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

getBackground gone? #663

Closed
borbe opened this issue Oct 26, 2016 · 7 comments
Closed

getBackground gone? #663

borbe opened this issue Oct 26, 2016 · 7 comments

Comments

@borbe
Copy link

borbe commented Oct 26, 2016

CucumberJS - Is there a way to get feature background information ?

it seems that it was ripped from feature.js on this commit:

a5fd825#diff-5530e5c6e19e6191a22488fb10c9819b

@charlierudolph
Is there another way to get the background information?

Right now it is merging all the background steps into the steps information but this is not practical if you need to know wether they are part of the background or not.

@charlierudolph
Copy link
Member

Currently there is no way to get the background. The version of gherkin we are using deals with the background steps and adding them to each scenario.

Whats your use case for knowing whether or not a step is part of the background or not?

@borbe
Copy link
Author

borbe commented Oct 26, 2016

@charlierudolph, i connected my automated tests to testrail api, so im creating tests using the gherkin information.

In test management tools there is a "Preconditions" or sometimes "Setup".

And i wanted to plug in the Background into that section, but after that commit i mentioned, there is no way i can differentiate between background steps that run for all the scenarios in the feature or if it is a step that is part of that scenario only.

@charlierudolph
Copy link
Member

Okay. How are you accessing the background and what would be an ideal solution for you?

The solution I'm thinking of at the moment would be to add an isBackground method to the step object.

@borbe
Copy link
Author

borbe commented Oct 26, 2016

I think that solution is pretty good since it is at the step level.

from my perspective, I think accessing the step and checking from there if it is a background step is the best solution actually.

so totally agreed with your proposal.

@charlierudolph charlierudolph added this to the 2.0 release milestone Nov 24, 2016
@charlierudolph
Copy link
Member

In 2.0.0-rc.1, steps now have an isBackground property. Do you need it in the JSON output?

@borbe
Copy link
Author

borbe commented Nov 28, 2016

Thank you very much for addressing this issue!

I believe that the JSON output should point that as well but if there is no other practical use for the background steps identification other than the use case i mentioned, the isBackground property suffice :)

Thanks again!

@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