2
votes

I'm working with a maven project, and are trying to run only the integration tests, while skipping unit tests.

I'm running the integration tests using failsafe plugin, and the plugin execution is bound to the integration-test phase.

Is there any way I can run only the integration tests, while skipping the unit tests (which are run via surefire).

My googling led to a page that shows me how to do the opposite.

1

1 Answers

1
votes

If you want to skip the test you have two choices:

mvn -Dskip=true ...

which will not compile the tests nor execute them (logical ;-)). The other option is just to skip the execution of the tests but doesn't skip the compilation of the tests

mvn -DskipTests=true ...

But you can't skip the test lifecycle phase in Maven.