Name scenarios by intent
Use labels like success, validation_error, server_error, timeout.
scenarios.json contains an array of rules:
{ "rules": [ { "method": "GET", "match": "/v1/example", "enabled": true, "active_scenario": "success", "scenarios": { ... } } ] } # hot workflow Change "active_scenario" from "success" to "error" See frontend behavior instantlymethod: HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)match: Request path to matchenabled: Whether the rule is activeactive_scenario: Scenario key to usescenarios: Map of scenario definitionsstatus: HTTP status code (optional, default 200)json: Inline JSON response bodyfile: Fixture file path (relative to project base path)delay: Delay in seconds before responseEach scenario must include at least one of json or file.
Name scenarios by intent
Use labels like success, validation_error, server_error, timeout.
Use fixture files for large payloads
Keep mock data in fixtures/ and reference with file for cleaner config.
Model user pain early
Add delayed and failing scenarios so UI states are polished before release.