TrainingConferencesAbout UsContact UsAdvertiseSQE.com

StickyMinds.com: brain food for building better software

Join

Join

Clarify Your Search Criteria
Tips on Using Our Search Feature(s)
StickyMinds.com Home
ResourcesEventsTopicsPowerPassJobs
Software Testing & QA Online Community  >  Detail: What Does It Cost to Fix a Defect?



A StickyMinds.com Original
Article Picture
What Does It Cost to Fix a Defect?

By Johanna Rothman

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: We all have different attitudes and policies toward finding and fixing defects. The choice about whether and when to fix defects depends upon many factors, one of the least understood being the actual cost of fixing a defect. In this week’s column, testing expert Johanna Rothman shares a formula for calculating the system test cost to fix defects and how to factor that into the bigger picture of your project.


Tricentis
Dan is a developer working on a project, along with four other people. They spent the first eight months of the project developing the product without fixing their defects, unless the defect prevented them from moving forward with development. Dan and his team thought it would be more cost-effective to fix their defects all at once. So at month nine, about a month away from the desired release date, they decided it was time to fix the defects.

Avery is a project manager at a company with a virtual lock on the market. Because the customers are captive, each customer wants a beta copy immediately, so they can start using the software. Concerned that a beta with many defects would make their customers angry, Avery decided it would be more cost-effective and less risky for the developers to find and fix the majority of the defects before they started system test.

Two projects, two completely different approaches toward finding and fixing defects. We all have different attitudes toward fixing defects, specifically which ones to fix and when. The choice to fix or not to fix depends upon many factors: the kind of product you’re developing; the risks associated with shipping known or unknown defects; your development processes; and what it will cost you to fix the defect when you do fix it.

One of the least understood factors is the actual cost of fixing a defect. This cost feeds back into your choice of development lifecycle and development process and can help you decide how much risk you’re willing to take to ship or not ship the product. However, many people don’t actually know what it costs their organizations to fix a defect. If you’re not sure either, here is an estimation technique to measure that cost:

In system test, when people are 100 percent dedicated to finding and fixing defects, count the number of fixes. You know how many people (developers, testers, and anyone else) worked on the project, and you know the duration of system test. This allows you to calculate the cost to fix a defect during this phase of the project. Here’s how you can find the average cost to find and fix a defect:

Average cost to fix a defect =

(Number of people * number of days) * cost per person-day
(Number of fixed defects)

Note that the number of defects you find isn’t enough information—it’s the number of defects you fix. Detecting defects is only the first step. Locating the failure, deciding how to fix it, developer testing (a.k.a. unit testing) the fix, system testing the fix, and looking for other defects this fix caused is why the fix value is what’s important. Let’s look at some examples. In these examples, I assume a person-day is $500.

Dan’s project is uncovering large numbers of defects now that they’re in system test, and even though most of the defects are quick to fix, some take very long. Avery’s project is uncovering very few defects in system test, but because there’s such a long time between the time each defect is uncovered, it appears to take a long time to fix a defect. Using the calculation above, here are Dan and Avery’s data for system test:

Company (for a specific release)

Number of people

Cost per person-day

Number of days

Number of system test fixes

person-days

Average days to fix during system test

System test cost to fix a defect

Dan

5

$500

40

125

200

1.6

$800

Avery

10

$500

20

30

200

6.7

$3,333

As long as you’re looking at the whole picture of the project, this estimation metric is good for system test fix cost. But, look at how high Avery’s cost to fix is. In reality, Avery’s project met its beta release date (20 work days in system test), at a very low risk of disappointing the customers. Dan’s test time took two months (40 work days), and even though the team has fixed 125 defects, they have over 300 defects not fixed. Avery’s cost-to-fix is high, because his team worked hard to prevent defects before system test. In fact, using the estimation technique above, Avery’s cost to fix a defect is highly inflated in system test, because they found and fixed most of the defects beforehand. Because Avery’s project detected and fixed most of the defects before system test, the estimation technique is not valid. Instead, Avery’s project can calculate the actual cost of finding and fixing their defects. Avery uses his average of 8 hours system-test time to find and fix a defect. Here’s the table with Avery’s more realistic estimate of system test cost:

Company (for a specific release)

Number of people

Cost per person-day

Number of days

Number of system test fixes

person-days

Average days to fix during system test

System test cost to fix a defect

Dan

5

$500

40

125

200

1.6

$800

Avery

10

$500

20

30

200

1.0

$200

Using the updated data, here’s a clearer picture of the cost to Dan and Avery’s projects to fix a defect:

Implementation Costs

Project

Number of people on the project

Cost per person-day

Average time to fix for implementation

Implementation cost to fix

Number of Implementation fixes

Implementation total cost before System test

Dan

5

$500

not tracked

not tracked

not tracked

not tracked

Avery

10

$500

2 hours

$125

250

$31,250



System Costs

Average time to fix during system test

System test cost to fix a defect

Number of System test fixes

System test total cost

1.6

$800

125

$100,000

1.0

$200

30

$6,000



Post-Release Costs

Pre-release total cost

Average time to fix post-release

Post release cost to fix

Post-release number of fixes

Post release total cost

Total pre and post release cost

$100,000

15 person-days

$7,500

23

$172,500

$272,500

$103,850

5 person-days

$2,500

2

$5,000

$108,850

Avery has high system test costs, because his project spends more time looking for defects than fixing defects However, Avery’s total defect fix cost for Avery’s larger project is lower than Dan’s smaller project. And Avery’s post-release fix cost is substantially lower.

Each project will have its own cost to fix a defect, because the cost depends on the activities undertaken in the project and when you start tracking defects, as well as cost to fix. Use your fix cost to decide how you want to proceed with this project or the next one. If your cost is too high, and you’re not yet in system test, you could try some defect detection and prevention techniques. Just make sure that if everyone is associated with finding and fixing defects that you don’t only count the fix time, that you count the detection time also.

If your find-and-fix cost is high in system test, what’s the risk of releasing early? Avery might have used his find-and-fix cost of $3333 to chose to end system test early and release early, knowing that his post-release cost would rise. Only Avery and his management could estimate the risk of releasing early.

Use the pre-release fix costs to see if you and your staff are being cost-effective in your pre-release activities. I’ve found that each organization has a typical post-release cost, not necessarily tied to the project. So I use the post-release cost to help define release criteria. This helps you manage the risk of too many defects to fix after the release.

Knowing how much it costs you to find and fix a defect allows you to ask questions about how you’re finding, fixing, and verifying defects. Yet another way to build a system with the appropriate quality.



About the Author
Johanna Rothman observes and consults on managing high-technology product development, looking for the leverage points that will make her clients more successful. Johanna was the Conference Chair for SQE’s Software Management (SM) Conference (11-15 Feb.). She conducted a management-improv tutorial and participated in a panel discussion of mentoring and manager-making at the conference. She recently co-moderated a RoundTable “Making the Transition to Management” with Esther Derby. You can reach Johanna at jr@jrothman.com or by visiting www.jrothman.com.

Back to Top
 

StickyMinds.com Weekly Column From 2/18/02 

Member Comments
Add Your CommentExpand Comments
 
Comment:    
by wayne symons 6/18/2007

Would it not be a more accurate reflection of the cost to FIX a defect in the following way, by actually assessing the statistical data. We capture how a defect moves between people - one person does not fix the defect, it can be pinged around first. If you can assign a role cost to each person who had a look at the defect you can cost the whole audit of the defect. If you extrapolate this out to a sample of 1000 defects then surely this is more accurate data as its actual real time spent investigating/fixing?

Author's Response:
6/18/2007    
Wayne, yes, if you could capture all the ping-ponging of the defect and fix and documentation, you might be more precise. But precision doesn't buy you anything here. As long as you don't believe you're off by an order of magnitude, the relative accuracy is good enough.

BTW, I've rarely worked with teams who could capture all that data. If you do work with teams who do, it might be worth trying to capture that data for a week or two to see if the more precise data is better than the less precise data.

 
 
Comment:    
by Alex Forbes 2/20/2002

I would like to thank the author for introducing a more up to date metric for calculating the cost of a defect. I've always compared defects costs to the JPL study from the early 90s, that for every earlier stage in the development cycle one can catch and remediate a sw defect, a savings of 10x is achieved (for e.g., 10,000 to fix a sw defect once in testing, down to $10 if caught while writing the code itself). I'm going to take another look at the white paper, "From Software Quality Control to Quality Assurance" with renewed eyes. Implementing proactive quality assessment and assurance tools, plus the use of impact analysis tools may...Read On

Author's Response:
2/21/2002    
Alex, when I've measure the ratio of cost, it wasn't a nice even 1:10:100:1000 (requirements:design:implementation and test:post-release), it was more like 1:20:45:250. But, these are my measurements only, just on the projects I've worked on, and I'm not an academic. On the other hand, fixing a problem post-release, and having it cost 250 times what it cost to fix in requirements was a large-enough hammer for me to use on my management, to change what we did for the next project.

 
 
Comment:    
by Linda Hayes 2/20/2002

