DocumentationRules and scenarios
Rules and scenarios
Rules let you reproduce an app's behavior under controlled conditions. Scope each rule to the call you want to test.
Choose a rule
- Rewrite changes a field, header or status while the call flows through Splice.
Breakpointspauses matching calls so you can inspect, edit and release them manually.Mocksreturns a prepared response or error. You can also create a mock from a captured call.Networksimulates conditions such as latency, limited bandwidth or an offline connection.Map Remoteredirects matched traffic to a different test backend.Block Listrejects matching calls.Scriptsruns your JavaScript against matching traffic. Use the script tester on a recorded call before enabling a script.
Group rules into a scenario
Save the rules for a reproducible case as a scenario, such as an empty cart or a slow checkout. Activate the scenario, repeat the test and then deactivate it. Export the scenario to share it with a teammate.
Verify a rule
Enable the rule and repeat a matching test request. Check the call's status and rule indicators, then disable the rule and repeat the request to compare the baseline.