我正在maven-surefire-plugin中寻找与testFailureIgnore类似的东西,仅在一项特定测试失败时才适用。有没有办法做到这一点?
基本上,它忽略了所有测试失败,我希望它忽略一个特定的失败。
答案 0 :(得分:0)
我在这里找到了答案:https://rmannibucau.metawerx.net/post/maven-surefire-debugging-execution
下面的示例:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>applicationcomposer</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<groups>com.github.rmannibucau.surefire.executions.Group1</groups>
<skip>${maven.test.skip}</skip>
<systemPropertyVariables>
<openejb.jul.forceReload>true</openejb.jul.forceReload>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>arquillian</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludedGroups>com.github.rmannibucau.surefire.executions.Group1</excludedGroups>
<skip>${maven.test.skip}</skip>
<systemPropertyVariables>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
<configuration>
<skip>true</skip>
<failIfNoTests>false</failIfNoTests>
<reuseForks>true</reuseForks>
<forkCount>1</forkCount>
</configuration>
</plugin>