From the course: Cucumber Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Cucumber tags: Multiple tags

Cucumber tags: Multiple tags

From the course: Cucumber Essential Training

Start my 1-month free trial

Cucumber tags: Multiple tags

- [Instructor] So how about we apply an and condition? I want to run a scenario that matches both these tags. How about we do that? So we're going to make a change to our test runner here. And we will just apply these two tags and put an and in between. And this should run just one feature, the feature that matches both the tags. So let's go ahead and run this test. And it runs just one scenario here, which is the third scenario. And you can see that these two match. Now, a slightly different flavor of the syntax is this. Just put those tags in different double quotes and run this. And this should give me the same output. And it does. And it runs the third scenario. So, we have seen so many scenarios of testing Cucumber scenarios based on tags. Now, let's do one more here. I'm going to make another change, and this time, test not condition. So, let's remove this. And I want to run all tags that do not match NightlyBuildTest. And this should run two scenarios for me. So, if I go back…

Contents