Have you considered running your application test as a unit test? Then
you can use the existing maven test infrastructure, conventions, and tools.
If your application is managed using a dependency-injection-based
framework such as spring, and your test tool can be used
programmatically, you can run your entire test using mock objects to
mediate access. Nothing hits the network. See for example
GeoServerTestSupport:
https://svn.codehaus.org/geoserver/trunk/src/main/src/test/java/org/geoserver/test/GeoServerTestSupport.java
https://svn.codehaus.org/geoserver/trunk/src/main/src/test/java/org/geoserver/test/GeoServerAbstractTestSupport.java
This example uses JUnit 3, but one-time fixture setup is even easier in
JUnit 4 using @BeforeClass. Every instance is a complete, running
GeoServer, except for listening on the network. All tests are mock requests.
A big advantage of using mock objects to avoid network connections is
that your tests will not mysteriously fail when something else is using
your server network ports.
Kind regards,
Ben.
On 11/05/10 11:16, AnshuGupta wrote:
We are using Maven as the build automation tool. The build process generates
a jar file. The requirement here is to start execution of the java
application which will be generated by the build - Wait for a few seconds
to let the application start completely and then move onto the test phase,
which will perform start a test tool (SoapUI) that will issue soap calls
against the java application that was just started.
We tried using the exec plugin, to start the java application. However, when
we moved onto the test phase, the java application terminated. Also, we
couldn't figure out how to introduce a delay before the start of the soapUI
tests.
What will be the best way to achieve the above?
--
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]