Error Injection
Deliberately introducing faults—network failures, bad responses, timeouts—to verify the application handles them gracefully.
What is Error Injection?
What is Error Injection?
Error injection is the practice of intentionally forcing failure conditions—dropped connections, HTTP 500 responses, delayed requests, malformed data—to confirm that software degrades gracefully rather than crashing or corrupting state. It is how you test the code paths that only run when things go wrong, which are notoriously undertested and prone to nasty bugs. Playwright's network interception makes it easy to stub or fail requests inside a browser test, so you can validate error banners, retries, and fallbacks as part of a normal recorded flow.