Could not transform the NUnit report

30 November 2014

I was stumped by my idiocy on this issue! I spent a couple of hours scratching my head wondering why my NUnit publishing step failed.

Here is my stack trace.

Recording NUnit tests results
ERROR: Publisher hudson.plugins.nunit.NUnitPublisher aborted due to exception
hudson.util.IOException2: Could not transform the NUnit report. Please report this issue to the plugin author
    at hudson.plugins.nunit.NUnitArchiver.invoke(
    at hudson.plugins.nunit.NUnitArchiver.invoke(
    at hudson.FilePath.act(
    at hudson.FilePath.act(
    at hudson.plugins.nunit.NUnitPublisher.perform(
    at hudson.tasks.BuildStepMonitor$3.perform(
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(
    at hudson.model.Build$BuildExecution.post2(
    at hudson.model.AbstractBuild$
    at hudson.model.Run.execute(
    at hudson.model.ResourceController.execute(
Caused by: org.xml.sax.SAXParseException; systemId: file:/E:/JenkinsServer/jobs/Cols-Test/workspace/temporary-junit-reports/temp-junit.xml; lineNumber: 8; columnNumber: 3; Premature end of file.
    at Source)
    at Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at hudson.plugins.nunit.NUnitReportTransformer.splitJUnitFile(
    at hudson.plugins.nunit.NUnitReportTransformer.transform(
    at hudson.plugins.nunit.NUnitArchiver.invoke(
    ... 13 more
Finished: FAILURE

My Test report XMLs fileset was like **/TestResults/*.*/xml. It happens this path is quite wide and included some JUnit reports which are a different format than NUnit causing this failure. My .NET project was pulling in a library for which I accidentally committed the test reports (not added to .gitignore).


.NET CI Jenkins-CI NUnit Testing