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

Expose Scenario id to step definitions #673

Merged

Conversation

brasmusson
Copy link
Contributor

Recently on the mailing list the need to access the Scenario name and ideally the concatenation of Feature/Scenario Outline/Example from step definitions, which actually is the Id of the Gherkin Scenario. Now when the Scenario name has been exposed to the step definitions through the cucumber.api.Scenario interface (#671), it makes sense to also expose the Scenario id through that interface.

Fixes #715.

Extend the Scenario interface with the method getId(). Then it is
avialable to step definition through the Scenario argument to hooks.
The scenario id is esentially <feature name>;<scenario name> or
<feature name>;<outline name>;<example group name>;<example row number>.
@aslakhellesoy aslakhellesoy merged commit df74cdb into cucumber:master Jun 26, 2014
aslakhellesoy added a commit that referenced this pull request Jun 26, 2014
@brasmusson brasmusson deleted the expose-scenario-id-to-stepdefs branch June 28, 2014 08:32
@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 this pull request may close these issues.

Expose currently-execution feature's name to step definitions
2 participants