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.
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 Banner content When user focuses on Top Banner Then user gets an option of home page