Professional Documents
Culture Documents
S
SSQ Presentation
021209.01
Agenda
Summary of Previous Talk Defect Management Metrics Metrics for Project Management Metrics for Process Improvement Advanced Metric Models
SSQ Presentation
021209.01
Last time
We reviewed cultural issues related to defect management We went over a defect management process:
Policies Workflow/States Fields
SSQ Presentation
021209.01
Data Collection
At different states in the workflow, different data are collected Most data are collected at submit time Additional data are entered by the developer upon resolution And finally by the tester upon verification
SSQ Presentation
021209.01
Agenda
Summary of Previous Talk Defect Management Metrics Metrics for Project Management Metrics for Process Improvement Advanced Metric Models
SSQ Presentation
021209.01
021209.01
Time to record (18k *10m) Time to correct (9k *16h) Time savings (450 * 16h) ROI
This doesnt quantify the value of being able to predict quality and schedules
SSQ Presentation
021209.01
Simple Measures
Defect cost = Fix rate = Duration = (Total Resolution Effort) Number of resolved defects Number of resolved defects Period of time (week, month, etc.) ((Closed Date) (Submit Date))* Number of resolved defects
Last two include queue time, so they depend on workload Its helpful to understand the standard deviation too Bonus: By type, root cause, injection phase
* Excel NetWorkDays is a useful function
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Logging Defects
This is not
How many defects leak?
This is
What percent of known defects are recorded?
If you only start logging defects in test, youre missing over half of your data Try to capture data from reviews/inspections and developer unit tests
SSQ Presentation
021209.01
Prioritizing Defects
This is not about how to set priority, but Priority means the most important defects get resources first To measure this, we need to know the queue time (from submit to work starts) Therefore, we need an Accepted state, or something to note when work began Why cant we use Submit to Verify duration?
SSQ Presentation
021209.01
Aging Defects
Time in Resolver queue Time in Verifier queue
12 Days in Queue
SSQ Presentation
021209.01
Defect Backlog
Many groups dont count defects left over from prior releases; they only focus on defects found and not fixed in the current project This is dangerous because a product defect backlog can grow unmanaged ALL of the open defects are released, not just the new ones When producing the report of open defects, query for all open defects in the product
SSQ Presentation
021209.01
The Calculation
Week 1 2 3 4
Total number of defects Number closed before the week started Number that were opened after the week ended = Number open in the week
SSQ Presentation
021209.01
SSQ Presentation
021209.01
This uses named ranges, where D.Num.CRs D.T.Closed = Total number of CRs opened = Range of Closed Dates
SSQ Presentation
021209.01
The Result
SSQ Presentation
021209.01
Agenda
Summary of Previous Talk Defect Management Metrics Metrics for Project Management Metrics for Process Improvement Advanced Metric Models
SSQ Presentation
021209.01
SSQ Presentation
021209.01
A Project Axiom The quality of product in one phase is an indicator of the quality in later phases Why?
There are two answers
SSQ Presentation
021209.01
Review Metrics
Reviews & inspections have proven to be the most costeffective way to detect and remove defects Inspect your key project artifacts
(requirements, designs, code, tests, etc.)
SSQ Presentation
021209.01
Review/Inspection Data
There are many data collected during a review or inspection The ones that tell us about quality are:
Number of Operational defects discovered Number of Minor defects found
Defect Density Project = Operational Defects found by inspection Delta SLOC (or LOT)
SSQ Presentation
021209.01
Verification
Use Defect Density to estimate expected yield
Similar to estimate described with reviews
Defect discovery & closure Use extrapolation to predict when defect exit criteria will be met
SSQ Presentation
021209.01
Defect Discovery
Total Defects Opened
Cumulative Defects Found
Weekends
Time
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Well-Behaved Curve
Total Defects Opened
Cumulative Defects Found
Time
SSQ Presentation
021209.01
Cumulative Defects
Opened Closed
Time
SSQ Presentation
021209.01
Add: To QA
Total Defects Opened, Closed, & To QA
Cumulative Defects
Opened To QA Closed
Time
SSQ Presentation
021209.01
Dev is a bottleneck
Opened To QA Closed
QA is a bottleneck
Time
SSQ Presentation
021209.01
Time
SSQ Presentation
021209.01
Should I be concerned?
Time
SSQ Presentation
021209.01
Time
SSQ Presentation
021209.01
Computing in Excel
Query defects into Excel Convenient: Use named ranges for data
SSQ Presentation
021209.01
Computing in Excel
In a second sheet, create a date column and count the defects submitted and closed for each date.
Array formula. <Shift-Ctrl-Return>
SSQ Presentation
021209.01
90 80 70 Found in 4.7 60
Total CRs
40 30 20
Closed Found in 4.7
50 0
7/1/08 7/8/08 6/17/08 6/24/08 7/15/08 7/22/08 7/29/08 8/5/08 8/12/08 8/19/08
10 0
8/26/08 Target Release Date
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Defect Discovery
Total Defects Opened
Cumulative Defects Found
Should I release?
Time
SSQ Presentation
021209.01
Bad Defects
Bad is a function of
Severity = the consequences of the failure Probability that it will occur The number of customers likely to experience it May also include important customers or functions
These are often complex to calculate, so most companies just use Severity, tempered by other factors
SSQ Presentation
021209.01
Quality Threshold
No more than the following number of open defects:
Severity* Critical Important Moderate Trivial New 0 5 30 50 Old 0 10 100 200 Release team (stakeholders) need to determine values based on history. The goals are: Not to release any Critical defects Not to introduce too many new defects Manage the backlog
Where New = defects discovered in the current project, and Old = defects discovered in previous releases
SSQ Presentation
021209.01
SSQ Presentation
021209.01
It also appears to be more scrupulously proofread than TurboTax: Twice in TurboTaxs screens in my tests, incorrect information was displayed, though the tax returns themselves were unaffected.
SSQ Presentation
021209.01
I have a higher standard for accuracy in tax programs than I do for any other type of software, and while the errors we found didnt affect the bottom line, they did affect my confidence in the programs makers. Its unfortunate, because I felt TurboTax offered better features.
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Predicting Defects
There are several models for predicting defects The predictions of interest are:
How many defects are going to be created? When will I find them? How long will it take to fix them? When will I be done? How good will the result be?
SSQ Presentation
021209.01
At first this may not seem right, but its a reasonable predictor Which is more reliable?
67 specification defects per 200 pages of documentation (0.34 defects/page) 67 specification defects per 4300 SLOC (15.6 defects/KSLOC)
SSQ Presentation
021209.01
Release B
http://www.polariguana.com/sourceroi.php
SSQ Presentation
021209.01
Discovery Phase Requirements Design Code Testing Production Total Injected Defect Density
021209.01
SSQ Presentation
Next Project
Estimated to be 20,000 SLOC
Historical Defect Density Requirements Design Code Testing Production 4.94 1.97 3.89 0.06 0.03 Total Likely to Inject 99 39 78 1 1 218 Phase Likely Effort to Containment to Leak Resolve* 26.6% 17.3% 62.1% 81.7% 100.0% 26 7 48 1 1 85.3 38.5 18.3 2.2 1 Grand Total Total Rework 2242.2 263.3 882.9 2.1 0.6 3391.0
SSQ Presentation
021209.01
SSQ Presentation
Predictions can be made in Excel by extrapolating and seeing where the discovery and close lines meet
021209.01
100000
150000
200000
250000
300000
50000
Extrapolation
This method is quick and in some cases surprisingly good But not in all cases
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Example
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
10 20 30 40 50 60 0
1/1/2008 1/15/2008 1/29/2008 2/12/2008 2/26/2008 3/11/2008 3/25/2008 4/8/2008 4/22/2008 5/6/2008 5/20/2008 6/3/2008 6/17/2008 7/1/2008 7/15/2008 7/29/2008 8/12/2008 8/26/2008 9/9/2008 9/23/2008 10/7/2008
021209.01
In order for extrapolations to be reliable, the discovery rate must have peaked
Extrapolation
Done?
What does it mean to be done (from a defect perspective)?
No bad defects remain Predictable/manageable defects remain
Latent Defects
Latent defects (unknown at release time) can be predicted using defect density and Rayleigh PDF What needs to happen before the predictions become reliable?
The defect discovery rate must flatten
d f(t) =0 dt
SSQ Presentation
021209.01
100
200
300
400
500
600
SSQ Presentation
021209.01
2/12/2008 2/26/2008 3/11/2008 3/25/2008 4/8/2008 4/22/2008 5/6/2008 5/20/2008 6/3/2008 6/17/2008 7/1/2008 7/15/2008 7/29/2008 8/12/2008 10 20 30 40 50 60 0 1/1/2008 1/15/2008 1/29/2008 2/12/2008 2/26/2008 3/11/2008 3/25/2008 4/8/2008 4/22/2008 5/6/2008 5/20/2008 6/3/2008 6/17/2008 7/1/2008 7/15/2008 7/29/2008 8/12/2008 8/26/2008 9/9/2008 9/23/2008 10/7/2008 8/26/2008 9/9/2008 9/23/2008 10/7/2008
Discovery Rate
SSQ Presentation
021209.01
Using Excel
As before, create a linear extrapolation of the last <criteria> days: Flattening criteria example:
The discover rate must less than 5 defects per day in the past two weeks of testing
SSQ Presentation
021209.01
Using Excel
Add linear trend line Select Display equation on chart
SSQ Presentation
021209.01
Using Excel
This gives the slope of the line m, where
Cumulative Defect Submitted
y=mx + b
In this case, m = 2.2 defects/day Not good enough
1/1/2008
4/8/2008
5/6/2008
6/3/2008
7/1/2008
1/15/2008
1/29/2008
2/12/2008
2/26/2008
3/11/2008
3/25/2008
4/22/2008
5/20/2008
6/17/2008
7/15/2008
7/29/2008
8/12/2008
8/26/2008
9/9/2008
9/23/2008
SSQ Presentation
021209.01
10/7/2008
And Finally
Track latent/released defects carefully They are your best indicator of Quality
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Agenda
Summary of Previous Talk Defect Management Metrics Metrics for Project Management Metrics for Process Improvement Advanced Metric Models
SSQ Presentation
021209.01
A True Story
A while back, I looked in the mirror and decided I needed to loose some weight. What is the first thing Im going to do?
SSQ Presentation
021209.01
My First Step
SSQ Presentation
021209.01
Submit reason Test case failed Pass criteria unclear Tested wrong version Setup/config wrong Data-related error Other
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Cons:
Projects may use different processes Variation may be too great
Suggestions:
Dont measure projects measure processes Only measure your best projects Tailoring is okay, but separate out the data
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Phase Containment
Identifies the lifecycle activities that leak defects Tells you where to improve defect detection efforts
Phase Containment
100% 90% 80% % Defects Contained 70% 60% 50% 40% 30% 20% 10% 0% Requirements Design Code Build Testing
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Pareto the types of errors being created, 3000 weighted by cost (effort) 2500
1000
1500
2000
500
0
Requirements Ambiguous/vague Requirements Missing Logic flow Missing logic Requirements Changed Wrong variable used Other Case statement Typo Specification Missing Garbage collection Exception handling Parameter m ismatch Requirements Wrong Uninitialized variable Bad validation check Missing end statement Env not match test
Root Cause T
Agenda
Summary of Previous Talk Defect Management Metrics Metrics for Project Management Metrics for Process Improvement Advanced Metric Models
SSQ Presentation
021209.01
Defect Probabilities
Weibull distributions are useful engineering models, where the tail approaches zero asymptotically Weibull Probability Density Function (PDF) is:
m m
m t f(t) = t c
m - t c
m t = c c
m-1 - t c
(Wikipedia)
Where m determines the shape of the curve, and c is the scale parameter
SSQ Presentation
021209.01
Weibull Curves
Weibull curves with different shapes (values of m) can be used to model various systems (probability distributions)
3 m=0.5 m=10
m=1 1
m=2
m=4
0 0 1 2 3
SSQ Presentation
021209.01
Weibull Curves
m = 0.1 to 5.0 in .1 increments
1.5
Rayleigh (m=2)
1.0
0.5
SSQ Presentation
021209.01
Weibull Curves
2.0
Weibull Curves
m = 0.1 to 5.0 in .1 increments
1.5
0.5
SSQ Presentation
021209.01
2 t f(t) = t c
Let x = 2t
2 - t
2t = 2 c
2
t c
f(x) = c2 e
SSQ Presentation
021209.01
- x 2c
= c2
x2 - 2 4c
f(x) =
2 e c
8 7
Rayleigh Curves
c = 0.1 to 0.5
c = 0.1
x2 4c 2
SSQ Presentation
021209.01
Excel Formula
SSQ Presentation
021209.01
d f(t) dt
=0
c Solving gives tm = 2
To scale the area under the curve, multiply by K Substitute c = tm 2
SSQ Presentation
021209.01
2t f(t) = K 2 c
t c
=K
2t
(tm 2)
t
(tm 2)
e 2
2
= K 2t2 e m
2t
- t2
2t2m
f(t) = K t m
- t2
te
2t2m
If we can estimate how many defects well find (K) and when weve hit the peak (tm), we can create a PDF for our project!
SSQ Presentation
2010 Holl Consulting
021209.01
SSQ Presentation
021209.01
Latent Defects = K
1
tm
- t2
te
2t2m
dt
Release Date
SSQ Presentation
021209.01
SSQ Presentation
021209.01
CDF = 1 - e
t c
SSQ Presentation
021209.01
Rayleigh Assumptions
The defect rate observed during the development process is positively correlated with the defect rate in the field. Given the same error injection rate, if more defects are discovered and removed earlier, fewer will remain in later stages.
SSQ Presentation
021209.01
Exponential Models
Exponential Model (Weibull, m=1) 1 f(t) = c
t c
1.2
Exponential
1.0
Weibull,
m=1
0.8
0.6
0.4
0.2
SSQ Presentation
021209.01
SSQ Presentation
021209.01
Model Summary
Rayleigh is Weibull distribution with m=2 Other values of m produce other probability distributions There are many models; try several that fit All models are wrong. Some models are useful.
George E. Box
SSQ Presentation
021209.01
Summary
A defect management program includes
A balanced solution Training & explaining Metrics that are used
SSQ Presentation
021209.01
Questions?
Chris Holl
Chris_Holl@hotmail.com
Next Class: Tools for Metrics