Professional Documents
Culture Documents
The Economics
of Testing
Objectives
Synopsis
This module discusses why software defects are costly to find and
fix. You will also learn how early defect detection can save much
cost in fixing defects.
Table of Contents
Another economic impact is from the way we perform testing. It is possible to have very
good motivations and testing goals while testing in a very inefficient way.
In this section, we will examine the economic impact of defects and ways to economize
testing.
Where
Where Defects
Defects Originate
Originate
Code
Code OOther
Design ther
Design 7%
7% 10%
10%
27%
27%
This document may not be reproduced.
Req's
Req's
56%
56%
• The English language is ambiguous and even what we consider clear language can be
interpreted differently by different people.
The figures in this pie chart were taken from a James Martin study and the numbers track
very closely to measurements of typical software projects.
STBC - 1
The Economics of Testing
The problem with the big bang approach to testing is that defects are not found until toward
the end of the project. This is the most costly and risky time to fix defects. Some complex
defects may even be impossible to fix.
The figures above were taken from surveys at the Quality Assurance Institute’s (QAI)
annual software testing conference. To obtain the current survey, go to www.qaiusa.com.
STBC - 2
The Economics of Testing
100
100
90
90
80
80
70
70
60
60
50
50
40
40
30
30
20
20
10
10
00
Req's
Req's Design
Design Code
Code Test
Test Prod
Prod
That is, if a defect costs one unit (hour, dollar, etc.) to fix in requirements and design, it
costs 10 units to fix in testing (system/acceptance) and over 100 times to fix in production.
Sometimes the cost to fix a defect in production costs much more than 100 times the cost
of fixing it in the requirements phase.
This cost of defects doesn’t even take into account the impact cost of defects. These costs
could be attributed to lost revenue, reimbursements, fraud, lost customers, bad public
relations, and litigation. In the case of safety critical systems, how can one put a cost value
on a human life?
STBC - 3
The Economics of Testing
An Example
Big Bang Approach Lifecycle Approach
Accumulated Accumulated Accumulated Accumulated
Test Cost Defects per 1KLOC Defects per 1KLOC Test Cost
0 20 Req’s 10 10
Cost to find = $1
0 40 Design 15 25
Cost to find = $1
0 60 Code 18 42
Cost to find = $1
Test 4 182
480 12
(80% detection)
Cost to find = $10
1,680 0 0 582
Implement
Adapted from Effective Methods for (0 defects)
Software Testing by William E. Perry
Cost to find = $100
An Example
This slide shows two contrasting views of testing – the lifecycle approach where testing is
performed throughout the project, and the big bang approach where testing is performed
only at the end of the project. The final cost of the big bang approach is much greater than
the lifecycle approach.
STBC - 4
The Economics of Testing
The
The Bottom
Bottom Line
Line
•• Most
Most defects
defects are
are created
created in in the
the
early
early stages
stages ofof aa project
project
•• Most
Most defects
defects are
are found
found inin the
the later
later
stages of a project
stages of a project
•• ItIt costs
costs 10 10 to
to 100
100 times
times asas much
much
to
to fix
fix aa defect
defect inin the
the later
later phases
phases
of
of aa project.
project.
If you really want to make your testing more efficient and reduce the overall cost of testing
This document may not be reproduced.
and defects, test early in the project and continue testing throughout the project. Most
defects can be found by inspections even before a test is performed!
The
The Bottom
Bottom Line
Line
•• IfIf you
you want
want toto reduce
reduce thethe cost
cost of
of testing,
testing,
spend
spend time
time early
early inin the
the system
system
development
development (or (or purchase)
purchase) process
process toto
make sure the requirements
make sure the requirements and designand design
are
are correct.
correct.
STBC - 5