达到阈值时如何修复不稳定的构建?

编程入门 行业动态 更新时间:2024-10-09 17:26:02
本文介绍了达到阈值时如何修复不稳定的构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的总体覆盖范围已达到阈值,但仍将构建标记为不稳定.有人知道原因吗?

My overall coverage is meeting the threshold, but still build is marked as Unstable. Does anyone know the reason for this?

16:53:04 [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=75, maxClass=99, minMethod=75, maxMethod=99, minLine=75, maxLine=99, minBranch=40, maxBranch=99, minInstruction=65, maxInstruction=99, minComplexity=0, maxComplexity=99] 16:53:04 [JaCoCo plugin] Publishing the results.. 16:53:04 [JaCoCo plugin] Loading packages.. 16:53:04 [JaCoCo plugin] Done. 16:53:04 [JaCoCo plugin] Overall coverage: class: 89, method: 89, line: 77, branch: 41, instruction: 67 16:53:04 [JaCoCo plugin] Health thresholds: JacocoHealthReportThresholds [minClass=75, maxClass=99, minMethod=75, maxMethod=99, minLine=75, maxLine=99, minBranch=40, maxBranch=99, minInstruction=65, maxInstruction=99, minComplexity=0, maxComplexity=99] 16:53:04 [JaCoCo plugin] Apply Min/Max thresholds result: UNSTABLE

Jacoco报告

推荐答案

好吧,根据我发现的链接,覆盖范围应同时超过最小和最大覆盖范围.

Ok, according to links I found, the coverage should be ABOVE both minimum and maximum coverage.

查看链接 issues.jenkins-ci/browse/JENKINS-16903 —报告相同的意外行为.

See the links issues.jenkins-ci/browse/JENKINS-16903 — reporting the same unexpected behaviour.

groups .google/forum/#!topic/jenkins-jacoco-plugin-mailing-list/pzHm98RJjB8/discussion -这是最终声明的规则:

groups.google/forum/#!topic/jenkins-jacoco-plugin-mailing-list/pzHm98RJjB8/discussion — here the rule it is finally declared:

配置的最大阈值高于实际覆盖范围.如果覆盖率低于最小值,则构建失败; 如果覆盖率低于最大值,则构建不稳定,如果覆盖率高于则表明成功.

从第二个主题看来,仅指定一个阈值(或仅最小阈值)似乎不起作用.因此,建议您尝试将最小值和最大值都设置为预期的最小值.

It also seems from the second topic that specifying only one threshold (or only minimum) does not work. Therefore I'd recommend you to try setting both min and max to your expected minimum.

更多推荐

达到阈值时如何修复不稳定的构建?

本文发布于:2023-10-16 14:12:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497800.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阈值   不稳定

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!