-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Feature Request: Support hierarchy of Steps in the JSON output #1111
Comments
@Kausam the JSON output is actually a "standard" - this is what Cucumber outputs, and we can't change it. for details, read this: #1035 and https://relishapp.com/cucumber/cucumber/docs/formatters/json-output-formatter that said, you may be happy to know that we are nearly done writing our own "native" built-in HTML report, which will be the "default" going forward, and it will retain the step "nesting" you are looking for: https://twitter.com/KarateDSL/status/1237797240686522369 you can help by trying this out from the |
and @Kausam you really should have mentioned that you submitted this issue on the other project: damianszczepanik/cucumber-reporting#926 - looks like you got a clear response there as well :) |
Yeah, I figured that this would require change in other projects too. I had raised a similar issue on the Cucumber repository too. They said that they are anyway phasing out the JSON report. That's another dead end. |
@Kausam can you provide a link or source, it will be good to have in this ticket for reference |
@ptrthomas, sure! Here is the cucumber issue: cucumber/common#979 |
Summary
karate
allows us to call aScenario
from aStep
but the json output shows all the steps at the same level. It would be awesome if the json output supports having multipleStep
s inside aStep
. This would enable reporting tools to create more readable reports.Expected Behavior
If we allow a single
![ProposedReport](https://user-images.githubusercontent.com/19550684/79882057-a5d81880-840f-11ea-84f6-5a08574544a8.png)
Step
to contain all the nestedStep
s it calls,Reporting tools can then leverage this and display the result in a much more readable format. A short json snippet highlighting the proposed change.
The above report can be generated by using this json and a slightly modified version of the cucumber-reporting tool.
Current Behavior
Currently, all the steps (including the steps from nested features) are put at the same level in the json output. This means that the generated report can potentially show thousands of steps all at once.
![CurrentReport](https://user-images.githubusercontent.com/19550684/79881169-8391cb00-840e-11ea-933b-3729346b6882.png)
Current json file plugged into the existing reporting tool generates the following report:
Context & Motivation
I found it hard to understand/go through a 4000 line html report. The few important(top level) steps were getting lost among a myriad of irrelevant steps. Having an option to hide nested steps would make the report easier to deal with. I wish to know if we can have this feature in
karate
.The text was updated successfully, but these errors were encountered: