I added the maven-failsafe-plugin
to my project for runnig integration tests. When i run test
only unit tests are running and when i run integration-test
first unit tests and then integration tests are running.
It's all what i want so far but when i clean and build the project both unit tests and integration tests are running which i wouldn't prefer because i just don't want to prepare the environment for integration testing on every build. I clean and build the project for some generated source to regenerate and i don't want to run the integration test meanwhile.
Is there a way that i only run the integration tests on purpose not by any automation?
I added -DskipITs
flag clean install
command of maven so integration tests are not running when i make a call of clean and install.
And i created maven goals as integration-test
and verify
to run and verify the integration tests via the failsafe plugin
which i added to my pom.xml
.
As i'm using netbeans
as ide, i set the predefined maven commands via the actions tab of the project properties and i can run the integraion tests via right click to peoject and integration test sub menu under maven menu.