Onward and Upward

Blog archive

Proof of Unit Testing's Time Savings

At Visual Studio Magazine, we're big proponents of unit testing as a means of writing better, more efficient code. Yes, that can come under the heading of "Duh!", as in "Duh, Ward, that ain't exactly breaking news, is it?"

True though that may be, it's my suspicion (based solely on anecdotal evidence, it must be pointed out) that many, many developers don't do it as a regular practice. I'd suspect the reasons are fear of the unknown, or the inertia we all experience when it comes to changing our routines.

But if you're not doing unit testing, you're seriously slowing down your productivity. That's according to some numbers that came across my desk (OK, monitor) in a press release from Typemock, which makes unit testing products. According to Typemock,

Over 50% of the largest European banks and over 35% of global leading financial institutions consider unit testing critical

Now, aside from the spin that will naturally be applied to those figures, they're still pretty significant. And it backs up what we've been saying for years now -- that unit testing saves time, which of course saves money. How much time? Well, the release estimates a 70-80 percent reduction in debugging time. Again, I'm not sure that most developers are seeing quite that level of time savings, but maybe some of you are. I'd love it if you unit testers would give me some feedback related to this: how much time do you save over your non-unit-testing days?

I wonder if the new emphasis on time-to-market that's been spurred by the explosion of mobile development is leading to a similar uptake in unit testing; I suspect it's having a large impact in that realm. Again, let me know.

If you're not using unit testing, I'd also be interested in hearing why.

Posted by Keith Ward on 02/07/2012 at 1:15 PM

comments powered by Disqus

Reader Comments:

Wed, Feb 29, 2012

At least, according to this article, unit tests work well to fill out the space between the ads in the printed edition.

Mon, Feb 20, 2012 UnitTester

So your saying a company that makes products for unit testing sent you a study that says not enough people are doing unit testing?

Mon, Feb 13, 2012 Joe Dallas, TX

In one instance, I worked for a company that was, to its credit, very metrics-oriented. They had metrics that included estimates from the QA team for the number of expected defects for a given release, based on function points (stories, use cases, etc.). When I arrived there, no unit tests existed and the actual count (yes, not hours or other measue of effort, so open to criticism) was about 200% of the QA estimate. After 2.5 years of coding, and introduction of slightly over 1000 unit tests, the actual count for the latest release dropped to about 35% of the QA estimate; the QA team did not change its methodology for establishing estimates.

Thu, Feb 9, 2012 Tom

I agree with the other commenters. You've got our attention; how about showing some proof? I'd like to see a side by side case history of a test app development effort -- one with all the unit testing overhead, one without. Absent that I remain unconvinced.

Wed, Feb 8, 2012 josh

I am a massive fan of unit testing but Trevor is right no evidence at all, it would however be a fantastic study.

Wed, Feb 8, 2012

There is not enough good material out there for learning unit testing in my opinion. I would like to see a walkthrough of a complete mvc3 app built with unit testing (preferably with TDD) from the start to help people really understand this process.

Wed, Feb 8, 2012 Trevor

There's no "proof" here whatsoever, just a group of people that agree. Pick almost any topic and you can assemble a group of people that agree with you.

Add Your Comments Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Please type the letters/numbers you see above

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.