Lecture 12 Review and Inspection (1)
Lecture 12 Review and Inspection (1)
1. Introduction
2. Types of Software Reviews
3. Software Inspection
4. Inspection Checks
5. Inspection Metrics
1
1. Introduction
-Quality control activities determine whether a product conforms to
its requirements, specifications, or pertinent standards.
÷Nonconformance constitute defects.
-Performing quality control within the development process is more
efficient than looking for errors after the product has been completed.
-Software review is a verification method that is used to improve
work products before they are completed.
÷It consists of having people other than the author of a work product examine
that product to find defects and identify improvement opportunities.
÷Inspection: formal and managed peer review process with the following
characteristics:
-The process is carried out by a review team with clearly defined roles.
-The process follows an unambiguous set of criteria for each type of artifacts.
-Specific data are collected during the process. 3
-The process is driven by quantitative goals such as process and quality improvements.
3. Software Inspection
-Software inspection was introduced by Michael Fagan in the 1970s,
as an elaborated process for systematic review of software artifacts.
4
-According to data collected from various studies, the benefits of
inspection include the following:
÷Net increase in productivity in the range of 30-100%;
÷Overall project time saving of 10-30%;
÷5 to 10 times reduction in test execution costs and time;
÷Reduction in maintenance costs of up to one order of magnitude;
÷Improvement in consequent product quality.
÷Minimal defect correction backlash at systems integration time.
-According to many previous studies inspection is more efficient than
testing, specifically when comparing inspection of code modules
with testing those modules.
÷Inspection finds most of the problems testing would find, and does so more
efficiently.
7
Inspection Process
÷Planning: Identifies work product to be inspected, determines the size and composition
of the inspection team, and sets the inspection schedule.
÷Overview: Optional phase where team members who are unfamiliar with the work product
to be inspected receive orientation.
÷Preparation: Team members inspect the work individually looking for defects in the work
product with the guidance of relevant checklist.
-The majority of defects found in inspection processes are found in this stage (about 75%);
-The reviewer should record any issues found, and determine their severity (i.e., major or minor):
•major for a defect that will cause an observable product failure or departure from requirements;
•minor for a defect that will not cause a failure in execution of the product.
-At this stage, it is strictly required that reviewers work individually and do not attempt to find 8
solutions to defects found as this is an improper use of their time.
Inspection Process (ctd.)
÷Inspection Meeting: Inspection team members meet to discuss possible defects in the work
product. The moderator should ensure that all the issues raised by individual reviewers are
appropriately logged.
÷Rework: The work product is revised to conform to requirements and specifications.
÷Follow up: The rework is verified, final inspection data is collected and summarized, and the
inspection is officially closed. At this stage also, the moderator may calculate certain metrics
to assess the effectiveness of the inspection and recommend improvement to the inspection
process. 9
-Example of Individual Reviewer Log form (used during preparation stage)
10
-Example of Log form (used during meeting phase)
Date: 14 March 2003
Team: DT1
Part/Level: WCMS-HLD-1-03 Cycle: 1
Moderator: M. Python Owner: M. Bean
Engineer Data
Defect Data
Totals: 8 9
Unique Defects: 2 3
Inspection Summary Product Size: 15 Size Measure: pages
Total Defects for J.B: 8 Total Defects for R.M: 9 Common Defects: 6
Est. Total Defects: Total Number Found: Number Left:
Meeting Time: 30 min Total Insp. Hours: Overall Rate:
11
Major Defects/Total: Defects / Size Unit: Defects / Hour
Inspection Workload
15
5. Inspection Metrics
-The data collected during a software process are used to compute a set
of metrics that support evaluation and improvement of the process as
well as planning and tracking quality.
-The metrics computed during such process should be defined by the
requirements of your organization (typically in the quality manual).
÷The collection of data and calculation of metrics for no reason is a waste of time.
Where A and B are the number found by reviewer A and B respectively and C is
the number found by both A and B.
-Defect density is the ratio of the number of defects found to the size
of the artifact. It is given by
Where the size of the artifact is measured in number of pages, loc, or other size measure.
17
Example: compute inspection metrics from the following inspection log form
Date: 14 March 2003
Team: DT1
Part/Level: WCMS-HLD-1-03 Cycle: 1
Moderator: M. Python Owner: M. Bean
Engineer Data
Defect Data
Totals: 8 9
Unique Defects: 2 3
Inspection Summary Product Size: 15 Size Measure: pages
Total Defects for J.B: 8 Total Defects for R.M: 9 Common Defects: 6
Est. Total Defects: Total Number Found: Number Left:
Meeting Time: 30 min Total Insp. Hours: Overall Rate:
18
Major Defects/Total: Defects / Size Unit: Defects / Hour
Estimated Total Number of Defects
-The estimated total number of defects is the sum of the total number
of defects found and the estimated total number of defects remaining.
÷In order to estimate the total number of defects remaining in an artifact immediately
after inspection, we use an approach similar to the population sampling approach
used by biologists to estimate the population of a particular ecosystem.
Let the number of defects found by one reviewer be the tagged population (A).
÷Note that in practice such assumptions are not always fulfilled, simply because some
defects are harder to find than others, and some reviewers are better than others.
20
Inspection Yield
21
Inspection Rate and Defect Detection Rate
Where:
÷size stands for the size of the artifact in number of pages, loc, or other size measure.
÷total inspection time measured in hours
22
Calculating Inspection Metrics with more than two Reviewers
-If there are more than 2 reviewers, the same approach can be taken
to calculate inspection totals and yield by grouping reviewers into
two groups for calculation: group A and group B:
÷If there are 3 reviewers, it is often a good idea to choose the person who has the most
unique defects to be one group and the other two reviewers to be the other group. For
each group if any member of that group has found a defect, then count it for the group.
23
Example with 3 reviewers:
No. Defect Description Engineers (finding major defects)
R1 R2 R3 A (R2) B
1 1 1
1 1
1 1
1 1 1
1 1 1
1 1
1 1
1
1
1
1 1 1
Totals 7 9 7
Unique defects 1 2 0