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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With