Skip to content

Create Scenario Outline

A Scenario Outline runs the same steps with different data. Write the steps with <placeholders> and add an Examples table with a column for each placeholder. AssertThat recognises it as a Scenario Outline when you save.

Step 1: Open the feature and select Add scenario, or edit an existing scenario.

Step 2: Write the steps with placeholders, then the Examples table:

When I apply the promo code "<code>"
Then I see the message "<message>"
And my basket total is <total>
Examples:
| code | message | total |
| WELCOME10 | Promo code applied | £36.00 |
| SUMMER25 | This code has expired | £40.00 |

Step 3: Select Save. The scenario is shown as a Scenario Outline with its Examples table.

A feature with a Scenario Outline and its Examples table

To fill the table, select Generate Examples with AI in the editor: it suggests happy-path, edge and negative rows. See Review and improve scenarios with AI. Gherkin keywords, including Examples, follow the space’s Gherkin language.

When a Scenario Outline is run manually, you choose which example row you’re running. See Manual test execution.