Technical Metrics for Software Chapter 18. Chapter 18 -- Assistance -- Michael Jager January 9, 19982 Chapter Outline D Software Quality D A Framework.

Slides:



Advertisements
Similar presentations
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and are provided with permission by R.S.
Advertisements

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.
Metrics for Process and Projects
These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 6/e (McGraw-Hill 2005). Slides copyright 2005 by Roger Pressman.1.
Developed by Reneta Barneva, SUNY Fredonia Product Metrics for Software.
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.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
R&D SDM 1 Metrics How to measure and assess software engineering? 2009 Theo Schouten.
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.
Software Requirements
Overview of Software Requirements
Software Metrics.
Software Process and Product Metrics
Configuration Management
Chapter 13 & 14 Software Testing Strategies and Techniques
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Managing Software Quality
Chapter 15 Software Product Metrics
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
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
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.
Agenda Introduction Overview of White-box testing Basis path testing
Software Engineering SM ? 1. Outline of this presentation What is SM The Need for SM Type of SM Size Oriented Metric Function Oriented Metric 218/10/2015.
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 Quality Metrics
Lecture 4 Software Metrics
1 SYSC Software Project Management: Software Quality1 Software Quality & Metrics Software Quality & Metrics Sources: 1.Roger S. Pressman, Software.
1 COSC 4406 Software Engineering COSC 4406 Software Engineering Haibin Zhu, Ph.D. Dept. of Computer Science and mathematics, Nipissing University, 100.
Chapter 3: Software Project Management Metrics
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
Measurement and quality assessment Framework for product metrics – Measure, measurement, and metrics – Formulation, collection, analysis, interpretation,
Software Engineering 2004 Jyrki Nummenmaa 1 SOFTWARE PRODUCT QUALITY Today: - Software quality - Quality Components - ”Good” software properties.
SEN 460 Software Quality Assurance
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,
Metrics "A science is as mature as its measurement tools."
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Chapter : 23 Product Metrics. A Framework For Product Metrics Measure, Metric, And Indicator A measure provides an indication of the extent, amount, dimension,
1 Software Requirements Descriptions and specifications of a system.
TOTAL QUALITY MANAGEMENT
Software Metrics 1.
McCall’s Quality Factors
Lecture 15: Technical Metrics
For University Use Only
Chapter 13 & 14 Software Testing Strategies and Techniques
Software Project Sizing and Cost Estimation
Software engineering.
Lecture 17 Software Metrics
Software Requirements analysis & specifications
Thursday’s Lecture Chemistry Building Musspratt Lecture Theatre,
Software Metrics “How do we measure the software?”
Presented by Trey Brumley and Ryan Carter
Chapter 19 Technical Metrics for Software
6. Software Metrics.
Presentation transcript:

Technical Metrics for Software Chapter 18

Chapter Assistance -- Michael Jager January 9, Chapter Outline D Software Quality D A Framework for Technical Software Metrics D Metrics for the Analysis Model D Metrics for the Design Model D Metrics for Source Code D Metrics for Testing D Metrics for Maintenance D Summary

Chapter Assistance -- Michael Jager January 9, Technical Metrics D Are NOT absolute (hence they are open to debate) D Provide us with a systematic way to assess quality D Provide insight into product quality on-the-spot rather than after-the-fact

Chapter Assistance -- Michael Jager January 9, Software Quality D Software requirements are the foundation from which quality is measured. D Specified standards define a set of development criteria that guide the manner in which software is engineered. D There is a set of implicit requirements that often goes unmentioned. D Software quality is a complex mix of factors that will vary across different applications and the customers who request them.

Chapter Assistance -- Michael Jager January 9, McCall’s Software Quality Factors Maintainability Flexibility Testability Portability Reusability Interoperability Correctness Reliability Usability Integrity Efficiency Product Operation Product Revision Product Transition

Chapter Assistance -- Michael Jager January 9, HP’s FURPS D F unctionality - evaluate the feature set and capabilities of the program D U sability - aesthetics, consistency, documentation D R eliability - frequency and severity of failures D P erformance - processing speed, response time, resource consumption, throughput, efficiency D S upportability - maintainability testability, compatibility, ease of installation