While I applaud any effort to produce management-friendly (read as money) metrics, we have to be careful not to measure something just because we can. I have 2 concerns: 1) We all know that the cost to fix a defect skyrockets after release, when all manner of damage control and recovery may be required. Making decisions based on how much it will cost to fix a defect does not take into account the cost of NOT fixing it. 2) I agree with the earlier comment that only a thorough time-tracking system can give you defensible metrics. Otherwise, the sample size is usually so small (statistically speaking) that minor variances (someone takes...Read On

Author's Response:
2/20/2002    
Linda, I first started using cost-to-fix post-release. My management thought it just took us a "couple of days" to make fixes, and we could choose to fix numerous defects post-release. When I measured how long it took, it was roughtly 4 person-weeks to fix each defect. I had a sample size of 50 post-release defects for that release. Even after that release, our post-release fix cost didn't decrease much, but by changing what we did during the project, we were able to significantly reduce the number of defects going out to the field, and therefore the number of defects we needed to fix.

 
 
Comment:    
by Tek Wallah 2/19/2002

It was fascinating to see the testing process quantified like this -- much better than declaring this or that testing method 'obviously' the best. On the other hand, I'm left with the impression that we're still trying to measure the size of a cloud. Reading the article, I kept thinking of non-trivial factors that affect the total cost of testing and that had no place in the formulae: 1. How much time did Avery's team waste fixing bugs in code that was eventually eliminated or radically rewritten before code complete? 2. Did Dan's 20 days give them enough time to rewrite the parts of the code that were fundamentally flawed -...Read On

Author's Response:
2/21/2002    
Tek, I'm glad you could see that this is just the beginning of the story. Let me try to answer some of the questions: 1. Avery's team didn't *feel* as if they wasted time fixing defects, because even if they redesigned and rewrote code, they learned from the fixing. 2. Dan's 20 days were insufficient. The customers eventually kicked out the CEO and reorganized the company, based on too many defects for too many releases. (Small customer base.) 3. Not everyone on Avery's team was able to stop nit-picking during high level design and architecture, but they had ways to deal with those nits. 4. The customers took over Dan's company's board :-) 5. Avery's team was not loyal to the code, but to the product. That meant that they were able to scrap when they needed to scrap. 6. It's not clear to me that any of Dan's defects didn't need to be fixed. Hmm, let me say that more clearly. None of the defects Dan's project found were trivial enough to postpone. 7. Testers didn't disrupt the development on Avery's project - the testers and developers worked together.

 
 
Comment:    
by James Bach 2/18/2002

I worry about this metric, Johanna. Anyone who calculates a "cost to fix" metric is going to want to use that information to extrapolate future costs, right? I mean, if the metric tells me that fixing a bug costs $500, then I should be allowed to reason that making a decision *not* to fix 10 bugs would save me $5000, but that wouldn't be a valid inference, would it? Fixing them might cost pennies, depending on the type of fix. Or may cost vastly more NOT to fix. Deciding not to fix a set of bugs may not save me a single day on the project, if, for instance, the schedule is driven by some factor other than fixing bugs, or bug fixes happen in...Read On

Author's Response:
2/20/2002    
James, you're right to worry. Using this metric by itself can be meaningless, unless you plan to change where you put the effort on a project. Unfortunately, many software projects are driven by how many of which defects they can fix in the last phase of the project. If managers understood how much it cost to find and fix defects at the end of the project, maybe, just maybe, they would change how they planned the next project.

 
 
Comment:    
by Mary Steinborn 2/18/2002

One thing I found interesting in these examples is that the "cost to fix" defects is calculated in combination with the effort of testing required to find the defect to be fixed. Testing and debugging, whoever does the actual work, are two different activities with their own metrics and implications. For example, if one team finds and fixes 100 defects and the other team finds 400 defects and fixes 100, all else being equal, the second team is at a much greater advantage. It means they have had the opportunity to fix the highest priority defects first, and have a better basis to calculate the risk of releasing with the known unfixed defects.Read On

Author's Response:
2/21/2002    
Mary, at the end of the project, assuming everyone is focused on finding and fixing defects, I don't know how to separate the testing from the fixing. Are you testing if you're trying to replicate a problem? Are you testing if you're trying to verify a fix is good? Are you fixing if you're testing your fix? Are you fixing if you read the other code around what you've fixed? If I knew how to appropriately categorize the activities, I would, but there are too many overlapping activities when "everyone" is in frantic find-and-fix mode. BTW, I'm not sure that the people who find 400 defects and fix 100 defects are better off than the people who only find 100. It depends on how many more defects there are to find, *and* if the developers actually fix the highest exposure defects first. :-) (I suspect we agree more than we disagree, but just numbers aren't a good enough indication of what's going on.) I absolutely do agree with you that the more product testing everyone does earlier, the better off the project is.

 
 
Comment:    
by Robert E. Lee 2/18/2002

Great article, Johanna! You've captured the cost basis of errors. Mix this with the relative efficiency of finding and fixing via reviews compared to "trying to recreate the problem" debug & fix, and you've got the big picture. Continuous unit testing and 100% review coverage not only catch faults early, but also point squarely at the location needing repair - saving 60-80% of "bug fix" time. The progression from "known problem" to "known cause" is not cheap in system test.

 
 
Comment:    
by Srinivasan Desikan 2/18/2002

A good article and the author made it very easy to calulate the cost by simple tables. Here are my views; 1. It doesn't matter in my opinion how many days it takes to fix a problem. Developers work on many activities in a day and duration can't be calculated by elapsed days. What matters a lot is the effort it has taken (in terms of actual hours the developer spent working for the fix. Many defect tracking tools now have a seperate field where the effort in hours can be entered for each defect. We can run a query to find out the total hours, get the actual number of days and use it in the calculation. 2. We can use the cost calculated...Read On

 
Back to Top



 
Ads By Google
What's This?
 
 



About Us   |   Contact Us   |   Terms & Conditions   |   Privacy Policy   |   RSS Feed



© 2013 StickyMinds.com. All rights reserved.
ASTQB

Tricentis



STARWEST