What is the cost of avoiding unit testing and the cost of software bugs?

More than a third of the cost of software bugs – over $25 billion in the US alone – could be avoided if better software testing was performed in the initial stages of development?

The cost of inadequate infrastructure for software testing in the United States was $59.6 billion, or about 0.6 percent of US GDP, according to a report by the National Institute of Standards and Technology (NIST). Over half of the costs are borne by software users and the remainder by software developers and vendors.

According to NIST, while software bugs can’t be completely avoided, more than a third of this cost could be avoided if better software testing was performed and bugs were found during the development stage.[1] Based on 2010-2011 labor costs, the cost of preventable software bugs has increased to at least $25.8 billion in the United States alone.

So, how does this break down? According to NIST’s estimates, approximately 10 percent of computer programmers’ and 35 percent of software engineers’ time is spent debugging and correcting errors. According to NIST, this is equal to at least 302,450 full time employees engaged in testing and debugging activities, representing approximately one-fourth of all computer programmers and software engineers in the United States. Half of labor when developing software is spent on testing.[2]

The median salary in 2010-2011 of American computer applications software engineer was $85,430 and the median wage of computer systems software engineers was $92,430. At the lower wages of American computer applications software engineers, assuming that no additional employees are required to engage in testing and debugging activities, this yields a minimum cost of at least $25,838,303,500 spent on debugging and correcting errors per year.

Currently, over half of all errors are found “downstream” in the development process, after the code has already been sent to QA or during post-sale software use. However, as the above shows, by engaging in development practices that are more likely to find bugs upstream, such as unit testing, overall costs can be reduced.

Ward Cunningham’s First Law of Programming states that “lowering quality lengthens development time.” According to Cunningham:

Quality software takes the least amount of time to develop. If you have code that is simple as possible, tests that are complete and a design that fits just right, additions and changes happen in the fastest possible way because the impact is lowest. Consequently, if you hack something out, the more you hack the slower you go because the cost of addition or change grows with each line of code.

By preventing bugs in the development process, long-term costs are saved. The average lifespan of a software system can be decades. According to David Laribee, “The idea that you have a development team that completes a project then throws it over the wall to a maintenance team is fundamentally flawed.”

Hence, if you unit test, you will:

  • Find bugs quicker
  • Provide confidence in your code
  • Send less bugs to QA
  • Release higher quality software
  • Save your company lots of money.


Who wouldn’t like that? Download Isolator or Isolator++ today.


[1] The Economic Impacts of Inadequate Infrastructure for Software Testing. http://www.nist.gov/director/planning/upload/report02-3.pdf

[2] http://www.cs.washington.edu/homes/mernst/pubs/economics-foser2010.pdf

  • http://www.edocr.com/doc/32967/software-development-companies-india Lawrence bruce

    You made some decent points there. I looked on the internet for
    the issue and found most individuals will go along with with your blog.

  • qathoughtleaders

    you for sharing this informative post. Very nice articulation. How about
    sharing your thoughts on futuer of software quality assurance and testing.
    Look forward to your next post.

  • Kristian Ask

    I agree with the quote completely but it doesn’t necessarily mean that unit-testing is the way to go. Write less and better code is the first thing to do. KISS has been around much longer than unit testing and it still apply. Unit-testing is just picking up at most 40% of the bugs and that is if the tests are well written. Most of those can be avoided in the first place. To pick above 80% of bugs you’d have to go for the google-style testing using 10,000+ users to test.