# Test Fixtures
`tests/fixtures/` holds reusable offline and middleware fixtures for scenario tests.
Suggested layout:
- `tests/fixtures/<scenario>/agent-run/<step-key>/`
- cached `rho agent-run` result for one agent step
- `result.json` stores stdout, stderr, return code, and captured outputs
- `files/...` stores replayable output files
- `tests/fixtures/<scenario>/middleware/*.yaml`
- file-backed middleware policies for deterministic allow/deny decisions
Common workflow:
1. record agent fixtures
- `./tests/test-two-console-demo-agent-approval.sh --record-fixtures --reset`
2. replay offline with deterministic middleware
- `./tests/test-two-console-demo-agent-approval.sh --offline --reset`
Override the middleware policy:
- `./tests/test-two-console-demo-agent-approval.sh --offline --middleware fixture --middleware-fixture tests/fixtures/two-console-demo-agent-approval/middleware/deny-release.yaml`