【发布时间】:2016-05-03 12:52:13
【问题描述】:
我有一份 Jenkins 工作,将一些测试报告 (XML) 复制到本地并通过 xUnit 将它们转换为 JUnit 报告。
问题是没有失败或跳过的测试,但我总是得到
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to FAILURE
[xUnit] [INFO] - Stopping recording.
Finished: FAILURE
是什么原因造成的?
【问题讨论】:
-
有检测结果吗?如果没有结果,xUnit 发布者可能会配置为失败。这是您构建中唯一的 xUnit 输出吗?什么是构建配置?你有什么版本的 xUnit 插件?
-
@Dave Bacher 这是奇怪的部分。我确实有测试结果,这是相当大的文件集。在获得这些 xml 报告后,我尝试使用 xUnit 来发布它们。詹金斯的工作以前可以正常工作,但最近却失败了。我不知道发生了什么。
-
我遇到了同样的问题,我通过 Bash 脚本触发了单元测试的运行(以及 xml 结果文件的创建),脚本返回
1和 this 导致构建失败,[xUnit] [INFO] - Setting the build status to FAILURE行具有误导性,因为它没有将构建设置为失败,我的脚本的返回代码已经将构建设置为失败.我相信它只是反映构建的当前状态。 -
对我来说也是一样,在你的输出之前我还有 3 行。他们是
[xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing JUnit [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'nosetests.xml' relative to '/home/jenkins/workspace/mts-pipeline-quality' for the testing framework 'JUnit'.
标签: jenkins junit xunit threshold