You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've attempted to use a tagged hook within a given step definition class and then reused one of the Given steps contained in the same class as the tagged hook across 2 feature files. I've tagged a Scenario outline expecting to see the Before hook called prior to executing the Given step, but this does not appear to be happening.
It's a bit difficult to explain. Please see the public gist I've shared at https://gist.github.com/1850089 for the feature files and accompanying step definition classes, along with what I would expect the outcome to be and what the actual result is.
First feature file
@feature_1Feature: Feature oneScenario: A Given a step in A
When an action in A
Then the expected outcome is X
@feature_2Scenario Outline: BGiven a step in C
When an action in B
Then the outline's expected outcome is <result>Examples:
| result | | Y | | W |
Second feature file
Feature: Feature 2@feature_2Scenario: CGiven a step in C
When an action in C
Then the expected outcome is Z
EXPECTED OUTPUT
[class org.stag.hello.StepDefsForFeature_1]: Inside GIVEN step A
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step A
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step X
[class org.stag.hello.StepDefsForFeature_2]: Inside tagged BEFORE hook -- tag = @feature_2
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step B
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step Y
[class org.stag.hello.StepDefsForFeature_2]: Inside tagged BEFORE hook -- tag = @feature_2
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step B
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step W
[class org.stag.hello.StepDefsForFeature_2]: Inside tagged BEFORE hook -- tag = @feature_2
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_2]: Inside WHEN step C
[class org.stag.hello.StepDefsForFeature_2]: Inside THEN step Z
ACTUAL OUTPUT
[class org.stag.hello.StepDefsForFeature_1]: Inside GIVEN step A
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step A
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step X
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step B
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step Y
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_1]: Inside WHEN step B
[class org.stag.hello.StepDefsForFeature_1]: Inside THEN step W
[class org.stag.hello.StepDefsForFeature_2]: Inside tagged BEFORE hook -- tag = @feature_2
[class org.stag.hello.StepDefsForFeature_2]: Inside GIVEN step C
[class org.stag.hello.StepDefsForFeature_2]: Inside WHEN step C
[class org.stag.hello.StepDefsForFeature_2]: Inside THEN step Z
The text was updated successfully, but these errors were encountered:
I've attempted to use a tagged hook within a given step definition class and then reused one of the Given steps contained in the same class as the tagged hook across 2 feature files. I've tagged a Scenario outline expecting to see the Before hook called prior to executing the Given step, but this does not appear to be happening.
It's a bit difficult to explain. Please see the public gist I've shared at https://gist.github.com/1850089 for the feature files and accompanying step definition classes, along with what I would expect the outcome to be and what the actual result is.
First feature file
Second feature file
EXPECTED OUTPUT
ACTUAL OUTPUT
The text was updated successfully, but these errors were encountered: