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

java.lang.NullPointerException when publish JUnit.xml result to Zephyr for Jira

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Ubuntu 14.04.05 x64
      Jenkins 2.32.3
      zephyr-for-jira-test-management 1.4

      I have a Robot Framework test result file "output.xml",
      and I convert this test result file into JUnit format by command below in Build step:

      rebot -x junit.xml -l NONE -r NONE output.xml 
      

      Under Post-Build, I have 2 post-build actions (refer to file Selection_003.png):
      1. Publish Junit test result report
      2. Publish test result to Zephyr for JIRA

      And I'll get:

      + rebot -x junit1.xml -l NONE -r NONE output1.xml
      XUnit:   /var/lib/Jenkins_Backup/jenkins/jobs/Publish_Test_Result_JIRA/workspace/junit1.xml
      Recording test results
      [ZapiTestResultReporter] [INFO] Examining test results...
      Build result is SUCCESS
      Total Test Cases : 8ERROR: Build step failed with exception
      java.lang.NullPointerException
      	at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:424)
      	at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:564)
      	at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:99)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      	at hudson.model.Run.execute(Run.java:1753)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Build step 'Publish test result to Zephyr for JIRA' marked build as failure
      
      + rebot -x junit2.xml -l NONE -r NONE output2.xml
      XUnit:   /var/lib/Jenkins_Backup/jenkins/jobs/Publish_Test_Result_JIRA/workspace/junit2.xml
      Build step 'Execute shell' marked build as failure
      Recording test results
      [ZapiTestResultReporter] [INFO] Examining test results...
      Build result is FAILURE
      Total Test Cases : 8ERROR: Build step failed with exception
      java.lang.NullPointerException
      	at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:404)
      	at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:564)
      	at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:99)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      	at hudson.model.Run.execute(Run.java:1753)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:404)
      Build step 'Publish test result to Zephyr for JIRA' marked build as failure
      

        1. test2.png
          test2.png
          9 kB
        2. test1.png
          test1.png
          9 kB
        3. Selection_003.png
          Selection_003.png
          62 kB
        4. output2.xml
          57 kB
        5. output1.xml
          59 kB
        6. junit2.xml
          0.8 kB
        7. junit1.xml
          0.7 kB

            zeedeveloper Zephyr Developer
            totoroliu Rick Liu
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: