TDD in Two Years

About a year ago in a session at SD Forum 2006 Dave Astels related a story on how one manager approached mandating TDD on a team:

  • Move the whole team out to a new collocated team room.
  • Outfit the team with brand new equipment.
  • Brought in Dave to mentor/coach the team on TDD by doing a lot of pairing.
  • Mandated that all code was unit tested.
  • Mandated user stories and acceptance tests written into Fitnesse.

Impressive story, and probably the sort of boss I’d love to work under. After two years we’ve finally realized much of the goals I set out to accomplish:

All of my developers are writing tests, some TDD and some just in close proximity to writing the code, but average code coverage is 75-80% and defects are down more than 10x from just two years ago.

We’ve put Fitnesse in place and are writing acceptance tests for the first time.

Two of my developers are even pair programming by choice.

It took two years, which feels like a long time to me. Could a shock treatment have worked better? I think given our environment where most of the developers were brand new or relatively new to OO or Java adding in all of the TDD approach would have largely backfired. Maybe we could have done it in a single year, but I’m still really proud of my team.

There’s not much better than knowing that you’ve been able to really grow your team out into a high quality group of software developers conversant in most of the XP practices and constantly willing to learn and improve.