Retrospective

Write the Test First, and then write only the code needed to make the test pass. This keeps the software you build focused and testable. Tests should support you in refactoring safely and test code should be kept as CLEAN as production code.

In this chapter, we discovered…

  • The why behind test-first development, not just the how.

  • Test-first development can easily be done wrong if you write too many tests or write implementation-dependent tests that can impede refactoring code.

  • Our tests should support refactoring code, and to do this write only the tests needed to specify the behavior you’re creating.

  • Doing test-first development helps quality assurance, but it doesn’t replace QA.

  • Test-first development involves building features ...

Get Beyond Legacy Code 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.