On my previous project I was running 3 development teams with 4 solutions that together consisted an integrated platform all on one Jenkins Master.
I had 2 DOS batch files that were held in a JenkinsScripts/ subdirectory at the root of each solution. One was called CodeCoverage.bat (which ensured OpenCover and ReportGenerator watched the unit tests) which in turn called RunUnitTests.bat passing parameters.
In RunUnitTests.bat the key line with many parameters resolved to:
packages\xunit.runner.console.2.1.0\tools\xunit.console.exe <MyUnitTestProject.dll> -nologo -noshadow -nunit TestReports\TestResults.xml
Hence, I was converting XUnit result XML to NUnit result XML and using the NUnit Plugin to publish the results.
Since I used this approach, the options for mapping of XUnit and NUnit 3 XML to Jenkins friendly JUnit (at my behest mind you) has improved.
1
and this was causing the build to fail, the line[xUnit] [INFO] - Setting the build status to FAILURE
was misleading because it wasn't setting the build to failure, the build was already set to failure by the return code of my script. I believe it is simply mirroring the current state of the build.[xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing JUnit [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'nosetests.xml' relative to '/home/jenkins/workspace/mts-pipeline-quality' for the testing framework 'JUnit'.