×
☰ See All Chapters

Cucumber Bullets

  • We can use * (an asterisk) in pace of Given, When, Then, And, But.  We could have written the previous scenario like this: 

Feature: Login

  Scenario: Successful Login to the page

    * I open Chrome browser

    * I navigate to login page

    * I navigate to login page in a new tab

    * I click on login option

    * I provide username as "manu.m@tools4testing.com" and password as "*****"

    * Username should be Email

    * I click on login button

    * Login success window should be displayed

    * Login success window should welcome me

    * Login success window should be a pop up

  • This version is easier to write but has lost meaning and readability. This version is mostly used by customers and stakeholders. 

  • Same Example without bullets: 

Feature: Login

  Scenario: Successful Login to the page

    Given I open Chrome browser

    And I navigate to login page

    But I navigate to login page in a new tab

    When I click on login option

    When I provide username as "manu.m@tools4testing.com" and password as "*****"

    But Username should be Email

    When I click on login button

    Then Login success window should be displayed

    Then Login success window should welcome me

    But Login success window should be a pop up


All Chapters
Author