Details

    • Similar Issues:

      Description

      Seeing this with the latest 1.5 version of the plugin. Looks similar to JENKINS-12494

      Saving reports...
      Processing '/x/eng/rtpbld00/scratch/smo/.jenkins/jobs/ocf_qa_merge_result/builds/2013-11-20_12-16-22/testng/testng-results.xml'
      java.lang.NullPointerException
      at hudson.plugins.testng.results.MethodResultException.trySettingData(MethodResultException.java:47)
      at hudson.plugins.testng.results.MethodResultException.<init>(MethodResultException.java:19)
      at hudson.plugins.testng.parser.ResultsParser.finishException(ResultsParser.java:351)
      at hudson.plugins.testng.parser.ResultsParser.parse(ResultsParser.java:229)
      at hudson.plugins.testng.TestNGTestResultBuildAction.loadResults(TestNGTestResultBuildAction.java:97)
      at hudson.plugins.testng.Publisher.perform(Publisher.java:109)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      at hudson.model.Run.execute(Run.java:1704)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:230)

      This testng file is a merge of 3 separate ones (the tree suite nodes in this one) each of which worked on its own. I'm not certain this is 100% proper expectation, but it seemed to work with an older version of the merging that we did.

        Attachments

          Activity

          Hide
          nullin Nalin Makar added a comment -

          Could you please attached the testng-results.xml that causes this issue?

          Show
          nullin Nalin Makar added a comment - Could you please attached the testng-results.xml that causes this issue?
          Hide
          nullin Nalin Makar added a comment -

          Thanks. I can reproduce this. Looking into it now.

          Show
          nullin Nalin Makar added a comment - Thanks. I can reproduce this. Looking into it now.
          Hide
          nullin Nalin Makar added a comment - - edited

          User error. You should be wrapping exception messages and stack traces in CDATA blocks. Following is an example of correct testng result XML:

          <testng-results>
            <reporter-output>
            </reporter-output>
            <suite name="Ant suite" duration-ms="44881" started-at="2011-05-05T00:59:00Z" finished-at="2011-05-05T00:59:45Z">
              <groups>
              </groups>
              <test name="Ant test" duration-ms="44881" started-at="2011-05-05T00:59:00Z" finished-at="2011-05-05T00:59:45Z">
                <class name="gov.nasa.jpl.FoobarTests">
                  <test-method status="PASS" signature="setUp()" name="setUp" is-config="true" duration-ms="1" started-at="2011-05-05T00:59:42Z" finished-at="2011-05-05T00:59:42Z">
                  </test-method>
                  <test-method status="FAIL" signature="b()" name="b" duration-ms="2035" started-at="2011-05-05T00:59:42Z" finished-at="2011-05-05T00:59:44Z">
                    <exception class="java.lang.AssertionError">
                      <message>
                        <![CDATA[Test <a href="https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/b/">b</a> did not generate the expected output. See files: <a href="https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/a.diff/*view*/">a.diff</a> for details.]]>
                      </message>
                      <full-stacktrace>
                        <![CDATA[java.lang.AssertionError: Test <a href="https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/b/">b</a> did not generate the expected output. See files: <a href="https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/a.diff/*view*/">a.diff</a> for details.
          	at org.testng.Assert.fail(Assert.java:89)
          	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          	at java.lang.reflect.Method.invoke(Method.java:597)
          	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
          	at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
          	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
          	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
          	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
          	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          	at java.lang.Thread.run(Thread.java:662)
          ]]>
                      </full-stacktrace>
                    </exception>
                  </test-method>
                </class&gt;
              </test>
            </suite>
          </testng-results>
          
          Show
          nullin Nalin Makar added a comment - - edited User error. You should be wrapping exception messages and stack traces in CDATA blocks. Following is an example of correct testng result XML: <testng-results> <reporter-output> </reporter-output> <suite name= "Ant suite" duration-ms= "44881" started-at= "2011-05-05T00:59:00Z" finished-at= "2011-05-05T00:59:45Z" > <groups> </groups> <test name= "Ant test" duration-ms= "44881" started-at= "2011-05-05T00:59:00Z" finished-at= "2011-05-05T00:59:45Z" > < class name= "gov.nasa.jpl.FoobarTests" > <test-method status= "PASS" signature= "setUp()" name= "setUp" is-config= " true " duration-ms= "1" started-at= "2011-05-05T00:59:42Z" finished-at= "2011-05-05T00:59:42Z" > </test-method> <test-method status= "FAIL" signature= "b()" name= "b" duration-ms= "2035" started-at= "2011-05-05T00:59:42Z" finished-at= "2011-05-05T00:59:44Z" > <exception class= "java.lang.AssertionError" > <message> <![CDATA[Test <a href= "https: //trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/b/" >b</a> did not generate the expected output. See files: <a href= "https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/a.diff /*view*/ " >a.diff</a> for details.]]> </message> <full-stacktrace> <![CDATA[java.lang.AssertionError: Test <a href= "https: //trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/b/" >b</a> did not generate the expected output. See files: <a href= "https://trumpet.jpl.nasa.gov/hudson/job/FooBar/637/artifact/test/artifacts/a.diff /*view*/ " >a.diff</a> for details. at org.testng.Assert.fail(Assert.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74) at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang. Thread .run( Thread .java:662) ]]> </full-stacktrace> </exception> </test-method> </ class& gt; </test> </suite> </testng-results>
          Hide
          netappbluedevil NetAppBlueDevil added a comment -

          Thanks. Just determined the same late Friday. The XSL we had to merge multiple result files was missing the information for the cdata-section attribute and was dropping the CDATA tags.

          Show
          netappbluedevil NetAppBlueDevil added a comment - Thanks. Just determined the same late Friday. The XSL we had to merge multiple result files was missing the information for the cdata-section attribute and was dropping the CDATA tags.

            People

            • Assignee:
              nullin Nalin Makar
              Reporter:
              netappbluedevil NetAppBlueDevil
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: