Ideally integration test should be created in a separate bundle. Hence the below steps should be done on the integration test pom. Ie unhcr.it.tests/pom.xml.
Ideally during the build, integration test should not be executed but unit test can be executed.
Steps to exclude integration tests by default.
1. Exclude integration test from maven-surefire-plugin plugin(plugin for unit tests)
2. In maven-failsafe-plugin include IT test.
<configuration>
<skipITs>true</skipITs>
<includes>
<include>**/*ITTest.java</include>
</includes>
</ configuration>
4. This will allow you to run with tests disabled by default and to run them with this command:
mvn install -DskipITs=false
No comments:
Post a Comment