The Maven lifecycle has four phases for running integration tests:
- pre-integration-test for setting up the integration test environment.
- integration-test for running the integration tests.
- post-integration-test for tearing down the integration test environment.
- verify for checking the results of the integration tests.
The Failsafe Plugin generates reports in 2 different file formats:
- Plain text files (*.txt)
- XML files (*.xml)
By default, these files are generated at ${basedir}/target/failsafe-reports.
The Failsafe Plugin has only 2 goals:
- failsafe:integration-test runs the integration tests of an application.
- failsafe:verify verifies that the integration tests of an application passed.
<profile>
<id>integration-test</id>
<build>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
No comments:
Post a Comment