Quality Metrics - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Quality Metrics

Description:

Comment Percentage. CDM(Coupling Dependency Metric) Cyclomatic complexity ... The comment percentage is calculated by the total number of comments divided by ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 43
Provided by: Raph1
Category:
Tags: metrics | quality

less

Transcript and Presenter's Notes

Title: Quality Metrics


1
Quality Metrics
  • By Jordan Wong and Raphael Chan

2
Quality 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

3
Why 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

4
Purpose 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

5
Purpose 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

6
What 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

7
Characteristics 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.

8
Metrics 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)

9
Types 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

10
Coupling Dependency Metric
  • predicts which modules are likely to be fault
    prone
  • detects run-time failures
  • examines corrective maintenance

11
CDM Case Studies
  • OASIS Course Registrations System
  • ffortid Text Formatting Utility
  • Collaborative Care System
  • Electronic File Transfer Facility

12
OASIS Course Registration System
13
Ffortid Text Formatting Utility
14
Collaborative Care Metric
15
Electronic File Transfer Facility
16
Benefits 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

17
Cyclomatic 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

18
Cyclomatic 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

19
Cyclomatic Complexity Scale
20
Benefits 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

21
Software 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

22
Software 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))

23
Software 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)

24
Benefits 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

25
Function Point Metric
  • Measures the design size and complexity of a
    software system
  • Developed by Allen Albrecht, 1970s
  • Give developers a centered view of productivity

26
Function 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

27
Unadjusted Count
  • Ex.

28
Influence 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

29
Influence Rating cont...
  • Ex. A sample influence rating of the 14 factors

30
Function Points
  • Function Points Unadjusted Count x (.65
    .01 x Influence Rating)
  • Function Points 154 x (.65 .01 x 43) 163

31
Benefits of Function Point Metric
  • Data can be obtained much earlier in the
    development of the software
  • Estimate system change costs
  • Reliable effort predictor metric

32
Quality 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

33
QFD continued...
  • Matrix Chart is used to link customer
    requirements to technical solutions

Correlation Matrix
34
QFD 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.

35
QFD 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

36
Goal 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

37
GQM - 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.

38
GQM - 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
39
GQM 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
40
GQM 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
41
Conclusion
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

42
Slides
  • 1 - 10 Raphael and Jordan
  • 18-20, 29-32 Raphael
  • 11-17, 21-28, 33-39 Jordan
Write a Comment
User Comments (0)
About PowerShow.com