Test data establishes the known initial and final states needed to execute and verify a scenario. Effective scenarios describe only data that influences the behavior under test, hiding incidental details. section 7.6.6 section 8.5
Useful practices for managing test data include:
- Set up databases, permissions, records, files, and external resources quickly, precisely, and automatically before a scenario. section 8.5 section 8.6
- Represent recurring data through named personas whose details can live in JSON-like files or an initialized test database. section 9.2.1
- Separate test data from UI selector logic so changing either does not require duplicating or rewriting unrelated automation. section 11.1
- Remove columns that do not affect the business rule, keeping scenarios understandable to the whole team. section 7.6.6
Distance-based hotel search
Prepare three available Paris hotels with distances of 3.2, 6.9, and 12.5 km; searching within 10 km should return only the first two. The data makes both the starting state and expected result explicit. section 7.6.6
Scenario: Search for available hotels by distance
Given Bindi needs to make a business trip to Paris
And the following hotels have available rooms:
| Hotel Name | Location | Distance from center |
| Ritz | Paris | 3.2 |
| Savoy | Paris | 6.9 |
| Hilton | Paris | 12.5 |
When Bindi searches for a hotel within 10 km of Paris
Then she should be presented with the following hotels:
| Hotel Name | Location | Distance from center |
| Ritz | Paris | 3.2 |
| Savoy | Paris | 6.9 |
Inspect a complete scenario showing prepared hotel data, a distance constraint, and the filtered expected result. section 7.6.6


