Baby Steps to TDD Adoption

After 23 days into the first Sprint on one of my teams projects, I finally got a very rewarding email from Cruisecontrol with the following message:

Unit Tests: (89)
All Tests Passed

The comment on the CVS file,


, was simply:

first test cases

The back story is I had been charting the unit tests for the project for the past few days showing a very static 85 unit tests. I had even taken to posting updates on the wall with a flat line of bar graphs pointing out the obvious. The 85 unit tests don’t sound to bad, but they were inherited from an earlier codebase that was being used. All the new code for the Sprint was completely untested.

The project is on a first Sprint and has had the usual sorts of issues:

  • One developer with one past JSF project and one developer with only two past Struts projects.
  • Multiple strange problems with JSF 1.0.
  • Connectivity issues to our legacy system.
  • Websphere configuration issues with deployments and classloaders.
  • RAD 6.0 crashing a few times per day.
  • Not hooked up to Cruisecontrol until about day 16 of the Sprint.

And as usual fixing all of these problems trumped writing tests. So even though it’s the first tests written on the project and they’re ‘test later’ unit tests, it’s still a great sign of progress. For the developer who checked in the tests today they’re his first unit tests written in production code.

As a small bit of gratitude and encouragement I delivered two well deserved Hershey’s bars to the developers around lunch time. Progress to TDD is slow, but there is progress.