Jenkins xUnit Test Report

I have a Jenkins job to copy some test reports (XML) to local ones and convert them to JUnit reports via xUnit.

The problem is that there are no missed or missed tests, but I always get

[xUnit] [INFO] - Check 'Failed Tests' threshold. [xUnit] [INFO] - Check 'Skipped Tests' threshold. [xUnit] [INFO] - Setting the build status to FAILURE [xUnit] [INFO] - Stopping recording. Finished: FAILURE 

What causes this?

+8
junit jenkins xunit threshold
source share
1 answer

In my previous project, I had 3 development teams with 4 solutions, which together made up an integrated platform on one Jenkins Master.

I had 2 DOS batch files that were contained in the JenkinsScripts / subdirectory at the root of each solution. One of them was called CodeCoverage.bat (which provided OpenCover and ReportGenerator for monitoring unit tests), which in turn called the RunUnitTests.bat parameters.

In RunUnitTests.bat, a key string with many parameters is allowed:

 packages\xunit.runner.console.2.1.0\tools\xunit.console.exe <MyUnitTestProject.dll> -nologo -noshadow -nunit TestReports\TestResults.xml 

Consequently, I converted the XUnit XML result to a NUnit XML file and published the results using the NUnit plugin.

Since I used this approach, options have been improved for comparing XUnit and NUnit 3 XML with Jenits Jenkins (as I wish).

0
source share

All Articles