Chaos Engineering for QA: deliberately breaking the system to test resilience
“We’ve got retries and failover” sounds reliable — until a real outage hits and it turns out the retries are hammering the downed database and the failover was never configured. Chaos Engineering is about learning the truth in advance: inject a failure in a controlled way and check whether the system survives. Not “find a bug at random,” but test a specific hypothesis about resilience. Let’s go through how to do it sensibly and safely, and where QA fits in.
It’s not “break prod,” it’s test a hypothesis
The key difference from vandalism is the steady-state hypothesis. First you capture what “normal” looks like in measurable terms (a business metric or SLI: orders/min, p99 latency, error rate). Then you state a hypothesis: “if the cache fails, the system will keep serving orders at the same rate.” Only then do you inject the failure and check whether the metric held. If yes — confidence confirmed; if no — you found a weak spot before prod did. The canon is Principles of Chaos Engineering.
Blast radius: start small and be able to roll back
The main safety rule is the minimal blast radius. Not “kill the whole cluster,” but one instance. Not 100% of traffic, but 1%. And always — an abort button: the experiment must stop and roll back instantly if the metric drops past a threshold.
- Start in staging; move to prod only when you trust your rollback tooling.
- Limit the scope: one service, one zone, a fraction of users.
- Define the automatic stop threshold up front (abort conditions).
- Warn the team and agree on a window — this is an experiment, not sabotage.
What failures to inject
- Instance/pod death — abruptly kill the process (the Netflix Chaos Monkey classic): test auto-recovery and rebalancing.
- Latency injection — add delay to a dependency’s response: test timeouts and whether delays cascade.
- Network faults — packet loss, drops, an unreachable port: does the client retry sensibly.
- Dependency outage — take down the DB, cache, third-party API: is there graceful degradation and a fallback.
- Resource exhaustion — saturate CPU, memory, disk, connection pool: what degrades first, and predictably.
- Zone/region outage — shut down a whole AZ: does failover actually work.
Tools
- Chaos Monkey (Netflix) — randomly kills instances; where it all started.
- Gremlin — a commercial platform: CPU/memory/network/latency/shutdown with blast-radius control and abort.
- Chaos Mesh and Litmus — chaos for Kubernetes (pod kill, network/IO faults, stress).
- AWS Fault Injection Service and Azure Chaos Studio — native cloud fault injection.
- Toxiproxy (Shopify) — a proxy that adds latency/drops; handy for local and CI experiments.
Game Days — drills for the team
A Game Day is a scheduled event where you inject a failure and the whole team watches how both the system and the people respond. It tests more than code: did the alert fire in time, did on-call find the right dashboard, is the runbook clear, who decides on rollback. Often the most valuable Game Day finding isn’t in the code — it’s that an alert wasn’t configured or the runbook is stale.
Where QA fits in
Chaos Engineering is a natural extension of non-functional testing, and QA isn’t a bystander here:
- Design experiments: which hypothesis, which failure, which metric, which rollback threshold.
- Validate graceful degradation: when a dependency fails the feature degrades softly rather than taking down the whole app.
- Check retries and circuit breakers: no retry storm, the circuit opens.
- Check observability: the failure shows on the dashboard, the alert fired, the trace shows where it broke.
- Document findings as bugs/risks and re-run after the fix.
What NOT to do
- Chaos with no hypothesis and no metric — that’s just breakage, not an experiment.
- An experiment without monitoring — you’ll see neither the problem nor the moment to hit abort.
- Straight to 100% of prod with no kill switch — that’s how you lose money and trust.
- Chaos at peak load or during a release — choose the window deliberately.
- Not warning the team — panic and a real incident instead of a drill.
Safe chaos-experiment checklist
- Hypothesis stated in terms of a measurable metric (SLI/business)
- Steady state captured “before”
- Minimal blast radius (1 instance / 1% traffic / 1 zone)
- An abort button and automatic stop conditions exist
- Monitoring and alerts on for the experiment
- Team warned, window agreed (not a release, not peak)
- Started in staging; prod only with proven rollback
- Graceful degradation, retries, circuit breaker checked
- Result recorded: did the hypothesis hold or not
- Weak spots found are filed and re-checked after the fix
Bottom line
Resilience you never tested with a deliberate failure is an assumption, not a fact. Chaos Engineering turns “we’ll probably survive” into a testable hypothesis: capture normal, break a little with an abort button, watch whether the metric holds. For QA it’s the logical next step after load testing and observability — testing not only “does it work under load” but “does it survive when part of it falls away.”
Sources: Principles of Chaos Engineering, Gremlin — Chaos Engineering: history & principles, Netflix Chaos Monkey, Chaos Mesh, AWS Fault Injection Service, Toxiproxy.