Jenkins Error in Publishing NUnit Test Results

Topic Tools

Running Unit test is most common and essential practice of Build automation, however while publishing NUnit test results, you might get this error “ERROR: Step ‘Publish NUnit test result report’ aborted due to exception – Caused by: Could not transform the NUnit report”

You should have added the NUnit Test result report step as Post Build action

And once you run the job, it will throw error as below :

First you need to understand what exactly is causing the error :

Its not the Nunit report ( TestResult.xml )

Its not either your framework/installation/nunit3-console.exe

Software Configuration - Commonly Used Terms

Its the way Jenkins take this reports – Jenkins tries to transform the NUnit report to JUnit report since its understand only JUnit reports.

While doing that its using the defaul XLST file which is causing the issue.

What you can do ?

You can use the XSLT written by Paul Hicks. You can download it from this link (Make sure its properly copied with no spaces/extra words – use XML validator to validate)

Then instead of using Jenkins transformed file, use this new xslt file and add the below to NUnit3-console command



–result will tell Nunit to save result in the given name and

transform will transform the result as per Jenkins requirement.

Once done, just run the build again and this time you see the success


1 comment… add one
  • Lino Link Reply

    I am constantly looking online for articles that can facilitate me. Thank you!

Leave a Comment