Kent Beck: Why Composable Tests Beat Isolated Ones
Kent Beck: Composable Tests

Kent Beck explains why test isolation isn't the same as test composition. He argues that while isolated tests are predictable, composing them—by trimming redundant assertions—can make suites faster, more readable, and more specific. Using an example of interest computation and reporting, he shows how 10 composed tests can give the same confidence as 20 brute-force ones, and he pushes back on the fear of reducing assertions.
Composition isn't making tests worse. Composition is looking at the tests as a whole, trying to make the whole better as judged by several valuable properties of tests.
- pfdietz
I had a test suite with thousands of tests. One way of running it was to take all the passing tests, and then run them repeatedly in random order.
This found new bugs involving unintended persistent state.
- solarengineer
Someone had written a comment about whether Kent Beck has heard of global and static variables. That comment seems to have been deleted.
Kent Beck is co-creator [1] of the JUnit Testing Framework and has most definitely heard of static and global variables.
- grim_io
I'm done listening to smart people proposing fixes for my dumb code.
Either I'm not smart or disciplined enough to make it work, or my colleagues are not. Mostly both.
- nhgiang
Ah Kent Beck, I see your style of writing trivial examples hasn't changed
- johnwils
Trimming the copy-paste chain is right. The pieces being green isn’t the same as the app opening.