0Pricing
Testing Mastery: JUnit, Mockito & Integration Tests · Lesson

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

  1. Introduction to BDD
  2. Gherkin Syntax and Features
  3. Implementing Step Definitions
  4. Scenario Outlines and Data Tables
← Back to Testing Mastery: JUnit, Mockito & Integration Tests