Software Quality Assurance Complete Notes
Software Quality Assurance Complete Notes
Chapter # 1
Introduction to Software Quality Assurance: What is quality, quality assurance, Quality in the
project manager’s triangle, The Quality challenge, Quality control v/s Quality assurance,
Testing concepts and issues?
Rao Shahrukh
2 Software Quality Assurance
• Regulatory Compliance: SQA ensures compliance with regulatory standards and industry best
practices, which is crucial for organizations operating in regulated environments such as healthcare,
finance, and government sectors.
• Maintenance Costs: By ensuring that the software is released with high quality, SQA helps in reducing
ongoing maintenance costs associated with fixing defects and addressing customer issues.
• Brand Reputation: Software quality directly influences the brand reputation of an organization.
Consistently delivering high-quality software products helps in building a positive brand image and
reputation.
Quality: Quality in software refers to the degree to which a software product meets specified
requirements and user expectations. It encompasses attributes such as functionality, reliability, usability,
performance, and maintainability.
Quality Assurance (QA): QA is the systematic process of ensuring that quality standards and procedures
are defined and adhered to throughout the software development lifecycle.
Project Management Triangle:
• The project management triangle is a model that illustrates the relationship between three key
constraints in project management: scope, time, and cost. The Project Management Triangle, also known
as the Triple Constraint or Iron Triangle.
Scope: The scope of a project refers to the work that needs to be done to complete the project. It includes
all of the features and functions that will be delivered as part of the project.
Time: The time constraint refers to the amount of time that is available to complete the project. This
includes the time it takes to complete all of the tasks that are required to deliver the project.
Rao Shahrukh
3 Software Quality Assurance
Cost: The cost constraint refers to the amount of money that is available to complete the project. This
includes the cost of all of the resources that are required to deliver the project
Quality Challenges
Software Quality Assurance (SQA) is crucial for ensuring a polished final product, but even the best SQA
processes can face roadblocks that lead to quality challenges.
Challenge 1: Incomplete Test Coverage
This arises when not all functionalities, configurations, or edge cases of the software are tested. It can
happen due to:
Time Constraints: Testing everything thoroughly can be very time-consuming, especially for complex
software. Deadlines often force testers to prioritize critical features and leave less crucial areas untested.
Limited Resources: Teams might not have enough testers or lack the specialized skills required to
comprehensively test all aspects of the software.
Unclear Requirements: If the software requirements are ambiguous or poorly documented, testers might
struggle to identify the full scope of what needs to be tested.
Solution:
Risk-Based Testing: Focus testing efforts on high-risk areas of the software based on potential impact
and likelihood of failure.
Prioritization: Clearly define critical features and prioritize testing them first.
Automation: Utilize automated testing tools to handle repetitive tasks and free up testers for more
exploratory testing.
Exploratory Testing: Dedicate time for exploratory testing where testers can delve into the software and
discover unforeseen issues.
Clear Requirements: Ensure requirements are well-defined, documented, and reviewed by both
developers and testers.
Challenge 2: Ineffective Defect Management
This occurs when bugs are not reported properly, tracked efficiently, or resolved in a timely manner. This
can lead to:
Duplicate Defects: The same bugs get reported multiple times, wasting time and resources.
Unresolved Defects: Bugs linger in the system because they aren't prioritized or addressed effectively.
Unclear Communication: Developers and testers lack clear communication regarding bugs, leading to
confusion about who is responsible for fixing them.
Solution:
Rao Shahrukh
4 Software Quality Assurance
Standardized Reporting: Implement a bug tracking system with clear guidelines for reporting defects,
including steps to reproduce and expected behavior.
Prioritization: Classify bugs based on severity and prioritize fixing critical bugs that impact core
functionalities.
Clear Ownership: Assign clear ownership to each bug, ensuring developers understand what needs to be
fixed and testers can track progress.
Communication & Collaboration: Foster open communication between developers and testers to
discuss bugs, identify root causes, and find solutions collaboratively.
Challenge 3: Lack of Automation Over-reliance on manual testing can be slow, inefficient, and prone to
human error. This can lead to:
Repetitive Testing: Tedious tasks like regression testing eat into valuable time that could be spent on
more strategic testing efforts.
Inconsistent Testing: Manual testing can vary between testers, leading to inconsistencies and potentially
missed bugs.
Slow Feedback: Identifying and fixing bugs can take longer due to the time required for manual testing.
Solution:
Identify Automation Opportunities: Look for repetitive tasks and frequently changing areas that are
well-suited for automation.
Invest in Automation Tools: There are various automation tools available for different testing needs.
Develop & Maintain Automation Scripts: Create robust and maintainable automation scripts to ensure
their effectiveness over time.
Combine Automation with Manual Testing: While automation offers significant benefits, it shouldn't
replace manual testing entirely. Utilize both approaches for optimal coverage.
Quality Control V/s Quality Assurance:
Software Quality Assurance (SQA) and Quality Control (QC) are two essential components of the
software development process, each playing a distinct role in ensuring the overall quality of the software
product. While they are often used interchangeably, it's crucial to understand their differences to
effectively manage and improve software quality.
Software Quality Assurance (SQA): SQA focuses on ensuring that the software development process
follows predefined quality standards and procedures. It is a proactive approach that aims to prevent
defects by implementing processes and standards throughout the software development lifecycle.
Quality Control (QC): QC, on the other hand, involves the actual testing and inspection of the software
product to identify defects and deviations from quality standards. It is a reactive approach that aims to
detect and correct defects after the software is developed.
QA (Proactive): Ensures a quality product by preventing defects from occurring in the first place. It's
about building quality into the development process.
Rao Shahrukh
5 Software Quality Assurance
QC (Reactive): Identifies defects in the final product to ensure it meets quality standards. It's about
catching and fixing issues before they reach the customer.
Activities:
QA:
• Defining quality standards and requirements.
• Implementing testing processes and procedures.
• Conducting risk assessments to identify potential problems.
• Training developers on best practices for building quality software.
• Reviewing code for potential issues.
QC:
• Functional testing: Verifying features work as intended.
• Usability testing: Ensuring the software is user-friendly.
• Performance testing: Measuring speed and stability.
• Compatibility testing: Checking if the software runs on different devices and operating systems.
• Defect identification and reporting.
Timing:
SQA: Begins at the initiation of the software development process and continues throughout the entire
lifecycle. It is concerned with setting up processes and standards before defects occur. QC: Takes place
during the later stages of the software development process, primarily after the completion of coding. It
involves executing tests and inspections to find and fix defects.
Goal:
SQA: The primary goal of SQA is to ensure that the software development process is efficient, effective,
and capable of producing a high-quality product. It focuses on preventing defects from occurring in the
first place.
QC: The main goal of QC is to identify defects in the software product and ensure that it meets the
specified quality requirements. It focuses on detecting and correcting defects before the software is
released to the customer.
Responsibility:
SQA: The responsibility for SQA lies with the entire software development team, including project
managers, developers, testers, and quality assurance professionals. It requires collaboration and adherence
to established processes and standards.
QC: The responsibility for QC typically lies with the testing team, whose primary role is to identify and
report defects in the software product. However, QC activities may involve collaboration with other
stakeholders to address quality issues effectively.
Rao Shahrukh
6 Software Quality Assurance
Rao Shahrukh
7 Software Quality Assurance
Example: Testing if the interface is intuitive and easy to navigate for users with varying levels of
technical expertise.
Solution: Conduct user testing sessions with a representative group of users, observing their interactions
and gathering feedback.
• Performance Testing: Measures how well the software performs under load (speed, responsiveness,
resource usage).
Example: Testing how the software behaves when a large number of users access it simultaneously,
ensuring it maintains acceptable response times.
Solution: Use performance testing tools to simulate load and analyze performance metrics. Optimize
code and infrastructure if bottlenecks are identified.
• Compatibility Testing: Ensures the software works correctly on different platforms, browsers, devices,
and operating systems.
Example: Testing the software on different versions of Windows, macOS, and mobile operating systems
(iOS, Android) to identify compatibility issues.
Solution: Use emulators or simulators to test on various platforms. Develop the software with a focus on
crossplatform compatibility.
• Security Testing: Identifies and mitigates vulnerabilities that could be exploited by attackers.
Example: Testing the software for common security vulnerabilities like SQL injection, cross-site
scripting (XSS), and insecure data storage.
Solution: Employ security testing tools to scan code for vulnerabilities. Implement secure coding
practices and follow best practices for data protection.
Common Testing Issues and Solutions:
• Incomplete or Inaccurate Requirements: Testing can only be as good as the requirements it's based
on.
Solution: Work closely with developers and stakeholders to ensure requirements are clear, concise, and
testable.
• Inadequate Test Coverage: Not all functionalities or edge cases are tested, potentially leading to
missed defects.
Solution: Use a risk-based approach to prioritize testing efforts, focusing on critical areas and high-risk
functionalities. Employ exploratory testing techniques to uncover unexpected issues.
• Limited Testing Time or Resources: Time and resource constraints can compromise testing
thoroughness.
Solution: Prioritize testing based on impact and risk. Leverage automation tools to streamline repetitive
tasks.
• Regression Bugs: Fixes in one area introduce unintended side effects in another.
Rao Shahrukh
8 Software Quality Assurance
Solution: Implement a robust regression testing strategy, including automated regression tests that are
executed after any code changes.
• Communication Gaps: Lack of communication between testers, developers, and other stakeholders can
create misunderstandings and delays.
Solution: Foster collaboration through regular meetings, defect tracking systems, and clear
documentation. Establish a culture of open communication and shared ownership of quality
Chapter # 2
Quality Assurance in Software Projects: Software phases, Principles and practices, Quality
management, Quality assurance and standards, Quality planning and quality control.
Rao Shahrukh
9 Software Quality Assurance
2. Design Phase: A lack of quality in the design process can invalidate good requirements specification
and make correct implementation difficult. Industry practice shows that using checklists during design
helps improve design quality.
3. Implementation Phase: Code reviews, walkthroughs, and quality audits are crucial activities to ensure
quality during implementation
4. Maintenance Phase: Continuous improvement, riskbased approach, and stakeholder involvement are
essential for maintaining software quality during the maintenance phase.
It includes principles and practices like:
Quality Planning: Defining specific quality standards and determining necessary processes to achieve
them.
Quality Control (QC): Enforcing quality standards by inspecting and testing the software product during
and after development.
Quality Assurance: Improving the processes used to make the product, including process standardization
and evaluation.
Quality Management: Maintaining and enhancing software quality through leadership engagement,
resource management, and risk management.
Software Metrics and Measurement: Assessing the effectiveness of SQA activities using metrics like
defect density, code coverage, and customer satisfaction.
Preventive and Corrective Actions: Eliminating causes of potential and detected nonconformities or
defects.
Continuous Improvement: Ongoing efforts to improve all processes based on feedback and iterative
learning. SQA processes and techniques include code reviews, automated testing, and Continuous
Integration and Continuous Delivery (CI/CD) SQA ensures software quality, saves time and cost,
improves reliability, and cuts maintenance costs
Chapter # 3
Verification and Validation: Formal Verification, Planning verification and validation, Critical system
Validation, Reliability validation, Principles of software validation, Software verification
Rao Shahrukh
10 Software Quality Assurance
verification checks whether the software is designed and developed as per the specified requirements,
while validation checks if the software (end product) has met the client's true needs and expectations.
Verification
Verification is a process of determining if the software is designed and developed as per the specified
requirements. It is a static practice of verifying documents, design, code, and program. Verification
includes all the activities associated with producing high-quality software, such as inspection, design
analysis, and specification analysis. It is a relatively objective process, and it helps in lowering the
number of defects that may be encountered in the later stages of development, reducing the chances of
failures in the software application or product, and building the product as per the customer specifications
and needs.
Validation
Validation, on the other hand, is the process of evaluating the final product to check whether the software
meets the customer expectations. It is a dynamic mechanism of validating and testing the actual product.
Validation is a one time process that starts only after verifications are completed.
Rao Shahrukh
11 Software Quality Assurance
Rao Shahrukh
12 Software Quality Assurance
Formal Verification
Formal verification in Software Quality Assurance (SQA) is the process of using mathematically rigorous
procedures to confirm that software models and code behave correctly. It involves systematically
searching through possible execution paths of software models or code to identify errors in the design.
Formal verification can be performed on models, generated code, and hand code to detect errors, generate
test vectors, and ensure conformance to specifications. Unlike traditional testing methods that rely on
Rao Shahrukh
13 Software Quality Assurance
concrete data values, formal verification techniques work on models of system behavior, including test
scenarios and verification objectives that describe desired and undesired system behaviors. This approach
complements simulation and provides a deeper understanding of software designs, helping to improve
software quality and reliability.
Planning Verification and Validation
Planning for verification and validation is a concurrent activity with core and development teams
throughout the project life cycle. During this phase, the software or system under test is documented in
scope, and a preliminary test plan and refinement are made. Tools, test environment, development
strategy, and identifying the requirements through inspection or analysis are also identified during this
phase.
Chapter # 4
Rao Shahrukh
14 Software Quality Assurance
Software Quality Assurance: Planning for Software Quality Assurance, Software Quality Assurance
(SQA) Plans, SQA-Organizational level initiatives, SQA planning (Observations, Numbers, Results),
Rao Shahrukh
15 Software Quality Assurance
Example: Risks in software development could include scope changes, resource constraints, technical
challenges, and external dependencies. Risk management strategies may involve risk identification,
assessment, mitigation, and monitoring throughout the project.
6. Quality Control Measures
Quality control measures are implemented to monitor and evaluate the quality of software deliverables
during the development process. These measures help identify defects early and ensure that the software
meets quality standards.
Example: Quality control measures may include code reviews, inspections, testing activities, defect
tracking, and adherence to coding standards to maintain software quality throughout the development
lifecycle.
Rao Shahrukh
16 Software Quality Assurance
Rao Shahrukh
17 Software Quality Assurance
Plan: In this stage, objectives and processes are established to deliver the desired results. This includes
identifying resources, setting goals, and developing a plan of action.
Do: In this stage, the plan is put into action. The team carries out the objectives and processes established
during the planning phase.
Check: During this stage, the data and results gathered from the doing phase are evaluated. Data is
compared to the expected outcomes to see any similarities and differences. The testing process is also
evaluated to see if there were any changes from the original test created during the planning phase.
Act: In this stage, a process is improved based on the data and results gathered during the checking phase.
Records from the doing and checking phases help identify issues with the process. These issues may
include problems, non conformities, opportunities for improvement, inefficiencies, and more.
PDCA cycle is a useful tool for business process improvement, providing a structured approach to
continuous improvement. It is a versatile technique that can be applied across industries and
organizational types, helping to simplify processes, minimize errors, and create standard operating
procedures. However, it requires commitment and buy-in from leadership and a firm commitment to the
process to be effective in the long term
Ch 8
Rao Shahrukh
18 Software Quality Assurance
Rao Shahrukh
19 Software Quality Assurance
5. Automated Quality Assurance Automation is a key initiative for improving efficiency and
consistency in SQA. This includes automated testing, continuous integration/continuous deployment
(CI/CD), and automated code analysis tools.
Example: An organization sets up a CI/CD pipeline where every code change triggers automated unit
tests, integration tests, and static code analysis. This automation reduces the risk of introducing
defects and accelerates the development process.
6. Risk Management and Quality Metrics Risk management involves identifying and mitigating
risks that could impact software quality. Quality metrics provide quantitative data to assess and
improve quality.
Example: The organization creates a risk management plan that identifies potential risks (like
technical debt or skill gaps) and establishes mitigation strategies. Key quality metrics, such as defect
density, code coverage, and customer satisfaction, are tracked to measure success.
7. Cross-Functional Collaboration Collaboration among different teams (e.g., development, QA,
operations, customer support) ensures that quality is addressed from multiple perspectives and
reduces communication barriers.
Example: An organization establishes cross-functional teams for each project, with representatives
from development, QA, and operations. Regular meetings ensure alignment on quality goals and help
resolve issues quickly
Ch 9
Introduction to SQA Planning
Software Quality Assurance (SQA) Planning is the process of establishing a plan to ensure that the
software meets quality standards.
Purpose: To maintain high-quality software by detecting and resolving issues early in the development
process.
Key Components of SQA Planning
Observations: Gathering qualitative and quantitative data to understand the current quality status.
Numbers: Metrics and measurements used to evaluate software quality.
Results: The outcomes and benefits of implementing SQA planning.
Observations in SQA Planning
Qualitative Observations:
Stakeholder feedback: Gathering input from users, clients, and team members.
Process reviews: Examining the development and QA processes.
Defect analysis: Identifying common issues and their causes.
Quantitative Observations:
Rao Shahrukh
20 Software Quality Assurance
Chapter # 5
Software Testing: Specification based test construction techniques, Black box, Whitebox and grey-
box testing etc.
Software Testing
Rao Shahrukh
21 Software Quality Assurance
Software testing is a process used to identify errors, gaps, or missing requirements in a software
application. It involves executing software/system components to evaluate whether it meets specified
requirements and ensuring that it's error-free.
Key Terminology
Test Case: A specific scenario with defined inputs, execution conditions, and expected results.
Test Suite: A collection of related test cases.
Test Environment: The configuration of software, hardware, and network settings used during testing.
Test Data: The data used to test the system.
Defect/Bug: A variance between expected and actual outcomes.
Rao Shahrukh
22 Software Quality Assurance
Rao Shahrukh
23 Software Quality Assurance
Chapter # 6
Tools and Framework for software testing: Jtest, JUnit, J Walk, Power Mock, Test NG etc.
Rao Shahrukh
24 Software Quality Assurance
JWalk:
JWalk is a mutation testing tool that evaluates the effectiveness of test suites by introducing faults into the
source code and checking if the tests can detect them.
Example: In the banking application, JWalk can mutate the source code of the Account class by
introducing faults like swapping arithmetic operations or changing conditional expressions. It then checks
if the existing test suite can detect these faults.
Power Mock:
PowerMock extends mocking libraries like Mockito and EasyMock, allowing mocking of static methods,
constructors, and final classes, which are otherwise challenging to mock.
Example: Let's say the banking application relies heavily on static utility classes for logging or
validation. Using PowerMock, you can mock these static methods to simulate different scenarios, such as
successful and failed transactions, without altering the actual implementation.
Ch 12
Chapter # 7
Comprehensive Software Testing Techniques for SDLC: Control flow oriented test construction
techniques, Data flow oriented test construction techniques, Clean-room approach to quality
assurance.
Software Quality Assurance (SQA) ensures software meets requirements and standards. Here’s a
simplified overview of comprehensive testing techniques used throughout the Software Development Life
Cycle (SDLC).
Introduction to Software Testing
Software Testing: The process of evaluating software to ensure it meets requirements and is free from
defects.
Goals of Software Testing:
Verify and Validate: Make sure software works as expected.
Find Defects: Identify and fix bugs before release.
Ensure Quality: Deliver a high-quality product.
Rao Shahrukh
25 Software Quality Assurance
Rao Shahrukh
26 Software Quality Assurance
Chapter # 8
Product Quality and Process Quality: Standards for process quality and standards for product quality.
Rao Shahrukh
27 Software Quality Assurance
Rao Shahrukh
28 Software Quality Assurance
Rao Shahrukh
29 Software Quality Assurance
Rao Shahrukh
30 Software Quality Assurance
Chapter # 9
Testing Documents: Walkthroughs and Inspections, Structure, Checklist, Audits, Roles and
responsibilities (Reviews, Inspections, etc), How to make reviews and inspections most effective
Testing Documents
Types of Testing Documents
1. Test Plan
Outlines the strategy, objectives, resources, schedule, and scope of testing.
Example: A project test plan detailing the testing phases, types of tests (unit, integration, system),
resources required, and schedule.
2. Test Cases
Specific conditions under which a new functionality is tested.
Example: Test cases for a login module including valid, invalid, and boundary inputs.
3. Test Scripts
Step-by-step instructions to execute test cases.
Example: Automated test scripts written in Selenium for web application testing.
Rao Shahrukh
31 Software Quality Assurance
Rao Shahrukh
32 Software Quality Assurance
4. Structure
Document Structure
• Title Page: Includes document title, version, author, and date.
• Table of Contents: Lists sections and subsections.
• Introduction: Purpose, scope, and overview.
• Body: Detailed content (e.g., test cases, scripts).
• Summary: Conclusions and observations.
• Appendices: Additional information and references.
Review Meeting Structure
1. Preparation: Review documents beforehand.
2. Opening: Introduction and agenda.
3. Review: Discuss each item, identify defects.
4. Action Items: Assign responsibilities for corrections.
5. Closing: Summarize findings, next steps.
Rao Shahrukh
33 Software Quality Assurance
Rao Shahrukh
34 Software Quality Assurance
Rao Shahrukh
35 Software Quality Assurance
Chapter # 10
Quality Assurance beyond Testing: Defect Prevention and Process Improvement, Software
Inspection, Fault Tolerance and Failure Containment, Comparing Quality Assurance Techniques
and Activities.
Rao Shahrukh
36 Software Quality Assurance
Inspection Process
1. Planning
Define objectives, scope, and participants.
Example: Planning an inspection for a critical module of a banking application.
2. Overview Meeting
Introduce the document and provide an overview.
Example: The author explains the design document to the inspection team.
3. Preparation
Reviewers examine the document individually using checklists.
Example: Reviewers identifying potential security issues in the code.
4. Inspection Meeting
Discuss findings, identify defects, and document issues.
Example: A meeting where defects are logged and categorized by severity.
5. Rework
Author corrects the identified defects.
Example: The developer fixes the identified issues in the code.
6. Follow-up
Verify that all defects have been addressed.
Example: A follow-up meeting to ensure all corrections have been made.
Benefits of Software Inspections
• Early detection of defects.
• Improved communication among team members.
• Enhanced software quality.
• Reduced cost of fixing defects.
Fault Tolerance and Failure Containment
Fault Tolerance Techniques
1. Redundancy
Using additional components to ensure system reliability.
Example: Redundant servers in a data center to prevent downtime.
2. Exception Handling
Rao Shahrukh
37 Software Quality Assurance
Common QA Techniques
1. Reviews and Inspections
Rao Shahrukh
38 Software Quality Assurance
Rao Shahrukh
39 Software Quality Assurance
Chapter # 11
Quantifiable Quality Improvement: Feedback Loop and Activities for Quantifiable Quality
Improvement.
Rao Shahrukh
40 Software Quality Assurance
2. Feedback Loop
Definition and Importance
• Feedback Loop: A system where outputs of a process are used as inputs to drive future improvements. •
Importance: Ensures continuous improvement by integrating lessons learned and data from previous
cycles back into the development process.
Feedback Loop Process
Rao Shahrukh
41 Software Quality Assurance
1. Data Collection
Gather metrics and feedback from various sources.
Example: Collecting defect reports from the testing team and customers.
2. Analysis
Analyze the data to identify trends and root causes.
Example: Analyzing defect trends to identify common causes of failures.
3. Action Planning
Develop action plans to address identified issues.
Example: Creating a plan to refactor high-risk code areas with frequent defects.
4. Implementation
Implement the action plans and improvements.
Example: Refactoring the identified code areas and adding more test cases.
5. Monitoring and Review
Monitor the effectiveness of implemented actions.
Example: Reviewing defect density metrics after refactoring to assess improvement.
6. Feedback Integration
Integrate feedback and lessons learned into future cycles.
Example: Updating coding standards and best practices based on recent findings.
3. Activities for Quantifiable Quality Improvement
Implementing Metrics
1. Define Clear Metrics
Choose metrics that align with project goals and quality objectives.
Example: Selecting defect density and test coverage as key metrics for a project.
2. Automate Data Collection
Use tools to automatically collect and report metrics.
Example: Integrating automated testing tools that generate coverage reports.
3. Regular Reporting
Create regular reports to track progress and identify issues.
Example: Weekly reports on defect trends and test coverage.
4. Benchmarking
Rao Shahrukh
42 Software Quality Assurance
Rao Shahrukh