Why a fail-safe plugin requires both integration testing and goal verification

I have the following pom.xml

<project> ... <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>integration-test</id> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <configuration> <argLine>${failsafeArgLine}</argLine> <includes> <include>**/dmg/*IT.java</include> </includes> <skipTests>${skipTests}</skipTests> </configuration> </execution> </executions> </plugin> ... </project> 

The problem is that when I remove the goal of checking , the assembly is successful every time, even if testing fails.

And when I remove the integration test goal, integration tests just don't run

Why does a failover plugin require both integration checks and goal checks?

+5
source share
1 answer

In the Maven Failsafe plugin link you can find a simple answer why the build is always successful

 failsafe:integration-test runs the integration tests of an application. failsafe:verify verifies that the integration tests of an application passed. 

Without verification, the test results of the target are not checked at all (but they are executed), therefore, for a fail-safe plug-in, the goal of integration testing is required to run the tests and check the โ€œverificationโ€ of their results. p>

+5
source

Source: https://habr.com/ru/post/1204438/


All Articles