Chapter 19 - Technical Metrics for Software
Overview
This chapter describes the use of technical metrics in the software quality
assurance process. Earlier in the text the use of metrics in project management
was discussed. Software engineers use technical metrics to help them assess the
quality of the design and construction software product being built. Technical
metrics provide software engineers with a basis to conduct analysis, design,
coding, and testing more objectively. Qualitative criteria for assessing
software quality are not always sufficient by themselves. The process of using
technical metrics begins by deriving the software measures and metrics that are
appropriate for the software representation under consideration. Then data are
collected and metrics are computed. The metrics are computed and compared to
pre-established guidelines and historical data. The results of these comparisons
are used to guide modifications made to work products arising from analysis,
design, coding, or testing.
Software Quality Principles
- Conformance to software requirements is the foundation from which quality
is measured.
- Specified standards define a set of development criteria that guide the
manner in which software is engineered.
- Software quality is suspect when a software product conforms to its
explicitly stated requirements and fails to conform to the customer's implicit
requirements (e.g. ease of use).
McCall's Quality Factors
- Correctness
- Efficiency
- Integrity
- Reliability
- Usability
- Flexibility
- Maintainability
- Testability
- Interoperability
- Portability
- Reusability
McCall’s Software Metrics
- Auditability
- Accuracy
- Communication commonality
- Completeness
- Consistency
- Data commonality
- Error tolerance
- Execution efficiency
- Expandability
- Generality
- Hardware independence
- Instrumentation
- Modularity
- Operability
- Security
- Self-documentation
- Simplicity
- Software system independence
- Traceability
- Training
FURPS Quality Factors
- Functionality
- Usability
- Reliability
- Performance
- Supportability
ISO 9126 Quality Factors
- Functionality
- Reliability
- Usability
- Efficiency
- Maintainability
- Portability
Measurement Process Activities
- Formulation – derivation of software measures and metrics appropriate for
software representation being considered
- Collection – mechanism used to accumulate the data used to derive the
software metrics
- Analysis – computation of metrics
- Interpretation – evaluation of metrics that results in gaining insight
into quality of the work product
- Feedback – recommendations derived from interpretation of the metrics is
transmitted to the software development team
Formulation Principles for Technical Metrics
- The objectives of measurement should be established before collecting any
data.
- Each metric is defined in an unambiguous manner.
- Metrics should be based on a theory that is valid for the application
domain.
- Metrics should be tailored to accommodate specific products and
processes.
Software Metric Attributes
- Simple and computable
- Empirically and intuitively persuasive
- Consistent and objective
- Consistent in use of units and measures
- Programming language independent
- Provides an effective mechanism for quality feedback
Representative Analysis Metrics
- Function-based metrics
- Bang metric (function strong or data strong)
- Specification quality metrics (Davis)
Representative Design Metrics
- Architectural design metrics
- Structural complexity (based on module fanout)
- Data complexity (based on module interface inputs and outputs)
- System complexity (sum of structural and data complexity)
- Morphology (number of nodes and arcs in program graph)
- Design structure quality index (DSQI)
- Component-level design metrics
- Cohesion metrics (data slice, data tokens, glue tokens, superglue tokens,
stickiness)
- Coupling metrics (data and control flow, global, environmental)
- Complexity metrics (e.g. cyclomatic complexity)
- Interface design metrics (e.g. layout appropriateness)
Halstead’s Software Science (Source Code Metrics)
- Overall program length
- Potential minimum algorithm volume
- Actual algorithm volume (number of bits used to specify program)
- Program level (software complexity)
- Language level (constant for given language)
Testing Metrics
- Metrics that predict the likely number of tests required during various
testing phases
- Metrics that focus on test coverage for a given component
Maintenance Metrics
- Software Maturity Index (IEEE Standard 982.1-1988)
- SMI approaches 1.0 as product begins to
stabilize