我为 Maven 故障安全插件配置了以下配置来运行我的集成测试(基于故障安全使用文档中的文档:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
当我尝试使用以下方法运行单个测试时:
mvn -Dit.test=MyLovelyTest failsafe:integration-test
它没有运行我的测试。它随着消息而死:No tests were executed
如果我删除 的execution
定义verify
,那么它会按预期执行测试。由于我从官方使用文档中复制了插件def,我想知道插件中是否存在错误,还是我做错了什么?