-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Tags at the examples block are not treated as actual tags in scenario #849
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
Comments
Sounds like a bug |
@williamlabrum Which version of Cucumber-JVM are you using? I cannot reproduce this problem in Cucumber-JVM v1.2.2. There both hooks tagged with the Examples table tag are executed for the scenarios instantiated from the Example table, and |
@brasmusson Yes, I am using v1.2.2. Another thing that is worth noting is that I am using java 1.6 (not by choice). Please feel free to clone the cucumber-debugging project here: https://github.com/williamlabrum/cucumber-debugging to see an example setup. Execution: mvn clean test -Dcucumber.options="--tags @mytag" Here is the output seen by me (no indication of output tag data provided by the BeforeStepDefs class): Also, since updating to v1.2.2, I now see a bunch of that blue text when using Scenario Outlines. Whats with that? Makes me feel like I'm skipping scenarios/steps when looking at the output (even though I'm not). |
Ok, @williamlabrum its a bug. But it is not as easy as that the tags on examples tables are totally ignored, they are lost when performing tag filtering. If you remove I have not tracked down where the bug is located, but as it is related to tag filtering, the possibility is that it is located in the gherkin library, and in that case the bug is likely to remain until the current gherkin library (gherkin2) is replaced by the gherkin3 library (since no new releases of gherkin2 is planned). |
Got it. Thanks for your feedback and support. |
Has this bug been looked at? This still seems to be an issue? |
Is there a test for it against gherkin3? |
info.cukes
gherkin3
3.0.0
I am using gherkin3 and am still unable to get the example tags using either a before hook: |
Cucumber-JVM doesn't use Gherkin3 yet, so adding it to the classpath has no effect |
Ok, I thought that might be the case... Is there an estimate on when Gherkin3 would be added to Cucumber-JVM? |
I don't do estimates. It will be ready when it's ready. |
Method examples of FilterFormatter class in Gherkin2 project has been changed to fix this problem. However, new version of Gherkin2 is not released. Can we have a new version of Gherkin2 to solve this issue? |
Hello, I think I encountered the same bug, but the behavior that caught my attention is slightly different. I noticed that tags attached to 'Examples' section in 'Scenario Outline' do not appear in the JSON report. I hope the fix you are talking about in this issue will also result in correct JSON output. |
AFAIK, fixing this before v2.0 would mean to make changes to code that will be thrown away by #1035 (use Gherkin4) or it might even require a new release for Gherkin2, so I would prefer to not try to fix this before v2.0. |
Now when #1035 has been merged, the 2.0.0-SNAPSHOT version from the master branch (with the groupId io.cucumber), treats tags on the example blocks correctly. |
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. |
It seems as though tags specified at an examples block are not treated as such when being assigned to a scenario:
This ultimately prevents us from creating Hooks based on tagged Example blocks. Perhaps there is an alternative?
The text was updated successfully, but these errors were encountered: