Title: Quality Metrics
1Quality Metrics
- By Jordan Wong and Raphael Chan
2Quality Metrics Definition
- The ability to measure the quality of software
- A set of attributes or non-functional
requirements must be identified - Quality metrics are used to measure the quality
characteristics that are targeted in the software
development process
3Why MEASURE?
- To make assessments if the software lifecycle are
meeting software requirements - Quantitative measurements provide organizations
or developers help in making decisions and
improving quality - To improve total quality of the software
4Purpose of Quality Metrics
- Achieve quality goals
- Establish quality requirements for a system at
its outset - Establish acceptance criteria and standards
- Evaluate the level of quality achieved against
the established requirements
5Purpose of quality metrics cont
- Detect anomalies or point to potential problems
in the system - Predict the level of quality that will be
achieved in the future - Monitor changes in quality when software is
modified - Assess the ease of change to the system during
product evolution
6What can Measurement do for me?
- Managers, Organizations, etc. must ask
themselves these questions - What are the benefits?
- When will I see the benefits?
- How much will it cost?
- Measurement can be used to help produce software
in a timely and cost efficient manner for
customer satisfaction
7Characteristics of Metrics
- Metrics Characteristics
- Can be described in several characteristics
- 1. Understandable The quality or characteristic
the organization is measuring must be relevant,
meaningful, and simple to understand. - 2. Field Tested This metric should have been
measured before by another industry or something
that can be measured. - 3. Economical The metric should be able to be
measured in a considerable amount of cost. - 4. High Leverage By measuring this certain
metric, it should have an impact on cost,
quality, and development for this project or for
future projects. - 5. Timely The measurement and data should be
extracted in a suitable amount of time frame to
meet the managements objective.
8Metrics and Methods
- Line Count
- Comment Percentage
- CDM(Coupling Dependency Metric)
- Cyclomatic complexity
- Software Science
- Function Point Metric
- GQM(Goal Question Metric)
- QFD(Quality Function Deployment)
9Types of Metrics
- Line Count - These include counting all physical
lines of code, the number of statements and the
number of comment lines. - Understandability, Reusability, Maintainability
- Comment Percentage - include a count of the
number of comments, both on-line and stand-alone.
The comment percentage is calculated by the total
number of comments divided by the total lines of
code less the number of blank lines. - Understandability, Reusability, Maintainability
10Coupling Dependency Metric
- predicts which modules are likely to be fault
prone - detects run-time failures
- examines corrective maintenance
11CDM Case Studies
- OASIS Course Registrations System
- ffortid Text Formatting Utility
- Collaborative Care System
- Electronic File Transfer Facility
12OASIS Course Registration System
13Ffortid Text Formatting Utility
14Collaborative Care Metric
15Electronic File Transfer Facility
16Benefits of CDM
- Good predictor of run-time failures
- Efficient corrective maintenance
- Allows faults to be detected and corrected early
in the lifecycle - Saves cost and time
- Fewer maintenance faults
17Cyclomatic Complexity Metric
- Tom McCabe, 1976
- Applied to source code
- Measures design complexity
- Measures the number of linearly independent paths
through a program module - correlated with the probability of defects
18Cyclomatic Complexity Formula
- Places a numerical value on the complexity
- Takes a count of the number of test conditions in
a program - Cyclomatic Complexity E - N P
E number of edges, N number of nodes,
P number of connected paths
19Cyclomatic Complexity Scale
20Benefits of McCabes Cyclomatic Complexity
- Gives relative complexity of various designs
- Can be computed early in the lifecycle
- Measures the minimum effort and best areas of
concentration for testing - Guides the testing process by limiting the
program logic during development
21Software Science Metric
- Developed by Halstead
- used to predict the following properties
a) Length, volume, difficulty, and level
b) Number of errors
c) Effort and time
required for development
22Software Science Formulas
- Given variables n1
number of distinct operators in a program n2
number of distinct operands in a program N1
number of occurrences of operators in a
program N2 number of occurrences of operands
in a program - Properties n Program Vocabulary n1
n2 N Observed Program Length N1 N2 N
Estimated Program Length n1(log2(n1))
n2(log2(n2))
23Software Science Formulas cont...
- Properties V Program Volume
N(log2(n)) D Program Difficulty
(n1/2)/(N2/n2) L Program Level 1/D E
Effort V/L B Number of errors (V)/E0
(E0 is the programming error rate, 3000 lt E0
lt 3200) T Time( in seconds) E/S (S is the
Stroud number 5 lt S lt 20)
24Benefits of Software Science
- Do not require in-debt analysis of programming
structure - Predicts rate of error
- Predicts maintenance effort
- Useful in scheduling and reporting projects
- Simple to calculate
- Can be used for any programming language
25Function Point Metric
- Measures the design size and complexity of a
software system - Developed by Allen Albrecht, 1970s
- Give developers a centered view of productivity
26Function Point Formula
- Function Points Unadjusted Count x (.65
.01 x Influence Rating) - Unadjusted Count obtained by examining the design
and identifying the inputs, outputs, inquiries,
files and interfaces
27Unadjusted Count
28Influence Rating
- 14 factors are rated on a scale of 0 to 5 with 0
indicating no influence and 5 indicating strong
influence - Ex. Transaction Rate
29Influence Rating cont...
- Ex. A sample influence rating of the 14 factors
30Function Points
- Function Points Unadjusted Count x (.65
.01 x Influence Rating) - Function Points 154 x (.65 .01 x 43) 163
31Benefits of Function Point Metric
- Data can be obtained much earlier in the
development of the software - Estimate system change costs
- Reliable effort predictor metric
32Quality Function Deployment (QFD)
- First Developed by Yoji Akoa in the 1960s to
improve the shipping industry - Recently developed and transformed to the
software quality industry - Step by step method into making customer needs
into actual technical requirements - Focuses on Customer Satisfaction
33QFD continued...
- Matrix Chart is used to link customer
requirements to technical solutions
Correlation Matrix
34QFD continued...
- WHAT are the product requirement of the
customer wants and needs. - HOW are the requirements meeting the terms of
design requirements. - Customer Importance which indicates the
relative value of importance depending on what
the customer prefers.
35QFD continued...
- Advantages
- Associates required qualities and technicalities
throughout development process - Reduces defects by preventing them at an early
stage - Decrease in design changes
- Disadvantages
- Large amounts of time used to focus on future
development of the product - No standardization
- May cost more in time and resources
36Goal Question Metric (GQM)
- Top-Down Model
- Measurement Program in which Goals are defined,
questions raised, and measurements are taken and
analyzed - Developed by Victor Basili in the late 1980s
37GQM - continued
- Development of Goals (Conceptual Level) A goal
is defined for the object and will address both
the productivity and quality concerns of the
software that is being measured. - Generation of Questions (Operational Level) A
set of questions are defined based on the goals. - Identification of Metrics (Quantitative Level)
A set of measures are collected to answer the
generated questions in a quantitative level.
38GQM - continued
The GQM is a top-down model hierarchical
structure, and can be described below in this
figure
Goal
Goal
Question
Question
Question
Question
Question
Metric
Metric
Metric
Metric
Metric
Metric
Goal-Question-Metric Method Figure
39GQM Example
G Q M
Timeliness on Quality Metrics Presentation
How many lines are in each slide?
How long does he take in each slide?
Number of slides 43
Avg. lines on each slide 4.5
Avg. time on each slide 35 secs
40GQM Example 2
G Q M
-Timeliness of change request from project manager
-Is change request actually performed?
-What is the current change request time?
-What is the deviation of actual change time from
estimated change time?
-Standard Deviation
-Average Cycle Time
-Subject to evaluation of manager
41Conclusion
What we learned.
- Quality Metrics measure desired qualities of
software - Quality Metrics improves development of software
- There is no one standardized method
- Methods are chosen based on the managers or
developers goals
42Slides
- 1 - 10 Raphael and Jordan
- 18-20, 29-32 Raphael
- 11-17, 21-28, 33-39 Jordan