为什么故障安全插件需要集成测试和验证目标? [英] Why failsafe plugin requires both integration-test and verify goals?
问题描述
我有下一个 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>
问题在于,当我实现 verify 目标时,即使每次测试失败,构建都会每次都成功.
The problem is that when I'm taking off verify goal then the build is every time successful even if there was test failures.
当我实现集成测试目标时,集成测试根本就不会运行
And when I'm Taking off integration-test goal the integration tests simply do not run
为什么故障安全插件需要集成测试和验证目标?
Why failsafe plugin requires both integration-test and verify goals?
推荐答案
在Maven Failsafe插件参考中,您可以找到简单的答案,为什么构建总是成功
In Maven Failsafe plugin reference you can find simple answer why 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 verify goal test results are not checked at all(but they are executed), so failsafe plugin requires integration-test goal to run tests, and verify to "verify" their results.
这篇关于为什么故障安全插件需要集成测试和验证目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!