Reputation: 517
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.
Upvotes: 5
Views: 5801
Reputation: 728
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.
Upvotes: 3
Reputation: 91
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.
Upvotes: 1
Reputation: 1
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
Upvotes: -1