Software Metrics: The Following Can Be Regarded As The Fundamental Metric
Software Metrics: The Following Can Be Regarded As The Fundamental Metric
It is calculated as follows:
Function Test Coverage = FE/FT Where,
FE is the number of test requirements that are covered by test cases that were executed against
the software
FT is the total number of test requirements.
Reliability Metrics
Reliability is calculated as follows:
Reliability = 1 Number of errors (actual or predicted)/Total number of lines of executable code
This reliability value is calculated for the number of errors during a specified time interval. Three
other metrics can be calculated during extended testing or after the system is in production. They
are:
MTTFF (Mean Time to First Failure)
MTTFF = The number of time intervals the system is operable until its first failure (functional
failure only).
MTBF (Mean Time Between Failures)
MTBF = Sum of the time intervals the system is operable
MTTR (Mean Time To Repair)
MTTR = sum of the time intervals required to repair the system The number of repairs during
the time period.
Types
Process Metrics
Product Metrics
Process Metrics
Many organizations take measurements or metrics because they have the capability to measure,
rather than determining why they need the information. Unfortunately, measurement for the sake
of a number or statistic rarely makes a process better, faster, or cheaper. A poor measurement can
hurt a process if incorrect decisions are based on the result of that measurement. People at all
levels of organizations continue to take measurements hoping that they will shed light on the best
way to provide a product or service. Though fraught with good intentions, these poorly contrived
measurements add to the confusion of what should and should not be measured.
Product Metrics
Product metrics are for describing characteristics of product such as its size, complexity,
features, and performance. Several common product metrics are mean time to failure, defect
density, customer problem, and customer satisfaction metrics.
1. Mean time to failure metric is, to put it plainly, the average time the product runs before
experiencing a crash, which is important for systems like air traffic control that are required to
have no more than a few seconds of down time in a full year.
2. Defect density metric refers to number of imperfections per:
Lines of code
Function definitions
3. Customer problem metric is a measure of problems customers have encountered with the
product over the total usage of the product. This metric takes into account that multiple instances
of the product can be used at the same time, which effectively multiplies the length of time the
product has been in operation by the number of product licenses.
4. Customer satisfaction metric is generally a survey asking customers to rate their satisfaction
with the product and/or its features on a five-point scale.
quantifiable,
easy to collect,
simple,
meaningful,
non-threatening.
Quantifiable Measurements
To ensure consistent comparison of findings, the method of measurement needs to be standard,
concise, and quantifiable. For example, to determine the density of defects, you need to identify
what metrics provide this information and a standard of measurement. For example, the test
metric to gather is the number of defects and the method of measurement is lines of code (loc),
(i.e., x number of defects per y loc).
Definitions must be clear and concise. For example, the definition of defect must state what
constitutes a defect and the definition of lines of code must state the number of lines of code to
be used as the standard of measure, (e.g., 1000). The definitions must also provide any other
information necessary to ensure consistency, (e.g., if the lines of code are commented or not
commented).
Easy to Collect
The information collection process must not take too much of the collectors time, or the
information will not be collected. The amount of test metrics gathered from any one group needs
to be kept at a minimum, collecting only that which is most useful. Whenever possible, automate
the data collection process.
Simple Information
The information collected should be simple to gather. If it is hard for the collector to determine
what to measure or report, the information is likely to be inaccurate.
Meaningful Purpose
The information gathered must have a specific purpose, (or purposes). For example, the
information will be used to determine the number of defects and time used for each testing
phase, in order to determine the most cost effective ways to minimize errors.
The information to collect must be understandable and viewed as relevant to the collector, or the
information will not be collected. For example, to make the information in the previous example
relevant, explain that the findings will highlight the testing methods that work and methods that
dont work, so that employee effort is focused on productive activities.
Non-Threatening Use
Avoid using test metrics for employee evaluation purposes. Collection of information that is
perceived as a threat to the employees job status is frequently reported inaccurately or
incompletely.