maven-surefire-plugin - 1 个特定测试的 testFailureIgnore
问题描述
我在 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>
推荐阅读
- c++ - 共享队列和 2 个线程
- sql-server - 报表生成器开关盒
- virtocommerce - vc-platform 3.58.0:platform.blades.modules-list.labels.manual-install-disabled
- hardware - Confluent 单节点的硬件要求
- python-3.x - AWS SAM 计划 Lambda 未按计划触发
- php - Yii2中的进程下载后返回引荐来源或刷新不起作用
- python-3.x - Python Turtle Graphics 窗口崩溃
- java - 防止 Firefox 在通过命令行 TaskKill 终止时崩溃?
- c++ - 为什么不能推导出这个模板参数?
- python - 为什么附加列表不能分配给变量?