On Feb 5, 2007, at 8:37 AM, Alex Karasulu wrote:
<snip>

May I suggest a third solution? We might use tools like jmeter which are able to launch tests against a ldap server, playing full scenarios. The good part of it is that you can prepare the scenarios with a GUI, and save them as XML files to be replayed within maven (there is a maven-jmeter-plugin). The good points about this scenario that you only launch the server once, tests are easy to write and to maintain, and there is no more relation with the actual code base, so no huge refactoring to do in tests when modifying base classes like AttributeImpl.

This is a great idea but how do we get this to be part of the build process? Basically how do we get maven to launch a test server on startup that will be available for the entire run while tests operate on it?

This is a great idea if we can make maven do it.

1. quick easy way is to use junit TestSetup something like this

    public static Test suite() {
        return new TestSetup(new TestSuite(HOWLLogTest.class)) {
            protected void setUp() throws Exception {
                //start server
            }
            protected void tearDown() throws Exception {
                //stop server
            }
        };
    }

This will start the server before the tests in this class and stop it after they are all run. This way you can still have individual tests which is likely to promote code clarity.

2. look into maven integration test support or steal some of the geronimo test framework.

thanks
david jencks



Alex



<akarasulu.vcf>

Reply via email to