Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44077

NUnit plugin throws a NullReferenceException when parsing NUnit XML

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Not A Defect
    • Component/s: nunit-plugin
    • Labels:
    • Environment:
      Official Jenkins 2.46.2 Docker image
      NUnit plugin 0.20
      Unity3DBuilder plugin 1.3
    • Similar Issues:

      Description

      The NUnit plugin throws a NullReferenceException when attempting to parse the .xml report produced by Unity3D's test runner:

      Here is the actual error from our build logs:

      The job is run on a slave node running on Mac OS X 10.11.6. So far I have been unable to publish a single report with the NUnit plugin. I have confirmed that the NUnit plugin does find the report file, the failure happens after the parsing has started and a temporary-junit-reports folder has been created (containing a simple temp-junit.xml with barely no contents, see below)

        Attachments

          Issue Links

            Activity

            Hide
            slide_o_mix Alex Earl added a comment -

            Can you upload the xml files as attachments (with any secure information redacted of course). It looks like the XML output does not follow the NUnit3 output format, see https://github.com/nunit/docs/wiki/Test-Result-XML-Format#test-run

            Show
            slide_o_mix Alex Earl added a comment - Can you upload the xml files as attachments (with any secure information redacted of course). It looks like the XML output does not follow the NUnit3 output format, see  https://github.com/nunit/docs/wiki/Test-Result-XML-Format#test-run
            Hide
            thesymbolat Atso Sariola added a comment -

            Here's the xml report
            report.xml

            Unity3D test reports are generated by NUnit version 2.6.4, anything newer than that is sadly not an option for us. Online resources seem to indicate that people have been using the NUnit plugin successfully with these reports before. Has the support for pre-NUnit3 reports been dropped from the plugin?

            Show
            thesymbolat Atso Sariola added a comment - Here's the xml report report.xml Unity3D test reports are generated by NUnit version 2.6.4, anything newer than that is sadly not an option for us. Online resources seem to indicate that people have been using the NUnit plugin successfully with these reports before. Has the support for pre-NUnit3 reports been dropped from the plugin?
            Hide
            slide_o_mix Alex Earl added a comment -

            Nope, no support has been dropped.

            Show
            slide_o_mix Alex Earl added a comment - Nope, no support has been dropped.
            Hide
            slide_o_mix Alex Earl added a comment -

            Was this working at some point before? The xml file you uploaded doesn't follow the normal NUnit 2 XML format. Usually there is a <test-results> root node.

            Show
            slide_o_mix Alex Earl added a comment - Was this working at some point before? The xml file you uploaded doesn't follow the normal NUnit 2 XML format. Usually there is a <test-results> root node.
            Hide
            thesymbolat Atso Sariola added a comment -

            It turns out Unity3D updated their NUnit version to 3.0 and graciously forgot to mention it in their changelog. This doesn't really answer any questions though, as the produced XML indeed does seem to be invalid, for both NUnit2 and NUnit3 formats.
            At this point I'm leaning towards this being a bug in Unity3D, which means this issue is invalid and can be closed.

            Show
            thesymbolat Atso Sariola added a comment - It turns out Unity3D updated their NUnit version to 3.0 and graciously forgot to mention it in their changelog. This doesn't really answer any questions though, as the produced XML indeed does seem to be invalid, for both NUnit2 and NUnit3 formats. At this point I'm leaning towards this being a bug in Unity3D, which means this issue is invalid and can be closed.
            Hide
            slide_o_mix Alex Earl added a comment -

            Please keep me posted if you file an issue against Unity, there are a couple other people who have submitted similar issues with similar problems with Unity and I want to make sure that I keep on top of any changes that might need to be made.

            Show
            slide_o_mix Alex Earl added a comment - Please keep me posted if you file an issue against Unity, there are a couple other people who have submitted similar issues with similar problems with Unity and I want to make sure that I keep on top of any changes that might need to be made.
            Hide
            thesymbolat Atso Sariola added a comment -

            The issue has been reported for unity here. I'll close this issue now as it doesn't seem to be an issue with the NUnit plugin. Thank you for the help nevertheless!

            Show
            thesymbolat Atso Sariola added a comment - The issue has been reported for unity here . I'll close this issue now as it doesn't seem to be an issue with the NUnit plugin. Thank you for the help nevertheless!

              People

              • Assignee:
                slide_o_mix Alex Earl
                Reporter:
                thesymbolat Atso Sariola
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: