testFailureIgnore 用于 1 个特定测试
testFailureIgnore for 1 specific test
我正在 maven-surefire-plugin 中寻找类似于 testFailureIgnore 的东西,它仅在一个特定测试失败时才适用。有办法实现吗?
基本上它忽略了所有测试失败,我希望它忽略一个特定的失败。
我在这里找到了答案: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>
我正在 maven-surefire-plugin 中寻找类似于 testFailureIgnore 的东西,它仅在一个特定测试失败时才适用。有办法实现吗?
基本上它忽略了所有测试失败,我希望它忽略一个特定的失败。
我在这里找到了答案: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>