Software Quality Assurance: Lecture 41. This lecture will cover the following: measurement lies at the heart of many systems that govern our lives; economic measurements; military measurements; medical measurements; atmospheric measurements; measurements in every day life;...
Trang 1Introduction to Quality Metrics - 1
Lecture # 41
Trang 22
The software industry is in a constant state of
change With advances in hardware, software, graphical, and multimedia technologies,
applications are constantly being rethought,
redesigned, and reengineered New
development methods and techniques are
continuously evolving Because of this
environment of continuous change, the software environment or software business can be
extremely difficult to manage
Trang 33
Effective change management techniques require consistent and meaningful
measures
The ability of an organization to effectively and efficiently manage data provides a
true competitive advantage and adds
value to the company’s bottom line
Trang 44
IEEE Standard Glossary of Software
Engineering Terminology defines
“measure” as an activity that ascertains or appraises by comparing to a standard
Trang 55
Measurement lies at the heart of many systems that govern our lives
Trang 66
Prices, weight, size, etc
Some aspect of a thing is assigned a
descriptor that allows us to compare it with others
Trang 77
Measurement is the process by which
numbers or symbols are assigned to
attributes of entities in the real world in
such a way as to describe them according
to clearly defined rules
Trang 88
An entity is an object or an event in the real
world
An attribute is a feature or property of an entity Typical attributes include the area or color, the cost, or the elapsed time
We often talk about entities and their attributes interchangeably
‘It is cold today’
‘Usman is taller than Ali’
Trang 99
We can make judgments about entities solely by knowing and analyzing their attributes
Measurement is a process whose
definition is far from clear-cut
Trang 1010
Color is an attribute of a room How can we
compare ‘blue’ with ‘off-white’
Can we measure intelligence of human? Is I.Q
an accurate measure of the human intelligence
Accuracy and margin of error of measurement
Analyze and draw conclusions about
measurements
Trang 1111
Measurement is a direct quantification of,
as in measuring the height of a tree or
weight of a shipment of bricks
Calculation is indirect, where we take
measurements and combine them into a quantified item that reflects some attribute whose value we are trying to understand
Trang 1212
Measurements in SE - 1
We fail to set measurable targets for our software products For example, we
promise that the product will be
user-friendly, reliable and maintainable without specifying clearly and objectively what
these terms mean
Projects without clear goals will not
achieve their goals clearly (Gilb)
Trang 1313
Measurements in SE - 2
We fail to understand and quantify the
component costs of software projects For example, most projects cannot
differentiate the cost of design from the
cost of coding and testing
We do not quantify or predict the quality of the products we produce
Trang 1414
Measurements in SE - 3
We allow anecdotal evidence to convince
us to try yet another revolutionary new
development technology, without doing a carefully controlled study to determine if the technology is efficient and effective
Trang 15Objectives for Software Measurements and Measurement Programs
Trang 1616
Managers’ Perspectives
What does each process cost?
How productive is the staff?
How good is the code being developed?
Will the user be satisfied with the product?
How can we improve?
Trang 1717
Engineers’ Perspectives
Are the requirements testable?
Have we found all the faults?
Have we met our product or process goals?
What will happen in the future?
Trang 1818
Need for Collecting Metrics - 1
Conduct performance appraisals to
evaluate individual productivity
Justify existence, particularly in the era of company downsizing, justification may be needed for the existence of separate test group
Compare the quality of one system with another (similar) system
Trang 1919
Need for Collecting Metrics - 2
Monitor if the quality level is affected when any changes are introduced to the
Trang 2020
Benefits of Metrics - 1
Increase customer satisfaction
Improve productivity and quality by
quantifying development and maintenance processes
Develop, identify, and analyze trends
Provide useful information for planning
cycle
Trang 2121
Benefits of Metrics - 2
Provide a baseline against which future efforts can be measured
Determine the skill level and the number
of resources required to support a given application
Identify programs that require special
attention or additional maintenance time
Trang 2222
Benefits of Metrics - 3
Identify complex programs that may cause unpredictable results
Provide constructive means of making
decisions about product quality
Trang 2323
Cost of Metrics - 1
There is an initial cost associated with
setting up a measurement system
However, the long-term gains derived by measuring and implementing process
improvement programs certainly outweigh the cost
Trang 2424
Trang 2525
Categories of Software Metrics
Product metrics
Process metrics
Project metrics
Trang 2626
Product Metrics
Product metrics are those that describe the characteristics of the product such as size, complexity, design features,
performance, and quality level
Trang 2727
Process Metrics
Process metrics are those that can be used for improving the software
development and maintenance process
Examples include the effectiveness of defect removal during development, the pattern of testing defect arrival, and the response time of the fix process
Trang 2828
Trang 2929
Software Quality Metrics
Software quality metrics are a subset of software metrics that focus on quality aspects of the
product, process, and project
In general, software metrics are more closely
associated with process and product metrics
than with project metrics
Nonetheless, the project parameters such as
number of developers and their skill levels, the schedule, the size, and the organization
structure certainly affect the quality of the
product
Trang 3030
Before, we discuss software quality metrics, let’s first discuss attributes of software quality
Trang 3131Attributes of
Software Quality
Trang 3232
Attributes of Software Quality - 1
Trang 3333
Attributes of Software Quality - 2
Trang 3434
Correctness
The extent to which a program satisfies specifications and fulfills user’s mission
Trang 3535
Reliability
The extent to which a program can be
expected to perform the intended function with accuracy (acceptable level of
downtime)
Trang 3636
Efficiency
The extent to which a computer uses
minimum resources to perform a function
Trang 3737
Integrity
The extent to which access to software by unauthorized persons can be controlled
Trang 3838
Usability
The effort required to use or learn the application
Trang 3939
Maintainability
How difficult it is find and fix the problem
Trang 4040
Testability
The effort required to test the system in order to ensure it functions according to the requirement
Trang 4141
Flexibility
The ease of updating or modifying a program
Trang 4242
Trang 4343
Reusability
The extent to which a code could be reused for another application
Trang 4444
Common Measurements - 1
Requirements
Size of the document (# of words, pages,
functions)
Number of changes to the original
requirements, which were developed later in the life cycle but not specified in the original requirements document This measure
indicates how complete the original requirements document was
Consistency measures to ensure that the
requirements are consistent with interfaces from other systems
Trang 4545
Common Measurements - 2
Requirements (cont’d)
Testability measures to evaluate if the
requirements are written in such a way that
the test cases cab be developed and traced to the requirements
Trang 4646
Common Measurements - 3
Often problems detected in the
requirements are related to unclear
requirement which are difficult to measure and test, such as
The system must be user friendly (What does user friendly mean?)
The system must give speedy response time (What is speedy response time? 10
seconds, 13 seconds?)
Trang 4747
Common Measurements - 4
The system must have state-of-the-art
technology (What is considered art?)
state-of-the- They system must have clear management reports (What should these reports look like? What is the definition of clear?)
Trang 4848
Trang 4949
Common Measurements - 5
Design/Code (cont’d)
No of lines of code
Data usage, measured in terms of the number
of primitive data items
Entries/exits per module which predict the
completion time of the system
Trang 5050
Trang 5151
Though there are several items in
organization that can be tracked,
measured, and improved, there are seven measures that are commonly tracked
Trang 5252
Seven Commonly Tracked
Trang 5353
Number of Defects - 1
Defect count can be kept at three different stages
During white box testing to evaluate the
quality of original code
During black box testing to evaluate the
number of errors that escaped white box
After the product is released to the customer
to evaluate the number of errors not found
during both the unit and black box tests
Trang 5454
Number of Defects - 2
Along with the defect, the origin of the defect should be evaluated and also severity of defect should be noted
Trang 5555
Work Effort - 1
Work effort constitutes the number of hours
spent on development of a new system, system enhancement, or the support and maintenance
of an existing system
The hours are collected throughout the project life cycle, across all the development phases to track commitments, expectations made to the clients, and to provide historical data to improve estimating for future work efforts
Trang 5656
Work Effort - 2
Can provide early warnings regarding budget over-runs and project delays
Trang 5757
Schedule
The purpose of schedule measurements is
to track the performance of the project
team toward meeting the committed
schedule
Planned start date versus actual date
Planned completion date versus actual
date
Trang 5858
Number of Changes to the
Requirements - 1
The number of additions, changes, and deletions
to requirements should be measured as soon as the requirements document is checked into the formal configuration management
This measure reflects the quality of requirements and the need to change the process of either
collecting the requirements for documenting
them
Trang 5959
Number of Changes to the
Requirements - 2
The measure is also used to determine system stability, since evidence of constantly changing requirements may affect the overall quality of the product
The changes to the requirements are counted as they occur
Also the determination of the mean time from the requirement completion to when the first change was introduced is considered
Trang 6060
Number of Changes to the
Requirements - 3
This data tells you how thorough the
original requirement-gathering phase was
Once the software is released,
enhancement requests resulting from
customer calls or updates due to problem fixes are also counted as changes are
made
Trang 6161
Trang 6262
Size - 2
When the size grows larger than
expected, the cost of the project as well as the estimated time for completion also
grow
The size of the software is also used for
estimating the number of resources
required
The measure used to estimate program
size should be easy to use early in the
project life cycle
Trang 6363
Size – 3 – Lines of Code
Trang 6464
Size – 4 – Function Points - 1
It is a method of quantifying the size and
complexity of a software system based on a
weighted user view of the number of external
inputs to the application; number of outputs from the application; inquiries end users can make; interface files; and internal logical files updated
by an application
These five items are counted and multiplied by weight factors that adjust them for complexity
Trang 6565
Size – 5 – Function Points - 2
Function points are independent of languages, can be used to measure productivity and
number of defects, are available early during
functional design, and the entire product can be counted in a short time
They can be used for a number of productivity and quality metrics, including defects,
schedules, and resource utilization
More on function points later
Trang 6666
Trang 6767
Complexity - 1
This metric gives data on the complexity of the software code
As the complexity of the software
increases, the required development effort increases and the probability of defects
increases
Complexity can be measured at as many successive levels as possible beginning at the individual software module level
Trang 6868
programmer to code, test, and become
familiar with the program
Trang 6969
Trang 7070
Trang 7171
Complexity - 5
Complexity (cont’d)
Diagnostics metrics which are the measure of programming language violations which may not cause compile errors or warning but which are confusing, such as
Dead code
Unresolved procedure exits
Trang 7272
Complexity - 6
Complexity (cont’d)
Design complexity which is measured by
Modularity (how well as design is decomposed into small, manageable modules)
Coupling (the interfaces between units)
McCabe’s cyclomatic complexity
Trang 7373
Summary
Trang 7474
References
Inroads to Software Quality: “How-To”
Guide and Toolkit by Alka Jarvis and Vern Crandal, PH, 1997, (Chapter 8)
Software Metrics: A Rigorous & Practical Approach, by Norman E Fenton and Shari
L Pleeger, 2nd Edition, PWS Publishing
Company, 1997 (Chapter 1)
Trang 7575
Additional Software Quality Metrics
Mean time to failure (MTTF)
Defect density
Defects by severity
Customer problems
Customer satisfaction
Trang 7676
Mean Time To Failure - 1
The mean time to failure metric measures the time between failures
It is often used with safety-critical systems such as the airline traffic control systems, avionics, and weapons For example, in civilian airliners, the probability of certain catastrophic failures must be no worse
than 10^(-9) per hour
Trang 7777
Mean Time To Failure - 2
A failure occurs when a functional unit of a software-related system can no longer
perform its required function or cannot
perform it within specified limits
Mean time between failures (MTBF)
Trang 7878
Defect Density
The defect density measures the number of
defects discovered per some unit of software
size (lines of code, function points)
The defect density metric is used in many
commercial software systems
The defect rate of a product or the expected
number of defects over a certain time period is important for cost and resource estimates of the maintenance phase of the software life cycle
Trang 7979
Defects by Severity - 1
The defects by severity metric is a simple count of the number of unresolved defects listed by severity
Typically, this metric is measured at some regular interval and plotted to determine whether or not a trend exists
Trang 8080
Trang 8181
Customer Problems - 1
This metric is a simple count of the
number of new (non-duplicate) problems reported by customers over some time
interval
When measured at regular intervals and plotted, the data can be used to identify a trend Although, a trend may be apparent,
it is more useful to determine the reasons behind the trend
Trang 8282
Customer Problems - 2
If, for example, the number of customer-reported
problems increases over time, is it because more end users are using the product?
If you measure the number of customers who use the product at the same intervals that you measure
customer-reported problems, you might identify a effect or correlation between the metric and number of end users
cause- For example, if you determine that as the number of end users of the system increases the number of customer- reported problems increases, a relationship may exist between the two that suggests that you may have a
serious scalability flaw in your product