Chapter Assistance -- Michael Jager January 9, Transition to a Quantitative View D Previous slides described qualitative factors for the measurement of software quality D Everyday quality measurements D gymnastics, wine tasting, talent contests D side by side comparisons D quality judged by an expert in the field D Quantitative metrics don’t explicitly measure quality, but some manifestation of quality

Chapter Assistance -- Michael Jager January 9, The Challenge of Technical Metrics D Each quality measurement takes a different view of what quality is and what attributes in a system lead to complexity. D The goal is to develop measures of different program attributes to use as indicators of quality. D Unfortunately, a scientific methodology of realizing this goal has not been achieved.

Chapter Assistance -- Michael Jager January 9, Measurement Principles D Formulation - derivation of software metrics appropriate for the software being considered D Collection - accumulating data required to derive the formulated metrics D Analysis - computation of metrics and application of mathematical tools D Interpretation - evaluation of metrics in an effort to gain insight into the quality of the system D Feedback - recommendations derived from the interpretation of metrics

Chapter Assistance -- Michael Jager January 9, Attributes of Effective Software Metrics D Simple and computable D Empirically and intuitively persuasive D Consistent and objective D Consistent in units and dimensions D Programming language independent D Effective mechanism for quality feedback

Chapter Assistance -- Michael Jager January 9, Function Based Metrics D The Function Point (FP) metric can be used as a means for predicting the size of a system (derived from the analysis model). D number of user inputs D number of user outputs D number of user inquiries D number of files D number of external interfaces

Chapter Assistance -- Michael Jager January 9, Function Point Metric Weighting Factor MEASUREMENT PARAMETERcountsimpleaveragecomplextotal number of user inputs3 x346= 9 number of user outputs2 x457= 8 number of user inquiries2 x346= 6 number of files1 x71015= 7 number of external interfaces4 x5710= 20 count - total 50 Overall implemented size can be estimated from the projected FP value FP = count-total  (   F i )

Chapter Assistance -- Michael Jager January 9, The Bang Metric D Used to predict the application size based on the analysis model. D The software engineer first evaluates a set of primitives unsubdividable at the analysis level. D With the evaluation of these primitives, software can be defined as either function-strong or data- strong. D Once the Bang metric is computed, past history must be used to predict software size and effort.

Chapter Assistance -- Michael Jager January 9, Metrics for Requirements Quality D Requirements quality metrics - completeness, correctness, understandability, verifiability, consistency, achievability, traceability, modifiability, precision, and reusability - design metric for each. See Davis. D E.g., let n r = n f + n nf, where D n r = number of requirements D n f = number of functional requirements D n nf = number of nonfunctional requirements

Chapter Assistance -- Michael Jager January 9, Metrics for Requirements Quality D Specificity (lack of ambiguity) D Q = n ui /n r D n ui - number of requirements for which all reviewers had identical interpretations D For completeness, D Q = n u /(n i  n s ) D n u = number of unique function requirements D n i = number of inputs specified D n s = number of states specified

Chapter Assistance -- Michael Jager January 9, High-Level Design Metrics D Structural Complexity D S(i) = f 2 out (i) D f out (i) = fan-out of module i D Data Complexity D D(i) = v(i)/[f out (i) +1] D v(i) = # of input and output variables to and from module i D System Complexity D C(i) = S(i) + D(i)

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

Chapter Assistance -- Michael Jager January 9, Morphology Metrics a bcde f g ij k l hmn pq r sizedepthwidtharc-to node ratio

Chapter Assistance -- Michael Jager January 9, AF Design Structure Quality Index u S1 = total number of modules u S2 = # modules dependent upon correct data source or produces data used, excl. control u S3 = # modules dependent upon prior processing u S4 = total number of database items u S5 = # unique database items u S6 = # of database segments u S7 = # modules with single entry & exit

Chapter Assistance -- Michael Jager January 9, AF Design Structure Quality Index u D 1 = 1 if arch design method used, else 0 u D 2 = 1 - (S2/S1) -- module independence u D 3 = 1 - (S3/S1) -- independence of prior processing u D 4 = 1 - (S5/S4) -- database size u D 5 = 1 - (S6/S4) -- DB compartmentalization u D 6 = 1 - (S7/S1) -- Module entrance/exit

