>Unit Testing

>Unit Testing

>With apologies to The Monkeys

I thought unit tests were just for fairy tales
Never had the time to do things right
Going live was frantic
Development a drag
Changing all my code got real bad

Then I wrote my tests, now I’m a believer
Without a trace of doubt in my mind
I’m in love – mmmmmmm
I’m a believer, best thing I’ve ever tried

Ahem. Or something. I’ve just made substantial changes to two of our production systems over the last couple of weeks, but thanks to Andy and some stuff we did months ago in a pub, I have tests. They rock. Not saying they’ve nailed everything but certainly they’ve made a big difference.

The first system I changed it was remarkably painless and I felt remarkably confident. The second system was a bit more rushed but the go live had no major issues. The one issue that did crop up I changed on my test system here, ran the unit tests, watched them fail, fixed the code again, ran the tests again, watched them past, svn updated the live system and all was fine. Never felt in much panic and making the fixes was a much more pleasurable experience.

The only problem is – I can now see all the areas I don’t have tests for …

Leave a Reply

Your email address will not be published. Required fields are marked *