Cucumber Series Tutorial 3- Make your Automation Data Driven by Parametrising Feature File with Scenario Outline and Examples keyword.
In Tutorial 2 we have seen, how to make test script data-driven by parametrizing the Feature file. But the problem with this approach is, if we have to supply multiple data then we have to write separate methods in step definition file, which will add a lot of boilerplate code. Another approach is using "Examples" Approach 2: Parametrising the Test script using Examples Keyword and Scenario Outline. Changes in Feature File: Here, instead of using Scenario , we will be using Scenario Outline And we will provide test data through Examples keyword: Feature: Free CRM Login Feature Scenario Outline: Free CRM Login Test Scenario Given User is already on Login Page When Title of login page is Free CRM Then user enters " <username> " and " <password> " And User clicks on login button And user is on home page Examples: | username | password | | user1 | password1 | | user2 | password2 ...