Code Monkey home page Code Monkey logo

cucumber-reporting-jenkins's People

Contributors

blt04 avatar chriskozak avatar damianszczepanik avatar fabianbuch avatar kingsleyh avatar mamalisk avatar mathias21 avatar nicopranger avatar poum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cucumber-reporting-jenkins's Issues

404 on cucumber-jvm reports

Hello

I am getting a 404 on the cucumber-jvm plugin. Could you please help

the html reports are at path_to_workspace//reports/html/ and the cucumber.json gets created under path_to_workspace//reports/cucmber.json

The error is as below.

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
FATAL: java.lang.String.isEmpty()Z
java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
at hudson.model.Run.run(Run.java:1434)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)

Exception when trying to generate report for large number of features

when I just run 1 feature to test out the report generation it works fine but when I run the whole suite (which results in about a 3meg json file) the Report publisher throws this error

54 scenarios (8 failed, 1 pending, 45 passed)
270 steps (8 failed, 10 skipped, 1 pending, 251 passed)
36m31.963s
Build step 'Execute shell' marked build as failure
[CucumberReportPublisher] Generating HTML reports

ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.NullPointerException
    at net.masterthought.jenkins.json.Step.getInternalStatus(Step.java:40)
    at net.masterthought.jenkins.json.Step.getStatus(Step.java:46)
    at net.masterthought.jenkins.FeatureReportGenerator.getAllStepStatuses(FeatureReportGenerator.java:333)
    at net.masterthought.jenkins.FeatureReportGenerator.<init>(FeatureReportGenerator.java:38)
    at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:96)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:697)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:672)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:650)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:619)
    at hudson.model.Run.run(Run.java:1429)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Email was triggered for: Failure
Sending email for trigger: Failure

Freestyle type projects only?

This plugin looks really nice, but I have a question. In the readme you say its for Freestyle projects only - just wondering why this is?

I think it would be really nice to use this, but our jobs are generally maven jobs. Is there a specific issue with these?

Thanks for your thoughts,

Matt

Malformed exception while generating report

Following stacktrace is generated:

[CucumberReportPublisher] copying json to reports directory: C:\Users\GPCTAdmin.jenkins\jobs\AcceptanceTestRun_FF_12\builds\2012-06-21_12-06-19\cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Expected EOF at line 190 column 3
at com.google.gson.Gson.assertFullConsumption(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:758)
at com.google.gson.Gson.fromJson(Gson.java:706)
at com.google.gson.Gson.fromJson(Gson.java:678)
at net.masterthought.jenkins.FeatureReportGenerator.parseJsonResults(FeatureReportGenerator.java:54)
at net.masterthought.jenkins.FeatureReportGenerator.(FeatureReportGenerator.java:36)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:96)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:658)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:627)
at hudson.model.Run.run(Run.java:1459)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:239)

java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
        at com.google.gson.Gson.fromJson(Gson.java:802)
        at com.google.gson.Gson.fromJson(Gson.java:757)
        at com.google.gson.Gson.fromJson(Gson.java:706)
        at com.google.gson.Gson.fromJson(Gson.java:678)
        at net.masterthought.cucumber.ReportParser.parseJsonResults(ReportParser.java:30)
        at net.masterthought.cucumber.ReportParser.<init>(ReportParser.java:18)
        at net.masterthought.cucumber.ReportBuilder.<init>(ReportBuilder.java:36)
        at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:100)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:786)
        at hudson.model.Build$BuildExecution.post2(Build.java:183)
        at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:733)
        at hudson.model.Run.execute(Run.java:1592)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:237)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
        at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
        at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
        at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
        at com.google.gson.Gson.fromJson(Gson.java:791)
        ... 16 more

Jenkins Cucumber net.masterthought.jenkins.CucumberReportPublisher aborted: NullPointerException

Hi
I am having the similar issue and getting following exception in Jenkins while generating the reports.

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] copying json from: file:/c:/.jenkins/workspace/cucumber-acceptance-tests/to reports directory: file:/e:/.jenkins/jobs/cucumber-acceptance-tests/builds/2012-11-01_16-13-02/cucumber-html-reports/
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.NullPointerException
at net.masterthought.cucumber.util.Util.collectSteps(Util.java:104)

I am using the "cucumber-reports 0.0.14" plugin on Jenkins ver. 1.444.
I tried with setting "Json Reports Path" as "target" and empty. The "Plugin Url Path" is empty

The JSON File is in "ci/job/cucumber-acceptance-tests/ws/storytests/target/cucumber.json" as follows:
[
{
"id":"some-feature",
"tags":[
{
"name":"@mytests",
"line":1
}
],
"description":"",
"name":"some feature",
"keyword":"Feature",
"line":2,
"elements":[
{
"id":"some-feature;setup",
"tags":[
{
"name":"@setup11",
"line":4
}
],
"description":"",
"name":"Setup",
"keyword":"Scenario",
"line":5,
"type":"scenario"
},
{
"id":"some-feature;one",
"description":"",
"name":"one",
"keyword":"Scenario",
"line":7,
"steps":[
{
"name":"X",
"keyword":"Given ",
"line":8
},
{
"name":"Y",
"keyword":"When ",
"line":9
},
{
"result":{
"duration":482295,
"status":"passed"
},
"name":"Z",
"keyword":"Then ",
"line":10,
"match":{
"location":"FoobarSteps.Z()"
}
}
],
"type":"scenario"
},
{
"id":"some-feature;abc",
"description":"",
"name":"abc",
"keyword":"Scenario",
"line":12,
"steps":[
{
"name":"X",
"keyword":"Given ",
"line":13
},
{
"name":"Y",
"keyword":"When ",
"line":14
},
{
"result":{
"duration":476918,
"status":"passed"
},
"name":"Z",
"keyword":"Then ",
"line":15,
"match":{
"location":"FoobarSteps.Z()"
}
}
],
"type":"scenario"
},
{
"id":"some-feature;new-one",
"description":"",
"name":"new one",
"keyword":"Scenario",
"line":17,
"steps":[
{
"name":"X is height",
"keyword":"Given ",
"line":18
},
{
"name":"Y is height",
"keyword":"When ",
"line":19
},
{
"result":{
"duration":428535,
"status":"passed"
},
"name":"Z is height",
"keyword":"Then ",
"line":20,
"match":{
"location":"BoobarSteps.Z()"
}
}
],
"type":"scenario"
},
{
"id":"some-feature;teardown",
"tags":[
{
"name":"@TEARDOWN11",
"line":22
}
],
"description":"",
"name":"Teardown",
"keyword":"Scenario",
"line":23,
"type":"scenario"
}
],
"uri":"com\foobar\stories\mytests.feature"
}
]

My pom.xml looks as follows:

org.apache.maven.plugins
maven-failsafe-plugin
2.12


**/AllStories.java

${project.build.sourceDirectory}
${project.build.outputDirectory}
${project.build.outputDirectory}/failsafe-reports

${project.build.sourceDirectory}/resources




integration-test

integration-test
verify



Test looks as follows:
@RunWith(Cucumber.class)
@Cucumber.Options(tags = { "@wip", "@broken" }, strict = true, format = { "pretty", "html:target/cucumber", "json:target/cucumber.json" })
public class AllStories { ... }

Can some please help me on this.

Thanks.

All feature file links on Feature Statistics page go to same location

I have 4 feature files which display on the Feature Statistics page as 4 rows in the table. Each row starts with the feature name which is a link. But whichever feature link I click, they all take me to the contents of the last feature in the list. I have verified on our Jenkins server under the job's "cucumber-html-reports" directory that all the correct html files and pages are generated. But through the browser, you cannot get to any of those pages due to this issue. All the links also share the same href of ".html". So the url at any of the feature pages is the same:

http://p4aut01:8080/view/Enterprise%20Team/job/IndividualConsolidation_Cucumber/cucumber-html-reports/.html

If I could attach screenshots I would, but hopefully I've been descriptive enough. Is this a known issue? I didn't see it in the list. We like your output so much better than our view of our feature files in subversion via a web browser that we share with the business, that we'd rather have the business view features that the Cucumber Reports Plugin displays, so this issue is preventing us from doing that. Lemme know if you need more detail/screenshots/etc.

Cheers!
Powers Foss ([email protected])

Feature Result report page is inaccurate

We have multi module mvn project.

And we have several .feature files in each module. And the test runners are set up to create separate .json file for each test run like below.

@RunWith(Cucumber.class)
@Cucumber.Options(features = {"classpath:cucumberDefect1.feature"}, format = {"pretty", "html:target/cucumber", "son:target/cucumber1.json"})
public class cucumberDefect1 {
}

@RunWith(Cucumber.class)
@Cucumber.Options(features = {"classpath:cucumberDefect2.feature"}, format = {"pretty", "html:target/cucumber", "son:target/cucumber2.json"})
public class cucumberDefect2 {
}

We run these tests on Jenkins with the cucumber plugin to generate the cucumber reports. And we run these tests in parallel on multiple threads so the build run time is minimized.

Some of the cucumber reports generated are incorrect. The Feature Statistics report seems fine. But when clicked on a feature link to view Feature Result, it always takes us to the last feature that was run in the set.

Below is how I would put the current behavior:

Given n test feature files in a multi-module maven project
And these test feature files are run in parallel on CI
And nth feature file is the last one to be run in the set
And CI has produced the cucumber report
When clicked on any feature link other than the nth to view the Feature Result page
Then the viewer is rendered with Feature Results page of the nth feature
And not the correct features Feature Result page

Below is the behavior we would like to have:

