O'Reilly logo

Cucumber Cookbook by Shankar Garg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ANDing and ORing tagged Hooks

Just as we ANDed and ORed the Tags, same way we can AND and OR the combination of Tags and Hooks. Consider a situation where we need to perform certain Steps for Features, such as for feature1 and feature2 but not for other Features. How do we do this in Cucumber? Let's see this in this recipe.

Getting ready

We will update the home_page.feature file like this for this recipe:

@important Feature: Home Page Background: flow till home page Given user is on Application home page @sanity Scenario: Home Page Default content Then user gets a GitHub Bootcamp section @regression Scenario: GitHub Bootcamp Section When user focuses on GitHub Bootcamp Section Then user gets an option to setup git @sanity @regression Scenario: Top ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required