Test-Driven Development: By Example
by Kent Beck
A key one to read and reread — the red-green-refactor loop crystallised in 240 pages.
- Status
- Read · December 2023
- Bought
- December 4, 2023
- For
- Engineers new to disciplined TDD · Anyone who writes tests after the fact and wants to flip the order · Tech leads codifying a team testing rhythm
Where it earned its place
The one-paragraph verdict
Five stars and a key one to read more than once. The first read gives you the loop; the reread after a year of practice shows you how much more Beck packed in than you noticed. Beck’s strength is that he shows the work instead of preaching it: the money example and the xUnit example are written test-by-test, mistakes left in, so you watch the loop tighten in real time. The chapters are tiny and almost entirely signal, which is rare. The honest criticism — and it’s the one every reviewer lands on — is that the examples are toys. A multi-currency Money class and a test framework bootstrapping itself never face the things that make testing hard in production: I/O, time, concurrency, a database. The prose is also showing its age. But the discipline it teaches is timeless, and most engineers who think they “do TDD” are actually writing tests last; this book fixes that.
Who should read it
Read it if you write tests after the implementation and suspect you’d design better the other way around — that’s the gap it closes. Tech leads codifying a team’s testing rhythm will get a shared vocabulary out of it. Skip it if you already practice TDD fluently; you’ll find it remedial. It is a primer on the loop, not a reference on test architecture.
Where it earned its place
The red-green-refactor instinct carried straight into the Archives pipeline, where I let failing tests drive the entity-extraction boundaries before writing the parsers. Where Beck stops — real infrastructure — is exactly where integration testing with Testcontainers and consumer-driven contract testing pick up: the same discipline applied to a Postgres instance and a service boundary instead of a Money class.
Skip it if…
You want guidance on testing distributed systems, async workers, or anything with real I/O — the book deliberately stays in the small, and you’ll have to bridge that gap yourself.