On Thu, Jun 12, 2008 at 2:13 PM, Kathryn Huxtable
<[EMAIL PROTECTED]> wrote:

> The test suite uses a user-supplied LDAP directory and two HSQL databases.
> It would be nice if before running the tests Maven could start up the
> databases from initial settings and make sure LDAP was running on localhost.
> Then it would be nice if it could shut down the databases and (possibly)
> LDAP after all the tests have been run.
>
> I can easily see via standard JUnit processes how to do this for each test,
> but I'd prefer to do it globally.

Since it's JUnit, look at the TestSetup class, which wraps an entire
suite of tests.

Here's an example of a TestSetup class that uses Cargo to start and
stop Tomcat for the tests.  If you already have the code to start and
stop your LDAP server and database, you could do the same thing.
http://svn.apache.org/repos/asf/shale/framework/trunk/shale-test/src/main/java/org/apache/shale/test/cargo/CargoTestSetup.java

Geoffrey also mentioned Cargo... not incidentally, it's always been
intended as a generic container manipulation tool, so having it stop
and start databases and ldap servers would be great. It's just that no
one has done it yet. :)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to