Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Test Result Trend Graph Empty, but Tests Are Run

Where does the data that produces the "Test Result Trend" graph actually come from? I have a "Test Only" job that produces 2 files in target/surefire-reports. (Produced by maven) Inspecting the files directly shows that the tests are executing and passing.

The graph shows successful builds along x-axis but no test results. If I click on a specific build from the project page, it shows "(no tests)" next to the "Test Result" link.

Is there some sort of post-processing I need to do on the XML files? They are in JUnit format, produced by the maven-soapui-plugin.

Thanks!

like image 489
sceaj Avatar asked Oct 11 '11 19:10

sceaj


People also ask

How do I enable test result trend in Jenkins?

To get the resulting trend of Jenkins's job execution you just go into your project and click on the hyperlink trend which would be available just after build history. By doing this, you will get the result of the last 20 or 30 days which is again configurable.

Does Jenkins provide test report?

Jenkins understands the JUnit test report XML format (which is also used by TestNG). When this option is configured, Jenkins can provide useful information about test results, such as trends. The plugin also provides a generic API for other unit-test publisher plugins in Jenkins.


2 Answers

You need to check "Publish JUnit test result report" in the "Post Build Actions" section of your job configuration, and specify the location of the XML output from your JUnit tests.

like image 71
gareth_bowles Avatar answered Oct 02 '22 16:10

gareth_bowles


For me, I had this problem when I had the "Aggregate downstream test results" box ticked in the job configuration. Unticking it solved my problem (I can live without aggregate results).

like image 36
Phil Avatar answered Oct 02 '22 17:10

Phil