rwinch / spring-ldap

Apache License 2.0
0 stars 0 forks source link

LDAP-284: Documentation for testing: in memory ldap #116

Open rwinch opened 10 years ago

rwinch commented 10 years ago

Original Reporter: matthewc Environment: Not Specified Version: 1.3.2 Migrated From: https://jira.spring.io//browse/LDAP-284 I was recently talking to a Spring developer about in memory directories for use with creating test cases in spring-ldap. I mentioned that nothing is found in the documentation. He told me that the recommended solution is to use ApacheDS and to please file a ticket, so that some examples could be added into the documentation. With our current implementation, we load up an in-memory directory, apply an LDIF to populate it with data, and run some tests. Prior to some of the tests, we do have to run modify LDIFs to change the directory for the specific tests we are about to run. (These implementations aren't using spring-ldap at the current time.) I would like to see examples of how to these kinds of operations with spring-ldap.

Some of our tests also modify the directory (create, update, delete tests). We use spring-jdbc to do something similar, but cheat using the transaction manager to roll the changes back once the test is complete. If this is possible, it would be great if this was documented also in this proposed testing section.

If some other method is better for doing integration tests of our DAO classes, I would be interested to see that documented instead. We are trying to use an approach where everything is testable and don't want to have to use live test servers to perform all of our testing, where we don't absolutely have to do so.