Given n test feature files in a multi-module maven project
And the these test feature files are run in parallel on CI
And nth feature file is the last one to be run in the set
And CI has produced the cucumber report
When clicked on n-1feature link to view the Feature Result page
Then the viewer is rendered with Feature Results page of n-1 feature
And not Feature Results page of the nth feature

The 0.0.10 is the plugin version we have.

"Back to Jenkins" link broken

The "Back to Jenkins" link at the top of each page assumes that Jenkins is installed on the root of the web server.

My instance of Jenkins is installed at http://server/jenkins, therefore the "Back to Jenkins" link should be:
http://server/jenkins/job/project_name/build_number
however, the link currently is:
http://server/job/project_name/build_number

Interestingly enough, the other links are all correct and direct me to the right location (taking into account my "jenkins" subfolder), it's just the "Back to Jenkins" link that is broken.

[CucumberReportPublisher] there were no json results found in......

Im sure this isnt a valid "issue" more of config problem I am unable to solve and a cry for help!!!

I have installed the latest reports plugin in Jenkins and the features run correctly but there seems to be some issue with JSON, I am not sure that it is even being created, the build report always has this at the end:

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] there were no json results found in: C:\dev\workspace\Cucumber Dovetail\target
[CucumberReportPublisher] there were no json results found in: C:\dev\jobs\Cucumber Dovetail\builds\2013-02-21_13-50-11\cucumber-html-reports

After several (probably hundred) attempts at changing the pom file, jenkins location and configuration, reinstall of maven etc etc I am now absolutely stuck on how to solve this.

I am using Intelli JIDEA CE12, latest JDK and Maven.

Jenkins build pre-steps Win Exec command:
mvn clean test -Dcucumber.options="--tags @FaCupProgsALL" -Dbrowser=firefox

Build Root POM - points to my Intelli local project (not using GIT yet)

Publish Cucumber Reports Json Path: target

If anyone has any ideas or experienced anything similar I would appreciate your help as these reports would be vital the project we are working on.

Thanks, Steve

Delete Quietly Error

I am new to using this plugin, and I am trying to get it to work with some webdriver tests using cucumber-jvm framework. When I try to include this plugin as a post build step, I get the below error.
I am not running Jenkins, I am running Hudson, could this have something to do with it? Additionally, I am running on an https site, with the port forwarded [https://192.168.1.12/hudson/ is my base url]. I was unable to find much information about updating the Plugin Path URL. Could this have something to do with it?
Thanks

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /var/lib/hudson/jobs/Cosmic Comix/builds/2012-12-03_16-03-30/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
FATAL: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
at net.masterthought.cucumber.ReportBuilder.copyResource(ReportBuilder.java:180)
at net.masterthought.cucumber.ReportBuilder.generateReports(ReportBuilder.java:46)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:101)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:541)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:527)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:515)
at hudson.model.Build$RunnerImpl.post2(Build.java:152)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:499)
at hudson.model.Run.run(Run.java:1199)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:123)

[Ruby] duration not appearing in reports

all my reports have duration of 0 for every feature and scenario. I looked at the json output and it doesn't have a duration value, is this field in the report for implementations of Cukes in other languages (Java for instance)?

Feature paths in the report

Just got this plugin running, and the Feature Overview comes up nicely. However the links to the individual features don't seem to work. Looking at the generated link shows things like this:

file:///C:/-Dev-Tools-Jenkins_Config-jobs-Install-NDD%20(with%20Release)-workspace-Ndd-NddWebAppHusky-src-test-resources-viewDog.feature.html

probably not the url intended.

I believe the issue is that I'm running cucumber-jvm 1.0.7, and it looks like in that version the feature uri got changed - so it now gives you the full path to the feature file. It used to be the relative path, but it seems not any more.

Use output attribute from steps

In my json file, I have a failed step that contains an attribute "output" that contains HTML content.

Would it be possible to display it directly in the report of the failed step?

Cucumber report job being marked as failed

I was just looking at this job in the Jenkins dashboard, and saw the last couple of runs had failed (red ball), when I had a look at them it looked like they had run, both from the console, and looking at the generated reports.

I've realised that if there are any failures in the report it marks the job as having failed, I'm not sure this seems right - I think the report worked, but it just reported errors.

Does this sound right to you?

I had a look, and I think its this line:
buildResult = featureReportGenerator.getBuildStatus();

in the cucumber report publisher.

Do you want to look at this, or would you like me to create a pull request (I'm currently just getting my feet wet with GitHub, so don't mind having a go at this :) )

Thanks,

Matt

Wrong scenarios counter in report: Background is counted as stand alone scenario

if I have a feature file like


Feature: test feature

Background:
Given User1 logs into application
And User2 logs into application

Scenario: test1
When User1 does something
Then User2 receives something

Scenario: test2
When User2 does nothing
Then User1 receives nothing


Scenarios counter in report will be 4. Background is counted as stand alone scenario and for me it seems wrong, background is part of test scenario.

Error while generating report.

Hi,

I am trying to use the plugin to generate the great reports and I'm getting the following error:

Publishing rails stats report...
[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /var/lib/jenkins/jobs/Karmalot-web_Master_AcceptanceTest/builds/2012-07-03_11-24-28/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 13
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:72)
at com.google.gson.Gson.fromJson(Gson.java:791)
at com.google.gson.Gson.fromJson(Gson.java:757)
at com.google.gson.Gson.fromJson(Gson.java:706)
at com.google.gson.Gson.fromJson(Gson.java:678)
at net.masterthought.jenkins.FeatureReportGenerator.parseJsonResults(FeatureReportGenerator.java:54)
at net.masterthought.jenkins.FeatureReportGenerator.(FeatureReportGenerator.java:36)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:96)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:658)
at hudson.model.Build$RunnerImpl.post2(Build.java:162)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:627)
at hudson.model.Run.run(Run.java:1438)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 2 column 13
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 19 more

The JSON is being generated correctly on the root folder of the jenkins job. I left the parameter of the target json file empty to look for it by it self.

NullPointer when generating HTML report

Hi,

I have this little problem :

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] copying json to reports directory: /data/jenkins/jobs/test-modules-cucumber-jvm/builds/2012-04-25_17-21-39/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.NullPointerException
at net.masterthought.jenkins.FeatureReportGenerator.getAllStepStatuses(FeatureReportGenerator.java:131)
at net.masterthought.jenkins.FeatureReportGenerator.(FeatureReportGenerator.java:29)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:71)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:692)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:667)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:989)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:614)
at hudson.model.Run.run(Run.java:1429)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:478)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)

Could you help ?

I try to fork and correct this by my self but when I try to build I obtain that :

[INFO] Failed to resolve artifact.

Missing:

  1. org.kohsuke.stapler:stapler-groovy:jar:1.169

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.kohsuke.stapler -DartifactId=stapler-groovy -Dversion=1.169 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.kohsuke.stapler -DartifactId=stapler-groovy -Dversion=1.169 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.jenkins-ci.tools:maven-hpi-plugin:maven-plugin:1.74
2) org.kohsuke.stapler:stapler-groovy:jar:1.169

  1. org.kohsuke.stapler:stapler-jelly:jar:1.169

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.kohsuke.stapler -DartifactId=stapler-jelly -Dversion=1.169 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.kohsuke.stapler -DartifactId=stapler-jelly -Dversion=1.169 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.jenkins-ci.tools:maven-hpi-plugin:maven-plugin:1.74
2) org.kohsuke.stapler:stapler-groovy:jar:1.169
3) org.kohsuke.stapler:stapler-jelly:jar:1.169


2 required artifacts are missing.

for artifact:
org.jenkins-ci.tools:maven-hpi-plugin:maven-plugin:1.74

