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

Cucumber Tags and and Or #168

Closed
Hanumanthap24 opened this issue Aug 12, 2020 · 8 comments · Fixed by #169
Closed

Cucumber Tags and and Or #168

Hanumanthap24 opened this issue Aug 12, 2020 · 8 comments · Fixed by #169
Assignees
Labels

Comments

@Hanumanthap24
Copy link

Hi ,

I have a scenario like this.

My Feature file:
@us1
Feature:My feature

Scenario outline:Tc1
Given
When
Then

@env
Examples:

@Env2
Examples:

@env3:
Examples

And When i run my test cases like

mvn verify -Dtags="@us1 and @env"

This will run all the test cases under the folder in which my feature file resides and not this feature file alone.
Could you tell me if this is not the correct way using and & Or.

@bischoffdev
Copy link
Collaborator

Hello, "tags" is not a Cucable option.
It is all described in the documentation:
https://github.com/trivago/cucable-plugin#includescenariotags

@bischoffdev bischoffdev self-assigned this Aug 14, 2020
@Hanumanthap24
Copy link
Author

Hanumanthap24 commented Aug 14, 2020

Xml.txt

Please find my xml attached.

I have included my tags in XML..When i run my test cases
mvn clean verify -U -s settings.xml DrunParallelTests="true"

,in the logs it says.

[INFO] Cucable created 0 separate feature files and 0 runners.

If I run with only one tag like @us1,my test runs all the test cases in the feature file.

What is the mistake here?

@bischoffdev
Copy link
Collaborator

bischoffdev commented Aug 14, 2020

(@us1 and @env) and not @Env2

says: run scenarios that have both us1 and env tags and not env2. Do you have scenarios that match this?

@Hanumanthap24
Copy link
Author

Hanumanthap24 commented Aug 14, 2020

Yes.As you see my in the first question I asked,My feature file tag name is @us1,and parameters are @env and @env2..
I am interested in executing all test cases in feature file with @env parameters(Examples).

Not only that,I have assigned a tag to scenario as below,

@test1
Scenario outline:Tc1
Given
When
Then

@env
Examples:

@Env2
Examples:

and exeucted like @test1 and @env in include scenario tags,but says

[INFO] Cucable created 0 separate feature files and 0 runners.

@bischoffdev
Copy link
Collaborator

Hi again, alright, I will investigate this. Maybe you found a bug there :-)

@bischoffdev bischoffdev added bug and removed question labels Aug 14, 2020
@bischoffdev
Copy link
Collaborator

Yes it seems you did find a bug. I will try to fix it for the next release.

@Hanumanthap24
Copy link
Author

When can we have this feature?Just need approx date.

@bischoffdev
Copy link
Collaborator

I merged and released this 2 weeks ago (see above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants