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

Support for Background in feature #160

Closed
ghost opened this issue Jun 23, 2020 · 8 comments
Closed

Support for Background in feature #160

ghost opened this issue Jun 23, 2020 · 8 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jun 23, 2020

Is your feature request related to a problem? Please describe.
I am having a lot of Background steps in my feature files, having them parsed in Cucable generated feature file and showing them in report as part of Scenario steps creates a lot of unnecessary text in scenario, thus making it less "human" readable.

Is it possible to have them parsed in generated Cucable feature files as Background?

Describe the solution you'd like
Have Background steps stay in Background section after generated feature files are created.

Describe alternatives you've considered
I have considered plain usage of Maven Surefire / Failsafe in combination with JUnit and Cucumber, but that creates other problems with having json file overwritten by rerun of scenario (https://stackoverflow.com/questions/50115819/cucumber-json-report-getting-overwritten-by-rerun-scenario-report/50160234#50160234).
Functionality which is offered with Cucable plugin which creates separate runner and feature file per scenario solves this problem as there is json file per scenario.

Additional context
Original feature example:
original scenario

Generated feature example:
generated scenario

@bischoffdev
Copy link
Collaborator

As Background is just syntactic sugar for repeating steps, I am struggling to see the value here. Normally, the Cucable generated scenarios are just there for running the tests and less for human readability. In which case do you need to look at the generated scenarios?

@bischoffdev bischoffdev self-assigned this Jun 24, 2020
@ghost
Copy link
Author

ghost commented Jun 24, 2020

Hi, thanks for response.

I am using reports which are generated as a result of test execution as part of Living Specification Documentation those are then shared with non-technical stakeholders.

Basically they are not looking exactly in generated scenarios, however, based on generated scenarios, json result files are created and after that we use CI tools which create reports based on those json results. So like that, the ordering of steps in Background and Feature, propagates to our reports and generated documents afterwards.

Hope, this gives some insight.

@bischoffdev
Copy link
Collaborator

Ah I see, that makes sense. I don't know exactly when a next Cucable release will be happening as I am focussing on Cluecumber a lot but I will keep this in the backlog for the next one.

@Naumansh
Copy link

I am also looking for the same. And also the background should become optional in cluecumber report like hooks. It will be kool feature n will make report look compact.

@bischoffdev
Copy link
Collaborator

In progress...

@bischoffdev
Copy link
Collaborator

Done in 1.9.0 - release will happen during the next 30 minutes.

bischoffdev added a commit that referenced this issue Nov 26, 2020
@ghost
Copy link
Author

ghost commented Nov 26, 2020

Thanks. It looks good now.

@bischoffdev
Copy link
Collaborator

Thanks for confirming 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants