• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • cucumber-perf-plugin
    • None
    • Windows 7
      master only
      jenkins 1.519
      java 1.6 update 37

      When parsing reports the plugin thros an exception

      [Cucumber Tests] Parsing results.
      [Cucumber Tests] parsing cucumber.json
      [CucumberPerfRecorder] Starting Cucumber Performance Report generation...
      [CucumberPerfRecorder] Reporting on performance for cucumber #87
      [CucumberPerfRecorder] detected master build 
      [CucumberPerfRecorder] running project report
      [CucumberPerfRecorder] build report generation complete - true
      [CucumberPerfRecorder] running project reports on 1 builds
      ERROR: Publisher com.castlemon.jenkins.performance.CucumberPerfRecorder aborted due to exception
      java.lang.NullPointerException
      	at com.castlemon.jenkins.performance.util.CucumberPerfUtils.getRelevantSummaries(CucumberPerfUtils.java:36)
      	at com.castlemon.jenkins.performance.reporting.ReportBuilder.generateScenarioReports(ReportBuilder.java:128)
      	at com.castlemon.jenkins.performance.reporting.ReportBuilder.generateProjectReports(ReportBuilder.java:74)
      	at com.castlemon.jenkins.performance.CucumberPerfRecorder.generateProjectReport(CucumberPerfRecorder.java:102)
      	at com.castlemon.jenkins.performance.CucumberPerfRecorder.perform(CucumberPerfRecorder.java:71)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
      	at hudson.model.Run.execute(Run.java:1618)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:242)
      [CucumberReportPublisher] Compiling Cucumber Html Reports ...
      [CucumberReportPublisher] detected this build is running on the master 
      [CucumberReportPublisher] copying json to reports directory: C:\workarea\source\jenkinsci\cucumber-testresult-plugin\.\work\jobs\cucumber\builds\2013-10-04_14-06-20\cucumber-html-reports
      [CucumberReportPublisher] Generating HTML reports
      Finished: FAILURE
      

      This renders the plugin unusable and causes the builds to be marked as failures.

          [JENKINS-19888] NPE when running plugin

          James Nord created issue -

          Jim Gallagher added a comment -

          Hi,

          Sorry that this causing you an issue. Could you please attach a copy of the cucumber.json file that this plugin fails on, and I'll try to examine the issue & solve it?

          Thanks

          Jim

          Jim Gallagher added a comment - Hi, Sorry that this causing you an issue. Could you please attach a copy of the cucumber.json file that this plugin fails on, and I'll try to examine the issue & solve it? Thanks Jim
          Jim Gallagher made changes -
          Assignee New: Jim Gallagher [ truedub ]

          Jim Gallagher added a comment -

          Without the file in question I'm unfortunately unable to progress this issue. If you could assist by supplying it I'd be delighted to assess the error and fix it.

          Unless I can progress this in the next 2 weeks, I'll mark the issue as closed.

          Jim Gallagher added a comment - Without the file in question I'm unfortunately unable to progress this issue. If you could assist by supplying it I'd be delighted to assess the error and fix it. Unless I can progress this in the next 2 weeks, I'll mark the issue as closed.

          I stumbled upon the same issue. See the attached cucumber.json file. HTH

          Matthias Naber added a comment - I stumbled upon the same issue. See the attached cucumber.json file. HTH
          Matthias Naber made changes -
          Attachment New: cucumber.json [ 24651 ]

          Jim Gallagher added a comment -

          I've analysed the file you've attached - many thanks for that.

          The error is caused by step definitions in the json output that do not contain an id element, causing a null-pointer exception when trying to generate the step reports for each scenario.

          That's the cause - the solution is more tricky. I need to investigate the structure of the json output and determine if an id element is mandatory - you'd think it is, but your file indicates otherwise.

          This is still under investigation.

          Jim Gallagher added a comment - I've analysed the file you've attached - many thanks for that. The error is caused by step definitions in the json output that do not contain an id element, causing a null-pointer exception when trying to generate the step reports for each scenario. That's the cause - the solution is more tricky. I need to investigate the structure of the json output and determine if an id element is mandatory - you'd think it is, but your file indicates otherwise. This is still under investigation.
          Jim Gallagher made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Jim Gallagher added a comment -

          Matthias, could you supply me the feature file you used for this test? I need to relate the json output back to the feature file to see what's missing and how I can code around it.

          Thanks

          Jim Gallagher added a comment - Matthias, could you supply me the feature file you used for this test? I need to relate the json output back to the feature file to see what's missing and how I can code around it. Thanks

          Jim Gallagher added a comment -

          Having done a lot of investigation on this, no simple solution presents itself, as the issue is basically caused by a malformed JSON file (not invalid JSON, just missing elements) - results are also missing for certain steps.

          I'm going to close the issue, despite the lack of resolution, but will re-open should it be reported as a problem for anyone else.

          Jim Gallagher added a comment - Having done a lot of investigation on this, no simple solution presents itself, as the issue is basically caused by a malformed JSON file (not invalid JSON, just missing elements) - results are also missing for certain steps. I'm going to close the issue, despite the lack of resolution, but will re-open should it be reported as a problem for anyone else.

            truedub Jim Gallagher
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: