Why Unit Test?

I’ve written a few articles about unit testing on this blog, but so far they’ve been about how to go about doing so and what supporting libraries/frameworks are available. Now I want to look at why unit testing is a good idea. In particular, this article will focus on the business perspective.

Many software developers embrace the unit testing of code with enthusiasm. Unfortunately though, there are many who see it as something that will just hinder them in getting their work done - after all, they will have to write significantly more code, won’t they? It is even more unfortunate that many managers see things the same way. So, why unit test, given that developers will indeed have to write significantly more code?

The fact is that, from a business perspective, unit testing earns its keep on the cost/benefit scale. The 1988 paper "Understanding and Controlling Software Costs" by Barry Boehm and Philip Papaccio states:

…the cost of fixing or reworking software is much smaller (by factors of 50 to 200) in the earlier phases of the software life cycle than in the later phases

The authors also provide references in support of this statement. Now look at the numbers: assuming the least worst case, catching an error early make it cheaper to fix by a factor of fifty. Compare this with the amount of effort needed to write a unit test - and remember this is the least worst case. It seems that unit testing is definitely earning its keep! Unfortunately, my research suggests there is a lack of recent data published on the web in this field. However, although the paper I have cited is quite old, it is hard to imagine that things have improved in the light of today’s technology. In fact, things are likely to be worse because computer systems are much more complex, as they attempt to solve much more complex problems.

Unfortunately, unit testing will not guarantee completely bug free code. Somewhere, something will get missed. It is likely, for example, that unit test coverage will miss some aspects - corner cases in particular - of the code. Despite this, the evidence suggests that it does contribute significantly.

Leave a comment

?>Lesbian sport videos publicnude public invasion Vince Ferelli Roxy Love Big Mouthfuls tight ass drilled outinpublic Amy Reid shaved pussy hammered Charmane Star outinpublic submityourbitch.com submit your bitch hazehim Monsters Of Cock outinpublic.com publicinvasion busty adventures haze him Hot tight pussy submityourbitch submityourbitch publicinvasion public invasion itsgonnahurt Blonde round ass Kat drills ungloryhole Gia Malone magical feet outinpublic.com assparade Lesbiansportvideos TOMMYDXXX Beautiful hand job Medical Femdom collegerules.com BIGGEST ASS CRAVING publicinvasion outinpublic.com SpecialExercises collegerules submit your bitch dildo drills her pussy public invasion hottest white girls ungloryhole.com natural beautiful tits lesbian lover licks Brooke Banner Blonde gets fucked hard hazehim VISCONTITRIPLETS evanrivers MALEDIGITAL pussy licked sexy blonde petite itsgonnahurt publicinvasion lucky stud in a hot threesome college rules VINTAGEGAYLOOPS pussy covered submit your bitch Aiden Aspen Milf cravers fat juicy ass. ungloryhole camel toe porn star fucked hard publicinvasion pussy pounded Sexy big tits pornstar collegerules.com Bang Bros bangbus NEXTDOORBUDDIES facial fest Aiden Aspen hazehim.com Big Mouthfuls Ice La Fox Confession Of Married Man Alexis Fawx Special Exercises lesbian dildo drilling publicinvasion Lacey lounging smacked those asses out in public collegerules SpecialExamination CODYCUMMINGS GAy Cumshots Extrem tugjobs tugjobs CIndia Summers publicinvasion public invasion itsgonnahurt.com public invasion collegerules Special Examination college rules collegerules.com ungloryhole outinpublic NEXTDOORPASS NEXTDOORPASS amazing blowjob outinpublic.com its gonna hurt milf lessons trannyland bang pas BIGGEST ASS CRAVING outinpublic.com Stephanie Cane summer time milf facialfest fuck team five Gyno Orgasm Videos NEXTDOORHOOKUPS ungloryhole.com trannyland.com NEXTDOORMALE tug jobs Nude sport videos tranny land itsgonnahurt hazehim hazehim.com Redhead BBW bait Bus publicinvasion Bareblacking public invasion firm tits fat mature redhead MedicalFemdom Summer Bailey milfsoup GynoOrgasmVideos milfsoup public invasion college rules Licking Dick And Ass submit your bitch trannyland.com Nudesportvideos 3DS Max 8 OEM3Q 3GP Video Converterdownload acdsee manager 2009 oemred eye remover pro 1.2cheapest windows vistacheapest windows vista ultimatecheap AutoCAD 2009Vision Backup Enterprisecheap Macromedia ColdFusionnero photoshow 5 downloadadobe photoshop cs oemcoldfusion mx 7 downloadkamagra sildenafil citratekamagra generic viagraorder caverta onlinecaverta 100buy cavertatadaliscasodex 50 mg tablet