Professional Documents
Culture Documents
Unit-8 Software Measurement and Metrics (E-Next - In)
Unit-8 Software Measurement and Metrics (E-Next - In)
Unit-8 Software Measurement and Metrics (E-Next - In)
UNIT-8
SOFTWARE MEASUREMENT AND METRICS
Metrics for Software Maintenance
When development of a software product is complete and it is released to the market, it enters
the maintenance phase of its life cycle. During this phase the defect arrivals by time interval
and customer problem calls (which may or may not be defects) by time interval are the de
facto metrics. However, the number of defect or problem arrivals is largely determined by the
development process before the maintenance phase. Not much can be done to alter the quality
of the product during this phase. Therefore, these two de facto metrics, although important,
do not reflect the quality of software maintenance. What can be done during the maintenance
phase is to fix the defects as soon as possible and with excellent fix quality. Such actions,
although still not able to improve the defect rate of the product, can improve customer
satisfaction to a large extent. The following metrics are therefore very important: Fix backlog
and backlog management index Fix response time and fix responsiveness Percent delinquent
fixes Fix quality
Fix backlog is a workload statement for software maintenance. It is related to both the rate of
defect arrivals and the rate at which fixes for reported problems become available. It is a
simple count of reported problems that remain at the end of each month or each week. Using
it in the format of a trend chart, this metric can provide meaningful information for managing
the maintenance process. Another metric to manage the backlog of open, unresolved,
problems is the backlog management index (BMI).
As a ratio of number of closed, or solved, problems to number of problem arrivals during the
month, if BMI is larger than 100, it means the backlog is reduced. If BMI is less than 100,
then the backlog increased. With enough data points, the techniques of control charting can
be used to calculate the backlog management capability of the maintenance process. More
investigation and analysis should be triggered when the value of BMI exceeds the control
limits. Of course, the goal is always to strive for a BMI larger than 100. A BMI trend chart or
control chart should be examined together with trend charts of defect arrivals, defects fixed
(closed), and the number of problems in the backlog.
Figure 4.5 is a trend chart by month of the numbers of opened and closed problems of a
software product, and a pseudo-control chart for the BMI. The latest release of the product
was available to customers in the month for the first data points on the two charts. This
explains the rise and fall of the problem arrivals and closures. The mean BMI was 102.9%,
indicating that the capability of the fix process was functioning normally. All BMI values
were within the upper (UCL) and lower (LCL) control limits葉he backlog management
process was in control. (Note: We call the BMI chart a pseudocontrol chart because the BMI
data are autocorrelated and therefore the assumption of independence for control charts is
violated. Despite not being "real" control charts in statistical terms, however, we found
Page 75 of 88
STQA NOTES SYMCA
pseudo-control charts such as the BMI chart quite useful in software quality management. Fix
Response Time and Fix Responsiveness
For many software development organizations, guidelines are established on the time limit
within which the fixes should be available for the reported defects. Usually the criteria are set
in accordance with the severity of the problems. For the critical situations in which the
customers' businesses are at risk due to defects in the software product, software developers
or the software change teams work around the clock to fix the problems. For less severe
defects for which circumventions are available, the required fix response time is more
relaxed. The fix response time metric is usually calculated as follows for all problems as well
as by severity level:
Mean time of all problems from open to closed. If there are data points with extreme values,
medians should be used instead of mean. Such cases could occur for less severe problems for
which customers may be satisfied with the circumvention and didn't demand a fix. Therefore,
the problem may remain open for a long time in the tracking report.
In general, short fix response time leads to customer satisfaction. However, there is a subtle
difference between fix responsiveness and short fix response time. From the customer's
perspective, the use of averages may mask individual differences. The important elements of
fix responsiveness are customer expectations, the agreed-to fix time, and the ability to meet
one's commitment to the customer. For example, John takes his car to the dealer for servicing
in the early morning and needs it back by noon. If the dealer promises noon but does not get
the car ready until 2 o'clock, John will not be a satisfied customer. On the other hand, Julia
does not need her mini van back until she gets off from work, around 6 P.M. As long as the
dealer finishes servicing her van by then, Julia is a satisfied customer. If the dealer leaves a
timely phone message on her answering machine at work saying that her van is ready to pick
up, Julia will be even more satisfied. This type of fix responsiveness process is indeed being
practiced by automobile dealers who focus on customer satisfaction.
The mean (or median) response time metric is a central tendency measure. A more sensitive
metric is the percentage of delinquent fixes. For each fix, if the turnaround time greatly
exceeds the required response time, then it is classified as delinquent:
This metric, however, is not a metric for real-time delinquent management because it is for
closed problems only. Problems that are still open must be factored into the calculation for a
real-time metric. Assuming the time unit is 1 week, we propose that the percent delinquent of
Page 76 of 88
STQA NOTES SYMCA
problems in the active backlog be used. Active backlog refers to all opened problems for the
week, which is the sum of the existing backlog at the beginning of the week and new problem
arrivals during the week. In other words, it contains the total number of problems to be
processed for the week葉he total workload. The number of delinquent problems is checked at
the end of the week. Figure 4.6 shows the real-time delivery index diagrammatically.
It is important to note that the metric of percent delinquent fixes is a cohort metric. Its
denominator refers to a cohort of problems (problems closed in a given period of time, or
problems to be processed in a given week). The cohort concept is important because if it is
operationalized as a cross-sectional measure, then invalid metrics will result. For example,
we have seen practices in which at the end of each week the number of problems in backlog
(problems still to be fixed) and the number of delinquent open problems were counted, and
the percent delinquent problems was calculated. This cross-sectional counting approach
neglects problems that were processed and closed before the end of the week, and will create
a high delinquent index when significant improvement (reduction in problems backlog) is
made.
Fix Quality
Fix quality or the number of defective fixes is another important quality metric for the
maintenance phase. From the customer's perspective, it is bad enough to encounter functional
defects when running a business on the software. It is even worse if the fixes turn out to be
defective. A fix is defective if it did not fix the reported problem, or if it fixed the original
problem but injected a new defect. For mission-critical software, defective fixes are
detrimental to customer satisfaction. The metric of percent defective fixes is simply the
percentage of all fixes in a time interval (e.g., 1 month) that are defective.
A defective fix can be recorded in two ways: Record it in the month it was discovered or
record it in the month the fix was delivered. The first is a customer measure, the second is a
process measure. The difference between the two dates is the latent period of the defective
fix. It is meaningful to keep track of the latency data and other information such as the
number of customers who were affected by the defective fix. Usually the longer the latency,
the more customers are affected because there is more time for customers to apply that
defective fix to their software system.
There is an argument against using percentage for defective fixes. If the number of defects,
and therefore the fixes, is large, then the small value of the percentage metric will show an
optimistic picture, although the number of defective fixes could be quite large. This metric,
therefore, should be a straight count of the number of defective fixes. The quality goal for the
maintenance process, of course, is zero defective fixes without delinquency.
Software Metric
A software metric is a standard of measure of a degree to which a software system or
process
Page 77 of 88
STQA NOTES SYMCA
possesses some property. Even if a metric is not a measurement (metrics are functions, while
measurements are the numbers obtained by the application of metrics), often the two terms
are used as synonyms. Since quantitative measurements are essential in all sciences, there is a
continuous effort by computer science practitioners and theoreticians to bring similar
approaches to software development. The goal is obtaining objective, reproducible and
quantifiable measurements, which may have numerous valuable applications in schedule and
budget planning, cost estimation, quality assurance testing, software debugging, software
performance optimization, and optimal personnel task assignments.
Software Metrics are used to measure the quality of the project. Simply, Metric is a unit used
for describing an attribute. Metric is a scale for measurement.
Suppose, in general, “Kilogram” is a metric for measuring the attribute “Weight”. Similarly,
in software, “How many issues are found in thousand lines of code?”, here No. of issues is
one measurement & No. of lines of code is another measurement. Metric is defined from
these two measurements.
Page 78 of 88
STQA NOTES SYMCA
1. Take the decision for next phase of activities such as, estimate the cost & schedule of
future projects.
2. Understand the kind of improvement required to success the project
3. Take a decision on process or technology to be modified etc.
Importance of Software Testing Metrics:
As explained above, Test Metrics are the most important to measure the quality of the
software.
Now, how can we measure the quality of the software by using Metrics?
Suppose, if a project does not have any metrics, then how the quality of the work done by a
Test analyst will be measured?
Page 79 of 88
STQA NOTES SYMCA
1. Base Metrics
2. Calculated Metrics
Base Metrics:
Base Metrics are the Metrics which are derived from the data gathered by the Test Analyst
during the test case development and execution.
This data will be tracked throughout the Test Lifecycle. i.e. collecting the data like Total no.
of test cases developed for a project (or) no. of test cases need to be executed (or) no. of test
cases passed/failed/blocked etc.
Calculated Metrics:
Calculated Metrics are derived from the data gathered in Base Metrics. These Metrics are
generally tracked by the test lead/manager for Test Reporting purpose.
LIMITATIONS
Page 80 of 88
STQA NOTES SYMCA
following domains:
Scheduling
Software sizing
Programming complexity
Software development effort estimation
Software quality
Software metrics is a standard of measure that contains many activities which involve some
degree of measurement. It can be classified into three categories: product metrics, process
metrics, and project metrics.
Product metrics describe the characteristics of the product such as size, complexity,
design features, performance, and quality level.
Project metrics describe the project characteristics and execution. Examples include
the number of software developers, the staffing pattern over the life cycle of the
software, cost, schedule, and productivity.
Some metrics belong to multiple categories. For example, the in-process quality metrics of a
project are both process metrics and project metrics.
Page 81 of 88
STQA NOTES SYMCA
Data Collection
The quality of any measurement program is clearly dependent on careful data collection. Data
collected can be distilled into simple charts and graphs so that the managers can understand
the progress and problem of the development. Data collection is also essential for scientific
investigation of relationships and trends.
Page 82 of 88
STQA NOTES SYMCA
The notion of divide and conquer approach has been implemented as a standard approach to
measuring software quality.
Reliability Models
Most quality models include reliability as a component factor, however, the need to predict
and measure reliability has led to a separate specialization in reliability modeling and
prediction. The basic problem in reliability theory is to predict when a system will eventually
fail.
Management by Metrics
For managing the software project, measurement has a vital role. For checking whether the
project is on track, users and developers can rely on the measurement-based chart and graph.
The standard set of measurements and reporting methods are especially important when the
software is embedded in a product where the customers are not usually well-versed in software
terminology.
Page 83 of 88
STQA NOTES SYMCA
defects:
o Are confirmed and agreed upon (not just reported).
o Dropped defects are not counted.
phase:
o Can be any phase in the software development life cycle where defects can be
injected AND detected. For example, Requirement, Design, and Coding.
injected:
o The phase a defect is ‘injected’ in is identified by analyzing the defects [For
instance, a defect can be detected in System Testing phase but the cause of the
defect can be due to wrong design. Hence, the injected phase for that defect is
Design phase.]
FORMULA
UNIT
Percentage (%)
TARGET VALUE
The ultimate target value for Defect Detection Efficiency is 100% which means that
all defects injected during a phase are detected during that same phase and none are
transmitted to subsequent phases. [Note: the cost of fixing a defect at a later phase is
higher.]
USES
For measuring the quality of the processes (process efficiency) within software
development life cycle; by evaluating the degree to which defects introduced during
that phase/stage are eliminated before they are transmitted into subsequent
phases/stages.
For identifying the phases in the software development life cycle that are the weakest
in terms of quality control and for focusing on them.
Page 84 of 88
STQA NOTES SYMCA
for a duration (say, the first month, the quarter, or the year).
for each phase of the software life cycle.
for the whole of the software life cycle.
USES
For comparing the relative number of defects in various software components so that
high-risk components can be identified and resources focused towards them.
For comparing software/products so that quality of each software/product can be
quantified and resources focused towards those with low quality
Cost of Quality (COQ) is a measure that quantifies the cost of control/conformance and the
cost of failure of control/non-conformance. In other words, it sums up the costs related to
prevention and detection of defects and the costs due to occurrences of defects.
Definition by ISTQB: cost of quality: The total costs incurred on quality activities and
issues and often split into prevention costs, appraisal costs, internal failure costs and
external failure costs.
Definition by QAI: Money spent beyond expected production costs (labor, materials,
equipment) to ensure that the product the customer receives is a quality (defect free)
product. The Cost of Quality includes prevention, appraisal, and correction or repair
costs.
Page 85 of 88
STQA NOTES SYMCA
EXPLANATION
FORMULA / CALCULATION
Cost of Quality (COQ) = Cost of Control + Cost of Failure of Control
where
Cost of Control = Prevention Cost + Appraisal Cost
and
Cost of Failure of Control = Internal Failure Cost + External Failure Cost
Measurement Principle
• Formulation. The derivation of software measures and metrics appropriate for the
representation of the software that is being considered.
• Collection. The mechanism used to accumulate data required to derive the formulated
metrics.
Page 86 of 88
STQA NOTES SYMCA
• Interpretation. The evaluation of metrics resulting in insight into the quality of the
representation.
Software metrics will be useful only if they are characterized effectively and validated so that
their worth is proven. The following principles [Let03b] are representative of many that can
be proposed for metrics characterization and validation:
• A metric should have desirable mathematical properties. That is, the metric’s value should
be in a meaningful range (e.g., 0 to 1, where 0 truly means absence, 1 indicates the maximum
value, and 0.5 represents the “halfway point”). Also, a metric that purports to be on a rational
scale should not be composed of components that are only measured on an ordinal scale.
• When a metric represents a software characteristic that increases when positive traits occur
or decreases when undesirable traits are encountered, the value of the metric should increase
or decrease in the same manner.
• Each metric should be validated empirically in a wide variety of contexts before being
published or used to make decisions. A metric should measure the factor of interest,
independently of other factors. It should “scale up” to large systems and work in a variety of
programming languages and system domains.
Software Metrics provide measures for various aspects of software process and software
product.
Software measures are fundamental requirement of software engineering. They not only help
to control the software development process but also aid to keep quality of ultimate product
excellent.
According to Tom DeMarco, a (Software Engineer), “You cannot control what you cannot
measure.” By his saying, it is very clear how important software measures are.
Page 87 of 88
STQA NOTES SYMCA
The number of defects found in development process and number of defects reported
by the client after the product is installed or delivered at client-end, define quality of
product.
Process Metrics - In various phases of SDLC, the methods and tools used, the
company standards and the performance of development are software process metrics.
Resource Metrics - Effort, time and various resources used, represents metrics for
resource measurement.
Page 88 of 88