jenkinsci / cucumber-reports-plugin

Jenkins plugin to generate cucumber-jvm reports
https://plugins.jenkins.io/cucumber-reports/
GNU Lesser General Public License v2.1
210 stars 232 forks source link

java.lang.NullPointerException when using json file #161

Closed taraszka closed 7 years ago

taraszka commented 7 years ago

Hey,

I have a java.lang.NullPointerException error when I am trying to generate report at Jenkins.

java.lang.NullPointerException at net.masterthought.cucumber.json.Element.calculateStepsStatus(Element.java:129) at net.masterthought.cucumber.json.Element.setMetaData(Element.java:104) at net.masterthought.cucumber.json.Feature.setMetaData(Feature.java:165) at net.masterthought.cucumber.ReportParser.setMetadata(ReportParser.java:97) at net.masterthought.cucumber.ReportParser.parseJsonFiles(ReportParser.java:60) at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:87) at net.masterthought.jenkins.CucumberReportPublisher.generateReport(CucumberReportPublisher.java:174) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:112) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 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:186) 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:405)

do you know what could case this problem? It’s run like this:

./bin/cucumber.sh ${TAGS} DRIVER=${DRIVER} --format junit --out test-results --format json --out json-test-results/cucumber-test-result.json

the cucumber.sh script is calling: bundle exec cucumber --guess -r features/step_definitions/ -r features/support/ $@

which is generating the json file.

taraszka commented 7 years ago

Plugin version: 3.7.0

damianszczepanik commented 7 years ago

show me JSON file

taraszka commented 7 years ago

@damianszczepanik with plugin version 3.9.0 this issue is not exist anymore. I will close this case now. Thanks for your hard work.