The long way through Software Craftsmanship

Listening to the tests

Jan 6, 2015 - 1 minute read - Comments - GOOSbookTDD

Specifically the chapter no. 20 (“Listening to the tests”) from Growing Object-Oriented Software Guided by Tests available here is so good to learn to hear to your tests.

To hear what they’re trying to tell you, the authors (Steve Freeman and Nat Pryce) explain this to you:

  • I Need to Mock an Object I Can’t Replace
  • Logging Is a Feature
  • Mocking Concrete Classes
  • Don’t Mock Values
  • Bloated Constructor
  • Confused Object
  • Too Many Dependencies
  • Too Many Expectations

To close, a quote:

[…] We’ve found that the qualities that make an object easy to test also make our code responsive to change

Growing Object-Oriented Software Guided by Tests, chapter 20, page 229

Disclaimer about AI/GenAI

As of 2026-05-06, the text in these articles and blog entries has been written without AI/GenAI, except I sometimes use a spellchecker to fix errors. Think Word's spellchecker, not ChatGPT.

Notes, as of today (2026-05-06):

  • No code snippet has been automatically generated, nor vibe-coded, nor generated and reviewed.
  • I don’t have any article with AI contribution.

For future entries:

  • I may have used GenAI for the code in the repo. The code I exemplify/copy in the article will always be reviewed and tested, not vibe-coded. I will specify it in each snippet or at the top/bottom of the article.
  • I normally don't use it for the text contents, although if I have used it for the article text, it would be indicated as such.

Any entry before 2026-05-06 does not contain any AI/GenAI.

For more information, read the AI/GenAI Policy

Kata: prime factors Kata: Reverse Polish Notation in java