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

cucumber2: scenario name with garbage #768

Closed
akostadinov opened this issue Nov 5, 2014 · 5 comments
Closed

cucumber2: scenario name with garbage #768

akostadinov opened this issue Nov 5, 2014 · 5 comments

Comments

@akostadinov
Copy link
Contributor

In cucuber 1.x I see scenario.name == "scenario name"
In 2.x I see scenario.name == "Scenario: scenario name"
In 2.x also scenario.title == "Scenario: scenario name"

IMHO one of these should be simple "scenario name"

Update: ditto Scenario outline - both name and title contain: "Scenario Outline: scenario name, Examples (row 1)"

Update 2: It is important for me to know which row of the outline is this and if it is an outline or just a scenario but would be nice to have raw name somewhere. Also a separate method to get row number would be nice. if this is not possible I can live with current implementation. I basically want to know all details. Just parsing strings is not very nice IMHO.

@mattwynne
Copy link
Member

Good point. This is in a Before / After hook, yes?

@akostadinov
Copy link
Contributor Author

Yes. While on it, for scenario outline it would be very nice to know the example table values in addition to row number o:)

@mattwynne mattwynne added this to the 2.0 milestone Dec 22, 2014
@mattwynne
Copy link
Member

@brasmusson
Copy link
Contributor

I realized that the keyword is still included in the scenario.name available to hooks (see before_hooks.feature), In #814 there is a fix for this.

The checks in the Scenario Outline case is not very precise. The actual value of scenario.scenario_outline.name is Scenario Outline: <scenario outline name>, <examples table name> (row <nr>), but since the check of newline is missing, the both scenarios in the feature file is passing.

brasmusson added a commit that referenced this issue Mar 17, 2015
@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

No branches or pull requests

3 participants