Day1
Software Testing Introduction
● What is Software Testing? Software testing is a critical phase in software
development where the software is evaluated for defects, errors, or gaps to
ensure it meets the desired quality standards.
● Key Goals of Software Testing:
○ Quality Assurance: To ensure the software delivers on user expectations
and adheres to specified requirements.
○ Error Detection: To uncover bugs or issues before the software is
deployed to production.
○ Risk Mitigation: To prevent software failures that could negatively impact
business operations or user experience.
○ Validation: To confirm the product meets business needs and customer
requirements.
● Benefits:
○ Reduced development costs by identifying defects early.
○ Enhanced user satisfaction with high-quality software.
○ Increased confidence in the system's reliability and performance.
What is Testing?
● Detailed Definition: Testing is the systematic execution of a software application
or system to identify gaps, errors, or unmet requirements. It can be manual or
automated, and it involves verifying the system’s functionality, performance, and
security.
● Types of Testing:
○ Static Testing:
■ Done without executing the code (e.g., code reviews, document
reviews).
■ Goal: Identify errors in the early stages.
○ Dynamic Testing:
■ Involves executing the code.
■ Goal: Validate the software against requirements.
● Objectives of Testing:
○ Verify software meets requirements.
○ Detect and fix bugs.
○ Improve software reliability and performance.
Software Development Life Cycle (SDLC)
The SDLC is a systematic process used to develop high-quality software efficiently. It
includes multiple phases, each serving a specific purpose.
Phases of SDLC:
1. Requirement Analysis:
○ Activities: Collect, analyze, and document user requirements.
○ Outcome: Software Requirement Specification (SRS) document.
2. Planning:
○ Activities: Define project scope, budget, and timelines. Identify risks.
○ Outcome: Project Plan.
3. Design:
○ Activities: Create system architecture, database design, and user interface
(UI) designs.
○ Outcome: High-Level Design (HLD) and Low-Level Design (LLD) documents.
4. Development:
○ Activities: Developers write and compile the code based on design
documents.
○ Outcome: Functional software modules.
5. Testing:
○ Activities: Validate the software by executing test cases to find and fix
bugs.
○ Outcome: Bug-free, functional software.
6. Deployment:
○ Activities: Release the software to the production environment for end
users.
○ Outcome: Live, operational software.
7. Maintenance:
○ Activities: Fix issues reported by users, provide updates, and improve
functionality.
○ Outcome: Updated and maintained software.
Software Testing Methodologies
1. White Box Testing:
○ Also Known As: Glass Box Testing, Open Box Testing.
○ Key Focus: Code structure, internal logic, and paths.
○ Techniques:
■ Statement Coverage: Ensures every statement in the code is
executed at least once.
■ Branch Coverage: Ensures all possible branches in the code are
tested.
■ Path Coverage: Tests all independent paths in the code.
○ Example: In a login module, a White Box tester might verify that the
function handling password encryption correctly encrypts and stores the
password.
2. Black Box Testing:
○ Key Focus: Functional behavior of the software without knowledge of its
internal code.
○ Techniques:
■ Equivalence Partitioning: Divides input data into partitions where
all values behave the same way.
■ Boundary Value Analysis: Focuses on edge cases or boundaries of
input values.
■ Decision Table Testing: Tests combinations of inputs and their
corresponding outputs.
○ Example: In an e-commerce application, a Black Box tester might verify
that entering valid payment details processes the payment successfully.
3. Grey Box Testing:
○ Combination of White and Black Box Testing:
■ Partial knowledge of internal code and full understanding of
functional behavior.
○ Use Case:
■ Suitable for integration testing where understanding both the
internal structure and external functionality is crucial.
○ Techniques:
■ Matrix Testing: Verifies the relationship between input and output
across components.
■ Regression Testing: Ensures changes in code do not affect existing
functionality.
○ Example: Testing an application’s API, where the tester knows the
database schema and tests both functionality (Black Box) and data flow
(White Box).