简体   繁体   English

如何让maven在测试失败时不会失败

[英]How to get maven not to fail a build when it fails a test

I'm working on creating a reporting mechanism for tests and I want it to execute after all of the tests are run, and the resulting junit xml files are written out. 我正在为测试创建一个报告机制,我希望它在所有测试运行后执行,并且会写出生成的junit xml文件。 Unfortunately, it doesn't appear that the executing continues after it fails in the test phase. 不幸的是,在测试阶段失败后似乎没有继续执行。 Does anybody know what Maven configuration I could use to get the desired result if possible. 有人知道我可以使用什么Maven配置来获得所需的结果。 Many Thanks. 非常感谢。

May be this helps? 可能这有帮助吗?

 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <testFailureIgnore>true</testFailureIgnore>
        </configuration>
      </plugin>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当任何JUnit测试失败时,如何让构建失败? - How to let the build fail, when any JUnit test fails? 当单元测试覆盖率低于多模块项目中的预配置限制时,maven将失败构建 - maven fail build when unit test coverage fails below a pre-configured limit in a multimodule project 如果junit测试失败,如何停止Maven构建? - How to stop a maven build, if a junit test fails? maven - 当单元测试耗时太长时失败 - maven - fail build when unit test takes too long Maven 在达到测试超时时肯定会失败构建,即使失败设置为 true - Maven sure fail build when a test timeout is reached even when fail-on-end set to true 如何让 Java maven 构建因编译器警告而失败? - How do I get a Java maven build to fail for compiler warnings? 如果python脚本出现任何错误,如何使maven构建失败 - How to fail maven build if python script get any error 当存在某些依赖项时,maven 构建如何失败? - How can a maven build fail when certain dependencies are present? 当 testng 测试失败时 mvn build 失败 - mvn build fail when testng test fail 当任何 PIT 突变失败而不是突变覆盖时,maven 构建可能会失败吗? - Possible to fail maven build when any PIT mutation fails, rather than mutation coverage?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM