Jenkins NUnit report file not found

I run my NUnit tests on Jenkins but every time build step fails and i get this text:

Recording NUnit tests results FATAL: No NUnit test report files were found. Configuration error? Build step 'Publish NUnit test result report' marked build as failure Archiving artifacts Finished: FAILURE

It is actually caused by tests report files that cannot be found.

I added "Publish Nunit test result report" post-build action: "%WORKSPACE%\TestResults*.xml"

however jenkins cannot find it.

I checked if report file is created in my workspace and actually it is created in proper place so there should not be problem to read it.

Anyone knows how to solve this problem? I would be grateful for any help.

Can you try?

nunit testResultsPattern: 'TestResults.xml'

(without asterisk character) By default nunit xml is saved in the same directory as your Jenkins build project.

c# - Jenkins NUnit report file not found, Can you try? nunit testResultsPattern: 'TestResults.xml'. (without asterisk character) By default nunit xml is saved in the same directory as your  However because our build job is parameterised, we do not always generate test results, and there is no way to parameterise the "Public NUnit test result report" Post-build Action. It would make sense for there to be an advanced option that does not fail the build if no reports were found,

I solve this problem by change file destination from absolute path C:\Build\TestResults\MyTest.xml to relative TestResults\MyTest.xml.

I think Nunit plugin use relative path. You can go into the tab Workspace in your job and find this xml, then just copy path with your xml.

[JENKINS-11327] NUnit plugin: fails to find report files for nontrivial , > FATAL: No NUnit test report files were found. Configuration error? > Build step '​Publish NUnit test result report' marked build as failure. If I  When using the nunit-plugin, if the test result file is not found, the plugin reports  FATAL: No NUnit test report files were found.

As an alternative,

I am successfully using NUnit3 with the Jenkins NUnit plugin, by running the tests using a command line that includes: format=nunit2

Read more here

[JENKINS-11245] NUnit publish report function unable to access , FATAL: No NUnit test report files were found. Configuration error? Build step '​Publish NUnit test result report' marked build as failure. Is this a  JENKINS-51767 xUnit 2.x XSD does not validate NUnit 2.x XML report file. Fix original NUnit 2.x XSD file to validate the report file when there are test-suite and test-case alternate elements as children of a test-suite element.

c#: Jenkins NUnit report file not found, I run my NUnit tests on Jenkins but every time build step fails and i get this text:​Recording NUnit tests resultsFATAL: No NUnit test report files  Removed dependency of maven plugin, this will fix the issue not being a= ble to use the plugin with Hudson 1.296 (JENKINS-3427) Version 0.6. Plugin now merges JUnit and NUnit test results into one test report (JENKINS-1091) NUnit file report pattern can not cope with spaces in paths (JENKINS-1175) Version 0.5. Fixed so the plugin works on a

NUnit, This plugin transforms NUnit test reports so they can be recorded by Jenkins' JUnit features. NUnit file report pattern can not cope with spaces in paths (​JENKINS-1175) Removed exception throwing when no test reports could be found  Plugin now merges JUnit and NUnit test results into one test report (JENKINS-1091) NUnit file report pattern can not cope with spaces in paths ( JENKINS-1175 ) Version 0.5

NUnit Plugin - Jenkins, Fix issue when nunit xml file has a BOM (JENKINS-33493) Version 0.4. Removed exception throwing when no test reports could be found  The most recent comment on JENKINS-27043 seems to relate to the same issue but as that bug wasn't reported for the same reason I thought it would be best to create this as a stand-alone issue as it's quite specifically a compatibility problem with NUnit 3.

Comments
  • I think the NUnit plugin doesn't support environment variables in the file path. However, if the file is relative to the workspace, you should be able to omit %WORKSPACE%.
  • I even tried with absolute path but it is still not working