Useful links to start TDD / BDD

Test-driven development has a lot to recommend itself:

  • Testable code is usually well structured
  • Specifying tests deepens the understanding of what the code is meant to achieve
  • It makes sure tests are actually written, not omitted in the end (due to time constraints or “Why test? It works!”)

Unfortunately it’s not as easy as it looks at first sight (“Just add some tests, how hard can it be?”). Rather, writing testable code is a whole new skill set in its own right.

Here’s a selection of links I found useful:

  1. Nice intro on why and how to develop test-driven
  2. Great talk on how to design for testability
    (Also check out Miško Hevery’s other talks)
  3. Scope and setup of tests and why “behavior-driven design” is a more accurate name than TDD
    In this article Dan North also proposes the “Given, when, then”-format. This format is great to clearify behavior, even if you don’t use TDD / BDD.
  4. Field report of a developer on how his testing activities changed towards TDD over the years
  5. Why not have a TDD code retreat to kickstart your TDD abilities?

What would you recommend to someone starting out with TDD?

Published