-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
How to get Feature File commented lines in Cucumber Json Test Report #2163
Comments
Attaching the cucmber json report before (with comments) and after (missing comments) |
Out of curiosity, the latest version of Cucumber JVM is v7.15.0. Why are you upgrading only to v5.7.0? And I don't think there is a way to get those comments back using the current json formatter. The change in architecture between v1 and v2 was pretty drastic. And one of the changes, is that to wit comments are no longer associated to an element. You didn't describe your setup in much detail, but assuming your report is completely custom, you could consider building your report based on Cucumber Messages instead. The Cucumber v6 introduced a messages format and we're slowly migrating the cucumber provided plugins to that. For example see the cucumber-junit-xml-formatter and html-formatter already use the message protocol. If your report is made by another open source tool, you may want to consider migrating that tool to use messages. |
I can't make much sense of your reply. I was looking for an explanation of how you use the output of the So just to restate this for clarity.
If you have specific questions feel free to ask. |
The design of the Gherkin parser changed and comments are no longer associated with scenarios. I can't immediately find the associated change with the reasoning though. Currently you will have to re-associate them yourselves.
The bulk of the output is made up of step definitions, hooks and parameter types which re-instantiated for every scenario. This unfortunately can not be fixed until cucumber/cucumber-jvm#2035 gets resolved. Possibly through cucumber/cucumber-jvm#2279 which is a major undertaking. In the mean time you could filter hooks, step definitions and parameter type messages from the output as done by the html formatter here: Note: You can ask Cucumber to run your own plugins through |
I'm assuming you've figured things out. If not, feel free to ask more questions. |
In Cucumber version 1.2.5, comments used to appear in test report json:
However, in our framework, we upgraded to Cucumber version 5.7.0 and now we are not able to see the comments in test report.
This is causing lot of trouble for our users - who have used comments to express lot of information about the test case they are trying to test. Please let us know how to get back the comments in the cucumber report - so that subsequently, we can show the comments in the report generated by our framework.
We are using selenium java based framework. any pointers will be helpful.
The text was updated successfully, but these errors were encountered: