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

Zephyr for JIRA hangs while recording results, and throws NPE while stopping the hanged job

      Hi,

      I am using the Zephyr for JIRA plugin to upload test results to JIRA.

      But the upload process hangs after the following log msg.

      Recording test results
      Build step 'Publish JUnit test result report' changed build result to UNSTABLE
      [ZapiTestResultReporter] [INFO] Examining test results...
      Build result is UNSTABLE

      If we stop the job(after hanging for 12-13hrs), we get NPE.
      Exception Stacktrace:

      Total Test Cases : 62ERROR: Build step failed with exception java.lang.NullPointerException at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413) at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)

      Build step 'Publish test result to Zephyr for JIRA' marked build as failure Finished: FAILURE

      Plugin versions:
      Zephyr for JIRA: 1.3
      Zephyr Version on JIra server: 3.1.3.31302433
      JIra version: 7.0
      Jenkins Server version: 1.656
      Can anyone pls help me to find why the job hangs while uploading test results and why the NPE .

      TIA,
      Surajit

          [JENKINS-34222] Zephyr for JIRA hangs while recording results, and throws NPE while stopping the hanged job

          Surajit Dasgupta created issue -

          Steve Layman added a comment - - edited

          We're running into the same issue. Job hangs while compiling the test reports. We finally stopped the build after about 3.5 hours of waiting and got the NPE as well.

          I see the new test cases have been created, but no new cycle or execution statuses were added to them.

          [ZapiTestResultReporter] [INFO] Examining test results...
          11:55:33 Build result is UNSTABLE
          11:55:33 Total Test Cases : 498ERROR: Build step failed with exception
          15:30:00 java.lang.NullPointerException
          15:30:00 at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218)
          15:30:00 at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413)
          15:30:00 at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98)
          15:30:00 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
          15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
          15:30:00 at hudson.model.Build$BuildExecution.post2(Build.java:185)
          15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
          15:30:00 at hudson.model.Run.execute(Run.java:1766)
          15:30:00 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          15:30:00 at hudson.model.ResourceController.execute(ResourceController.java:98)
          15:30:00 at hudson.model.Executor.run(Executor.java:410)
          15:30:00 Build step 'Publish test result to Zephyr for JIRA' marked build as failure

          Jenkins v1.637
          Zephyr v1.3
          Jira v6.3.15

          Steve Layman added a comment - - edited We're running into the same issue. Job hangs while compiling the test reports. We finally stopped the build after about 3.5 hours of waiting and got the NPE as well. I see the new test cases have been created, but no new cycle or execution statuses were added to them. [ZapiTestResultReporter] [INFO] Examining test results... 11:55:33 Build result is UNSTABLE 11:55:33 Total Test Cases : 498ERROR: Build step failed with exception 15:30:00 java.lang.NullPointerException 15:30:00 at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218) 15:30:00 at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413) 15:30:00 at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98) 15:30:00 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) 15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) 15:30:00 at hudson.model.Build$BuildExecution.post2(Build.java:185) 15:30:00 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) 15:30:00 at hudson.model.Run.execute(Run.java:1766) 15:30:00 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 15:30:00 at hudson.model.ResourceController.execute(ResourceController.java:98) 15:30:00 at hudson.model.Executor.run(Executor.java:410) 15:30:00 Build step 'Publish test result to Zephyr for JIRA' marked build as failure Jenkins v1.637 Zephyr v1.3 Jira v6.3.15
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170281 ] New: JNJira + In-Review [ 183838 ]

          same issue here please help :
          JIRA Core 7.1.7
          zephyr for Jira : 3.2.1.32102629
          ZAPI : 2.2.0.22002611
          Jenskin : 2.14
          Zephyr for JIRA Test Management plugin : 1.3

          java.lang.NullPointerException
          at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218)
          at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413)
          at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98)
          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:1745)
          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

          Christian Boudreau added a comment - same issue here please help : JIRA Core 7.1.7 zephyr for Jira : 3.2.1.32102629 ZAPI : 2.2.0.22002611 Jenskin : 2.14 Zephyr for JIRA Test Management plugin : 1.3 java.lang.NullPointerException at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413) at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98) 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:1745) 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

          Charles Eakins added a comment - - edited

          We are trying to evaluate Zephyr along with Jira, and this plugin as stated above keeps hanging in Jenkins. I looked at the actual jenkins log and it appears a rest end point it's trying to get to is invalid. It actually did create the test cases, but then failed with a 404 when trying to upload the results:

          INFO: Test-Automation #12 main build action completed: SUCCESS
          org.apache.http.client.ClientProtocolException: Unexpected response status: 404
          at com.thed.zephyr.jenkins.utils.rest.Cycle.createCycle(Cycle.java:117)
          at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:385)
          at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98)
          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:1766)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)

          Zephyr for JIRA Jenkins plugin version: 1.3
          Zephyr Version on JIra server: Zephyr for JIRA Cloud 1.0.12-AC
          JIra version: No idea, it's cloud based and latest version.
          Jenkins Server version: 2.7.1

          Charles Eakins added a comment - - edited We are trying to evaluate Zephyr along with Jira, and this plugin as stated above keeps hanging in Jenkins. I looked at the actual jenkins log and it appears a rest end point it's trying to get to is invalid. It actually did create the test cases, but then failed with a 404 when trying to upload the results: INFO: Test-Automation #12 main build action completed: SUCCESS org.apache.http.client.ClientProtocolException: Unexpected response status: 404 at com.thed.zephyr.jenkins.utils.rest.Cycle.createCycle(Cycle.java:117) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:385) at com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98) 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:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Zephyr for JIRA Jenkins plugin version: 1.3 Zephyr Version on JIra server: Zephyr for JIRA Cloud 1.0.12-AC JIra version: No idea, it's cloud based and latest version. Jenkins Server version: 2.7.1

          Hi..

          I might be late to this discussion but this issue can be resolved by installing the ZAPI plugin in JIRA. The plugin allows for programmatic access to test data via REST APIs. This needs to be in JIRA for jenkins to be able to post the test results

          Sultan Maiyaki added a comment - Hi.. I might be late to this discussion but this issue can be resolved by installing the ZAPI plugin in JIRA. The plugin allows for programmatic access to test data via REST APIs. This needs to be in JIRA for jenkins to be able to post the test results

          I've looked at the source code this is a bug. Even if you don't have the plugin configured correctly it shouldn't hang the job. Basically they aren't consuming the http client response when there's an error, so it just hangs. This also requires you to be on a stand alone instance of Jira and not the cloud version. Still shouldn't hang however.

          Charles Eakins added a comment - I've looked at the source code this is a bug. Even if you don't have the plugin configured correctly it shouldn't hang the job. Basically they aren't consuming the http client response when there's an error, so it just hangs. This also requires you to be on a stand alone instance of Jira and not the cloud version. Still shouldn't hang however.

          lokman liton added a comment - - edited

          Hi Sultan Maiyaki, Could you please suggest me, which version of ZAPI plugin is best/suitable for this, I will request to our corresponding personnel to buy ZAPI plugin,
          Thanks in Advance.

          lokman liton added a comment - - edited Hi Sultan Maiyaki, Could you please suggest me, which version of ZAPI plugin is best/suitable for this, I will request to our corresponding personnel to buy ZAPI plugin, Thanks in Advance.

          Hi Lokman.

          You should install the latest version of Zapi that is compatible with your version of JIRA. You can check the version matrix on this page

          Best Regards

          Sultan Maiyaki added a comment - Hi Lokman. You should install the latest version of Zapi that is compatible with your version of JIRA. You can check the version matrix on this  page Best Regards

          Kris Jakab added a comment -

          Hi..I am using:

          JIRA 7.3.8

          Zephyr for JIRA 3.5.1

          ZAPI for JIRA 2.5.0

          Zephyr Jenkins plugin 1.4

          but still getting the same error with NullPointerException. Any ideas if the problem is a compatibility issue?

           

          Thank you.

          Kris Jakab added a comment - Hi..I am using: JIRA 7.3.8 Zephyr for JIRA 3.5.1 ZAPI for JIRA 2.5.0 Zephyr Jenkins plugin 1.4 but still getting the same error with NullPointerException. Any ideas if the problem is a compatibility issue?   Thank you.

            zeedeveloper Zephyr Developer
            surajit82 Surajit Dasgupta
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: