linux - Jenkins 失败 : Test reports were found but none of them are new. 测试运行了吗?

标签 linux bash jenkins junit report

我正在使用手动 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/

相关文章:

jenkins - 从与当前管道源相同的分支加载 Jenkins 共享库

android - Jenkins:无法解析com.android.tools.build:gradle:2.2.2

bash - 带负参数的 LDAP 搜索

linux - 从 shell 脚本中的另一个变量创建一个变量

node.js - Jenkins 上的 `npm install` 输出

linux - 使用 perl 更新 Conf 文件

linux - 在没有 CD 更改目录的情况下运行 PHP Artisan

Linux 内核架构支持时间表

c - 在 Unix 上使用套接字在 C 中发送和接收文件(服务器/客户端)

bash - 为什么这个 bash 脚本在比较之前添加一个字母?