Experienced practitioners, particularly those that have been involved in helping other developers learn TestDrivenDevelopment; note a life-cycle to its learning and adoption:

  1. The developer starts writing unit tests around their code using a test framework like JUnit,1 or NUnit.
  2. As the body of tests increases the developer begins to enjoy a strongly increased sense of confidence in their work.
  3. At some point the developer has the insight (or are shown) that writing the tests before writing the code, helps them focus on only writing the code that they need.
  4. The developer also notices that when they return to some code that they haven’t seen for a while, the tests serve to document how the code works.
  5. A point of revelation occurs when the developer realises that writing tests in this way helps them to “discover” the API to their code. TDD has now become a design process.
  6. Expertise in TDD begins to dawn at the point where the developer realizes that TDD is not about testing, it is about defining behaviour.
  7. Behaviour is about the interactions between components of the system and so the use of mocking is fundamental to advanced TDD.

This progression is very common, but while most developers find their way to step 4, many miss the big wins found at steps 5, 6 and 7.

BDDWiki: TDDAdoptionProfile (last edited 2007-10-24 21:16:23 by dsl-189-146-25-72)