from the specified remote repositories:
public (http://mvnrepository.adencf.local/nexus/content/groups/public),
repo.jenkins-ci.org (http://repo.jenkins-ci.org/public/),
central (http://repo1.maven.org/maven2),
sonatype-snapshots (https://oss.sonatype.org/content/repositories/snapshots),
public-snapshots (http://mvnrepository.adencf.local/nexus/content/groups/public-snapshots)

Error while generating report

I get the following error when generating the HTML reports:

Building remotely on pub-testdriver in workspace /opt/jenkins-slave/workspace/Systemtest - DrFront
Checkout:Systemtest - DrFront / /opt/jenkins-slave/workspace/Systemtest - DrFront - hudson.remoting.Channel@1d8dd769:pub-testdriver
Using strategy: Default
Last Built Revision: Revision 51f3976ca5721f369b519b9b33dead1ac76e1e09 (origin/HEAD, origin/master)
Checkout:Systemtest - DrFront / /opt/jenkins-slave/workspace/Systemtest - DrFront - hudson.remoting.LocalChannel@23364534
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://n06523@nrklx56021/opt/git-repos/cucumber.git
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision 51f3976ca5721f369b519b9b33dead1ac76e1e09 (origin/HEAD, origin/master)
Checking out Revision 51f3976ca5721f369b519b9b33dead1ac76e1e09 (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[Systemtest - DrFront] $ /bin/sh -xe /tmp/hudson6653976864463069602.sh
+ cd '/opt/jenkins-slave/workspace/Systemtest - DrFront'
+ ./bin/run_ci_tests.sh ci drfront
....

20 scenarios (20 failed)
69 steps (20 failed, 29 skipped, 20 passed)
0m0.170s
Build step 'Execute shell' marked build as failure
Archiving artifacts
Recording test results
[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on a slave 
[CucumberReportPublisher] copying json from: file:/opt/jenkins-slave/workspace/Systemtest%20-%20DrFront/to reports directory: file:/home/tomcat/.hudson/jobs/Systemtest%20-%20DrFront/builds/2012-06-11_13-28-18/cucumber-html-reports/
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.NullPointerException
    at net.masterthought.jenkins.FeatureReportGenerator.getAllStepStatuses(FeatureReportGenerator.java:332)
    at net.masterthought.jenkins.FeatureReportGenerator.<init>(FeatureReportGenerator.java:38)
    at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:96)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    at hudson.model.Run.run(Run.java:1435)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Finished: FAILURE

I'm using 0.0.11 (I think, or at least that is what my plugin manager tells me) on jenkins 1.456.

inaccurate feature overview

Hello,

i've got two feature files - one with 9 scenarios (in 26 steps) the other with 2 scenarios (in 5 steps). When the tests are run 6 scenarios (with 14 steps) are 'passed' whereas 4 (with 13 steps) are 'skipped' and 1 (with 4 steps) is 'failed'.
Unfortunately neither the 'steps' diagram nor the 'scenarios' show correct figures - respectively graphs. 'Steps' presents 54.55% passed, 36.36% skipped, 9.09% failed and 0.0% pending. Strangely 54.55% fits to 6 of 11 scenarios. The same applies to 36.36% (4 of 11) and 9.09% (1 of 11). Therefore i think you put the wrong label on the left hand diagram.
Furthermore the 'scenarios' diagram presents only two figures: 90.91% passed (10 of 11) and 9.09% failed (1 of 11). Unfortunately i cannot make any sense of that. First of all it misses the skipped scenarios (or steps?)...
Finally i've got a question concerning pending features or steps: In my json files there occur only three different scenario states - passed, failed and skipped. Is there any chance that the figure of pending steps or features is different from zero?

Thomas

Plugin only check Jenkins master server for target cucumber.json directory and not the build agent

JENKINS JOB WORKSPACE: d:\jenkinsbuildagent\workspace\MyApp
CUCUMBER JSON FILE LOCATION: d:\jenkinsbuildagent\workspace\MyApp\target\cucumber.json

CUCUMBER REPORT PUBLISHER CONFIG:
JSON REPORTS PATH: target

When the Jenkins job is run, the Publisher plugin cannot find the target directory:

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.IllegalStateException: basedir d:\JenkinsBuildAgent\workspace\MyApp\target does not exist.
at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:879)
at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61)

Feature Request: Static/project level link to the latest results

Just wondering if its possible to put a link into the project/job level which points to the latest results?

The use case I would like to use it for is to be able to publish the link within our team, so everyone can see what features/scenarios there are, and what state they are in (hopefully all green :).

Cheers,

Matt

404 error when accessing Cucumber Reports

Hello,

i'm running cucumber-reports 0.0.14 on a Jenkins 1.473
When accessing the reports of project foo i get a page with a 404 error. And the console output your plugin during the build is:
...
[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /proj/bar/tools/hudson/jobs/foo/builds/2012-07-29_22-00-37/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.NullPointerException
at net.masterthought.cucumber.util.Util.collectSteps(Util.java:104)
at net.masterthought.cucumber.json.Element.getStatus(Element.java:31)
at net.masterthought.cucumber.ReportInformation.processFeatures(ReportInformation.java:184)
at net.masterthought.cucumber.ReportInformation.(ReportInformation.java:37)
at net.masterthought.cucumber.ReportBuilder.(ReportBuilder.java:32)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:98)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:994)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
at hudson.model.Run.execute(Run.java:1513)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Finished: FAILURE

The Json reports path is set to foo/fooweb/target. And the workspace URL in jenkins is http://localhost:8120/job/foo/ws/. All Json reports are generated into http://localhost:8120/job/foo/ws/foo/fooweb/target/ as expected. Thus everything seems perfect but still goes wrong.

Any hints or clues are appreciated.

Thomas

Number of Scenarios incorrect

Hey,

When using the jenkins-cucumber-jvm-reports-plugin with features containing backgrounds or scenario outlines we came across a wrong calculation of the number of scenarios:

We have been running a build with the following feature-file

Feature: Feature

Background:
Given I am logged in

Scenario Outline: Check field is visible
When I do X
Then the field <field> is visible

Examples:
    |field|
    |"1"|
    |"2"|
    |"3"|
    |"4"|
    |"5"|

Then the Report says it does contain 11 Scenarios. I would expect the plugin to report either 5 scenarios (one for each entry in the example table) or only one.

It seems that the every background invocation as well as the header of the example table is counted as a scenario.

greets Klaus

404 when I click on the Cucumber Reports links

I'm trying to get my reports to show up, but end up with a 404. I installed the cucumber-reports plugin that's available via the Jenkins Plugin Manager, which is currently version 0.0.20. Then, I set my build step up as follows:

source /opt/boxen/env.sh
rbenv local 1.9.3-p392
cp config/database.yml.boxen config/database.yml
bundle install
bundle exec cucumber --format json -o cucumber.json features

Then, I selected the post-build action 'Publish cucumber results as a report', and left all of the options as their default. The output was as follows:

....
34 scenarios (34 passed)
342 steps (342 passed)
3m21.302s
Coverage report generated for Cucumber Features to /Users/ryanc/.jenkins/jobs/cucumber_test_1/workspace/coverage/cucumber. 3114 / 7994 LOC (38.95%) covered.
[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /Users/ryanc/.jenkins/jobs/cucumber_test_1/builds/2013-03-20_17-47-51/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
Finished: SUCCESS

However, when I click on the Cucumber Reports link, I'm taken to:

http://localhost:8080/job/cucumber_test_1/13/cucumber-html-reports/?

or, if I click on the Cucumber Reports link on the project page:

http://localhost:8080/job/cucumber_test_1/cucumber-html-reports/?

The output is:

Status Code: 404

Exception:
Stacktrace:
(none)

Generated by Winstone Servlet Engine v0.9.10 at Wed Mar 20 18:20:26 PDT 2013

The workspace contains a file, cucumber.json, as well as a directory, coverage/cucumber, as well as a directory, jobs/cucumber_test_1/builds/2013-03-20_17-47-51, which contains a folder, cucumber-html-reports.

Does that provide enough context?

empty page only if javascript charts

Hello everyone,

I've looked at the other issues already opened about an empty page shown if checked for the cucumber reports html page.
Here I have a bit different problem:

If I don't turn off flash, I see the reports chart like a charm.

If I do turn off flash, and should visualize them in Javascript... It shows me an empty page.
I thought it was a Java problem, so I updated Java, but it wasn't.
I thought it was a browser rendering problem, so I switched from Firefox to Opera, then Google Chrome and nothing worked.

How I can fix this? I need to show the charts in javascript format.

Thanks in advance.

404 on cucumber-jvm reports

getting a 404 on the cucumber-jvm plugin.

After running the plugin, when i click on the cucumber reports button, i get an empty stacktrace:

Status Code: 404

Exception:
Stacktrace:

using jenkins 1.491
and plugin 0.19

DSV Cucumber #43 main build action completed: SUCCESS
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
at com.google.gson.Gson.fromJson(Gson.java:802)
at com.google.gson.Gson.fromJson(Gson.java:757)
at com.google.gson.Gson.fromJson(Gson.java:706)
at com.google.gson.Gson.fromJson(Gson.java:678)
at net.masterthought.cucumber.ReportParser.parseJsonResults(ReportParser.java:30)
at net.masterthought.cucumber.ReportParser.(ReportParser.java:18)
at net.masterthought.cucumber.ReportBuilder.(ReportBuilder.java:36)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:100)
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:779)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:939)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
at hudson.model.Run.execute(Run.java:1541)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
at com.google.gson.Gson.fromJson(Gson.java:791)

jenkins-cucumber-jvm-reports-plugin-java does not work

I upgraded to the cucumber jvm version 1.0.7 , so that we can see the pretty test results, but this plugin does not seem to work.

Below is how I have my test runners set.

@RunWith(Cucumber.class)
@Cucumber.Options(features = {"classpath:threeBarChart.feature"}, format = {"pretty", "html:target/cucumber", "json:target/cucumber.json"})
public class StandardThreeBarChartAccTest {

}

I installed the plugin on Jenkins, and configured the build so that the relative path to the workspace of the json reports generated by cucumber-jvm is target/cucumber

but the build fails even though all the tests pass and throws the below error

01:19:55 [INFO] BUILD SUCCESS
01:19:55 [INFO] ------------------------------------------------------------------------
01:19:55 [INFO] Total time: 2:17:06.563s (Wall Clock)
01:19:55 [INFO] Finished at: Tue May 22 01:19:55 MDT 2012
01:19:55 [INFO] Final Memory: 198M/495M
01:19:55 [INFO] ------------------------------------------------------------------------
01:20:10 [TASKS] Scanning folder '/opt/ci/hudson/workspace/paper-reports-qa' for files matching the pattern '/*.java,/.xml,__/.pig' - excludes:
01:20:10 [TASKS] Found 1696 files to scan for tasks
01:20:10 [TASKS] Found 118 open tasks.
01:20:10 [TASKS] Computing warning deltas based on reference build #42
01:20:11 Recording test results
01:20:14 [CucumberReportPublisher] Compiling Cucumber Html Reports ...
01:20:14 ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
01:20:14 java.lang.IllegalStateException: basedir /opt/ci/hudson/workspace/paper-reports-qa/target/cucumber does not exist.
01:20:14 at org.apache.tools.ant.DirectoryScanner.scan(DirectoryScanner.java:852)
01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.findJsonFiles(CucumberReportPublisher.java:41)
01:20:14 at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:61)
01:20:14 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
01:20:14 at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
01:20:14 at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:653)
01:20:14 at hudson.model.Build$RunnerImpl.post2(Build.java:162)
01:20:14 at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
01:20:14 at hudson.model.Run.run(Run.java:1434)
01:20:14 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
01:20:14 at hudson.model.ResourceController.execute(ResourceController.java:88)
01:20:14 at hudson.model.Executor.run(Executor.java:238)

