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

NullPointerException while parsing testng-results.xml files

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • testng-plugin
    • None

      Here is the stack :

      java.lang.NullPointerException
      at hudson.plugins.testng.results.MethodResultException.trySettingData(MethodResultException.java:57)
      at hudson.plugins.testng.results.MethodResultException.<init>(MethodResultException.java:25)
      at hudson.plugins.testng.parser.ResultsParser.finishException(ResultsParser.java:322)
      at hudson.plugins.testng.parser.ResultsParser.parse(ResultsParser.java:226)
      at hudson.plugins.testng.parser.TestParser.getResults(TestParser.java:88)
      at hudson.plugins.testng.parser.TestParser.testParseEmptyException(TestParser.java:79)

      It is because I have an empty full stacktrace, but no short ...

      I am going to fork on github to provide a patch with a testcase

          [JENKINS-12494] NullPointerException while parsing testng-results.xml files

          benoit guerin added a comment -

          benoit guerin added a comment - See https://github.com/jenkinsci/testng-plugin-plugin/pull/7

          Code changed in jenkins
          User: Benoit GUERIN
          Path:
          src/main/java/hudson/plugins/testng/results/MethodResultException.java
          src/test/java/hudson/plugins/testng/parser/TestParser.java
          src/test/resources/sample-testng-empty-exp.xml
          http://jenkins-ci.org/commit/testng-plugin-plugin/8d1ad3d9fccc0637cbf04fea05daf9ba4984da05
          Log:
          Testcase + fix for bug #JENKINS-12494

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Benoit GUERIN Path: src/main/java/hudson/plugins/testng/results/MethodResultException.java src/test/java/hudson/plugins/testng/parser/TestParser.java src/test/resources/sample-testng-empty-exp.xml http://jenkins-ci.org/commit/testng-plugin-plugin/8d1ad3d9fccc0637cbf04fea05daf9ba4984da05 Log: Testcase + fix for bug # JENKINS-12494

          Code changed in jenkins
          User: Nalin Makar
          Path:
          src/main/java/hudson/plugins/testng/results/MethodResultException.java
          src/test/java/hudson/plugins/testng/parser/TestParser.java
          src/test/resources/sample-testng-empty-exp.xml
          http://jenkins-ci.org/commit/testng-plugin-plugin/b8096130b9043cd9fa1a8d2e4b4346484869f15e
          Log:
          Merge pull request #7 from bguerin/master

          Fixed: JENKINS-12494 - NPE while parsing testng xml with empty full stacktrace and no short stacktrace (Benoit Guerin)

          Compare: https://github.com/jenkinsci/testng-plugin-plugin/compare/e886a21...b809613

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nalin Makar Path: src/main/java/hudson/plugins/testng/results/MethodResultException.java src/test/java/hudson/plugins/testng/parser/TestParser.java src/test/resources/sample-testng-empty-exp.xml http://jenkins-ci.org/commit/testng-plugin-plugin/b8096130b9043cd9fa1a8d2e4b4346484869f15e Log: Merge pull request #7 from bguerin/master Fixed: JENKINS-12494 - NPE while parsing testng xml with empty full stacktrace and no short stacktrace (Benoit Guerin) Compare: https://github.com/jenkinsci/testng-plugin-plugin/compare/e886a21...b809613

          nalin_makar added a comment -

          Thanks Benoit. will be fixed in v0.31

          nalin_makar added a comment - Thanks Benoit. will be fixed in v0.31

            nalin_makar nalin_makar
            falcon benoit guerin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: