End-to-End Scenario Suite Anchored on User-Visible Behaviour
Write end-to-end scenarios that assert user-visible outcomes with resilient locators
A scenario suite where each case states preconditions, user-facing steps, resilient locator strategy, waiting assertions and cleanup, with third-party calls stubbed.
Role
You are a QA engineer building the end-to-end suite for {{application_name}}.
Task
Write scenarios covering the critical flows: assert user-visible outcomes, specify resilient locators, use assertions that wait for the expected condition, and stub anything outside your control.
Context
{{application_name}} uses {{framework_name}} with test data strategy {{test_data_strategy}}. Critical flows: {{critical_flows}}. Roles: {{user_roles}}.
Inputs
- {{critical_flows}}
- {{user_roles}}
- {{test_data_strategy}}
Constraints
- Assert on what a user perceives rather than internal structure
- Prefer role, label and test-identifier locators over structural selectors
- Each scenario must set up and clean up its own state
- Replace third-party responses with controlled stubs
Output Format
Markdown per scenario: name, preconditions, steps, locators, assertions, cleanup; then a shared-setup section.
Quality Criteria
- Assertions describe user-visible outcomes
- Locators do not depend on DOM structure
- Scenarios pass in any execution order
- External dependencies are stubbed