Scenario Outlines and Data Tables
Drive a single Gherkin scenario with multiple data sets using Scenario Outlines, Examples tables, and inline data tables.
Repeating Scenarios
Often you want to run the same behavior with different inputs. Copy-pasting a scenario per case is wasteful. Gherkin's Scenario Outline parameterizes one scenario over many examples.
Placeholders with Angle Brackets
In a Scenario Outline, values are placeholders written in angle brackets, filled in from an Examples table.
Scenario Outline: add numbers
Given I enter <a> and <b>
When I add them
Then the result is <sum>All lessons in this course
- Introduction to BDD
- Gherkin Syntax and Features
- Implementing Step Definitions
- Scenario Outlines and Data Tables