Download STBC –The Economics of Testing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
STBC
The Economics
of Testing
Objectives
•
•
•
Understand where defects originate
Learn about the 1:10:100 rule
Learn how to make the most of your testing investment
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
STBC –The Economics of Testing
•
•
•
•
Where defects originate
Where testing resources are used
The relative cost of fixing defects
The bottom line
The Economics of Testing
The Economics of Testing
There is a definite economic impact of software testing. One economic impact is from the
cost of defects. This is a very real and very tangible cost.
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
This document may not be reproduced.
Design
Design
27%
27%
Code
Code
7%
7%
OOther
ther
10%
10%
Req's
Req's
56%
56%
Where Defects Originate
To understand the dynamics and costs of defects, we need to know some things about
them. One of the most commonly understood facts about defects is that most defects
originate in the requirements definition phase of a project. The next runner-up is the design
phase.
Some problems in getting accurate, clear, and testable requirements are:
• Many people do not have a solid requirements gathering process
• Few people have been trained in or understand the dynamics of requirements
• Projects, people, and the world around us change very quickly
• 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
Where Testing Resources are
Used
50
50
45
45
40
40
35
35
30
30
25
25
20
20
15
15
10
10
55
00
Proposal
Proposal
Reqs
Reqs
Design
Design
Code
Code
Test
Test
Install
Install
Where Testing Resources are Used
We saw that most defects originate in requirements and design, but most of the testing
effort occurs in a traditional “testing” phase toward the end of the project. This is called the
“big bang” approach from the concentration of effort at one big phase. “Big bang” could
also describe the sound of the project as it fails.
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
The Relative Cost of Fixing
Defects
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
The Relative Cost of Fixing Defects
One of the most well known facts about software defects is that the longer they go
undetected, the more expensive they are to fix. Although research differs on the exact
ratios, the general rule is 1:10:100.
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
Test Cost Defects per 1KLOC
Accumulated
Accumulated
Defects per 1KLOC Test Cost
0
20
Req’s
10
10
15
25
18
42
4
182
0
582
Cost to find = $1
0
40
Design
Cost to find = $1
0
60
Code
Cost to find = $1
480
12
Test
(80% detection)
Cost to find = $10
1,680
0
Adapted from Effective Methods for
Software Testing by William E. Perry
Implement
(0 defects)
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 of
of aa project
project
•• Most
Most defects
defects are
are found
found in
in the
the later
later
stages
of
a
project
stages of a project
•• ItIt costs
costs 10
10 to
to 100
100 times
times as
as much
much
to
to fix
fix aa defect
defect in
in the
the later
later phases
phases
of
of aa project.
project.
The Bottom Line
This document may not be reproduced.
So, what does all of this mean? The main conclusion is that most people perform testing
too late in the process. These people wonder why testing is so expensive and why their
projects are often over budget.
If you really want to make your testing more efficient and reduce the overall cost of testing
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 to
to reduce
reduce the
the cost
cost of
of testing,
testing,
spend
spend time
time early
early in
in the
the system
system
development
development (or
(or purchase)
purchase) process
process to
to
make
sure
the
requirements
and
design
make sure the requirements and design
are
are correct.
correct.
STBC - 5