Addicted - to testing!
June 2, 2005 – 10:11 pmI’ve been coding for a while now - since I was 8 or so, in one form or another. No single practice has ever hit me as hard as unit testing, though.
I first started my flirtation with unit testing back in 2003. I was using classic ASP and, on the advice of some well-meaning books, decided to take a look at ASPUnit. I thought it was ok, but never really got hooked due to some external factors.
In mid-2004, I’d started using C# and reading more about agile methods, so I decided to give nUnit a whirl. My world was, to put it mildly, rocked. My productivity increased immensely (or so it felt), and my bug rate dropped noticeably - not that it was *cough* that bad before *cough cough*.
By the time I came to my current company back in February, then, I was well and truly addicted to the joy a green bar can bestow.
Unfortunately, unit testing isn’t an established practice here (yet, but more on that later) - and since 1) I’d never really explored testing in PHP other than the occasional peek at PHPUnit, and 2) I was working with other developers who weren’t testing, I sort of fell off the wagon. My first few weeks were rough - I’d add tests to new code I wrote where I could (as I got more familiar with PHPUnit, this became easier), but even now I’m producing noticeably more untested than tested code.
But wait! Some of the other developers here have been trying to make unit testing an accepted practice, and it seems that with my addition there might be enough of us to make a real go at it. We’re committed to producing tests for an internal app (written in Java, so woohoo for learning yet another testing framework), and hopefully a big win there will carry over into establishing testing company-wide… and if that happened, I’d be indulging my love of the green bar every time I turned around. We can only hope, right?

