Are we building the right software for the need ? Are we building the software right ?
Chapter 09
AIMS
(actual/potential) defect or quality current and future products. in
HoaSen University
Contents
General Types of Defect Analyses
Defect distribution analysis
What: Distribution over defect types Where: Distribution over defect locations General observations about defect distribution
Defect trend analysis and defect dynamics model Defect causal analysis
HoaSen University
Introduction
Defect CA
help both developers and testers to detect and remove potential defects help other project personnel to improve the development process, to prevent injection of similar defects and to manage risk better
defect data
from the main QA activities
HoaSen University
HoaSen University
HoaSen University
Where
Where was the defect found or discovered? This information can be used to provide valuable feedback to the development process through defect distribution analysis.
When
The identification of the exact time or associated development phase or subphase when a defect is injected and when it is discovered is important, because it provides information to analyze the overall defect trend and serves as the basis for quality prediction into the future.
HoaSen University
HoaSen University
typically deal with faults or defect fixes instead of failures or errors Defect fixes
is typically used if actual fixing of discovered problem took place before defect analyses were performed
HoaSen University
10
http://lyle.smu.edu/~tian/class/8317.09f/webM.pdf
HoaSen University
11
HoaSen University
12
module 771 174 102 63 31 29 23 25 16 # % 58.8 13.4 7.9 4.9 2.4 2.2 1.8 1.9 1.2 0.5 DFsum 0 174 204 189 124 145 138 175 128 63 % 0 7.4 8.6 8 5.2 6.1 5.8 7.4 5 2.7
Table 20.3 Distribution of DF for a commercial product LS NNTu - SQM W2009 HoaSen University 13
22 36 39 47 40 35 30 28 2109 2040 910 7824 4 0 6 0 8 0 4 8 4.6 5.1 6 5.2 4.5 3.9 3.7 3.1 26.96 26.07 11.6 100 3
HoaSen University
14
req. 10
spec. 22 10
post-rel 2 1 5 46 7 2 63
10
32
80
HoaSen University
320
statistical analysis
is a probabilistic analysis that examines the statistical link between causes and effects and deduces the probable causal relations between the two
HoaSen University
16
causal relations
are determined by the developers or code owners faults are typically determined through dedicated defect causal analysis
HoaSen University
17
HoaSen University
18
Such information
can be organized in a systematic way for further analyses
more valuable and specific feedback: use statistical models
NNTu - SQM W2009 HoaSen University 20
HoaSen University
21
HoaSen University
22
ODC
Key elements of ODC
Aim: tracking/analysis/improve Approach: classification and analysis Key attributes of defects Views: both failure and fault Applicability: inspection and testing Analysis: attribute focusing Need for historical data
HoaSen University
23
ODC concepts
ODC has a rich and extensive category of defect attributes, stemming from both the failure view and the fault view The attributes (8)
related to the former are typically completed by software testers or inspectors who initially observed problems and opened defect reports; while those related to the latter are typically completed by the software developers or system maintenance personnel who fixed the reported problems and updated the corresponding defect reports
NNTu - SQM W2009 HoaSen University 24
ODC
8 attributes
Activity
refers to the actual process step (code inspection, function test, etc.) when defects are discovered.
Trigger
describes the environment or condition that had to exist to expose the defects.
Impact
refers to either perceived or real impact on users.
Target
represents the high-level identity (i.e., design, code, ID, etc.) of the entity that was fixed.
ODC v5.11, IBM Center for Software Engineering NNTu - SQM W2009 http://www.ibm.com/developerworks/rational/library/aug06/gu/index.html HoaSen University 25
ODC
8 attributes
Type
represents the nature of the actual correction that was made.
Qualifier
specifies whether the fix that was made was due to missing, incorrect, or extraneous code or information.
Source
indicates whether the defect was found in code written inhouse, reused from a library, ported from one platform to another, or outsourced to a vendor.
Age
identifies the history of the target (i.e., design, code, ID, etc.) that had the defect. http://www.ibm.com/developerworks/rational/library/aug06/gu/index.html
NNTu - SQM W2009 HoaSen University 26
ODC concepts
failure view and information collected at defect discovery
Defect impact,
with attribute values covering functionality, reliability, etc.
Defect trigger,
with attribute values corresponding to the specific types of testing
Defect severity,
with commonly used attribute values: critical, major, minor, or or inspection activities or scenarios that triggered the defect detection. some numerical scale.
HoaSen University
27
ODC concepts
fault view collected at defect fixing
Defect type,
with attribute values: function, interface, algorithm, timing, etc.
HoaSen University
29
trigger severity week fix type action code source phase injected
inj
Defect severity
can be 1 (critical problem), 2 (major problem), 3 (minor problem), and 4 (minor inconvenience).
The week
when the defect is detected, counted from the start of the project.
NNTu - SQM W2009 HoaSen University 31
data collection is always a big hurdle that requires developers and testers to devote substantial time to analyze the defects and report the findings
NNTu - SQM W2009 HoaSen University 33
Defect trigger
corresponds to specific usage sequences or referrals that lead to problems recorded in the error logs. It can be analyzed by examining the referral pair information that can be extracted from the access logs (Ma and Tian, 2003).
Defect source
corresponds to specific files or file types that need to be changed, added, or removed to fix problems recorded in the error logs. It can be analyzed by examining both the specific errors and referral pairs.
NNTu - SQM W2009 HoaSen University 34
HoaSen University
35
one-way analysis
examines one attribute at a time, either its overall distribution or its trend over time
Two-way analysis
can be used to examine the crossinteraction of two attributes (Bhandari et al., 1993).
When similar distribution data are available over time or different development phases,
can trace them to perform defect trend analysis
HoaSen University
37
HoaSen University
38
Figure 20.2 gives us the trend of type E errors for the SMU/SEAS web site over 26 days
NNTu - SQM W2009 HoaSen University 39
TwoTwo-way and multi-way analysis: multiExamining cross-interactions crossanalysis examines the interaction between two attributes, and can be applied to all the attributes in pair-wise fashion simplest form
is the conditional analysis of an individual attribute under the condition of another attribute taking a specific value.
HoaSen University
40
TwoTwo-way and multi-way analysis: multiExamining cross-interactions [2] crossImpact Capability Documentation Installability Maintainability Migration Performance Reliability Security Service Standards Usability 1 2 0 0 0 0 1 27 1 0 0 0 Severity 2 12 1 6 6 0 1 96 3 0 1 10 3 13 14 6 19 0 3 66 3 4 2 44 4 1 10 4 7 1 0 7 0 4 1 19
HoaSen University
41
Reference
[1]Chapter 20 [1]Chapter 13 [3]Chapter 5 [4]Chapter 04 ODC - http://www.research.ibm.com/softeng/ODC/DETODC.HTM IBM
HoaSen University
42
Q/A
HoaSen University
43