Bens Stuff

Monday, February 28, 2005

how bout that, unit testing is good for something after all

yeah, so I've been putting off unit testing my code for quite a while. I don't know why, laziness probably. I've always tested it manually using copious logging and having some other eyes look at the code.
But at my new job we HAVE to have unit test written for everything we deploy. It's not a test driven development shop, but unit tests are taken seriously. So after a bit of grumbling (silently of course), I wrote my unit tests. They weren't as hard and painful as I thought it would have been. But you know what, all of my tests except one passed. Well I'll be a son of a son of a sailor (it's what was playing on my mp3 list). One of my unit tests actually uncovered a bug that wouldn't have been found until it went into production.
I have repented of my test-less ways and I now promise to faithfully write my unit tests. I will still refuse to go to TDD unless I'm forced to. I just can't think that way...

0 Comments:

Post a Comment

<< Home