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

The location abstraction for test steps from scenario outlines is too limited #149

Closed
brasmusson opened this issue Jan 7, 2018 · 2 comments · Fixed by #150
Closed

The location abstraction for test steps from scenario outlines is too limited #149

brasmusson opened this issue Jan 7, 2018 · 2 comments · Fixed by #150
Labels
🧷 pinned Tells Stalebot not to close this issue

Comments

@brasmusson
Copy link
Contributor

brasmusson commented Jan 7, 2018

Summary

The location abstraction for a test step from a scenario outline is too limited. Both the location of the outline step and the example table row instantiating the scenario outline is relevant for a test step and should be easily accessible from the test step. A Pickle steps created by the Gherkin compiler for steps of scenario outlines contains both the location of the outline step and the location of the example table row instantiating the scenario outline.

Expected Behavior

Cucumber-Ruby-Core should support that both the location of the outline step and the example table row instantiating the scenario outline is easily accessible, by for instance formatters, of test steps from scenario outlines.

Current Behavior

Currently Cucumber-Ruby-Core defines the single location of a test steps from scenario outlines as the location of the example table row instantiating the scenario outline. This has caused a regression compared to Cucumber-Ruby v1.x.x in both the Pretty Formatter and the Json Formatter (see cucumber/cucumber-ruby#1108).

Possible Solution

For instance define a method #original_location that for ExpandedOutlineSteps return the location of the OutlineStep it was expanded from, and that for Steps return the same location as the #location method.

Steps to Reproduce (for bugs)

See cucumber/cucumber-ruby#1108.

Context & Motivation

To be able to fix the regressions from Cucumber-Ruby v1.x.x.

Note

Also for test cases from scenario outlines the location abstraction similarly limited, but that is not causing any regressions.

@stale
Copy link

stale bot commented Mar 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 13, 2018
@brasmusson brasmusson added the 🧷 pinned Tells Stalebot not to close this issue label Mar 15, 2018
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Mar 15, 2018
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Sep 23, 2018
## [3.2.0](cucumber/cucumber-ruby-core@v3.1.0...v3.2.0)

### Added

* Add the GherkinSourceParsedEvent ([#155](cucumber/cucumber-ruby-core#155) @brasmusson)
* Add #original_location to Cucumber::Core::Ast::Step and Cucumber::Core::Test::Step ([#150](cucumber/cucumber-ruby-core#150), [#149](cucumber/cucumber-ruby-core#149) @brasmusson)

### Fixed

* Set message and backtrace for undefined result also when skipping (@brasmusson)
@lock
Copy link

lock bot commented Jul 8, 2019

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 Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧷 pinned Tells Stalebot not to close this issue
Projects
None yet
1 participant