1.Testing More Than the Happy Path
Most testing proves the system works when everything else is working. That is the least interesting case, because it is the one that happens on its own. The useful question is what happens when a dependency is slow, a node disappears, or a credential expires — and the only way to know is to make those things happen on purpose while you are watching.
Key features
- AWS defines chaos engineering, quoting the Principles of Chaos, as experimenting on a system to build confidence in its capability to withstand turbulent conditions in production
- AWS names a common anti-pattern directly: designing for resiliency but not verifying how the workload functions as a whole when faults occur
- An experiment starts from a measurable steady state — AWS's example is 300 TPS at 99% success and 500 ms round trip — that you observe throughout
- The hypothesis names the fault and the mitigation: if this fault occurs, the workload will do this, and this metric stays within this bound
- AWS advises not running an experiment you already know will fail — chaos engineering is for finding unknowns, not confirming a known break
- An experiment that passes should become an automated regression test in the CI/CD pipeline, not a one-off event
Two kinds of testing, both needed
- A five-stage cycle drawn as a loop.
- Stage 1, steady state: define a measurable output that shows normal behaviour, for example 300 transactions per second at 99% success with a 500 millisecond round trip.
- Stage 2, hypothesis: state that if a specific fault occurs, a named mitigation will keep a named metric within a stated bound.
- Stage 3, run the experiment: inject the fault with a defined scope, guardrails, and stop conditions.
- Stage 4, verify: compare the observed metrics with the hypothesis.
- Stage 5, improve: if steady state was not maintained, change the design and run the experiment again; if it was, automate the experiment as a regression test.
- An arrow returns from stage 5 to stage 1.
Signature
steady state → hypothesis → experiment (scoped, with stop conditions) → verify → improve → automate
Every mitigation in the design is an untested claim until you make the fault happen. Measure a steady state first, write the hypothesis as "if this fault, then this mitigation keeps this metric inside this bound", run it small, and measure what the user sees rather than what the servers report.