-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cucumber Json Report Context Information To Scenario/Scenario Outline [New Feature Request] #647
Comments
Looking at the code it appears the description should be added if we have it. We have some unit tests that the scenario description does get output in the json formatter, though no feature tests around it. Checking how we parse scenario outlines, it appears we lose the description when splitting it into multiple scenarios. That code lives in a dependency but I'll get the process started over to fix that. Thanks for reporting this! |
Actually appears to not be an issue with the dependency but simply that we need to get the data from elsewhere. If we want the ability to use example arguments in the description, then that is an update we would need to make on the dependency. I'll open an issue there to discuss that. |
thank you 👍 |
Hi Charlie, When could consumers anticipate a fix for this issue above? Many thanks in advance. |
@charlierudolph are you planning to implement the new event protocol in 2.0? |
@bhreinb - I have a branch with a fix for this. I will try and get a new version published with the fix this weekend. @aslakhellesoy - It wasn't planned currently but is something I could probably get in. Can you please create a new issue for it? |
Fixed in just released 1.3.1 |
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. |
Hi There,
I'm using the latest cucumber implmentation 1.3.0 and I'm wondering could I request a new field been written to the cucumber json that is written at the end of a test run. I believe other implementations of cucumber already support this i.e. (CucumberJVM).
For instance I have the following feature file
`Feature: Protractor_Browser_Restart
Epic:
12568
Scenario Outline: Test Naviagting To The Angular Site
At the end of a test run this generates the following JSON when I register to listen to the "JsonFormatter" i.e.
Generated JSON below
[ { "description": " Epic:\n 12568", "elements": [ { "id": "protractor_browser_restart;test-naviagting-to-the-angular-site", "keyword": "Scenario", "line": 16, "name": "Test Naviagting To The Angular Site", "steps": [ { "arguments": [], "keyword": "Before ", "result": { "status": "passed", "duration": 4201730 }, "hidden": true, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\Support\\Hooks.js:6" } }, { "arguments": [], "keyword": "Given ", "name": "I Go To Angular's Website And I Enter Thomas Into The Name Box", "result": { "status": "passed", "duration": 17782001483 }, "line": 11, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\StepDefinitions\\Browse_steps.js:4" } }, { "arguments": [], "keyword": "Then ", "name": "The Greeting Should Be Hello Thomas!", "result": { "status": "passed", "duration": 106639634 }, "line": 12, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\StepDefinitions\\Browse_steps.js:15" } }, { "arguments": [], "keyword": "After ", "result": { "status": "passed", "duration": 186717 }, "hidden": true, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\Support\\Hooks.js:13" } } ], "tags": [], "type": "scenario" }, { "id": "protractor_browser_restart;test-naviagting-to-the-angular-site", "keyword": "Scenario", "line": 17, "name": "Test Naviagting To The Angular Site", "steps": [ { "arguments": [], "keyword": "Before ", "result": { "status": "passed", "duration": 365144 }, "hidden": true, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\Support\\Hooks.js:6" } }, { "arguments": [], "keyword": "Given ", "name": "I Go To Angular's Website And I Enter Peter Into The Name Box", "result": { "status": "passed", "duration": 1394720283 }, "line": 11, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\StepDefinitions\\Browse_steps.js:4" } }, { "arguments": [], "keyword": "Then ", "name": "The Greeting Should Be Hello Peter!", "result": { "status": "passed", "duration": 88420688 }, "line": 12, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\StepDefinitions\\Browse_steps.js:15" } }, { "arguments": [], "keyword": "After ", "result": { "status": "passed", "duration": 138952 }, "hidden": true, "match": { "location": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\Support\\Hooks.js:13" } } ], "tags": [], "type": "scenario" } ], "id": "protractor_browser_restart", "keyword": "Feature", "line": 1, "name": "Protractor_Browser_Restart", "tags": [], "uri": "C:\\Users\\bxb145\\WebstormProjects\\Protractor_Browser_Restart\\Cucumber\\Browse.feature" } ]
The JSON has a description field at feature level that can store context information regarding the feature i.e. using the above feature file (Epic Level Business Requirement Is Set To 12568)
"description": " Epic:\n 12568",
Would it be possible to get a description field added at scenario/scenario outline level so that individual unique context can be given to the scenario and another module can use this field for display in a HTML report for example?
Let me know your thoughts? Thanks in advance. I'm aware you could add this to the "Scenario Outline" or "Scenario" but I'd like that to house what the test scenario does & description to house (for example originating business requirement of a scenario).
The text was updated successfully, but these errors were encountered: