Software Quality Metrics

Slides:



Advertisements
Similar presentations
Software Engineering Metrics for specification Quality Metrics are used to access the quality of the analysis model n r =n f +n nf WHERE n r= Total No.
Advertisements

Chapter 4 Software Process and Project Metrics
Chapter 4 Software Process and Project Metrics
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Process and Project Metrics
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Metrics for Process and Projects
Metrics for Process and Projects
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Metrics Project and Process Metrics. Why do we measure? Assessing project status Allows us to track risks Before they go critical Adjust workflow See.
Software Quality Metrics
Software Engineering II - Topic: Software Process Metrics and Project Metrics Instructor: Dr. Jerry Gao San Jose State University
Software Metrics II Speaker: Jerry Gao Ph.D. San Jose State University URL: Sept., 2001.
R&D SDM 1 Metrics How to measure and assess software engineering? 2009 Theo Schouten.
Software metrics Selected key concepts. Introduction Motivation:  Management:  Appraisal  Assurance  Control  Improvement  Research:  Cause-effect.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Technical Metrics for Software Chapter 18. Chapter Assistance -- Michael Jager January 9, Chapter Outline D Software Quality D A Framework.
Software Process and Product Metrics
OHT 21.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Software Quality assurance (SQA) SWE 333 Dr Khalid Alnafjan
Chapter 15 Software Product Metrics
Cmpe 589 Spring Software Quality Metrics Product  product attributes –Size, complexity, design features, performance, quality level Process  Used.
1 Software Quality CIS 375 Bruce R. Maxim UM-Dearborn.
Software Quality Applied throughout SW Engineering Process Encompasses ▫ Analysis, design, coding, testing, tools ▫ Formal tech reviews ▫ Multi-tiered.
Chapter 6 : Software Metrics
Software Measurement & Metrics
1. Software Metric- A definition 2. Types of Software metrics 3. Frame work of product metrics 4. Product metrics.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
Version control – Project repository, version management capability, make facility, issue/bug tracking Change control Configuration audit – compliments.
Software Metrics Software Engineering.
1 Chapter 15 Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6th edition by Roger S. Pressman.
Question To know that quality has improved, it would be helpful to be able to measure quality. How can we measure quality?
Software Project Management Lecture # 3. Outline Chapter 22- “Metrics for Process & Projects”  Measurement  Measures  Metrics  Software Metrics Process.
OHTO -99 SOFTWARE ENGINEERING “SOFTWARE PRODUCT QUALITY” Today: - Software quality - Quality Components - ”Good” software properties.
Software Metrics (Part II). Product Metrics  Product metrics are generally concerned with the structure of the source code (example LOC).  Product metrics.
OHT 21.1 Galin, SQA from theory to implementation © Pearson Education Limited 2004 Software Quality assurance (SQA) SWE 333 Dr Khalid Alnafjan
Software Metrics – part 2 Mehran Rezaei. Software Metrics Objectives – Provide State-of-art measurement of software products, processes and projects Why.
Lecture 4 Software Metrics
Chapter 3: Software Project Management Metrics
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
SOFTWARE PROCESS AND PROJECT METRICS. Topic Covered  Metrics in the process and project domains  Process, project and measurement  Process Metrics.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
A Metrics Program. Advantages of Collecting Software Quality Metrics Objective assessments as to whether quality requirements are being met can be made.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15a: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Hussein Alhashimi. “If you can’t measure it, you can’t manage it” Tom DeMarco,
Advanced Software Engineering Lecture 4: Process & Project Metrics.
Chapter 22 Metrics for Process and Projects Software Engineering: A Practitioner’s Approach 6 th Edition Roger S. Pressman.
Metrics "A science is as mature as its measurement tools."
Software Project Management Lecture # 3. Outline Metrics for Process and Projects  Introduction  Software Metrics Process metrics Project metrics Direct.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Cyclomatic complexity (or conditional complexity) is a software metric (measurement). Its gives the number of indepented paths through strongly connected.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
Software Metrics 1.
McCall’s Quality Factors
Lecture 15: Technical Metrics
For University Use Only
Software Project Sizing and Cost Estimation
Software engineering.
Software Metrics “How do we measure the software?”
Software metrics.
Presented by Trey Brumley and Ryan Carter
Chapter 19 Technical Metrics for Software
Process and Project Metrics
Metrics for Process and Projects
6. Software Metrics.
Presentation transcript:

Software Quality Metrics

What to measure Process Measure the efficacy of processes. What works, what doesn't. Project Assess the status of projects. Track risk. Identify problem areas. Adjust work flow. Product Measure predefined product attributes (generally related to ISO9126 Software Characteristics)

Software Quality Metrics Three kinds of Software Quality Metrics Product Metrics - describe the characteristics of product size, complexity, design features, performance, and quality level Process Metrics - used for improving software development/maintenance process effectiveness of defect removal, pattern of testing defect arrival, and response time of fixes Project Metrics - describe the project characteristics and execution number of developers, cost, schedule, productivity, etc. fairly straight forward

The Software Quality Metrics Framework Quality requirements that the software product must meet Quality factors – Management-oriented attributes of software that contribute to its quality Quality subfactors – Decompositions of a quality factor to its technical components Metrics – quantitative measures of the degree to which given attributes (factors) are present

Measurement, Measures, Metrics is the act of obtaining a measure Measure provides a quantitative indication of the size of some product or process attribute, E.g., Number of errors Metric is a quantitative measure of the degree to which a system, component, or process possesses a given attribute (IEEE Software Engineering Standards 1993) : Software Quality - E.g., Number of errors found per person hours expended

Software Quality Metrics Desired attributes of Metrics (Ejiogu, 1991) Simple and computable Empirical and intuitively persuasive Consistent and objective Consistent in the use of units and dimensions Independent of programming language, so directed at models (analysis, design, test, etc.) or structure of program Effective mechanism for quality feedback

McCall’s Software Quality Factors

Example Quality requirement – “The product will be easy to use” Quality factor(s) – Usability (An attribute that bears on the effort needed for use and on the assessment of such use by users) Quality subfactors – Understandability, ease of learning, operability, communicativeness

Subfactors Understandability – The amount of effort required to understand software Ease of learning – The degree to which user effort required to learn how to use the software is minimized Operability – The degree to which the effort required to perform an operation is minimized Communicativeness – The degree to which software is designed in accordance with the psychological characteristics of users

Direct Metrics Understanding Ease of learning Operability Learning time: Time for new user to gain basic understanding of features of the software Ease of learning Learning time: Time for new user to learn how to perform basic functions of the software Operability Operation time: Time required for a user to perform operation(s) of the software Communicativeness Human factors: Number of negative comments from new users regarding ergonomics, human factors, etc.

Software Quality Metrics Correctness: defects per KLOC maintainability mean time to change (MTTC) the time it takes to analyze the change request, design an appropriate modification, implement the change, test it, and distribute the change to all users spoilage = (cost of change / total cost of system) integrity threat = probability of attack (that causes failure) security = probability attack is repelled Integrity =  [1 - threat * (1 - security)]

Product Metrics Number and type of defects found during requirements, design, code, and test inspections Number of pages of documentation delivered Number of new source lines of code created Number of source lines of code delivered Total number or source lines of code delivered Average complexity of all modules delivered Average size of modules Total number of modules Total number of bugs found as a result of unit testing Total number of bugs found as a result of integration testing Total number of bugs found as a result of validation testing Productivity, as measured by KLOC per person-hour

Product Metrics Landscape Metrics for the analysis model Metrics for the design model Metrics for the source code Metrics for testing

Metrics for Requirements Quality E.g., let nr = nf + nnf , where nr = number of requirements nf = number of functional requirements nnf = number of nonfunctional requirements Specificity (lack of ambiguity) Q = nui/nr nui - number of requirements for which all reviewers had identical interpretations

High-Level Design Metrics Structural Complexity S(i) = f2out(i) fout(i) = fan-out of module i Data Complexity D(i) = v(i)/[fout(i) +1] v(i) = # of input and output variables to and from module i System Complexity C(i) = S(i) + D(i) Fan-out(i) is the number of modules called by the module i. Fan-out is the number of modules called by the module. The number of with clauses in Ada.

High-Level Design Metrics Example Main Find_min Swap Insertion_Sort Input Vector Sorted Vector Partial Vector Min Ind1, ind 2, vector Updated vector Structured Design

High level design metrics Example Complexity of Module i: Insertion_Sort Structural Complexity S(i) = f2out(i) = 22 = 4 fout(i) = fan-out of module i Data Complexity D(i) = v(i)/[fout(i) +1] = 2/(2 + 1) = 2/3 v(i) = # of input and output variables to and from module i System Complexity C(i) = S(i) + D(i) = 4 + 2/3 = 14/3 ≈ 5 Fan-out(i) is the number of modules called by the module i.

High-Level Design Metrics (Cont.) Morphology Metrics size = n + a n = number of modules a = number of arcs (lines of control) arc-to-node ratio, r = a/n depth = longest path from the root to a leaf width = maximum number of nodes at any level

Morphology Metrics a b c d e f g i j k l h m n p q r size: 17 + 17 depth:4 width:6 arc-to node ratio:1

Component-Level Design Metrics Cohesion Metrics Coupling Metrics data and control flow coupling global coupling environmental coupling Complexity Metrics Cyclomatic complexity Experience shows that if this > 10, it is very difficult to test

Coupling Metrics Data and control flow coupling Global coupling di = number of input data parameters ci = number of input control parameters d0 = number of output data parameters c0 = number of output control parameters Global coupling gd = number of global variables used as data gc = number of global variables used as control Environmental coupling w = number of modules called (fan-out) r = number of modules calling the module under consideration (fan-in) Module Coupling: mc = 1/ (di + 2*ci + d0 + 2*c0 + gd + 2*gc + w + r) mc = 1/(1 + 0 + 1 + 0 + 0 + 0 + 1 + 0) = .33 (Low Coupling) mc = 1/(5 + 2*5 + 5 + 2*5 + 10 + 0 + 3 + 4) = .02 (High Coupling)

Metrics for Source Code Maurice HALSTEAD’s Software Science n1 = the number of distinct operators n2 = the number of distinct operands N1 = the total number of operator occurrences N2 = the total number of operand occurrences Length: N = N1 + N2 Volume: V = Nlog2(n1 + n2)

Metrics for Source Code (Cont.) OPERATOR COUNT OPERAND COUNT IF-Then- end if 1 Z 5 While End-While 1 Y 2 = 5 X 4 ; 8 20 1 > 2 -2 1 + 1 5 1 - 1 0 2 print 1 1 1 ( ) 1 n1 = 9 N1 = 21 Length: N = 21+17 = 38 n2 = 8 N2 = 17 Volume: V = 38 log2(17)=155 Z = 20; Y = -2; X = 5; While X>0 Z = Z + Y; if Z > 0 then X = X – 1; end-if; End-while; Print(Z);

Metrics for Testing Analysis, design, and code metrics guide the design and execution of test cases. Metrics for Testing Completeness Breadth of Testing - total number of requirements that have been tested Depth of Testing - percentage of independent basis paths covered by testing versus total number of basis paths in the program. January 9, 1998

Metrics for Maintenance Software Maturity Index (SMI) MT = number of modules in the current release Fc = number of modules in the current release that have been changed Fa = number of modules in the current release that have been added Fd = number of modules from the preceding release that were deleted in the current release SMI = [MT - (Fc + Fa + Fd)] / MT January 9, 1998

Process Metrics Average find-fix cycle time Number of person-hours per inspection Number of person-hours per KLOC Average number of defects found per inspection Number of defects found during inspections in each defect category Average amount of rework time Percentage of modules that were inspected

Question?