[Ruby]Error when generating report

Hi,

This plugin seems cool, so I tried this but failed when generating report.

Following error message was shown in jenkins job console.

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master 
[CucumberReportPublisher] copying json to reports directory: /var/lib/jenkins/jobs/RingNote-AT/builds/2012-08-24_17-03-50/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
    at com.google.gson.Gson.fromJson(Gson.java:802)
    at com.google.gson.Gson.fromJson(Gson.java:757)
    at com.google.gson.Gson.fromJson(Gson.java:706)
    at com.google.gson.Gson.fromJson(Gson.java:678)
    at net.masterthought.cucumber.ReportParser.parseJsonResults(ReportParser.java:30)
    at net.masterthought.cucumber.ReportParser.<init>(ReportParser.java:18)
    at net.masterthought.cucumber.ReportBuilder.<init>(ReportBuilder.java:31)
    at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:98)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:710)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:685)
    at hudson.model.Build$RunnerImpl.post2(Build.java:162)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:632)
    at hudson.model.Run.run(Run.java:1463)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:239)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
    at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
    at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
    at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
    at com.google.gson.Gson.fromJson(Gson.java:791)
    ... 16 more

Error message seems like issue #17, but I'm using cucumber-reports version 0.0.14 on jenkins 1.466.1.
Thank you for help.

Cucumber reports link show a 404 error

Hi,

I've read some issues about 404 error, maybe the solution of my problem is there but I'm not capable to find it.

My trouble is the next:

The plugin works fine during the execution:

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /var/lib/jenkins/jobs/Spitni-UI_Testing_in_PreProd_RUBY/builds/2013-03-08_11-29-37/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
Finished: SUCCESS

I create the cucumber.json using this line in my execution:

bundle exec cucumber -p jenkins features/web/ --format json -o cucumber.json

This is the resultant json:

[{"uri":"features/web/check_home.feature","name":"Check the home page","description":"In order to be sure the home page is shown\nAs a Spitni visitor\nI want to see the home page properly","id":"check-the-home-page","line":1,"keyword":"Feature","elements":[{"steps":[{"name":"i am on the HomePage site","result":{"status":"passed"},"match":{"arguments":[{"offset":12,"val":"HomePage"}],"location":"features/step_definitions/web_shared_steps.rb:33"},"line":9,"keyword":"Given "},{"name":"I should see the products content block","result":{"status":"passed"},"match":{"arguments":[{"offset":17,"val":"products content"}],"location":"features/step_definitions/web_shared_steps.rb:6"},"line":10,"keyword":"Then "}],"name":"Open the home page","description":"As a unregistered user, when going to the home page\ni should be able to see the home page properly.","id":"check-the-home-page;open-the-home-page","line":6,"keyword":"Scenario","type":"scenario"}]},{"uri":"features/web/contact_request.feature","name":"Click on the contact link","description":"In order to look for the submitMessage button","id":"click-on-the-contact-link","line":1,"keyword":"Feature","elements":[{"steps":[{"name":"I am on the HomePage site","result":{"status":"passed"},"match":{"arguments":[{"offset":12,"val":"HomePage"}],"location":"features/step_definitions/web_shared_steps.rb:33"},"line":5,"keyword":"Given "},{"name":"I click on link Contact","result":{"status":"passed"},"match":{"arguments":[{"offset":16,"val":"Contact"}],"location":"features/step_definitions/web_shared_steps.rb:233"},"line":6,"keyword":"When "},{"name":"I should see the Contact page","result":{"status":"passed"},"match":{"arguments":[{"offset":17,"val":"Contact"}],"location":"features/step_definitions/web_shared_steps.rb:109"},"line":7,"keyword":"Then "}],"name":"Go to the homepage and click on the contact link and look for the submitMessage button","description":"","id":"click-on-the-contact-link;go-to-the-homepage-and-click-on-the-contact-link-and-look-for-the-submitmessage-button","line":4,"keyword":"Scenario","type":"scenario"}]}]

Do you see something wrong?

Thanks in advance,
Sergi Just Casas

Embedded screenshot in report

Hi,

It seems that reports are not being embedded in the reports. I have checked the JSON reports generated by cucumber and it does have the "embedding" tag, and i have also generated the embedded base64 code in HTML and the screenshot is rendered properly.

However, after the publishing step of the plugin and copying the JSON reports into Jenkin's build folder, the "embedding" tags are removed from the report. I have compared the JSON reports generated by cucumber (cucumber --format json -o myreport.json myfeature.feature) and the one copied into the build folder jenkins and the "embedding" tag is removed. It would be nice to have that and embed the screenshots in the HTML reports.

Main Tag Chart in Tag Overview is not displaying

Hi,

We recently upgraded to version 0.0.14 and the Main Tag Chart in Tag Overview is not displaying. A blue blank screen is appearing but no graph is displayed in the area. When viewed in IE the browser reports the following error

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 5 Sep 2012 09:36:58 UTC

Message: '$chart_rows' is undefined
Line: 27
Char: 20
Code: 0
URI: http://...../ci/job/my-project-tests/cucumber-html-reports/tag-overview.html

cheers,

ger.

NullPointer exception parsing cucumber.json

Hi, I've been fiddling with this for a few days and can't seem to get the reports plugin to publish the cucumber report.

I can get it to publish an EMPTY report, when I don't correctly specify the location of the .json file. But when I do specify this file, I get a 404. Looking in the build directory, I see a folder called cucumber-html-reports and all it contains is my .json file.

Looking at the tomcat logs, I see the following exception:

Dec 18, 2012 5:57:08 PM hudson.model.Run execute
INFO: SSO #772 main build action completed: SUCCESS
java.lang.NullPointerException
at net.masterthought.cucumber.util.Util.collectSteps(Util.java:104)
at net.masterthought.cucumber.json.Element.getStatus(Element.java:31)
at net.masterthought.cucumber.ReportInformation.processFeatures(ReportInformation.java:187)
at net.masterthought.cucumber.ReportInformation.(ReportInformation.java:39)
at net.masterthought.cucumber.ReportBuilder.(ReportBuilder.java:37)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:100)
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:779)
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:1568)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)

I am using cucumber-jvm 1.1.1

Any thoughts on how I can debug this further?

My .json file is called scrubber.json instead of cucumber.json -- does that matter?

Here are its' contents:

