A parameterized scenario marks deployment-dependent details with placeholders, so the same behavior can be specified and verified using values for different configurations. section 20.4 section 20.5
Listing 20.5 Price calculation for multi-country deployment
*** Features/Pricing.feature *** Scenario: Price calculation Given the net price of the Margherita pizza is [CUR]8 #A When the price of 3 Margherita pizzas are calculated Then the sum net price is [CUR]24 #A And the sales tax is [TAX] percent #B
The pizza pricing scenario uses [CUR] for currency and [TAX] for tax, leaving country-specific values to configuration. section 20.4
Use the pattern to keep configurable requirements clear:
- Identify which scenario details vary by deployment and mark them with placeholders. section 20.4
- Resolve placeholder values from test configuration when the scenario executes. section 20.5
