仅当测试失败次数发生变化时,我才能让Jenkins失败一次构建吗? [英] How can I have Jenkins fail a build only when the number of test failures changes?

查看:84
本文介绍了仅当测试失败次数发生变化时,我才能让Jenkins失败一次构建吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经定制了包含其自己的phpunit测试套件的产品.在Jenkins中,我有两个作业设置:第一个作业运行我们自己的测试套件,该套件涵盖我们的自定义设置,第二个作业运行现有的核心单元测试.

We've customized a product which includes their own phpunit test suite. In Jenkins, I have two jobs setup: the first runs our own test suite that covers our customizations, and the second job runs the existing core unit tests.

核心单元测试并非设计为在定制版本上运行,因此预期会失败.在〜5000个测试中,有81个失败.我要在Jenkins中进行设置的是,仅当失败测试的数量与以前的版本相比有所变化时,才将该版本标记为失败.

The core unit tests were not designed to be run on a customized version, so failures are expected. Out of the ~5000 tests, 81 fail. What I'd like to setup in Jenkins, is have the build marked as a failure only if the number of failed tests changes from the previous build.

我看过Performance插件,但是文档似乎很少,我正在尝试找到与我们的用例匹配的东西.

I've looked at the Performance plugin but the documentation seems sparse and I'm trying to find something that matches our use case.

有什么建议吗?

推荐答案

您应该看看插件 https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin

它处理过分机制(我在团队开发时为xunit插件指定了此要求)

It handle a threasolding mechanism (I specified this requirement for the xunit plugin when my team developed it )

期望这会有所帮助. 但是您想将失败与变更联系起来.... 嗡嗡声可能更复杂..不得不问..是否应该开发这种东西.

expect this helps.. But you want to associates the failure to a change .... Hum maybe more complex .. have to ask .. if such thing should be developped.

这篇关于仅当测试失败次数发生变化时,我才能让Jenkins失败一次构建吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