Why intermittent failures deserve a ticket, an owner, and a deadline. A test suite is only valuable if the team trusts it. The moment people start re-running failures without reading them, the suite has stopped protecting anyone.

Tests as documentation
Reliable tests control everything outside the code under test: time, randomness, network, and fonts. Once those are fixed, a failure means something changed in the code, which is exactly what we want to know.
- Freeze time and seed randomness in tests.
- Quarantine flaky tests with an owner and a deadline.
- Keep end-to-end tests for critical journeys.
- Read every failure before re-running.
Making the suite reliable
We track three numbers for the suite: total duration, flaky failure rate, and time from failure to fix. Coverage is useful for finding untested areas, but it is not a goal on its own.
Simplicity is prerequisite for reliability.
Edsger W. Dijkstra, EWD498, 1975
Quick takeaway
A trusted suite beats a large one.
What we measure
Deterministic
Time, randomness, and network are controlled.
Owned
Every flaky test has a name next to it.
Fast feedback
Most tests run in seconds, close to the code.
End-to-end tests are expensive, so we keep them for the journeys that make money or lose data. Everything else is tested closer to the code, where failures are faster and easier to read.
Questions, corrections, and war stories are welcome in the comments. Several of our best follow-up posts started as a reader pointing out something we had missed.
We will revisit this in six months with fresh numbers. If the results change, we will update the post and note what changed at the end.
If you try this on your own project, start with one page or one service rather than the whole codebase. A small experiment gives you real numbers to argue with, and it is easy to roll back if the idea does not fit.
We have been running this approach for several months now. The initial setup took about a day, and the ongoing cost is close to zero once the team knows where to look.
None of this is new, and that is the point. The techniques that last are usually the boring ones that are documented well and supported by the platform itself.
As always, the examples are simplified to fit on a page. The production version has more error handling and logging, but the shape of the code is the same.
Wrapping up
We have been running this approach for several months now. The initial setup took about a day, and the ongoing cost is close to zero once the team knows where to look.
Shared this with my team. The list near the end is going straight into our pull request template.
Glad it helped!
Same experience here, the tooling is much better now.
Same experience here, the tooling is much better now.
Bookmarked. The code sample alone saved me an afternoon.