SQM Notes
SQM Notes
SQM Notes
Software Quality: The degree to which a system, component, or process meets specific requirements or
customer/user needs/expectations.
The goal of software quality is to determine:
1. How well is the design of the software?
2. How well the software conforms to the developed design?
Software Quality Attributes: Software quality can be measured in terms of attributes. The attribute
domains that are required to define for a given software are as follows:
1. Functionality: The degree to which the purpose of the software is satisfied.
2. Usability: The degree to which the software is easy to use.
3. Testability: The ease with which the software can be tested to demonstrate the faults.
4. Reliability: The degree to which the software performs failure-free functions.
5. Maintainability: The ease with which the faults can be located and fixed, quality of the software can be
improved or software can be modified in the maintenance phase
6. Adaptability: The degree to which the software is adaptable to different technologies and platforms.
• Functionality:
➢ Completeness - The degree to which the software is complete.
➢ Correctness - The degree to which the software is correct.
➢ Efficiency - The degree to which the software requires resources to perform a software function.
➢ Traceability - The degree to which requirement is traceable to the software design and source
code.
➢ Security - The degree to which the software is able to prevent unauthorized access to the program
data.
• Usability:
➢ Learnability - The degree to which the software is easy to learn.
➢ Operability - The degree to which the software is easy to operate.
➢ User-friendliness - The degree to which the interfaces of the software are easy to use and
understand.
➢ Installability - The degree to which the software is easy to install.
➢ Satisfaction - The degree to which the user feels satisfied with the software.
• Testability:
➢ Verifiability - The degree to which the software deliverable meets the specified standards,
procedures and process.
➢ Validatable - The ease with which the software can be executed to demonstrate whether the
established testing criterion is met.
• Reliability:
➢ Robustness - The degree to which the software performs reasonably under unexpected
circumstances.
➢ Recoverability - The speed with which the software recovers after the occurrence of a failure.
• Maintainability:
➢ Agility - The degree to which the software is quick to change or modify.
➢ Modifiability - The degree to which the software is easy to implement, modify and test in the
maintenance phase.
➢ Readability - The degree to which the software documents and programs are easy to understand
so that the faults can be easily located and fixed in the maintenance phase.
➢ Flexibility - The ease with which changes can be made in the software in the maintenance phase.
• Adaptability:
➢ Portability - The ease with which the software can be transferred from one platform to another
platform.
➢ Interoperability - The degree to which the system is compatible with other systems.
• Training assures that the people involved with software development, and those people using the
software once it is developed, are able to do their jobs correctly.
• It is important to the quality of the software that the producers be educated in the use of the
various development tools at his or her disposal.
• The proper use of the software once it has been developed and put into operation is another area
requiring education.
9. Documentation
• During the software development phases, the SRS document, SDD, test plans and test cases, user
manuals and system guides etc. must be produced.
• The specified documentation standards must be followed in order to create these documents.
• The documentation helps strongly in the debugging process and hence the maintenance of the
product.
10. Safety and security
• Security:
➢ The highest quality software system is of no use if the data centre in which it is to be used is
damaged or destroyed.
➢ Another frequent damager of the quality of output of an otherwise high-quality software
system is data that has been unknowingly modified.
➢ Additionally, though not really a software quality issue per se, is the question of theft of data.
➢ Finally, the recent onslaught of hackers and software attackers and the burgeoning
occurrences of viruses also need to be considered.
➢ The software quality practitioner is responsible for alerting management to the absence, or
apparent inadequacy, of security provisions in the software.
➢ In addition, the software quality practitioner must raise the issue of data centre security and
disaster recovery to management's attention.
• Safety:
➢ Every software project must consciously consider the safety implications of the software and
the system of which it is a part.
➢ The project management plan should include a paragraph describing the safety issues to be
considered. If appropriate, a software safety plan should be prepared.
Bug - A bug refers to defects which means that the software product or the application is not working as
per the adhered requirements set. When we have any type of logical error, it causes our code to break,
which results in a bug.
Defect - A defect refers to a situation when the application is not working as per the requirement and the
actual and expected result of the application or software are not in sync with each other.
Error - Error is a situation that happens when the development team or the developer fails to understand
a requirement definition and hence that misunderstanding gets translated into buggy code.
Fault – Sometimes, due to certain factors such as lack of resources or not following proper steps, fault
occurs in software which means that the logic was not incorporated to handle the errors in the
application. It mainly happens due to invalid documented steps or a lack of data definitions.
Failure - It is the accumulation of several defects that ultimately lead to Software failure and results in the
loss of information in critical modules thereby making the system unresponsive. It is very rare.
Process Vs Procedure
• A process is a series of related tasks that turns input into output.
• A process describes a series of events leading to achieving a specific objective.
• A process normally operates at a higher level.
• You complete a process to achieve your desired outcome (or achieve your end goal).
• The procedure is a way of undertaking a process or part of a process.
• There can be one or more procedures in a process or procedures from other processes may be
referenced in a process.
• The procedure is an instructional guideline that guides you through each step of the process.
Phases of Software Development Life Cycle:
1. Requirement analysis phase—gathering and documentation of requirements.
2. Design phase—preliminary and detailed design of the software.
3. Implementation and unit testing phase—development of source code and initial testing of
independent units.
4. Integration and system testing phase—testing the integrated parts of various units and the system as
a whole.
5. Operational phase—delivering and installing the software at the customer’s site.
6. Maintenance phase—removing defects, accommodating changes and improving the quality of the
software after it goes into the operational phase.
Software Quality Assurance: It is the planned and systematic pattern of actions required to ensure quality
in the software. The term quality assurance includes the following:
• Technical risks – Software will not perform as intended or be hard to operate, modify and/or maintain.
• Programmatic risks – Project will overrun cost or schedule.
The goal of SQA is to reduce these risks by:
SQA Activities
1. Revision:
a. A draft version of an artifact/document submitted by the group will be evaluated.
b. Reviewers are allowed to post their comments about possible flaws in the documentation.
c. If there is any contradiction then it is discussed.
d. Review is composed of walkthrough and inspection.
2. Process Evaluation:
a. Define the process standards such as how reviews should be conducted and when reviews
should be held.
b. Monitor the development process to ensure that the standards are being followed.
c. Report the software project management and to the customer.
3. Software Standards:
a. Standards provides encapsulation of best or at least most appropriate practice.
b. Documentation standards specify form and contents for planning, control of the
documentation.
c. Design standards specify the form and content of design of the product and documentation
of the design.
d. Code standards specify the language in which the code is to be written and define any
restriction on use of language features.
SQA system components can be classified into 6 classes:
1) Pre-project components
2) Software project life cycle components
3) Infrastructure components for error prevention and improvements
4) Management SQA components
5) SQA standards, system certification and assessment components
6) Organizing for SQA- the human components
ISO 9000
• The International Organization for Standardization (ISO) made different attempts to improve the
quality with ISO 9000 series. It is a well-known and widely used series.
• The ISO 9000 series of standards is not only for software, but it is a series of five related standards
that are applicable to a wide range of applications such as industrial tasks including design,
production, installation and servicing. ISO 9001 is the standard that is applicable to software quality.
• The aim of ISO 9001 is to define, understand, document, implement, maintain, monitor, improve and
control the following processes:
1. Management responsibility
2. Quality system
3. Contract review
4. Design control
5. Document control
6. Purchasing
7. Purchaser-supplied product
8. Product identification and traceability
9. Process control
10. Inspection and testing
11. Inspection, measuring and test equipment
12. Inspection and test status
13. Control of nonconforming product
14. Corrective action
15. Handling, storage, packaging and delivery
16. Quality records
17. Internal quality audits
18. Training
19. Servicing
20. Statistical techniques
• They are not specific to any one industry and can be applied to organizations of any size.
• ISO 9000 can help a company satisfy its customers, meet regulatory requirements, and achieve
continual improvement.
• It should be considered to be a first step or the base level of a quality system.
• Quality management ensures that an organization, product or service consistently functions well. It
has four main components: quality planning, quality assurance, quality control and quality
improvement.
• Quality Management System (QMS) is simply defined as a formalized system that documents the
guidelines, processes, procedures, and responsibilities for achieving policies and objectives that
control, maintain or bring in quality in the product or service as per the agreed upon standards.
• Within the ISO 9000 series, standard ISO 9001 for quality system is most applicable to software
development.
• The ISO 9000 family contains these standards:
➢ ISO 9001:2015: Quality Management Systems—Requirements
➢ ISO 9000:2015: Quality Management Systems—Fundamentals and Vocabulary (definitions)
➢ ISO 9004:2009: Quality Management Systems—Managing for the Sustained Success of an
Organization (continuous improvement)
➢ ISO 19011:2011: Guidelines for Auditing Management Systems
ISO 9001
ISO 9001 is defined as the international standard that specifies requirements for a quality management
system (QMS). ISO 9001 was first published in 1987 by the International Organization for Standardization
(ISO). The current version of ISO 9001 was released in September 2015. Here are the key components and
principles of ISO 9001:
1. Process Approach: ISO 9001 encourages organizations to focus on their core processes and how they
interact to deliver quality.
2. Customer Focus: Prioritize understanding and meeting customer needs to enhance satisfaction.
3. Leadership: Top management plays a vital role in aligning quality with the organization's strategy.
4. Involvement of People: Empower and involve employees to contribute to quality improvement.
5. Process Improvement: Continuously assess and enhance processes and the overall quality
management system.
6. Evidence-Based Decision Making: Make decisions based on data and evidence to improve quality.
7. Relationship Management: Manage relationships with suppliers and stakeholders to support quality
goals.
8. Documentation: Maintain necessary documentation for consistency and traceability.
9. Risk-Based Thinking: Identify and address risks and opportunities for better quality outcomes.
10. Audit and Certification: Organizations can seek ISO 9001 certification to demonstrate their
commitment to quality management to customers and stakeholders.
Capability Maturity Model:
It is a strategy for improving the software process, irrespective of the actual life cycle model used. The
maturity levels are:
UNDERSTAND Tool
• Understand is a customizable integrated development environment (IDE) that enables static code
analysis through an array of visuals, documentation, and metric tools.
• It was built to help software developers comprehend, maintain, and document their source code.
• It enables code comprehension by providing flow charts of relationships and building a dictionary of
variables and procedures from a provided source code.
• Understand provides tools for metrics and reports, standards testing, documentation, searching,
graphing, and code knowledge.
• It is provided by SciTools.
Working of Understand tool
1. Parsing Source Code: Understand parses source code files from various programming languages,
extracting information about variables, functions, classes, relationships, and more.
2. Building a Database: The tool creates a database containing the extracted information. This database
stores the code's structural and semantic details, forming a foundation for analysis.
3. Visualization: Understand generates visual representations of the codebase's structure, like
dependency graphs, call trees, and inheritance hierarchies. These visuals help developers grasp the
architecture and relationships within the code.
4. Metrics and Statistics: The tool calculates code metrics like complexity, coupling, and cohesion. It
provides insights into code quality and potential areas for improvement.
5. Searching and Navigating: Developers can use Understand's search and navigation features to locate
specific code elements, references, or occurrences. This helps in understanding how different parts of
the code interact.
6. Cross-Referencing: Understand allows developers to cross-reference different elements, enabling
them to see where a function is called, where a variable is used, and so on.
7. Custom Queries: Developers can create custom queries to extract specific information from the
codebase. This is useful for generating custom reports or conducting in-depth analysis.
8. Language Support: Understand supports a wide range of programming languages, making it versatile
for analyzing different types of projects.
Comparison between Mccall Model, Boehm Model, and ISO 9126 Model
Aspect McCall Model Boehm Model ISO 9126 Model
Developed in the 1990s
Origin and Proposed in the 1970s
Developed in the 1970s and revised as ISO/IEC
Era and revised over time
25000
Emphasizes a cost and
Emphasizes software
Emphasizes three quality schedule estimation
product quality
Focus categories: Product, model with a focus on
attributes and
Operation, and Transition. the development
characteristics.
process.
Three categories, each
Defines software quality
with several
characteristics grouped
subcharacteristics: -
Divides software quality into six main categories:
Product: 11
factors into: Product, - Functionality -
Categories subcharacteristics -
Computer Program, and Reliability - Usability -
Operation: 6
Development Process. Efficiency -
subcharacteristics -
Maintainability -
Transition: 7
Portability
subcharacteristics
Offers a structured
Provides a qualitative Focuses on estimating approach to assessing
framework for software size, effort, and software quality using
Measurement assessment, with no schedule using metrics specific metrics, such as
specific metrics or like lines of code and defect density, response
measurement methods. function points. time, and adherence to
standards.
Used as a conceptual Widely used for
Primarily used for cost
framework for discussing assessing and specifying
and schedule estimation
Use Case software quality but lacks software quality in a
and project
concrete measurement measurable and
management.
guidelines. structured way.
The Boehm Model has The ISO 9126 Model has
The McCall Model has evolved into various evolved into the ISO/IEC
had limited practical iterations, such as 25000 series, which
Evolution application and has not COCOMO (COnstructive includes the SQuaRE
evolved significantly over COst MOdel), to address (Software Quality
time. different development Requirements and
environments. Evaluation) standards.
Some concepts, such as Still relevant today as the
Limited practical the COCOMO model, are foundation for defining
Modern relevance today due to its still used for cost and assessing software
Relevance qualitative nature and estimation, but the quality attributes,
lack of specific metrics. original Boehm Model is particularly in ISO/IEC
less relevant. 25000 standards.
Relationship Between Reliability and Maintainability
• Reliability Affects Maintainability:
➢ High Reliability: When a software system is highly reliable and has fewer defects or failures,
it often requires fewer maintenance activities. Users experience fewer problems, which
means there are fewer defects to fix and less need for corrective maintenance.
➢ Low Reliability: On the other hand, a less reliable system with frequent failures and defects
places a higher maintenance burden on the development team. Corrective maintenance
efforts become more time-consuming, and users may be frustrated by recurring issues.
• Maintainability Affects Reliability:
➢ High Maintainability: A system designed for easy maintenance allows developers to quickly
address and fix issues. It also makes it easier to implement preventive maintenance, such as
applying patches or updates to address vulnerabilities. As a result, a highly maintainable
system tends to have improved reliability over time.
➢ Low Maintainability: A system with poor maintainability can hinder the resolution of defects
or the implementation of necessary updates. This can lead to a degradation in reliability, as
unresolved issues accumulate and new problems emerge.
• This section shall delineate the specific purpose and scope of the particular SQAP.
• It shall list the name(s) of the software items covered by the SQAP and the intended
use of the software.
• It shall state the portion of the software life cycle covered by the SQAP for each
software item specified.
4.2 Reference documents (Section 2 of the SQAP)- This section shall provide a complete list of
documents referenced elsewhere in the text of the SQAP.
4.3 Management (Section 3 of the SQAP) - This section shall describe organization, tasks, and
responsibilities.
4.3.1 Organization
• This paragraph shall depict the organizational structure that influences and
controls the quality of the software.
• This shall include a description of each major element of the organization together
with the delegated responsibilities.
4.3.2 Tasks
Software Metrics
1. Pressman explained as “A measure provides a quantitative indication of the extent, amount,
dimension, capacity, or size of some attribute of the product or process”.
2. Measurement is the act of determine a measure.
3. The metric is a quantitative measure of the degree to which a system, component, or process
possesses a given attribute.
4. Fenton defined measurement as “It 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”.
5. Software metrics can be defined as “The continuous application of measurement-based
techniques to the software development process and its products to supply meaningful and
timely management information, together with the use of those techniques to improve that
process and its products”.
Halstead Metrics
According to Halstead's "A computer program is an implementation of an algorithm considered to be
a collection of tokens which can be classified as either operators or operand." Halstead’s Software
metrics are a set of measures proposed by Maurice Halstead to evaluate the complexity of a software
program. These metrics are based on the number of distinct operators and operands in the program
and are used to estimate the effort required to develop and maintain the program.
1. Program Volume (V): Proportional to program size, represents the size, in bits, of space necessary
for storing the program. This parameter is dependent on specific algorithm implementation. The
properties V, N, and the number of lines in the code are shown to be linearly connected and
equally valid for measuring relative program size.
V=N*log2n
The unit of measurement of volume is the common unit for size “bits”. It is the actual size of a
program if a uniform binary encoding for the vocabulary is used. And error = Volume / 3000
2. Program Level (L): To rank the programming languages, the level of abstraction provided by the
programming language, Program Level (L) is considered. The value of L ranges between zero and
one, with L=1 representing a program written at the highest possible level (i.e., with minimum
size). The higher the level of a language, the less effort it takes to develop a program using that
language.
L = V*/V
And estimated program level is
L^ = 2 * (n2) / (n1)(N2)
3. Program Difficulty (D): This parameter shows how difficult to handle the program is. The difficulty
level or error-proneness (D) of the program is proportional to the number of the unique operator
in the program.
D = (n1/2) * (N2/n2) = 1/L
As the volume of the implementation of a program increases, the program level decreases and
the difficulty increases. Thus, programming practices such as redundant usage of operands, or
the failure to use higher-level control constructs will tend to increase the volume as well as the
difficulty.
4. Programming Effort (E): Measures the amount of mental activity needed to translate the existing
algorithm into implementation in the specified program language. The unit of measurement of E
is elementary mental discriminations.
E=V/L=D*V
5. Program Length: According to Halstead, the first Hypothesis of software science is that the length
of a well-structured program is a function only of the number of unique operators and operands.
N = N1+N2
T = E / (f * S)
The concept of the processing rate of the human brain, developed by psychologist John Stroud,
is also used. Stoud defined a moment as the time required by the human brain requires to carry
out the most elementary decision. The Stoud number S is therefore Stoud’s moments per second
with:
5 <= S <= 20. Halstead uses 18. The value of S has been empirically developed from psychological
reasoning, and its recommended value for programming applications is 18.
Stroud number S = 18 moments / second
seconds-to-minutes factor f = 60
• A variable is live from the beginning of a procedure to the end of the procedure.
• A variable is live at a particular statement only if it is referenced a certain number of statements
before or after that statement.
• A variable is live from its first to its last references within a procedure.
• It is thus possible to define average number of live variables (LV), which is the sum of the count
of live variables divided by the executable statements in a procedure.
• This is a complexity measure for data usage in a procedure or program.
Where is the average live variable metric computed from ith module.
Variable Span
The size of a span indicates the number of statements that pass between successive uses of a
variables. The average span size for a program of n spans could be computed by using the
equation:
Program Weakness
A program consists of modules. Using the average number of live variables and average life
variables (n), the module weakness has been defined as:
A program is normally a combination of various modules, hence program weakness can be a useful
measure and is defined as:
where,
WMi : weakness of ith module
WP: weakness of the program
m: number of modules in the program
Object-Oriented Metrics
Terminologies:
1. Coupling Metrics
i. Response for a Class (RFC): Number of methods (internal and external) in a class.
ii. Data Abstraction Coupling (DAC): Number of Abstract Data Types in a class.
iii. Coupling between Objects (CBO): Number of other classes to which it is coupled.
iv. Message Passing Coupling (MPC): Number of send statements defined in a class.
v. Coupling Factor (CF): Ratio of actual number of coupling in the system to the max. possible
coupling.
2. Cohesion Metrics
i. Lack of Cohesion in Methods (LCOM):
ii. Tight Class Cohesion (TCC): Percentage of pairs of public methods of the class with common
attribute usage.
iii. Loose Class Cohesion (LCC): Same as TCC except that this metric also considers indirectly
connected methods.
iv. Information based Cohesion (ICH): Number of invocations of other methods of the same class,
weighted by the number of parameters of the invoked method.
3. Inheritance Metrics
i. Depth of Inheritance Tree (DIT): The maximum length from the node to the root of the tree
ii. Average Inheritance Depth (AID): It is calculated as-
xi. Class to Leaf Depth (CLD): It measures the maximum number of levels in the inheritance
hierarchy which is below the class.
xii. Attribute Inheritance Factor (AIF): Ratio of the sum of inherited attributes in all classes of the
system to the total number of attributes for all classes.
xiii. Method Inheritance Factor (MIF): Ratio of the sum of inherited methods in all classes of the
system to the total number of methods for all classes.
4. Size Metrics
i. Number of Methods per Class (NOM): It is defined as the number of local methods defined in
a class.
ii. Number of Attributes per Class (NOA): It is defined as the sum of the number of instance
variables and number of class variables.
iii. Weighted Number Methods in a Class (WMC): Methods implemented within a class or the
sum of the complexities of all methods
iv. SIZE1: It is the number of semicolons in a class.
v. SIZE2: It is NOA + NOM.
5. Reuse Metrics
i. Reuse Ratio (U): It is given as-
iii. Function Template Factor (FTF): It is defined as the ratio of the number of functions using
function templates to the total number of functions.
iv. Class Template Factor (CTF): It is defined as the ratio of the number of classes using class
templates to the total number of classes.
Usability Metrics
Usability metrics measure the ease of use, learnability and user satisfaction for a given software.
1. Task Effectiveness: It is measured as-
where quantity measures the amount of task completed by a user and quality measures the
degree to which the output produced by the user satisfies the goals of the task. Both quantity
and quality are represented in percentages.
2. Temporal Efficiency: It is measured as-
Testing Metrics
The testing metrics can be used to monitor the status of testing and provides indication about the
quality of the product. Testing coverage metrics can be used to monitor the amount of testing being
done. These include the following basic coverage metrics:
1. Statement coverage metric describes the degree to which statements are covered while testing.
2. Branch coverage metric determines whether each branch in the source code has been tested.
3. Operation coverage metric determines whether every operation of a class has been tested.
4. Condition coverage metric determines whether each condition is evaluated both for true and for
false.
5. Path coverage metric determines whether each path of the control flow graph has been exercised
or not.
6. Loop coverage metric determines how many times a loop is covered.
7. Multiple condition coverage metric determines whether every possible combination of
conditions is covered.
8. Test Focus (TF): It is measured as-