Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins failed: Test reports were found but none of them are new. Did tests run?

I'm testing the Jenkins jUnit plugin with a manual jUnit Xml file. And I get following info from console output

failed: Test reports were found but none of them are new. Did tests run?

I've searched the solution for this problem but none of them solve my confuse. I try to run a shell script. Since I'm pretty new to this(might have a lot of errors). Here is a piece of my shell script.

cd /Users/Shared/Jenkins/Home/jobs/jUnitReport
sudo visudo
Jenkins ALL = NOPASSWD: /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson7751940722564747051.sh
touch jUnit.xml

I don't really know how to access Jenkins to touch the file.(one of the solution to "failed: Test reports were found but none of them are new. Did tests run?").

<?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>

Any help will be appreciated. Thank You!

like image 981
wadestrikers Avatar asked Aug 05 '16 03:08

wadestrikers


1 Answers

(copied from my comment)

Source. There is a timestamp check but looks like it works on file timestamps (last modified) and uses a jitter of 3000 (presumably milliseconds). The JUnit plugin is ignoring test XML output that is older than the buildtime of the current build minus 3 seconds. If the test run and the JUnit plugin run are more than 3 seconds apart, the plugin will ignore the files.

like image 198
Stefan Hanke Avatar answered Nov 15 '22 06:11

Stefan Hanke