inject_response_corruption
Intercept matching browser requests and return malformed JSON, false content lengths, or truncated payloads to test whether web apps handle corrupted responses without crashing.
Instructions
Opens the browser, navigates to the application, and intercepts requests matching a URL pattern to return a malformed or corrupted response. Simulates protocol/transport level corruption and observes whether the UI crashes. Use to answer: does the app handle malformed JSON, content-length lies, or truncated payloads without crashing?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to test | |
| wait_ms | No | Milliseconds to wait after navigation before checking state (default: 2000) | |
| headless | No | Whether to run in headless mode (default: false, launches real browser so user sees application) | |
| viewport | No | Viewport size (default: 1280×720) | |
| corruption_type | Yes | Type of corruption: malformed_json (unterminated JSON body), length_mismatch (content-length claims 99999 bytes but body is short), truncated (body cut off at truncate_at_byte) | |
| preview_delay_ms | No | Milliseconds to pause after simulation before closing browser, allowing visual inspection (default: 2000) | |
| truncate_at_byte | No | Byte offset to truncate at (only used when corruption_type is truncated) | |
| fallback_selector | No | CSS selector for the fallback UI that should appear (e.g., '.parse-error') | |
| intercept_pattern | Yes | Glob pattern for requests to corrupt (e.g., '**/api/data**') | |
| keep_browser_open | No | Keep browser window open after test completes so user can interactively inspect the app (default: false) | |
| api_health_check_url | No | Optional backend or hosted API health check URL to verify before running chaos test. Aborts if backend is down or errors. |