damianszczepanik / cucumber-reporting-jenkins

Java jenkins plugin for cucumber-jvm reporting
151 stars 12 forks source link

HTTP ERROR 404 Problem accessing /job/Project_Name/cucumber-html-reports/. Reason:Not Found #161

Closed Lplay closed 7 years ago

Lplay commented 8 years ago

Hi Kingsley,

I initially emailed you I thought some of the posts my be old and I might not get a repsonse in time I get the following whenever I run the build

[CucumberReportPublisher] Compiling Cucumber Html Reports ... [CucumberReportPublisher] Copying all json files from: C:\Jars\workspace\Project_Name\target to reports directory: C:\Jars\jobs\Project_Name\builds\1\cucumber-html-reports [CucumberReportPublisher] there were no json results found in: C:\Jars\jobs\Project_Name\builds\1\cucumber-html-reports Finished: SUCCESS

And when I click the report I get :

HTTP ERROR 404 Problem accessing /job/Project_Name/cucumber-html-reports/. Reason:Not Found

I am running a maven project, but I have also tried a Free stlye Project as well but all to no avail.

I have provided my json path which is target(from my cucumber runner class:json:target/cucumber.json in "Json Reports Path" under Post build action.The json file is not generated at all in C:\Jars\workspace\Project_Name\target.

Why is the json file not generated?what I am doing wrong?

Kindly help,I have been on this for days

damianszczepanik commented 8 years ago

Check if JSON files are really in C:\Jars\workspace\Project_Name\target then C:\Jars\jobs\Project_Name\builds\1\cucumber-html-reports and finally plugin configuration

folaAkin commented 8 years ago

JSON files are not in either locations finally plugin configuration-I am not sure if I understand what you meant but as said in my previous comments Json Reports Path = target ( json:target/json/cucumber.json ) from my project

Lplay commented 8 years ago

Hi, Are you able to look into my issues?

Thanks Akin

Lplay commented 8 years ago

Hi, Are you able to look into my issues?

Thanks Akin

Lplay commented 8 years ago

Hi, Are you able to look into my issues?

damianszczepanik commented 8 years ago

This plugin does not generate json, it needs it as the input

folaAkin commented 8 years ago

I am not sure why you closed this issue,I never assumed the plugin generates json file.

Lplay commented 8 years ago

Hi, I am not getting my initial error (HTTP ERROR 404 Problem accessing /job/Project_Name/cucumber-html-reports/. Reason:Not )anymore My Jenkins is set up now on a Virtual machine(AWS Workspaces) and build runs fine but cucumber jvm report is not generated, see below from Jenkins console:

CucumberReportPublisher] Found 2 json files. [CucumberReportPublisher] 1. Found a json file: target\cucumber-usage.json [CucumberReportPublisher] 2. Found a json file: target\json\cucumber.json [CucumberReportPublisher] Generating HTML reports Build step 'Cucumber-JVM reports' changed build result to FAILURE Finished: FAILURE

When I opened the report I got the following error:

java.lang.NullPointerException at net.masterthought.cucumber.util.Util.toValidFileName(Util.java:50) at net.masterthought.cucumber.json.Feature.setReportFileName(Feature.java:176) at net.masterthought.cucumber.json.Feature.setMetaData(Feature.java:157) at net.masterthought.cucumber.ReportParser.setMetadata(ReportParser.java:91) at net.masterthought.cucumber.ReportParser.parseJsonResults(ReportParser.java:61) at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:51) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:134) 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: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)

Trying to generate report from following files. Make sure they are valid cucumber report files: D:\Users\dummy.jenkins\jobs\dummy\builds\98\cucumber-html-reports\target\cucumber-usage.json D:\Users\dummy.jenkins\jobs\dummy\builds\98\cucumber-html-reports\target\json\cucumber.json.

Please provide me an email if you want me to send the Json file to you.

Thanks

damianszczepanik commented 8 years ago

Attach json file

folaAkin commented 8 years ago

Json file attached

JsonFile.txt

damianszczepanik commented 8 years ago

Tired with the most recent version and it works.

folaAkin commented 8 years ago

Still facing the same issue, please see error below:

java.lang.NullPointerException at net.masterthought.cucumber.util.Util.toValidFileName(Util.java:50) at net.masterthought.cucumber.json.Feature.setReportFileName(Feature.java:176) at net.masterthought.cucumber.json.Feature.setMetaData(Feature.java:157) at net.masterthought.cucumber.ReportParser.setMetadata(ReportParser.java:91) at net.masterthought.cucumber.ReportParser.parseJsonResults(ReportParser.java:61) at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:51) at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:134) 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: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)

On Mon, Jun 20, 2016 at 7:29 PM, Damian Szczepanik <notifications@github.com

wrote:

Tired with the most recent version and it works.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/damianszczepanik/cucumber-reporting-jenkins/issues/161#issuecomment-227227942, or mute the thread https://github.com/notifications/unsubscribe/AOWherjKAnYfjea8m8iYPWD87SDGruSlks5qNtvvgaJpZM4ImNhV .

damianszczepanik commented 8 years ago

Then you probably attached wrong file.

folaAkin commented 8 years ago

I have run another build,attached are cucumber.json and cucumber-usage json.I am not sure the cucumber usage file is relevant anyway.

On Tue, Jun 21, 2016 at 4:22 PM, Damian Szczepanik <notifications@github.com

wrote:

Then you probably attached wrong file.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/damianszczepanik/cucumber-reporting-jenkins/issues/161#issuecomment-227474980, or mute the thread https://github.com/notifications/unsubscribe/AOWheuY6qtEmrmZjqneZ1hTmQIfu3dK4ks5qOAGygaJpZM4ImNhV .

folaAkin commented 8 years ago

Hi Damian,

Could you please help debug my NPE?I have seen either you or Kingsley help debug similar issues.

I really need the report to work

damianszczepanik commented 8 years ago

You've been provided source code so you can import the project and try to debug. First suggest to start debugging with standalone version https://github.com/damianszczepanik/cucumber-reporting

Also mind that this issue is not related to NPE - if you read carefully first post. This does not help to track issues ad pull requests.