[{"line":1,"elements":[{"line":2,"keyword":"Background","type":"background","name":"Columns can be validated by data type alphanumeric","description":""},{"line":4,"steps":[{"line":6,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":7},{"cells":["Field","alphaNumeric"],"line":8}],"name":"the following attribute definitions"},{"line":10,"keyword":"When ","rows":[{"cells":["Field"],"line":11},{"cells":["Test1"],"line":12}],"name":"I validate a field that matches the type"},{"line":13,"keyword":"Then ","name":"there are no errors"},{"line":15,"keyword":"When ","rows":[{"cells":["Field"],"line":16},{"cells":[""],"line":17}],"name":"I validate an empty field"},{"line":18,"keyword":"Then ","name":"there are no errors"},{"line":20,"keyword":"When ","rows":[{"cells":["Field"],"line":21},{"cells":["Test!"],"line":22}],"name":"I validate an field with non-alpha characters"},{"line":23,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":24},{"cells":["2","[Invalid value, must be alphaNumeric ]","Test!"],"line":25}],"name":"there is 1 error","result":{"status":"passed","duration":1114000}}],"keyword":"Scenario","type":"scenario","name":"alphanumeric","id":"alphanumeric-data-type-matching;alphanumeric","description":""},{"line":2,"keyword":"Background","type":"background","name":"Columns can be validated by data type alphanumeric","description":""},{"line":27,"steps":[{"line":29,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":30},{"cells":["Field","alphaNumericUppercase"],"line":31}],"name":"the following attribute definitions"},{"line":33,"keyword":"When ","rows":[{"cells":["Field"],"line":34},{"cells":["TEST1"],"line":35}],"name":"I validate a field that matches the type"},{"line":36,"keyword":"Then ","name":"there are no errors"},{"line":38,"keyword":"When ","rows":[{"cells":["Field"],"line":39},{"cells":[""],"line":40}],"name":"I validate an empty field"},{"line":41,"keyword":"Then ","name":"there are no errors"},{"line":43,"keyword":"When ","rows":[{"cells":["Field"],"line":44},{"cells":["TEST!"],"line":45}],"name":"I validate an field with non-alpha characters"},{"line":46,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":47},{"cells":["2","[Invalid value, must be alphaNumeric Uppercase ]","TEST!"],"line":48}],"name":"there is 1 error"},{"line":50,"keyword":"When ","rows":[{"cells":["Field"],"line":51},{"cells":["Test"],"line":52}],"name":"I validate an field with lowercase characters"},{"line":53,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":54},{"cells":["2","[Invalid value, must be alphaNumeric Uppercase ]","Test"],"line":55}],"name":"there is 1 error","result":{"status":"passed","duration":182000}}],"keyword":"Scenario","type":"scenario","name":"alphanumericUppercase","id":"alphanumeric-data-type-matching;alphanumericuppercase","description":""},{"line":2,"keyword":"Background","type":"background","name":"Columns can be validated by data type alphanumeric","description":""},{"line":57,"steps":[{"line":59,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":60},{"cells":["Field","alphaNumericLowercase"],"line":61}],"name":"the following attribute definitions"},{"line":63,"keyword":"When ","rows":[{"cells":["Field"],"line":64},{"cells":["test1"],"line":65}],"name":"I validate a field that matches the type"},{"line":66,"keyword":"Then ","name":"there are no errors"},{"line":68,"keyword":"When ","rows":[{"cells":["Field"],"line":69},{"cells":[""],"line":70}],"name":"I validate an empty field"},{"line":71,"keyword":"Then ","name":"there are no errors"},{"line":73,"keyword":"When ","rows":[{"cells":["Field"],"line":74},{"cells":["test!"],"line":75}],"name":"I validate an field with non-alpha characters"},{"line":76,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":77},{"cells":["2","[Invalid value, must be alphaNumeric Lowercase ]","test!"],"line":78}],"name":"there is 1 error"},{"line":80,"keyword":"When ","rows":[{"cells":["Field"],"line":81},{"cells":["Test"],"line":82}],"name":"I validate an field with uppercase characters"},{"line":83,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":84},{"cells":["2","[Invalid value, must be alphaNumeric Lowercase ]","Test"],"line":85}],"name":"there is 1 error","result":{"status":"passed","duration":178000}}],"keyword":"Scenario","type":"scenario","name":"alphanumericLowercase","id":"alphanumeric-data-type-matching;alphanumericlowercase","description":""}],"keyword":"Feature","name":"Alphanumeric data type matching","id":"alphanumeric-data-type-matching","uri":"com/scholastic/util/scrubber/alphanumeric.feature","description":""},{"line":1,"elements":[{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":4,"steps":[{"line":6,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":7},{"cells":["Field","invalidType"],"line":8}],"name":"the following attribute definitions"},{"line":10,"keyword":"Then ","name":"the attributes are not parsed"},{"line":12,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":13},{"cells":["Field","positiveint"],"line":14}],"name":"the following attribute definitions"},{"line":16,"match":{"location":"ScrubberStepDefs.the_attributes_are_not_parsed()"},"keyword":"Then ","name":"the attributes are not parsed","result":{"status":"passed","duration":126000}}],"keyword":"Scenario","type":"scenario","name":"Invalid data type","id":"datatype-validation;invalid-data-type","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":18,"steps":[{"line":20,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":21},{"cells":["Field","positiveInt"],"line":22}],"name":"the following attribute definitions"},{"line":24,"keyword":"When ","rows":[{"cells":["Field"],"line":25},{"cells":["1"],"line":26},{"cells":["0"],"line":27},{"cells":[""],"line":28},{"cells":["9516283819"],"line":29}],"name":"I validate rows with the correct data type"},{"line":30,"keyword":"Then ","name":"there are no errors"},{"line":32,"keyword":"When ","rows":[{"cells":["Field"],"line":33},{"cells":["-1"],"line":34},{"cells":["-0"],"line":35},{"cells":["a"],"line":36},{"cells":["\u0026123"],"line":37}],"name":"I validate rows with the incorrect data types"},{"line":38,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"4","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(4)FieldErrors","Field"],"line":39},{"cells":["2","[Invalid value, must be positive int]","-1"],"line":40},{"cells":["3","[Invalid value, must be positive int]","-0"],"line":41},{"cells":["4","[Invalid value, must be positive int]","a"],"line":42},{"cells":["5","[Invalid value, must be positive int]","\u0026123"],"line":43}],"name":"there are 4 errors","result":{"status":"passed","duration":357000}}],"keyword":"Scenario","type":"scenario","name":"Positive integer","id":"datatype-validation;positive-integer","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":45,"steps":[{"line":47,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":48},{"cells":["Field","alphaNumeric"],"line":49}],"name":"the following attribute definitions"},{"line":51,"keyword":"When ","rows":[{"cells":["Field"],"line":52},{"cells":["abc"],"line":53},{"cells":["ABC"],"line":54},{"cells":["123"],"line":55},{"cells":[""],"line":56},{"cells":["abc123"],"line":57},{"cells":["aBC123"],"line":58},{"cells":["ABC123"],"line":59}],"name":"I validate rows with the correct data type"},{"line":60,"keyword":"Then ","name":"there are no errors"},{"line":62,"keyword":"When ","rows":[{"cells":["Field"],"line":63},{"cells":["-1"],"line":64},{"cells":["\u0026123"],"line":65},{"cells":[""],"line":66}],"name":"I validate rows with the incorrect data types"},{"line":67,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"3","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(3)FieldErrors","Field"],"line":68},{"cells":["2","[Invalid value, must be alphaNumeric ]","-1"],"line":69},{"cells":["3","[Invalid value, must be alphaNumeric ]","\u0026123"],"line":70},{"cells":["4","[Invalid value, must be alphaNumeric ]",""],"line":71}],"name":"there are 3 errors","result":{"status":"passed","duration":269000}}],"keyword":"Scenario","type":"scenario","name":"Alphanumeric","id":"datatype-validation;alphanumeric","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":73,"steps":[{"line":75,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":76},{"cells":["Field","alphaNumericLowercase"],"line":77}],"name":"the following attribute definitions"},{"line":79,"keyword":"When ","rows":[{"cells":["Field"],"line":80},{"cells":["abc"],"line":81},{"cells":["ab c"],"line":82},{"cells":["123"],"line":83},{"cells":[""],"line":84},{"cells":["abc123"],"line":85}],"name":"I validate rows with the correct data type"},{"line":86,"keyword":"Then ","name":"there are no errors"},{"line":88,"keyword":"When ","rows":[{"cells":["Field"],"line":89},{"cells":["-1"],"line":90},{"cells":["\u0026123"],"line":91},{"cells":[""],"line":92},{"cells":["aBc"],"line":93},{"cells":["ABC"],"line":94},{"cells":["a,bc"],"line":95}],"name":"I validate rows with the incorrect data types"},{"line":96,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"6","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(6)FieldErrors","Field"],"line":97},{"cells":["2","[Invalid value, must be alphaNumeric Lowercase ]","-1"],"line":98},{"cells":["3","[Invalid value, must be alphaNumeric Lowercase ]","\u0026123"],"line":99},{"cells":["4","[Invalid value, must be alphaNumeric Lowercase ]",""],"line":100},{"cells":["5","[Invalid value, must be alphaNumeric Lowercase ]","aBc"],"line":101},{"cells":["6","[Invalid value, must be alphaNumeric Lowercase ]","ABC"],"line":102},{"cells":["7","[Invalid value, must be alphaNumeric Lowercase ]","a,bc"],"line":103}],"name":"there are 6 errors","result":{"status":"passed","duration":430000}}],"keyword":"Scenario","type":"scenario","name":"Alphanumeric Lowercase","id":"datatype-validation;alphanumeric-lowercase","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":105,"steps":[{"line":107,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":108},{"cells":["Field","alphaNumericUppercase"],"line":109}],"name":"the following attribute definitions"},{"line":111,"keyword":"When ","rows":[{"cells":["Field"],"line":112},{"cells":["ABC"],"line":113},{"cells":["123"],"line":114},{"cells":[""],"line":115},{"cells":["ABC123"],"line":116}],"name":"I validate rows with the correct data type"},{"line":117,"keyword":"Then ","name":"there are no errors"},{"line":119,"keyword":"When ","rows":[{"cells":["Field"],"line":120},{"cells":["-1"],"line":121},{"cells":["\u0026123"],"line":122},{"cells":[""],"line":123},{"cells":["abc"],"line":124},{"cells":["aBc"],"line":125},{"cells":["A,BC"],"line":126}],"name":"I validate rows with the incorrect data types"},{"line":127,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"6","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(6)FieldErrors","Field"],"line":128},{"cells":["2","[Invalid value, must be alphaNumeric Uppercase ]","-1"],"line":129},{"cells":["3","[Invalid value, must be alphaNumeric Uppercase ]","\u0026123"],"line":130},{"cells":["4","[Invalid value, must be alphaNumeric Uppercase ]",""],"line":131},{"cells":["5","[Invalid value, must be alphaNumeric Uppercase ]","abc"],"line":132},{"cells":["6","[Invalid value, must be alphaNumeric Uppercase ]","aBc"],"line":133},{"cells":["7","[Invalid value, must be alphaNumeric Uppercase ]","A,BC"],"line":134}],"name":"there are 6 errors","result":{"status":"passed","duration":446000}}],"keyword":"Scenario","type":"scenario","name":"Alphanumeric Uppercase","id":"datatype-validation;alphanumeric-uppercase","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":136,"steps":[{"line":138,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":139},{"cells":["Field","positive2PlaceDecimal"],"line":140}],"name":"the following attribute definitions"},{"line":142,"keyword":"When ","rows":[{"cells":["Field"],"line":143},{"cells":["123.45"],"line":144},{"cells":["0.12"],"line":145},{"cells":[".12"],"line":146},{"cells":["0"],"line":147},{"cells":["123"],"line":148},{"cells":["123.1"],"line":149},{"cells":[""],"line":150},{"cells":["100023421.78"],"line":151}],"name":"I validate rows with the correct data type"},{"line":152,"keyword":"Then ","name":"there are no errors"},{"line":154,"keyword":"When ","rows":[{"cells":["Field"],"line":155},{"cells":["-0.12"],"line":156},{"cells":["-1"],"line":157},{"cells":["-0"],"line":158},{"cells":["123,1"],"line":159},{"cells":["123.123"],"line":160},{"cells":["a,BC"],"line":161}],"name":"I validate rows with the incorrect data types"},{"line":162,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"6","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(6)FieldErrors","Field"],"line":163},{"cells":["2","[Invalid value, must be positive 2place decimal ]","-0.12"],"line":164},{"cells":["3","[Invalid value, must be positive 2place decimal ]","-1"],"line":165},{"cells":["4","[Invalid value, must be positive 2place decimal ]","-0"],"line":166},{"cells":["5","[Invalid value, must be positive 2place decimal ]","123,1"],"line":167},{"cells":["6","[Invalid value, must be positive 2place decimal ]","123.123"],"line":168},{"cells":["7","[Invalid value, must be positive 2place decimal ]","a,BC"],"line":169}],"name":"there are 6 errors","result":{"status":"passed","duration":448000}}],"keyword":"Scenario","type":"scenario","name":"Positive 2 place decimal","id":"datatype-validation;positive-2-place-decimal","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the type of data in a field, the scrubber generates errors when those rules are violated","description":""},{"line":171,"steps":[{"line":173,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Data Type"],"line":174},{"cells":["Field","positiveDecimal"],"line":175}],"name":"the following attribute definitions"},{"line":177,"keyword":"When ","rows":[{"cells":["Field"],"line":178},{"cells":["123.45"],"line":179},{"cells":["0.12"],"line":180},{"cells":["0"],"line":181},{"cells":["123"],"line":182},{"cells":["123.1"],"line":183},{"cells":[""],"line":184},{"cells":["123.123"],"line":185},{"cells":["123.1234567"],"line":186},{"cells":[".12"],"line":187},{"cells":["100023421.78"],"line":188}],"name":"I validate rows with the correct data type"},{"line":189,"keyword":"Then ","name":"there are no errors"},{"line":191,"keyword":"When ","rows":[{"cells":["Field"],"line":192},{"cells":["-0.12"],"line":193},{"cells":["-1"],"line":194},{"cells":["-0"],"line":195},{"cells":["123,1"],"line":196},{"cells":["a,BC"],"line":197}],"name":"I validate rows with the incorrect data types"},{"line":198,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"5","offset":10}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(5)FieldErrors","Field"],"line":199},{"cells":["2","[Invalid value, must be Positive Decimal]","-0.12"],"line":200},{"cells":["3","[Invalid value, must be Positive Decimal]","-1"],"line":201},{"cells":["4","[Invalid value, must be Positive Decimal]","-0"],"line":202},{"cells":["5","[Invalid value, must be Positive Decimal]","123,1"],"line":203},{"cells":["6","[Invalid value, must be Positive Decimal]","a,BC"],"line":204}],"name":"there are 5 errors","result":{"status":"passed","duration":366000}}],"keyword":"Scenario","type":"scenario","name":"Positive decimal","id":"datatype-validation;positive-decimal","description":""}],"keyword":"Feature","name":"Datatype validation","id":"datatype-validation","uri":"com/scholastic/util/scrubber/datatypes.feature","description":""},{"line":1,"elements":[{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":6,"steps":[{"line":7,"keyword":"Given ","rows":[{"cells":[""],"line":8}],"name":"these attribute definitions"},{"line":9,"keyword":"When ","name":"I complete them"},{"line":10,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate",""],"line":11}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":116000}}],"keyword":"Scenario","type":"scenario","name":"Empty header row","id":"attribute-definition-completion;empty-header-row","description":""},{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":13,"steps":[{"line":14,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":15}],"name":"these attribute definitions"},{"line":16,"keyword":"When ","name":"I complete them"},{"line":17,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":18}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":63000}}],"keyword":"Scenario","type":"scenario","name":"Complete header row","id":"attribute-definition-completion;complete-header-row","description":""},{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":20,"steps":[{"line":21,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Unique"],"line":22}],"name":"these attribute definitions"},{"line":23,"keyword":"When ","name":"I complete them"},{"line":24,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":25}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":68000}}],"keyword":"Scenario","type":"scenario","name":"Partial header row at start","id":"attribute-definition-completion;partial-header-row-at-start","description":""},{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":27,"steps":[{"line":28,"keyword":"Given ","rows":[{"cells":["Data Type Details","Validate"],"line":29}],"name":"these attribute definitions"},{"line":30,"keyword":"When ","name":"I complete them"},{"line":31,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":32}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":63000}}],"keyword":"Scenario","type":"scenario","name":"Partial header row at end","id":"attribute-definition-completion;partial-header-row-at-end","description":""},{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":34,"steps":[{"line":35,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Unique","Data Type Details","Validate"],"line":36}],"name":"these attribute definitions"},{"line":37,"keyword":"When ","name":"I complete them"},{"line":38,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":39}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":62000}}],"keyword":"Scenario","type":"scenario","name":"Partial header row at beginning and end","id":"attribute-definition-completion;partial-header-row-at-beginning-and-end","description":""},{"line":2,"keyword":"Background","type":"background","name":"To support more succinct tests and eliminate repeated updates when the attribute changes, we have a helper to","description":"fill in missing attributes"},{"line":41,"steps":[{"line":42,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Unique","Data Type Details","Validate"],"line":43},{"cells":["One","Yes","test1","true"],"line":44},{"cells":["Two","No","test2","false"],"line":45}],"name":"these attribute definitions"},{"line":46,"keyword":"When ","name":"I complete them"},{"line":47,"match":{"location":"AttributeDefinitionHelperStepdefs.I_get_the_following_attribute_definitions(DataTable)"},"keyword":"Then ","rows":[{"cells":["TSO Attribute","Unique","Required Field","number of characters type","number of charaters","allowable strings","restricted chars","restricted Strings","Data Type","Data Type Details","Validate"],"line":48},{"cells":["One","Yes","","","","","","","","test1","true"],"line":49},{"cells":["Two","No","","","","","","","","test2","false"],"line":50}],"name":"I get the following attribute definitions","result":{"status":"passed","duration":106000}}],"keyword":"Scenario","type":"scenario","name":"Values in supplied columns","id":"attribute-definition-completion;values-in-supplied-columns","description":""}],"keyword":"Feature","name":"Attribute definition completion","id":"attribute-definition-completion","uri":"com/scholastic/util/scrubber/helpers/attributedefinitionhelper.feature","description":""},{"line":1,"elements":[{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the number of characters, the scrubber generates errors when those rules are violated","description":""},{"line":4,"steps":[{"line":6,"keyword":"Given ","rows":[{"cells":["TSO Attribute","number of characters type","number of charaters"],"line":7},{"cells":["No Requirement","",""],"line":8},{"cells":["5 or less","up to","5"],"line":9}],"name":"the following attribute definitions"},{"line":11,"keyword":"When ","rows":[{"cells":["No Requirement","5 or less"],"line":12},{"cells":["","Test"],"line":13}],"name":"I validate an empty field with no requirement"},{"line":14,"keyword":"Then ","name":"there are no errors"},{"line":16,"keyword":"When ","rows":[{"cells":["No Requirement","5 or less"],"line":17},{"cells":["","Test12"],"line":18}],"name":"I validate a field with more characters than allowed"},{"line":19,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)5 or lessErrors","5 or less"],"line":20},{"cells":["2","[GREATER THAN 5 CHARS]","Test12"],"line":21}],"name":"there is 1 error"},{"line":23,"keyword":"When ","rows":[{"cells":["No Requirement","5 or less"],"line":24},{"cells":["","Test1"],"line":25}],"name":"I validate a field with exactly the number of characters allowed"},{"line":26,"match":{"location":"ScrubberStepDefs.there_are_no_errors()"},"keyword":"Then ","name":"there are no errors","result":{"status":"passed","duration":21000}}],"keyword":"Scenario","type":"scenario","name":"Maximum lengths","id":"number-of-characters-validation;maximum-lengths","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields have requirements about the number of characters, the scrubber generates errors when those rules are violated","description":""},{"line":28,"steps":[{"line":30,"keyword":"Given ","rows":[{"cells":["TSO Attribute","number of characters type","number of charaters"],"line":31},{"cells":["No Requirement","",""],"line":32},{"cells":["5 exactly","exactly","5"],"line":33}],"name":"the following attribute definitions"},{"line":35,"keyword":"When ","rows":[{"cells":["No Requirement","5 exactly"],"line":36},{"cells":["","Test12"],"line":37}],"name":"I validate a field with more characters than allowed"},{"line":38,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)5 exactlyErrors","5 exactly"],"line":39},{"cells":["2","[5 CHARs REQUIRED]","Test12"],"line":40}],"name":"there is 1 error"},{"line":42,"keyword":"When ","rows":[{"cells":["No Requirement","5 exactly"],"line":43},{"cells":["","Test"],"line":44}],"name":"I validate a field with fewer characters than allowed"},{"line":45,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)5 exactlyErrors","5 exactly"],"line":46},{"cells":["2","[5 CHARs REQUIRED]","Test"],"line":47}],"name":"there is 1 error"},{"line":49,"keyword":"When ","rows":[{"cells":["No Requirement","5 exactly"],"line":50},{"cells":["","Test1"],"line":51}],"name":"I validate a field with exactly the number of characters allowed"},{"line":52,"keyword":"Then ","name":"there are no errors"},{"line":54,"keyword":"When ","rows":[{"cells":["No Requirement","5 exactly"],"line":55},{"cells":["",""],"line":56}],"name":"I validate a field with no characters at all (empty)"},{"line":57,"match":{"location":"ScrubberStepDefs.there_are_no_errors()"},"keyword":"Then ","name":"there are no errors","result":{"status":"passed","duration":36000}}],"keyword":"Scenario","type":"scenario","name":"Exact length","id":"number-of-characters-validation;exact-length","description":""}],"keyword":"Feature","name":"Number of characters validation","id":"number-of-characters-validation","uri":"com/scholastic/util/scrubber/numchars.feature","description":""},{"line":1,"elements":[{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":5,"steps":[{"line":7,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":8},{"cells":["Field","Required"],"line":9},{"cells":["Other Field",""],"line":10}],"name":"the following attribute definitions"},{"line":12,"keyword":"When ","rows":[{"cells":["Field","Other Field"],"line":13},{"cells":["Test1","Foo"],"line":14}],"name":"I validate a row with all fields present"},{"line":15,"keyword":"Then ","name":"there are no errors"},{"line":17,"keyword":"When ","rows":[{"cells":["Field","Other Field"],"line":18},{"cells":["","Foo"],"line":19}],"name":"I validate a row with required field missing"},{"line":20,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)FieldErrors","Field"],"line":21},{"cells":["2","[INVALID NULL, required ]",""],"line":22}],"name":"there is 1 error","result":{"status":"passed","duration":629000}}],"keyword":"Scenario","type":"scenario","name":"Required field","id":"required-validation;required-field","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":24,"steps":[{"line":26,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":27},{"cells":["Field","Required blah"],"line":28}],"name":"the following attribute definitions"},{"line":30,"keyword":"When ","rows":[{"cells":["Field","Other Field"],"line":31},{"cells":["","Foo"],"line":32}],"name":"I validate a row with required field missing"},{"line":33,"match":{"location":"ScrubberStepDefs.there_are_no_errors()"},"keyword":"Then ","name":"there are no errors because the Required rule was not processed","result":{"status":"passed","duration":18000}}],"keyword":"Scenario","type":"scenario","name":"Required field with extra characters","id":"required-validation;required-field-with-extra-characters","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":77,"steps":[{"line":79,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":80},{"cells":["Conditional","required if "Optional" exists"],"line":81},{"cells":["Optional",""],"line":82}],"name":"the following attribute definitions"},{"line":84,"keyword":"When ","rows":[{"cells":["Conditional","Optional"],"line":85},{"cells":["",""],"line":86}],"name":"I validate a row with a conditional field missing and its condition is false"},{"line":87,"keyword":"Then ","name":"there are no errors"},{"line":89,"keyword":"When ","rows":[{"cells":["Conditional","Optional"],"line":90},{"cells":["","Test3"],"line":91}],"name":"I validate a row with a conditional field missing and its condition is true"},{"line":93,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)ConditionalErrors","Conditional"],"line":94},{"cells":["2","[INVALID NULL, required ]",""],"line":95}],"name":"there is 1 error","result":{"status":"passed","duration":266000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required field","id":"required-validation;conditionally-required-field","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":97,"steps":[{"line":99,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":100},{"cells":["Field","Required if"],"line":101}],"name":"the following attribute definitions"},{"line":103,"match":{"location":"ScrubberStepDefs.the_attributes_are_not_parsed()"},"keyword":"Then ","name":"the attributes are not parsed","result":{"status":"passed","duration":202000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required field missing conditional field name","id":"required-validation;conditionally-required-field-missing-conditional-field-name","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":105,"steps":[{"line":107,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":108},{"cells":["Conditional","required if "Optional" exists"],"line":109}],"name":"the following attribute definitions"},{"line":111,"match":{"location":"ScrubberStepDefs.the_attributes_are_parsed()"},"keyword":"Then ","name":"the attributes are parsed","result":{"status":"passed","duration":324000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required field missing conditional field","id":"required-validation;conditionally-required-field-missing-conditional-field","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":114,"steps":[{"line":116,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":117},{"cells":["Conditional","required if "Value" not in\t["foo"]"],"line":118},{"cells":["Value",""],"line":119}],"name":"the following attribute definitions"},{"line":121,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":122},{"cells":["Test2","Test3"],"line":123}],"name":"I validate a row with all fields present"},{"line":124,"keyword":"Then ","name":"there are no errors"},{"line":126,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":127},{"cells":["Test2","foo"],"line":128}],"name":"I validate a row with all fields present and value member of list"},{"line":129,"keyword":"Then ","name":"there are no errors"},{"line":131,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":132},{"cells":["","foo"],"line":133}],"name":"I validate a row with conditional field missing and value is member of list"},{"line":134,"keyword":"Then ","name":"there are no errors"},{"line":136,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":137},{"cells":["","Test"],"line":138}],"name":"I validate a row with conditional field missing and value not member of list"},{"line":139,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)ConditionalErrors","Conditional"],"line":140},{"cells":["2","[INVALID NULL, required ]",""],"line":141}],"name":"there is 1 error","result":{"status":"passed","duration":208000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required if not member of list","id":"required-validation;conditionally-required-if-not-member-of-list","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":143,"steps":[{"line":145,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":146},{"cells":["Conditional","required if "Value" in\t["foo", "bar"]"],"line":147},{"cells":["Value",""],"line":148}],"name":"the following attribute definitions"},{"line":150,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":151},{"cells":["Test2","Test3"],"line":152}],"name":"I validate a row with all fields present"},{"line":153,"keyword":"Then ","name":"there are no errors"},{"line":155,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":156},{"cells":["Test2","foo"],"line":157}],"name":"I validate a row with all fields present and value member of list"},{"line":158,"keyword":"Then ","name":"there are no errors"},{"line":160,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":161},{"cells":["","foo"],"line":162}],"name":"I validate a row with conditional field missing and value is member of list"},{"line":163,"keyword":"Then ","rows":[{"cells":["lineNumber","(1)ConditionalErrors","Conditional"],"line":164},{"cells":["2","[INVALID NULL, required ]",""],"line":165}],"name":"there is 1 error"},{"line":167,"keyword":"When ","rows":[{"cells":["Conditional","Value"],"line":168},{"cells":["","Test"],"line":169}],"name":"I validate a row with conditional field missing and value not member of list"},{"line":170,"match":{"location":"ScrubberStepDefs.there_are_no_errors()"},"keyword":"Then ","name":"there are no errors","result":{"status":"passed","duration":23000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required if member of list","id":"required-validation;conditionally-required-if-member-of-list","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":173,"steps":[{"line":175,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":176},{"cells":["Conditional","required if "Value" in"],"line":177},{"cells":["Value",""],"line":178}],"name":"the following attribute definitions"},{"line":180,"match":{"location":"ScrubberStepDefs.the_attributes_are_not_parsed()"},"keyword":"Then ","name":"the attributes are not parsed","result":{"status":"passed","duration":351000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required if member but no list specified","id":"required-validation;conditionally-required-if-member-but-no-list-specified","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":182,"steps":[{"line":184,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":185},{"cells":["Conditional","required if "Value""],"line":186},{"cells":["Value",""],"line":187}],"name":"the following attribute definitions"},{"line":189,"match":{"location":"ScrubberStepDefs.the_attributes_are_not_parsed()"},"keyword":"Then ","name":"the attributes are not parsed","result":{"status":"passed","duration":299000}}],"keyword":"Scenario","type":"scenario","name":"Conditionally required if member but missing in keyword","id":"required-validation;conditionally-required-if-member-but-missing-in-keyword","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":191,"steps":[{"line":193,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":194},{"cells":["Conditional","required if "Field1" exists AND "Field2" exists"],"line":195},{"cells":["Field1",""],"line":196},{"cells":["Field2",""],"line":197}],"name":"the following attribute definitions"},{"line":199,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":200},{"cells":["","",""],"line":201}],"name":"I validate a row with a conditional field missing and both its conditions are false"},{"line":202,"keyword":"Then ","name":"there are no errors"},{"line":204,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":205},{"cells":["","Hello",""],"line":206}],"name":"I validate a row with a conditional field missing and one of its conditions are false"},{"line":207,"keyword":"Then ","name":"there are no errors"},{"line":209,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":210},{"cells":["","","Kitty"],"line":211}],"name":"I validate a row with a conditional field missing and its other condition is false"},{"line":212,"keyword":"Then ","name":"there are no errors"},{"line":214,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":215},{"cells":["","Hello","Kitty"],"line":216}],"name":"I validate a row with a conditional field missing and both its conditions are true"},{"line":218,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)ConditionalErrors","Conditional"],"line":219},{"cells":["2","[INVALID NULL, required ]",""],"line":220}],"name":"there is 1 error","result":{"status":"passed","duration":258000}}],"keyword":"Scenario","type":"scenario","name":"Conditional required field AND field","id":"required-validation;conditional-required-field-and-field","description":""},{"line":2,"keyword":"Background","type":"background","name":"When fields are required, the validation generates errors when they are absent","description":""},{"line":222,"steps":[{"line":224,"keyword":"Given ","rows":[{"cells":["TSO Attribute","Required Field"],"line":225},{"cells":["Conditional","required if "Field1" exists AND "Field2" in ["foo"]"],"line":226},{"cells":["Field1",""],"line":227},{"cells":["Field2",""],"line":228}],"name":"the following attribute definitions"},{"line":230,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":231},{"cells":["","",""],"line":232}],"name":"I validate a row with a conditional field missing and both its conditions are false"},{"line":233,"keyword":"Then ","name":"there are no errors"},{"line":235,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":236},{"cells":["","Hello",""],"line":237}],"name":"I validate a row with a conditional field missing and one of its conditions are false"},{"line":238,"keyword":"Then ","name":"there are no errors"},{"line":240,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":241},{"cells":["","","foo"],"line":242}],"name":"I validate a row with a conditional field missing and its other condition is false"},{"line":243,"keyword":"Then ","name":"there are no errors"},{"line":245,"keyword":"When ","rows":[{"cells":["Conditional","Field1","Field2"],"line":246},{"cells":["","Hello","foo"],"line":247}],"name":"I validate a row with a conditional field missing and both its conditions are true"},{"line":249,"match":{"location":"ScrubberStepDefs.there_are_errors(int,DataTable)","arguments":[{"val":"1","offset":9}]},"keyword":"Then ","rows":[{"cells":["lineNumber","(1)ConditionalErrors","Conditional"],"line":250},{"cells":["2","[INVALID NULL, required ]",""],"line":251}],"name":"there is 1 error","result":{"status":"passed","duration":218000}}],"keyword":"Scenario","type":"scenario","name":"Conditional required field AND field in list","id":"required-validation;conditional-required-field-and-field-in-list","description":""}],"keyword":"Feature","name":"Required Validation","id":"required-validation","uri":"com/scholastic/util/scrubber/required.feature","description":""}]

empty reports after compiling .json file

Hi,

i'm trying to get this really cool plugin (v.0.0.14) running on jenkins (v1.397). I'm using cucumber-jvm-1.0.4 and run my tests via ant (seem's there's no way to quote xml here... :/ )

Unfortunately the resulting report is always empty although the generated json file contains definitely the right results. The jenkins console only displays the following messages (I have to leave out the reports directory here but this is fine anyway)

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory:
[CucumberReportPublisher] Generating HTML reports

Seems to me that the json report can't be read for some reason... ?!

Unimplemented steps do not appear as skipped or failed

When running Cucumber tests, an unimplemented step will fail the build (correctly), but the Jenkins reporting plugin fails to mark the feature as failed (or even skipped).

On drilling into the feature file, the relevant step is marked in yellow, but the main reporting page does not reflect this.

I have a screenshot of the relevant areas, and the JSON file saved, but cannot add these to the issue. If any further information is required please let me know.

Thanks for your hard work on this plugin, it's extremely useful

Error in GSON while parsing JSON report

JSON-output it generated from cucumber-jvm 1.0.8.

Output from Jenkins build:

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] copying json to reports directory: /home/tomcat/.hudson/jobs/tips/builds/2012-05-24_18-59-51/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
java.lang.RuntimeException: Unable to invoke no-args constructor for class [Lnet.masterthought.jenkins.json.Feature;. Register an InstanceCreator with Gson for this type may fix this problem.
    at com.google.gson.MappedObjectConstructor.constructWithAllocators(MappedObjectConstructor.java:68)
    at com.google.gson.MappedObjectConstructor.construct(MappedObjectConstructor.java:52)
    at com.google.gson.JsonObjectDeserializationVisitor.constructTarget(JsonObjectDeserializationVisitor.java:42)
    at com.google.gson.JsonDeserializationVisitor.getTarget(JsonDeserializationVisitor.java:60)
    at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:104)
    at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:76)
    at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:54)
    at com.google.gson.Gson.fromJson(Gson.java:551)
    at com.google.gson.Gson.fromJson(Gson.java:498)
    at com.google.gson.Gson.fromJson(Gson.java:467)
    at com.google.gson.Gson.fromJson(Gson.java:417)
    at com.google.gson.Gson.fromJson(Gson.java:389)
    at net.masterthought.jenkins.FeatureReportGenerator.parseJsonResults(FeatureReportGenerator.java:48)
    at net.masterthought.jenkins.FeatureReportGenerator.<init>(FeatureReportGenerator.java:34)
    at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:71)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
    at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:998)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
    at hudson.model.Run.run(Run.java:1435)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gson.UnsafeAllocator$1.newInstance(UnsafeAllocator.java:48)
    at com.google.gson.MappedObjectConstructor.constructWithAllocators(MappedObjectConstructor.java:64)
    ... 23 more
Caused by: java.lang.InstantiationException: [Lnet.masterthought.jenkins.json.Feature;
    at sun.misc.Unsafe.allocateInstance(Native Method)
    ... 29 more

I can't install this plugin

I downloaded if from github, and upload to my jenkins, but we can't see it in my installed plugins list.

My jenkins version is: Jenkins ver. 1.461

Thanks

Error while generating report 2

Hi,

I encountered a quite similar issue as the previous one (with a different error) :

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /var/lib/jenkins/jobs/projet/builds/2012-07-04_11-44-27/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
ERROR: Publisher net.masterthought.jenkins.CucumberReportPublisher aborted due to exception
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
at com.google.gson.Gson.fromJson(Gson.java:802)
at com.google.gson.Gson.fromJson(Gson.java:757)
at com.google.gson.Gson.fromJson(Gson.java:706)
at com.google.gson.Gson.fromJson(Gson.java:678)
at net.masterthought.jenkins.FeatureReportGenerator.parseJsonResults(FeatureReportGenerator.java:54)
at net.masterthought.jenkins.FeatureReportGenerator.(FeatureReportGenerator.java:36)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:96)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:717)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:692)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:639)
at hudson.model.Run.execute(Run.java:1513)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:306)
at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)
at com.google.gson.Gson.fromJson(Gson.java:791)
... 15 more

The problem is that I didn't change nothing, it was working good until yesterday. On seeing this, I updated Jenkins and all the plugins this morning, I uninstalled the cucumber plugin, then reinstalled. Always this error of BEGIN_ARRAY...

Thank you for help !

I18N, just to be sure ...

Hi,

Just to be sure, this time, is this code yet only intented to be used within jenkins ? So I could request a pull with I18N UI for jenkins using jenkins plugin I18N tools ?

Project level page, general UI enhancements

I've created a fork here https://github.com/dpayne/jenkins-cucumber-jvm-reports-plugin-java
I've added a project overview page, where each json file in the reports directory is a new project. This is very helpful when each json file has a large number of tests.

I've also made significant UI changes to all of the pages.

I've documented the changes here https://github.com/dpayne/jenkins-cucumber-jvm-reports-plugin-java/#differences-from-masterthoughts-plugin

empty page

Hello Kingsley,

i'm trying to run your cucumber-reports plugin v0.0.14 on a jenkins v1.473. The build runs smoothly and shows that the json files are being processed ...

[CucumberReportPublisher] Compiling Cucumber Html Reports ...
[CucumberReportPublisher] detected this build is running on the master
[CucumberReportPublisher] copying json to reports directory: /project/foo/tools/hudson/jobs/bar/builds/2012-10-03_09-39-42/cucumber-html-reports
[CucumberReportPublisher] Generating HTML reports
Finished: SUCCESS

However the reports page is empty when i hit a "cucumber reports" button. It doesn't even give a 404 error. The links point to http://jenkins-host:8120/job/bar/281/cucumber-html-reports/?

The json files are generated in the workspace directory ../bar/ws/bar/foo/target/ just as specified in the plugin configuration. How many json files can the plugin handle? Or does it depend on the existence of just a single json file per job/build?

json reports directory being ignored on slave

The setting for json report directory is ignored when the plugin is running on a slave.

Specifically in CucumberReportPublisher the line

    projectWorkspaceOnSlave.copyRecursiveTo( "**/*.json","", masterJsonReportDirectory);

does not include the jsonReportDirectory in the path if it is not empty.

it should be changed to something like the following

if (jsonReportDirectory.isEmpty()) {
       projectWorkspaceOnSlave = new FilePath(projectWorkspaceOnSlave, jsonReportDirectory);
       projectWorkspaceOnSlave.copyRecursiveTo( "**/*.json","", masterJsonReportDirectory);
} else {
       projectWorkspaceOnSlave.copyRecursiveTo( "**/*.json","", masterJsonReportDirectory);
}

Note: I have not yet tested the above code snippet

404 error when trying to open reports

I'm using cucumber-reports 0.0.12 with Jenkins 1.469. After installing the plugin, all plugin configuration options for projects are available. But when I click on any of the 'Cucumber Reports' link, I get the following 404 error:

Status Code: 404
Exception:
Stacktrace:
(none)

Generated by Winstone Servlet Engine v0.9.10 at Fri Jun 15 20:34:01 EEST 2012

Plugin cannot generate report on Windows

Hello,

I came across an issue when running Automation Tests on Windows environment. The plugin throws the following exception

java.io.FileNotFoundException: C:\development_tools\jenkins_home\jobs\Harness\builds\2012-04-19_11-40-26\cucumber-html-
reports\Q1Release\company_record\US1460_CourtesyAccessRenewFromCompanyRecord.feature.html (The system cannot find the p
ath specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileWriter.(Unknown Source)
at net.masterthought.jenkins.FeatureReportGenerator.generateReport(FeatureReportGenerator.java:153)
at net.masterthought.jenkins.FeatureReportGenerator.generateFeatureReports(FeatureReportGenerator.java:100)
at net.masterthought.jenkins.FeatureReportGenerator.generateReports(FeatureReportGenerator.java:46)
at net.masterthought.jenkins.CucumberReportPublisher.perform(CucumberReportPublisher.java:73)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:994)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:627)

So, after having a look at the source code. I found out that the json file generated by the cucumber jvm has the following uri for the feature which was run.

"uri":"Q1Release\company_record\US1460_CourtesyAccessRenewFromCompanyRecord.feature"

But the following code on the Feature class only handles forward slash and not backslash.

net.masterthought.jenkins.json.Feature.class

public String getFileName() {
return uri.replaceAll("/", "-") + ".html";
}

So, I have changed it to the below code and it worked for me.

public String getFileName() {
return uri.replaceAll("/", "-").replaceAll("\\", "-") + ".html";
}

Would you be able to push this changes to the main branch? or if possible I could push myself and help you out with the project?

By the way, the plugin is pretty cool and the report looks very good. well done!

Thanks a million!

Rodrigo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.