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

[Core] Provide a unique id of the current scenario to the hooks. #1160

Merged
merged 1 commit into from
Jul 2, 2017

Conversation

brasmusson
Copy link
Contributor

Summary

Provide a unique id of the current scenario to the hooks. Fixes #1158.

Details

Provide methods to access the uri of the feature file of the current executing scenario and the line(s) where the scenario is defined in the feature file. If the scenario is created from a scenario outline both the line of the example row and the scenario outline is provided.

In addition also put back the getId() method, returning <uri>:<line> (in case of scenarios from a scenario outline it is <example row line>). Even though it is not possible to provide the same id string as when using Gherkin v2.12.2 (<featrue name>:<scenario name>), hooks using Scenario.getId() sill still compile and still get a unique id for the scenario through that method.

How Has This Been Tested?

The automated test suite updated to cover this functionality.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Provide methods to access the pickle uri and the pickle lines, which
uniquely identify the current scenario. In addition also put back the
getId() method. Even though it is not possible to provide the same id
string as when using Gherkin v2.12.2, hooks using Scenario.getId()
will still compile and still get a unique id for the scenario through
that method.
@brasmusson brasmusson force-pushed the interface-for-hooks branch from 48a72ec to 268c0ef Compare July 2, 2017 07:22
@brasmusson brasmusson merged commit 268c0ef into master Jul 2, 2017
brasmusson added a commit that referenced this pull request Jul 2, 2017
@brasmusson brasmusson deleted the interface-for-hooks branch July 2, 2017 09:20
@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.

Make scenerio id available to hooks
1 participant