- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What do you mean by Scenario Outline in Cucumber?
We use the Scenario Outline keyword in the feature file in Cucumber. If a particular scenario needs to be executed with more than a set of data in multiple combinations, then we use the Scenario Outline.
The multiple data sets are represented in form of a table separated by (||) symbol under Examples keyword. Each row represents a group of data.
Example
Feature file.
Feature: Login Verification Feature Scenario Outline: Login Verification Given User lands on the home page When Page title is Tutorialspoint Then User keys in "<username>" and "<password>" Examples: | username | password | | Selenium | t123 | | Python |pt123 |
Step Definition file with Then statement having parametrization.
Example
@Then (“^User keys in \"(.*)\” and \"(.*)\”$”) public void user_keys(String username, String password){ System.out.println("The username and password is : " + username +””+ password); }
- Related Articles
- What is the Scenario Outline keyword in Cucumber?
- What do you mean by glue in Cucumber?
- What do you mean by starch?
- What do you mean by adolescence?
- What do you mean by heat?
- What do you mean by tissue?
- What do you mean by environment?
- What do you mean by Garbage?
- What do you mean by Propagation?
- What do you mean by Silk?
- What do you mean by Sex?
- What do you mean by disease?
- What do you mean by Nutrients?
- What do you mean by Obesity?
- What do you mean by Ruminants?

Advertisements