Ralph
Ralph

Reputation: 120871

How to execute the Maven Integration-Test Lifecyle phase twice

I want to execute the complete Maven Integration-Test Lifecyle (pre-integration-test, integration-test, post-integration-test) twice.

I use the cargo-maven2-plugin to start a tomcat in pre-integration-test phase and shut it down in post-integration-test. In between (in integration-test) I use maven-failsafe-plugin to run the integration test.

The problem is that I have two different server configurations (that can be tested with the same integration test). And I need to test them both. But I do not have the resource to run both servers in parallel. So I need to repeat the complete integration test twice:

Does anybody has an idea how to modify the maven lifecyle in this way?

Upvotes: 2

Views: 257

Answers (1)

khmarbaise
khmarbaise

Reputation: 97527

Simple solution make two separate modules which contain the configuration for the integration tests and that should do the trick.

Upvotes: 1

Related Questions