Developer testing is not primarily about design

With the advent a few years ago of test-driven development (TDD, a.k.a. “test-first” development), people started parroting the phrase “TDD isn’t about testing, it’s about design” like a mantra. As is often the case when a phrase is repeated too many times, eventually (for some people anyway) this seems to have come to mean “(developer) testing isn’t about testing, it’s about design”, i.e. the testing part of developer testing isn’t that important.

This is wrong. One of the key practices that enables agile software development is the production and maintenance of a robust, thorough set of automated tests written and run often by developers. This set of tests allows developers to make frequent and significant code changes without causing unintended bugs in related code. This practice fundamentally enables software teams to “embrace change”.

It is true that writing code test-first adds another dimension to the benefits of the practice of automated testing, by focusing the developer on the design/interface of their code before they write the actual code. Thus, it is true that TDD, considered as an enhancement to plain old automated testing, is primarily an enhancement that addresses the issue of design. Nevertheless, the automated testing part of TDD is still very much about testing, testing that is a very important part of an agile team’s toolbox.

Corollary: The primary criterion for evaluation of any approach to automated developer testing should be its ability to provide this robust, thorough test harness that protects against regression.

One Response to “Developer testing is not primarily about design”

  1. Steven Ashley Says:

    I couldn’t agree more, one more thing, care needs to be taken that the team isn’t “too close” when developing the tests. Personally, I have found, I can be to close to the code to adequately create tests for it, missing the forest because all the trees kept getting in the way.

Leave a Reply