The Third Virtue

Unit Testing is boring and tedious.  This is not just a hyperbolic opening line with the thinly veiled intent of grabbing the reader’s attention.  The only times I can remember enjoying writing a unit test were cases where there was a short setup to a not-quite-trivial problem, leading to the application crashing, such that writing out a unit test is not only less annoying than a manual scenario, but in some small way, I feel like I’m giving the buggy code the finger by not letting it inflict its full potential for disaster.  I am only four, after all.

Now is when the Hubris comes out.  How can we improve this situation?  Unit testing is not only recommended, but is indeed part of being a software professional.  If code you’ve written doesn’t have some automated testing around it, I would like you to have at least considered it, and made the conscious decision not to, for a good reason.  Otherwise, you’re not doing your job properly.  It’s really that simple.

Read more of this post

Advertisement