“All Your Tests are Terrible..."
summary
Google teams write roughly 100,000 C++ test binaries and common failures are concrete not abstract: tests must verify behavior, be readable, cover edge cases, show intended API use, and only fail for real regressions. Avoid flaky async waits, hidden setup, relying on private hooks or implementation ordering, comparing precomputed binaries byte for byte, or asserting mock internals. Require code review, make tests hermetic, synchronize or callback on async work, assert tolerances for golden outputs, and focus on correctness and resilience.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:07Goofus and Gallant
- 1:53Five properties of testing
- 3:58The first rule: write tests
- 4:48Correctness in testing
- 9:05Readability and structure
- 16:16Completeness and edge cases
- 21:01Demonstrability of APIs
- 23:08Resilience and avoiding flakes
- 29:01Brittle tests and golden files
- 33:19Avoiding brittle dependencies
- 41:57Summary and Q&A
- 44:15Advanced Testing Questions
- 50:00Flakiness and Culturing Tests
- 57:21Testing Policy and Conclusion








