Book Image

Cucumber Cookbook

By : Shankar Garg
Book Image

Cucumber Cookbook

By: Shankar Garg

Overview of this book

Table of Contents (13 chapters)
Cucumber Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

ANDing and ORing Tags


Most of the time, changes are made to many functionalities simultaneously; so it becomes imperative for testers to test all those functionalities. Sometimes we have to run all the Scenarios marked as @sanity and @regression and sometimes we want to run all Scenarios for feature1 or feature2. So how do we do this in Cucumber? Let's see that in this section.

Getting ready

This is the Feature file we will use 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

How to do it…

  1. If we want to run the Scenarios which are Tagged sanity and regression...