Unit 5: SoftwareTesting
Development testing: Test Driven Development; Release
Testing: User Testing.
2.
Software testing isan important process in the software
development lifecycle . It involves verifying and validating that a
software application is free of bugs, meets the technical
requirements set by its design and development , and satisfies user
requirements efficiently and effectively.
3.
What is DevelopmentTesting?
● Testing done during software development (SDLC)
● Performed by developers or engineers
● Helps to find bugs early
● Reduces time and cost risks
● Ensures software meets requirements and goals
● It is a continuous process (done throughout development)
● Testing is integrated with coding
→ Code is tested as soon as it is written
● Helps in quick problem detection and fixing
● Supports faster project completion (meet deadlines)
4.
Who Performs Testing?
●Programmer tests their own code
● Sometimes programmer–tester pairs
● For critical systems:
○ Separate testing group
○ Maintains test records
5.
Levels of DevelopmentTesting
Development testing is done at 4 levels:
1. Unit Testing
2. Integration Testing
3. System Testing
4. User Acceptance Testing
8.
UnitTesting
● UnitTesting isa software testing method
● Tests individual units/components of a program
● A unit can be:
→ Function
→ Method
→ Module
→ Object
● Done during coding phase (SDLC)
● Performed by developers (sometimes QA)
● It is a White-box testing technique
● It is the first level of testing (before integration testing)
9.
Features of UnitTesting
● Tests small, independent parts of code
● Each unit is tested separately (isolated)
● Helps to verify correctness of code
● Uses test cases with different inputs
● Errors are found at a very early stage
● Makes debugging easy
10.
Advantages of UnitTesting
● Improves code quality
● Helps to find bugs early
● Saves time and cost
● Reduces risk during development
● Makes code changes (refactoring) easier
● Ensures each unit works before integration
12.
Integration Testing
● Testingwhere multiple modules are combined and
tested
● Done after Unit Testing
● Checks interaction between modules
● Ensures data flow and sequence is correct
● Important for large and complex systems
13.
Types / Approaches
1.Big Bang Approach
○ All modules are combined at once and tested
2. Bottom-Up Approach
○ Start testing from low-level modules → move upward
○ Uses Driver
3. Top-Down Approach
○ Start testing from top-level modules → move downward
○ Uses Stub
4. Hybrid / Sandwich Approach
○ Combination of Top-Down + Bottom-Up
14.
Advantages & Disadvantages
Advantages:
●Easy to test module interaction
● Can be used early and later stages
● Improves overall system reliability
Disadvantages:
● Finding errors can be difficult in some approaches
● May require extra tools (Driver/Stub)
● Can be time-consuming for large systems
15.
Stub
● A Stubis a dummy program/module
● Used in Top-Down Testing
● Simulates lower-level modules
● Receives input from main (top) module
● Returns dummy output
Used when actual lower modules are not ready
16.
Driver
● A Driveris a dummy program/module
● Used in Bottom-Up Testing
● Simulates higher-level modules
● Calls the lower-level modules
Used when main module is not ready
Example:
Driver calls a function → checks its output
17.
Why Integration Testing?
●Ensures modules work together properly
● Detects errors in flow or sequence
● Needed when:
→ Many developers work on different modules
→ External libraries are used
→ System is large and complex
18.
System Testing
● Teststhe complete system
● All components are integrated
● Focus on:
○ Overall system behavior
● Goal: Check full system performance
19.
System Testing isa type of software testing that is performed on a completely
integrated system to evaluate the compliance of the system with the
corresponding requirements. In system testing, integration testing passed
components are taken as input.
User AcceptanceTesting
User AcceptanceTesting (UAT) ensures software meets user needs and
functions correctly in real-world scenarios, confirming usability, business
requirements, and readiness for deployment.
User Acceptance Testing (UAT) is the final phase of software testing
where real end users test the software to ensure it meets their needs and
business requirements. It involves executing real-world scenarios to verify
the software’s functionality, usability, and readiness for deployment.
UAT ensures the system behaves as expected in practical applications,
reducing post-launch issues and enhancing user satisfaction.
25.
Types of UserAcceptance Testing
● Alpha Testing: Internal testing to verify software functionality before
release.
● Beta Testing: External users test the software and provide feedback.
● Business Acceptance Testing (BAT): Validates the software aligns with
business objectives.
● Operational Acceptance Testing (OAT): Ensures readiness for deployment,
checking performance and recovery.
● Regulation Acceptance Testing (Compliance Testing): Ensures compliance
with legal, regulatory, and industry standards.
● Black Box Testing: Tests software functionality based on user inputs and
expected outputs, without internal knowledge.
26.
Importance of UAT
●Ensures Usability: UAT ensures the software is user-friendly,
meeting end-user expectations and providing a seamless user
experience.
● Gets User Feedback: Helps collect suggestions from real users.
● Meets Requirements: Checks if the software solves the
intended problem.
● Reduces Risks: Finds issues before the software is launched.
● Increases Satisfaction: Users are happier with the final product.
● Builds Trust: Gives confidence to stakeholders.
● Improves Quality: Makes the software better and more reliable.
● Smooth Implementation: Helps users easily adopt the system.
Testing and Debugging
●Testing → Finds errors
● Debugging → Fixes errors
● Both processes go together
30.
Test Driven Development
TestDriven Development (TDD) is a method where you write tests first, then write the
actual code.
Test → Code → Improve → Repeat
31.
Steps inTDD (Red–Green–Refactor)
1.Red (WriteTest)
○ Write a test for a feature
○ The test will fail (because code is not written yet)
2. Green (Write Code)
○ Write simple code to pass the test
3. Refactor (Improve Code)
○ Clean and improve the code
○ Make it better without breaking the test
1. Inside-OutApproach
Start fromsmall parts (functions) → then build full system
Simple Points:
● Test small units first
● Build system step by step
● Design improves during coding
● Easy for beginners
● Uses fewer mocks
● Avoids unnecessary complexity
35.
Outside-In Approach
Start fromuser view → then go inside
Simple Points:
● Test user behavior first (UI level)
● Then develop internal code
● Uses mocks and stubs
● Harder to learn
● Ensures system meets business needs
● Design is planned from the beginning
36.
Release Testing
Meaning:
Release testingis done before software is given to users.
Who does it?
Testing team (QA team)
Purpose:
Check if the software is ready for release
Ensure it meets requirements
Find final bugs
Example:
Before launching a college website, testers check:
● Login works
● Forms submit correctly
● No errors occur
37.
When is ReleaseTesting Performed?
Release testing is performed at the end of the software
development cycle, just before the software is released to users or
the market.
To detect and fix final defects
To ensure the software is ready for release
Security Testing
Checks forthreats, vulnerabilities, and risks.
Purpose:
Protect data from hackers
Ensure system safety
40.
Compatibility Testing
Checks whethersoftware works on different environments.
Includes:
● Different devices (mobile, laptop)
● Browsers
● Operating systems
41.
Regression Testing
Ensures thatnew changes do not affect existing
features.
Example:
● After adding a new feature, old features still work
properly