Chapter Assistance -- Michael Jager January 9, u DSQI =  w i D i, where the w i are weights totaling 1 which give the relative importance u The closer this is to one, the higher the quality. u This is best used on a comparison basis, i.e., with previous successful projects. u If the value is too low, more design work should be done. AF Design Structure Quality Index

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

Chapter Assistance -- Michael Jager January 9, Cohesion Metrics u Data slice - data values within the module that affect the module location at which a backward trace began. u Data tokens - Variables defined for a module u Glue Tokens - The set of tokens lying on multiple data slices u Superglue tokens - The set of tokens on all slices u Stickiness - of a glue token is proportional to number of data slices that it binds u Strong Functional Cohesion SFC(i) = SG(i)/tokens(i)

Chapter Assistance -- Michael Jager January 9, Coupling Metrics D Data and control flow coupling D d i = number of input data parameters D c i = number of input control parameters D d 0 = number of output data parameters D c 0 = number of output control parameters D Global coupling D g d = number of global variables used as data D g c = number of global variables used as control D Environmental coupling D w = number of modules called (fan-out) D r = number of modules calling the module under consideration (fan-in) D Module Coupling:m c = 1/ (d i + 2*c i + d 0 + 2*c 0 + g d + 2*g c + w + r) D m c = 1/( ) =.33(Low Coupling) D m c = 1/(5 + 2* * ) =.02 (High Coupling)

Chapter Assistance -- Michael Jager January 9, Interface Design Metrics D Layout Entities - graphic icons, text, menus, windows,. D Layout Appropriateness D absolute and relative position of each layout entity D frequency used D cost of transition from one entity to another D LA = 100 x [(cost of LA-optimal layout) / (cost of proposed layout)] D Final GUI design should be based on user feedback on GUI prototypes

Chapter Assistance -- Michael Jager January 9, Metrics for Source Code D Software Science Primitives D n 1 = the number of distinct operators D n 2 = the number of distinct operands D N 1 = the total number of operator occurrences D N 2 = the total number of operand occurrences Length: N = n 1 log 2 n 1 + n 2 log 2 n 2 Volume: V = Nlog 2 (n 1 + n 2 )

Chapter Assistance -- Michael Jager January 9, Metrics for Source Code ( Cont. ) SUBROUTINE SORT (X,N) DIMENSION X(N) IF (N.LT.2) RETURN DO 20 I=2,N DO 10 J=1,I IF (X(I).GE.X(J) GO TO 10 SAVE = X(I) X(I) = X(J) X(J) = SAVE 10 CONTINUE 20 CONTINUE RETURN END OPERATOR COUNT 1 END OF STATEMENT 7 2 ARRAY SUBSCRIPT 6 3 = 5 4 IF( ) 2 5DO 2 6, 2 7END OF PROGRAM 1 8.LT. 1 9.GE. 1 10GO TO 10 1 n 1 = 10 N 1 = 28 n 2 = 7 N 2 = 22

Chapter Assistance -- Michael Jager January 9, Metrics for Testing D Analysis, design, and code metrics guide the design and execution of test cases. D Metrics for Testing Completeness D Breadth of Testing - total number of requirements that have been tested D Depth of Testing - percentage of independent basis paths covered by testing versus total number of basis paths in the program. D Fault profiles used to prioritize and categorize errors uncovered.

Chapter Assistance -- Michael Jager January 9, Metrics for Maintenance D Software Maturity Index (SMI) D M T = number of modules in the current release D F c = number of modules in the current release that have been changed D F a = number of modules in the current release that have been added D F d = number of modules from the preceding release that were deleted in the current release SMI = [M T - (F c + F a + F d )] / M T

Chapter Assistance -- Michael Jager January 9, Summary D Software metrics provide a quantitative way to asses the quality of product attributes. D A software metric needs to be simple, computable, persuasive, consistent, and objective. D The function point and bang metrics provide quantitative means for evaluating the analysis model. D Metrics for design consider high-level, component level, and interface design issues.

Chapter Assistance -- Michael Jager January 9, Summary D Interface design metrics provide an indication of layout appropriateness for a GUI. D Using the number of operators and operands present in the code provides a variety of metrics to assess program quality. D Using the metrics as a comparison with known successful or unsuccessful projects is better than treating them as absolute quantities.