java.lang.NullPointerException

Google Groups | surajit...@gmail.com (JIRA) | 8 months ago
  1. 0

    Importing xUnit XML for a suite of test cases which does not contain a failure results in a Null pointer exception. Using xml generated from the python unittest framework for a suite with two passing test cases, we encountered a Null pointer exception: [ZapiTestResultReporter] [INFO] Examining test results... Build result is SUCCESS Total Test Cases : 2ERROR: Build step failed with exception java.lang.NullPointerException at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:331) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:441) 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:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) 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:381) Build step 'Publish test result to Zephyr for JIRA' marked build as failure Looking through the source code, we noticed in TestCaseUtil.java#L331, that response is closed when passList.size > 0. However, response becomes non null only if the failList.size > 0 in line 326. Line 331 should check to see if response != null before attempting to close and continue if it is null.

    Jenkins JIRA | 1 year ago | David Gonzalez
    java.lang.NullPointerException
  2. 0

    After loading test results form google test framework tests receive this error: Recording test results Build step 'Publish JUnit test result report' changed build result to UNSTABLE [ZapiTestResultReporter] [INFO] Examining test results... Build result is UNSTABLE Total Test Cases : 1ERROR: Build step failed with exception java.lang.NullPointerException at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:356) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:443) 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 Notifying upstream projects of job completion Finished: FAILURE It doesn't depend on number of test results, on it status (all failed, all success, failed and success).

    Jenkins JIRA | 12 months ago | Ilya Kolesov
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    After loading test results form google test framework tests receive this error: Recording test results Build step 'Publish JUnit test result report' changed build result to UNSTABLE [ZapiTestResultReporter] [INFO] Examining test results... Build result is UNSTABLE Total Test Cases : 1ERROR: Build step failed with exception java.lang.NullPointerException at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.executeTests(TestCaseUtil.java:356) at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:443) 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 Notifying upstream projects of job completion Finished: FAILURE It doesn't depend on number of test results, on it status (all failed, all success, failed and success).

    Jenkins JIRA | 12 months ago | Ilya Kolesov
    java.lang.NullPointerException

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests()
    2. com.thed.zephyr
      ZfjReporter.perform
      1. com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.assignTests(TestCaseUtil.java:218)
      2. com.thed.zephyr.jenkins.utils.rest.TestCaseUtil.processTestCaseDetails(TestCaseUtil.java:413)
      3. com.thed.zephyr.jenkins.reporter.ZfjReporter.perform(ZfjReporter.java:98)
      3 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
      6. hudson.model.Run.execute(Run.java:1745)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:404)
      9 frames