-
Notifications
You must be signed in to change notification settings - Fork 82
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
Include and Exclude tags don't consider scenarios #31
Comments
mmm, interesting one! The other one you are suggesting is, let's say I have the following feature
If I try to execute the tag @current, then 'My Scenario' should be executed. I agree this is a proper and clear behaviour. However, this is also suggests if I have the following
Now if I try to execute @current tag but exclude @Skip tag, then 'My Scenario' will not be executed, since now it does have two conflicting tags: the explicit tag, and the inherited one. Please share your thoughts, and if you can think if any other scenarios that should have a defined behaviour |
In your second example the scenario has So, to recap, the only defined behavior would be: use the tags of the scenarios, not the feature, when determining include and exclude tags. Same should be for before and after hooks, which it might already do, but just brining it up in case that is also based on the feature. |
I agree with that, going to get it done as soon as possible |
The changes has been pushed to develop branch. In short the changes will apply the exclusion on the feature level (since all scenarios will inherit the excluded tags anyway), but in case we are trying to match the including tags, we will apply this on the scenario level first, and if all the feature scenarios do not have a tag that should be included, then the whole feature will not be included. Otherwise, the feature with the included scenarios only will be executed. |
But what if my feature doesn't have I'll take a look at what you have and test it as well. |
Seems you are doing what I said above, I just read you wrong. I'll get to testing it now, thanks! |
|
Great catch! Fixed. |
I have covered this behaviour in the CucumberishTest target and pushed it to master. Thanks a lot @brentleyjones for the help! |
parserFeaturesInDirectory:fromBundle:includeTags:excludeTags:
only looks at the tags at the feature level. The correct behavior should be that it looks at all of the scenarios, since a tag at the feature level is just shorthand for applying the tag to all of the scenarios under it.Currently, if a tag only exists on a scenario, like
@Skip
, it's not considered.The text was updated successfully, but these errors were encountered: