What Test-Driven Development is…

I know this has been bandied about hither and yon by lots of people. But I still see statements like the one by James Bach quoted on Matt Heusser’s blog that “the part of the testing problem they address is a small fraction of the whole.” Well, yes. Of course it is.

Maybe that’s because Test-Driven Development (TDD) isn’t a testing technique. It’s a software development technique that happens to create a safety net of unit tests.

Or, to paraphrase Captain Jack Sparrow,

“That’s what TDD is, you know. It’s not just arrange and act and assert and testcases. That’s what TDD needs. But what TDD is… is freedom.”

TDD is the freedom to work incrementally without keeping detailed of the whole system in my head at one time. TDD is the freedom to refactor easily to a better design without worrying that I’ve broken other code that depends on it. TDD is the freedom solve simple problems and have the simple solutions collaborate into a solution to the larger problem.

But it’s not a testing strategy.


BTW, I would have left this as a comment on Matt’s blog, but Blogger doesn’t work for me anymore. Perhaps it’s the fact that I’m using Firefox, but URLs like http://www.blogger.com/captcha?type=IMAGE&captchaKey=4ur3k6eh4ksv give me a 404 error. That leaves me with the ALT text “Visual verification” for the captcha and keeps me from posting comments. Is anyone else having this problem? Queries to Blogger or Blogger’s forums go unanswered.

Later: Never mind.  It seems to be a problem with blocking cookies from www.blogger.com.

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

Comments (2) to “What Test-Driven Development is…”

  1. Keith Ray points out his post, on Behavior Driven Development (http://homepage.mac.com/keithray/blog/2006/08/12/). I have no problem with the language of BDD, and if it keeps people from getting stuck on the testing aspect, rather than the design aspect, then it’s a clear win. On the other hand, there are plenty of people who have been doing TDD “right,” thank you very much, and don’t need to re-work their vocabulary to get the value out of it. I’m fine with that, too.

  2. Another great point! No matter how often I try to make this point is seems, for some, to always fall on deaf ears.


Post a Comment
*Required (Never published)