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

xUnit v1.30 fails with NullPointerException when parsing cppnit results

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: xunit-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      Latest xUnit v1.30 fails with NullPointerException when parsing cppunit xml results - regressing back to v1.29 resolves the issue.

      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing CppUnit-1.12.1 (default)
      [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 13 test report file(s) were found with the pattern 'build/**/cppunit.xml' relative to '/sandbox/trunk' for the testing framework 'CppUnit-1.12.1 (default)'.
      ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
      java.lang.NullPointerException
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133)
      	at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:162)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
      	at hudson.model.Run.run(Run.java:1429)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:230)
      

      Here is the xunit config from config.xml:

          <com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
            <types>
              <com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
                <pattern>build/**/cppunit.xml</pattern>
                <faildedIfNotNew>false</faildedIfNotNew>
                <deleteOutputFiles>true</deleteOutputFiles>
                <stopProcessingIfError>true</stopProcessingIfError>
              </com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
            </types>
          </com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
      

        Attachments

          Activity

          jalexand jalexand created issue -
          jalexand jalexand made changes -
          Field Original Value New Value
          Summary xUnit v1.30 fails with NullPointerException whenparsing cppnit results xUnit v1.30 fails with NullPointerException when parsing cppnit results
          Description Latest xUnit v1.30 fails with NullPointerException when parsing cppunit xml results - regressing back to v1.29 resolves the issue.

          {noformat}
          [xUnit] [INFO] - Starting to record.
          [xUnit] [INFO] - Processing CppUnit-1.12.1 (default)
          [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 13 test report file(s) were found with the pattern 'build/**/cppunit.xml' relative to '/sandbox/trunk' for the testing framework 'CppUnit-1.12.1 (default)'.
          ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
          java.lang.NullPointerException
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
          at hudson.model.Build$RunnerImpl.post2(Build.java:162)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
          at hudson.model.Run.run(Run.java:1429)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          {noformat}
          Latest xUnit v1.30 fails with NullPointerException when parsing cppunit xml results - regressing back to v1.29 resolves the issue.

          {noformat}
          [xUnit] [INFO] - Starting to record.
          [xUnit] [INFO] - Processing CppUnit-1.12.1 (default)
          [xUnit] [INFO] - [CppUnit-1.12.1 (default)] - 13 test report file(s) were found with the pattern 'build/**/cppunit.xml' relative to '/sandbox/trunk' for the testing framework 'CppUnit-1.12.1 (default)'.
          ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
          java.lang.NullPointerException
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:354)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:345)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.setBuildStatus(XUnitPublisher.java:330)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:133)
          at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:101)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
          at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
          at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:645)
          at hudson.model.Build$RunnerImpl.post2(Build.java:162)
          at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
          at hudson.model.Run.run(Run.java:1429)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:230)
          {noformat}

          Here is the xunit config from config.xml:

          {code:xml}
              <com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
                <types>
                  <com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
                    <pattern>build/**/cppunit.xml</pattern>
                    <faildedIfNotNew>false</faildedIfNotNew>
                    <deleteOutputFiles>true</deleteOutputFiles>
                    <stopProcessingIfError>true</stopProcessingIfError>
                  </com.thalesgroup.dtkit.metrics.hudson.model.CppUnitJunitHudsonTestType>
                </types>
              </com.thalesgroup.hudson.plugins.xunit.XUnitPublisher>
          {code}
          gbois Gregory Boissinot made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          weakcamel Waldek M made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          gbois Gregory Boissinot made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 142101 ] JNJira + In-Review [ 189971 ]

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              jalexand jalexand
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: