Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON report missing scenario description when provided for Scenario outline #837

Closed
kevinschwarz opened this issue Feb 20, 2015 · 2 comments · Fixed by #841
Closed

JSON report missing scenario description when provided for Scenario outline #837

kevinschwarz opened this issue Feb 20, 2015 · 2 comments · Fixed by #841

Comments

@kevinschwarz
Copy link

When I configure the JSON reports the scenario description comes as null in the outputted JSON. It would be useful to populate this with the description from the Scenario outline

@CucumberOptions(plugin = {"json:target/cucumber/cukes.json" })

Scenario Outline: Scenario outline name
Scenario outline description

Given I have a feature
When I test ""
Then I get "" results

Examples: 
  |result type |
  | positive   |
  | negative   |
  | ambiguous  |

Now see outputted JSON, description is null

"description": "",
"name": "Scenario outline name",
"keyword": "Scenario Outline",
"line": 44,
"steps": [
{
"result": {
"duration": 37500,
"status": "passed"
},
"name": "I have a feature",
"keyword": "Given ",
"line": 38,
"match": {
"location": "ReporterSteps.i_have_a_feature()"
}
},
{
"result": {
"duration": 44210,
"status": "passed"
},
"name": "I test "positive"",
"keyword": "When ",
"line": 39,
"match": {
"arguments": [
{
"val": "positive",
"offset": 8
}
],
"location": "ReporterSteps.i_test(String)"
},
"matchedColumns": [
0
]
},
{
"result": {
"duration": 24473,
"status": "passed"
},
"name": "I get "positive" results",
"keyword": "Then ",
"line": 40,
"match": {
"arguments": [
{
"val": "positive",
"offset": 7
}
],
"location": "ReporterSteps.i_get_results(String)"
},
"matchedColumns": [
0
]
}
],
"type": "scenario"

@AkaiTsuki
Copy link

In CucumberScenarioOutline.java under core model, the method createExampleScenario is hard code the description with "" when create a new instance of Scenario from example table(on line 59), which I guess it should be getGherkinModel().getDescription().

brasmusson added a commit to brasmusson/cucumber-jvm that referenced this issue Mar 15, 2015
Both Scenario Outlines and Examples tables can have a description. The
description for an example scenario created from a Scenario Outline is
set to the contatenation of these description (if they both exists).
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants