我拼命想让maven failafe插件运行我的集成测试。
我已按如下方式配置插件:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<id>failsafe-itest</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skip>false</skip>
<includes>
<include>**/integration/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
我在以下包中有一个集成测试:
com.bignibou.tests.integration.repository.advertisement
但是,mvn-failsafe-plugin 无法提取。
我的include语法出了什么问题?
答案 0 :(得分:0)
更改为:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<configuration>
<skip>false</skip>
<includes>
<include>**/integration/**</include>
</includes>
</configuration>
<executions>
<execution>
<id>failsafe-itest</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skip>false</skip>
<includes>
<include>**/integration/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
对问题进行排序。
但是,我必须使用mvn failsafe:integration-test
运行插件本身才能运行集成测试并将单元测试短路!