Toolshed Technologies
Andy Hunt
Musician, Author, Programmer
What is Unit Testing?
02/29/2004
A new review of our book Pragmatic Unit Testing in Java is up on Slashdot.
Between this post and a recent flurry of activity over on JavaRanch, it seems pretty clear that many folks out there really don’t understand what unit testing is all about.
We’ve read posters who claim that unit testing is just the same as debugging, or that unit testing contributes to code bloat, or that it’s stupid, or a waste of time, or that real coders don’t bother with such things, and a lot of other nonsense.
Not to put too fine a point on it, but I think I see why so many folks are having trouble staying employed these days. The days of hacking out barely acceptable code are over. Outsourcing is taking its toll, and a once-gullible public is starting to wise up. They’d like applications that actually work; as reliable as your microwave oven, not as flakey as your cable TV box. (Think about it: have you ever had to reboot your microwave??)
Unit testing is a powerful technique that allows you to write better code, but many programmers won’t even try it. Maybe the problem is just in the name: instead of unit testing, perhaps we should call it something like asking the code. It is a coding technique, after all - not a testing technique.
And for the folks who don’t want to do it: not to worry. Someone else who wants your job will.
Latest News
-
Greenfield, Brownfield... Blackfield?
July 24, 2024 -
New article: The Limits of Process
January 25, 2022 -
New article: Habits vs. Practices
January 5, 2022 - List All News...