Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins tests reports analyzer integration with catch

I've recently started working with Jenkins to automatically build my c++ project and run my tests (I'm using catch.cpp).

I wanted some sort of a table of test run time and status and that led me to the "Test Results Analyzer" Plugin for Jenkins.

I have my builds run like this: running the tests

And you can see they actually run in the console output: build console output

finally, my test results analyzer plugin shows nothing: no tests on the plugin page

It looks like the plugin does not recognize that these are my tests. Which is reasonable since I've only told jenkins to execute these commands and i don't think it's smart enough to understand these are the tests to report. But i could not find how to tell "Test Reports Analyzer" what are the tests it needs to report.

My question is how do i get a table of tests like in the Plugins webpage:

Tests Reports Analyzer

Solution:

Jenkins needs a Junit format xml file of the test results.

specifically, in Catch.cpp this is achieved by the "-r junit" command line option.

after this i needed to configure jenkins to "Publish JUnit test result report" post-build action and git it a path to the output xml file i create with my "make test" command.

like image 429
amit levin Avatar asked May 16 '16 10:05

amit levin


1 Answers

Solution provided by OP:

Jenkins needs a Junit format xml file of the test results.

specifically, in Catch.cpp this is achieved by the "-r junit" command line option.

after this i needed to configure jenkins to "Publish JUnit test result report" post-build action and git it a path to the output xml file i create with my "make test" command.

like image 183
walsht Avatar answered Oct 05 '22 14:10

walsht