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

xUnit plugin fails to parse NUnit 2 report format generated by NUnit 3.6.0.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
    • Environment:
      Jenkins & Agents: Windows 2012R2 64 bit
      Jenkins 2.124
      xUnit: 2.0.0
    • Similar Issues:

      Description

      We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

      We're parsing as "nUnit-2 (default)".

      The build log reports:

      09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
      09:22:03 ERROR: Failed to parse POMs
      09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
      

      The slaves errorlog reports:

      INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
      Error on line 59 
        XPTY0004: A sequence of more than one item is not allowed as the first argument of
        substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON") 
        at xsl:for-each (#53)
           processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
        at xsl:for-each (#51)
           processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
        in built-in template rule
      org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
      

      and

      Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON") 
      

      See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

      I think it has problems handling test-runs where no tests were actually run.

      Reverting to 1.104 of the xUnit plugin fixes the problem.

        Attachments

        1. buildlog.txt
          7 kB
        2. jenkins-slave.err.log
          5 kB
        3. TestResults.xml
          6 kB

          Issue Links

            Activity

            jjvdgeer Jan-Jaap van der Geer created issue -
            jjvdgeer Jan-Jaap van der Geer made changes -
            Field Original Value New Value
            Attachment buildlog.txt [ 42693 ]
            Attachment jenkins-slave.err.log [ 42694 ]
            Attachment TestResults.xml [ 42695 ]
            jjvdgeer Jan-Jaap van der Geer made changes -
            Description We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.
            We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            The build log reports:
            {code}
            09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
            09:22:03 ERROR: Failed to parse POMs
            09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
            {code}

            The slaves errorlog reports:
            {code}
            INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
            Error on line 59
              XPTY0004: A sequence of more than one item is not allowed as the first argument of
              substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
              at xsl:for-each (#53)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
              at xsl:for-each (#51)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
              in built-in template rule
            org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
            {code}

            and

            {code}
            Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
            {code}

            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.
            jjvdgeer Jan-Jaap van der Geer made changes -
            Description We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            The build log reports:
            {code}
            09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
            09:22:03 ERROR: Failed to parse POMs
            09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
            {code}

            The slaves errorlog reports:
            {code}
            INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
            Error on line 59
              XPTY0004: A sequence of more than one item is not allowed as the first argument of
              substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
              at xsl:for-each (#53)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
              at xsl:for-each (#51)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
              in built-in template rule
            org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
            {code}

            and

            {code}
            Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
            {code}

            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.
            We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            The build log reports:
            {code:java}
            09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
            09:22:03 ERROR: Failed to parse POMs
            09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
            {code}
            The slaves errorlog reports:
            {code:java}
            INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
            Error on line 59
              XPTY0004: A sequence of more than one item is not allowed as the first argument of
              substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
              at xsl:for-each (#53)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
              at xsl:for-each (#51)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
              in built-in template rule
            org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
            {code}
            and
            {code:java}
            Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
            {code}
            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.

            Reverting to 1.104 of the xUnit plugin fixes the problem.
            jjvdgeer Jan-Jaap van der Geer made changes -
            Description We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            The build log reports:
            {code:java}
            09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
            09:22:03 ERROR: Failed to parse POMs
            09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
            {code}
            The slaves errorlog reports:
            {code:java}
            INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
            Error on line 59
              XPTY0004: A sequence of more than one item is not allowed as the first argument of
              substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
              at xsl:for-each (#53)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
              at xsl:for-each (#51)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
              in built-in template rule
            org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
            {code}
            and
            {code:java}
            Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
            {code}
            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.

            Reverting to 1.104 of the xUnit plugin fixes the problem.
            We upgraded our xUnit plugin from 1.104 to 2.0.0. After that the builds started to fail. The failure is in the last part of the build and seems to have to do with parsing of the unittest-results.

            We're parsing as "nUnit-2 (default)".

            The build log reports:
            {code:java}
            09:22:03 [xUnit] [ERROR] - Conversion error Error to convert the input XML document
            09:22:03 ERROR: Failed to parse POMs
            09:22:03 java.io.IOException: remote file operation failed: C:/jks/ws/Classic-AMIS_2.50.X_Build at hudson.remoting.Channel@d1a67e:JNLP4-connect connection from chdev1074.intern.csam.no/10.14.80.130:61390: java.io.IOException: Failed to deserialize response to UserRequest:org.jenkinsci.plugins.xunit.service.XUnitTransformer@14b5f21: java.lang.SecurityException: Rejected: net.sf.saxon.expr.CardinalityChecker; see https://jenkins.io/redirect/class-filter/
            {code}
            The slaves errorlog reports:
            {code:java}
            INFO: [xUnit] - [NUnit-2 (default)] - 14 test report file(s) were found with the pattern '**/target/TestResults.xml' relative to 'C:\jks\ws\Classic-AMIS_2.50.X_Build' for the testing framework 'NUnit-2 (default)'.
            Error on line 59
              XPTY0004: A sequence of more than one item is not allowed as the first argument of
              substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
              at xsl:for-each (#53)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]
              at xsl:for-each (#51)
                 processing /test-results/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[1]/results[1]/test-suite[3]/results[1]/test-case[1]
              in built-in template rule
            org.jenkinsci.plugins.xunit.exception.XUnitException: Conversion error Error to convert the input XML document
            {code}
            and
            {code:java}
            Caused by: net.sf.saxon.s9api.SaxonApiException: A sequence of more than one item is not allowed as the first argument of substring() ("TMService.UnitTests.TMServiceT...", "_IGNOREREASON")
            {code}
            See the enclosed buildlog and jenkins-slave.err.log extract. I've also included the problematic TestResults.xml file (created by NUnit Console 3.8.0).

            I think it has problems handling test-runs where no tests were actually run.

            Reverting to 1.104 of the xUnit plugin fixes the problem.
            jjvdgeer Jan-Jaap van der Geer made changes -
            Environment Jenkins & Agents: Windows 2012R2 64 bit
            xUnit: 2.0.0
            Jenkins & Agents: Windows 2012R2 64 bit
            Jenkins 2.124
            xUnit: 2.0.0
            oleg_nenashev Oleg Nenashev made changes -
            Labels JEP-200
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue duplicates JENKINS-51465 [ JENKINS-51465 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue duplicates JENKINS-51556 [ JENKINS-51556 ]
            nfalco Nikolas Falco made changes -
            Summary xUnit plugin cannot parse testresults since upgrading to 2.0.0 xUnit plugin fails to parse NUnit 2 report format generated by NUnit 3.6.0.0
            nfalco Nikolas Falco made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jjvdgeer Jan-Jaap van der Geer made changes -
            Attachment buildlog.txt [ 42693 ]
            jjvdgeer Jan-Jaap van der Geer made changes -
            Attachment buildlog.txt [ 43906 ]

              People

              • Assignee:
                nfalco Nikolas Falco
                Reporter:
                jjvdgeer Jan-Jaap van der Geer
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: