In this part, we cover some topics that regularly cause teams to struggle with test-driven development. What’s common to these topics is that they cross the boundary between feature-level and system-level design. For example, when we look at multi-threaded code, we need to test both the behavior that runs within a thread and the way different threads interact.
Our experience is that such code is difficult to test when we’re not clear about which aspect we’re addressing. Lumping everything together produces tests that are confusing, brittle, and sometimes misleading. When we take the time to listen to these “test smells,” they often lead us to a better design with a clearer separation of responsibilities.