Being Cellfish

Stuff I wished I've found in some blog (and sometimes did)

TDD is not about writing tests

Change of Address
This blog has moved to blog.cellfish.se.

TDD is not about writing tests

  • Comments 2

This week I held a brown-bag on TDD and coding dojos in my new team. The key point was that TDD (or unit tests without TDD) should not be about writing tests. It is about documenting behavior and writing good code. As a side effect you get a test suite that make you confident your code works as intended even when changing the code. I also emphasized that we're not making the code testable for the sake of testing it, we're writing better code since there is a correlation between bad designs and designs that are difficult to test. Michael Feathers held a talk recently on this topic. At the same conference he also talked about a simple rule you should follow even if not doing TDD; Never hide a TUF in a TUC.

Page 1 of 1 (2 items)