Mock, load, and chaos
Serve mocks from saved examples, load test with thresholds, and inject faults into one path.
Mock server (Pro)
- The Mock panel builds routes from saved examples, or from the open file with Generate from current file.
- Scenarios such as
defaultandoutageswitch the answers. Routes can match on query. - The setup is saved in
.forge/mocks.json, so it goes to git.
forge mock serve . --scenario outageLoad testing (Pro)
- The Load Test dialog has presets: Smoke (10 virtual users, 30 s) and Soak (5 virtual users, 10 min).
- Set virtual users, profile, iterations, duration, and think time.
- Reports are saved. Select two to compare them.
forge load orders.http --vus 25 --duration 60 --max-p95 400 --max-error-rate 1--max-p95 (ms) and --max-error-rate (percent) fail the run when crossed. With no error rate set, any failed request fails the run. Add --report-html or --report-csv for a report.
Chaos (free)
The Chaos panel injects faults into your own requests, scoped to a host or path:
- Latency (base plus jitter) and a failure rate
- Status codes such as 503 or 429, timeouts, connection resets, malformed bodies
- An optional seed, so a run can be repeated
Only matching requests are hit. Everything else stays untouched. In CI, use --chaos-rate, --chaos-target, --chaos-fault, --chaos-latency, and --chaos-seed on run-all.