I've created a project that runs integration-tests on 3 web services. There's a project for each integration-test p开发者_如何学JAVAer web-service. I want all 3 integration-test projects to be run when executing the parent pom (outside of the 3 integration projects).
I've got the modules up and running but since each module deploys a WAR to its jetty instance, I have issues with port binding. The port is already in use since the first jetty instance isn't stopped before executing the next module.
My temporary solution is to bind to a different port for each of the projects by using the SelectChannelConnector, but a better solution would be that each jetty instance is shut down as soon as each module finishes. Is this possible?
Each module binds to the package (assembly), pre-integration-test (deploy war to jetty) and integration-test phase (runs SoapUI tests).
Any help is greatly appreciated.
I would merge all integration tests into a single module and use Cargo to start a container (jetty might be just fine) and deploy all required applications on it during pre-integration-test, run the soapui tests during integration-tests and stop the container during post-integration-test.
Related question
- How to make jetty-maven-plugin deploy a war that is retrieved from a repository?
See also
- Functional testing with Maven, Cargo and Selenium
- Maven2 cargo plugin and integration test
精彩评论