jenkins - 标记詹金斯构建不稳定
问题描述
即使只有一个测试用例失败,我的构建也会被标记为失败。在那种情况下,我想让它不稳定。正如我所读到的,它取决于用于执行构建的插件。在 Jenkins wiki 我也发现了类似的东西:
如果构建成功并且一个或多个发布者报告它不稳定,则构建是不稳定的。例如,如果配置了 JUnit 发布者并且测试失败,则构建将被标记为不稳定。
我使用了带有 HTMLReporter 的 maven surefire 插件作为发布者:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>src\test\java\testCases\scenarios\${tests}</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter, org.uncommons.reportng.JUnitXMLReporter</value>
</property>
</properties>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
解决方案
推荐阅读
- java - 将 toPandas() 与 PySpark 一起使用时,如何避免 java.io.StreamCorruptedException: invalid stream header: 204356EC?
- database-design - 数据库设计 - 将订单数据库表拆分为买入/卖出
- timestamp - 如何在 ASP 经典中捕获窗口断开连接的时间戳
- ios - Swift iOS AudioKIt:呈现模态视图会导致音频爆裂
- c - 从 C 中的外部文件中扫描多行文本
- matplotlib - mplot3d Axes3D.contour()中参数stride的意义是什么?
- snowflake-cloud-data-platform - 如何找出阶段用于清理的存储空间
- square-connect - 先生,如何在反应中整合付款
- c# - Entity Framework 复合主键和外键
- javascript - 试图通过Javascript添加假点击ul li项目