Following the Rhythms of TDD

We’ve seen how individual unit tests help us explore and capture design decisions about our code and keep our code defect-free and simple to use, but that’s not all they can do. TDD has rhythms that help us with the whole development cycle. By following the rhythms, we have a guide on what to do next at each step. It is helpful to have this technical structure that allows us to think deeply about engineering good code and then capture the results.

The first rhythm was covered in the last chapter. Inside each test, we have a rhythm of writing the Arrange, Act, and Assert sections. We’ll add some detailed observations on succeeding with this next. We’ll go on to cover the larger rhythm that guides us as we refine ...

Get Test-Driven Development with Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.