concept scenario outline in category software development

appears as: scenario outline, scenario outlines, scenario outlines, A scenario outline, The scenario outline
Writing Great Specifications: Using Specification by Example and Gherkin

This is an excerpt from Manning's book Writing Great Specifications: Using Specification by Example and Gherkin.

In chapter 4, you learned that a scenario outline is a template that similar scenarios can share so you don’t have to repeat the same Given-When-Thens throughout your feature file. Scenario outlines use more-technical elements of Gherkin’s syntax, such as dynamic parameters and tables with examples. In this section, we’ll explore whether and how such elements change the automation process for scenario outlines.

Surely there must be a better approach than copying and pasting scenarios! Today, I can laugh at my former self, because I know one: scenario outlines.

Listing 4.4. Introducing a scenario outline
Feature: Shipping Scenario Outline: Shipping 1 Given a <format> book in Simona's cart 2 When she pays for it Then the book should be <shipped> 2 Examples: 3 | format | shipped | | PDF | sent to a mobile device | | Audiobook | sent over email | | Hardcover | shipped physically | | Paperback | shipped physically | | Audio CD | shipped physically |