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

PHPUnit results xml fails to parse

    Details

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

      Description

      Here is the stack trace that I am getting:
      [xUnit] [INFO] - Starting to record.
      [xUnit] [INFO] - Processing PHPUnit-3.4 (default)
      [xUnit] [INFO] - [PHPUnit-3.4 (default)] - 1 test report file(s) were found with the pattern 'build/unit-tests.xml' relative to '/var/lib/jenkins/jobs/respond-COMMIT/workspace' for the testing framework 'PHPUnit-3.4 (default)'.
      [xUnit] [INFO] - Check 'Failed Tests' threshold.
      ERROR: Publisher com.thalesgroup.hudson.plugins.xunit.XUnitPublisher aborted due to exception
      java.lang.NumberFormatException: For input string: ""
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:470)
      at java.lang.Integer.parseInt(Integer.java:499)
      at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.convertToInteger(XUnitThreshold.java:60)
      at org.jenkinsci.plugins.xunit.threshold.XUnitThreshold.getResultThreshold(XUnitThreshold.java:76)
      at org.jenkinsci.plugins.xunit.threshold.FailedThreshold.getResultThreshold(FailedThreshold.java:33)
      at com.thalesgroup.hudson.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:357)
      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:238)

        Attachments

          Activity

          Hide
          inori Roman Marintsenko added a comment -

          I have same error (same stack trace too); if I go to build/logs/junit.xml manually I see junit.xml with generated data just fine

          Show
          inori Roman Marintsenko added a comment - I have same error (same stack trace too); if I go to build/logs/junit.xml manually I see junit.xml with generated data just fine
          Hide
          jarredzhong Jarred Zhong added a comment - - edited

          Found the workaround way to avoid this exception:

          Enter number in all the Failed and Error Thresholds fields instead of entering any strings or leave it empty in the configure page of the project.

          Show
          jarredzhong Jarred Zhong added a comment - - edited Found the workaround way to avoid this exception: Enter number in all the Failed and Error Thresholds fields instead of entering any strings or leave it empty in the configure page of the project.
          Hide
          hvosdrecomm Hans Vos added a comment -

          Same problem here. Also found that entering the threshold values solves it. You cannot leave those empty despite the field descriptions saying that you can.

          Show
          hvosdrecomm Hans Vos added a comment - Same problem here. Also found that entering the threshold values solves it. You cannot leave those empty despite the field descriptions saying that you can.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/xunit/threshold/XUnitThreshold.java
          http://jenkins-ci.org/commit/xunit-plugin/85851de358d8f53293265820998594bd09118ba9
          Log:
          Fix JENKINS-11908

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/xunit/threshold/XUnitThreshold.java http://jenkins-ci.org/commit/xunit-plugin/85851de358d8f53293265820998594bd09118ba9 Log: Fix JENKINS-11908
          Show
          gbois Gregory Boissinot added a comment - Fix available in http://maven.jenkins-ci.org:8081/content/repositories/releases/org/jenkins-ci/plugins/xunit/1.32/

            People

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

              Dates

              • Created:
                Updated:
                Resolved: