Getting Test Infected
The starting point for me was reading the key books on TDD (my focus is TDD on the basis that it provides more benefits than Unit Testing alone and that if I'm going to change how I do things I'm just as well to change them to a better way of doing things!).
I also joined the Test Driven Development Yahoo! group to get that slow drip feed of TDD ideas into my inbox, keeping some share of mind on TDD and seeing the kind of issues practitioners were facing.
I've also got to say that presenting at conferences like ooPSLA and SPA put me in an environment with people like Kent Beck, Martin Fowler, Ward Cunningham and the next generation like Dan North and Liz Keogh which made it pretty embarrassing NOT to have been doing TDD for the last few years, so that certainly helped with the motivation to "get" TDD before Nashville!
Recently I finally got a couple of quiet days to get started and a perfect use case. I'm re-writing my in-house framework from the ground up and it is quite a bit more complicated than anything I'd usually code for a client and the robustness and handling of edge and exception cases is extremely important as I really need to be able to trust the framework. It's also a perfect example of trying to create a very powerful system that could result in analysis paralysis, so it's a perfect fit for a Test Driven Development approach. I IM'd many of the smart people I know to get their input on structuring, naming and writing tests.
I'd already installed the excellent MXUnit (although don't forget CFC Unit or CF Unit), so I read through the JUnit book, put together a few blog postings, and now I have my new IBO project (I'm starting by rewriting the IBO which LightBase uses extensively) including a test directory with a generated test class ready to be filled out with a set of useful tests. I'm going to cheat a little with the base object. I've already coded something, but I'm going to delete the code (including the class file) and start from scratch writing the tests first. It'll be interesting to see if the API I end up with from TDD is simpler or better than the one I originally came up with . . .


