A scenario outline is a template for describing several similar scenarios compactly. Angle-bracket placeholders match column headings in an Examples table; each data row supplies values for a separate scenario. section 8.4.2
Consider an outline when it makes a repeated pattern easier to read:
- Use a table when behavior naturally depends on variations in input data, such as acceptable or unacceptable contact details. section 8.4.3
- Use one when several scenarios differ by just a few words and the outline makes those differences clearer. section 8.4.4
- Prefer simple scenarios to start; compress them only when the resulting outline is easier to read. Remove redundant rows: large tables can repeat behavior and slow automation. section 8.4.3 section 8.4.4
An Examples table may include extra columns that help people understand why a row matters, even when the outline does not use their values. A description column is often placed first for readability. section 8.4.2
Listing 8.6 Scenario outline
Scenario Outline: Describe what remains of a pizza
Given a diner cuts their pizza into <slices per pizza> slices
When they eat <slices eaten> slices
Then they should have <remainder> slices left
Examples:
| description | slices per pizza | slices eaten | remainder |
| Not hungry at all | 6 | 0 | all |
| Quite hungry | 6 | 4 | 2 |
| Very hungry | 8 | 8 | none |A pizza example shows placeholders filled from three table rows, with a description column that adds context. section 8.4.2
Listing 8.10 Scenario outline emphasizes differences
Scenario Outline: Customer chooses to collect order
Given the customer is <authenticated-or-not>
When they choose to collect their order
Then they should be asked to <action-needed> contact details
Examples:
| authenticated-or-not | action-needed |
| authenticated | confirm |
| unauthenticated | supply |Compare authenticated and unauthenticated customers: the outline makes the two changing details visible in a compact table. section 8.4.4

