我正在使用手动 jUnit Xml 文件测试 Jenkins jUnit 插件。我从控制台输出中得到以下信息
failed: Test reports were found but none of them are new. Did tests run?
我已经搜索了这个问题的解决方案,但没有一个能解决我的困惑。我尝试运行一个 shell 脚本。因为我对此很陌生(可能有很多错误)。这是我的一段 shell 脚本。
cd /Users/Shared/Jenkins/Home/jobs/jUnitReport
sudo visudo
Jenkins ALL = NOPASSWD: /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson7751940722564747051.sh
touch jUnit.xml
我真的不知道如何访问 Jenkins 来访问文件。(“失败:找到测试报告但都不是新的。测试运行了吗?”的解决方案之一)。
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="PerformanceTest" errors="0" skipped="0" tests="2" failures="1" time="10.74" timestamp="2016-05-24T10:23:58">
<testcase classname="PerformanceTest" name="testSmoothness" time="15" jank-percentage="75">
<failure message="Too many jank frames." />
</testcase>
<testcase classname="PerformanceTest" name="testResponseTime" time="1.3" response-time="0.3">
</testcase>
</testsuite>
</testsuites>
任何帮助将不胜感激。 谢谢!
最佳答案
(从我的评论中复制)
Source .有一个时间戳检查,但看起来它适用于文件时间戳(最后修改)并使用 3000(大概是毫秒)的抖动。 JUnit 插件忽略比当前构建的构建时间减去 3 秒更早的测试 XML 输出。如果测试运行和 JUnit 插件运行相隔超过 3 秒,插件将忽略这些文件。
关于linux - Jenkins 失败 : Test reports were found but none of them are new. 测试运行了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38780778/