Cucumber — ScenarioOutline | Code Factory

Code Factory
1 min readNov 25, 2020

Donate : Link

WordPress Blog : Link

Applications… : Link

Cucumber Tutorial Index Page: Link

  • Scenario outline is used when we test same functionality with multiple test data.
  • Sample feature file:
Feature: Login functionality feature
ScenarioOutline: Login functionality with multiple valid test data
Given User navigate to
When User enter valid id
And User enter psw as
Then Login should be successful
And Home page should be displayed
|username |password |
|user1 |user1 |
|admin |admin |
  • Note
  • — Above examples column names are passed as a parameter to “when” statement
  • — In the place of Scenario we have to use ScenarioOutline.
  • — Examples are used to pass multiple arguments in a tabular format. Vertical pipes are used to seperate two different columns. An examples can contain many different columns.