Software Testing
Introduction
Software testing is the process of evaluating a software application to detect and fix defects,
verify its functionality, and ensure it meets user requirements. It is a crucial part of the
software development lifecycle (SDLC) to ensure quality and reliability.
Fundamentals of Software Testing
1. Purpose: Ensure the software meets specifications and is defect-free.
2. Principles:
• Testing shows the presence of defects.
• Early testing reduces cost and effort.
• Exhaustive testing is impossible.
• Defects cluster around specific areas.
Software Test Process
1. Test Planning:
• Define scope, objectives, and resources.
• Create test strategies and plans.
2. Test Design:
• Develop test cases and select test data.
3. Test Execution:
• Execute test cases and log results.
4. Defect Reporting:
• Identify and report issues for resolution.
5. Test Closure:
• Evaluate test results and deliver final reports.
Testing Levels
1. Unit Testing:
• Tests individual components for functionality.
• Performed by developers.
2. Integration Testing:
• Verifies interactions between integrated modules.
3. System Testing:
• Validates the complete system’s compliance with requirements.
4. Acceptance Testing:
• Conducted by users to ensure the software meets business needs.
Test Criteria
1. Entry Criteria: Define conditions under which testing can begin (e.g., code
completion).
2. Exit Criteria: Define conditions to determine when testing can be concluded (e.g., zero
critical defects).
Test Case Design
1. Definition: A test case is a set of conditions or inputs to test specific functionality.
2. Components:
• Test ID
• Test Objective
• Preconditions
• Test Steps
• Expected Result
• Actual Result
3. Approaches:
• Black-Box Testing: Focus on input-output behavior.
• White-Box Testing: Analyze internal code structure.
Test Oracles
1. Definition: A mechanism to determine whether the test outcomes are correct.
2. Types:
• Human Oracle: Domain experts verify results.
• Automated Oracle: Tools or scripts validate outcomes.
Test Techniques
1. Static Testing Techniques:
• Code Reviews
• Walkthroughs
• Inspections
2. Dynamic Testing Techniques:
• Functional Testing (Black-Box Techniques):
• Equivalence Partitioning
• Boundary Value Analysis
• Structural Testing (White-Box Techniques):
• Statement Coverage
• Branch Coverage
Advantages of Software Testing
1. Detects and resolves defects early.
2. Ensures customer satisfaction.
3. Enhances software performance and reliability.
4. Promotes confidence in product deployment.
Disadvantages of Software Testing
1. Testing cannot prove the absence of defects entirely.
2. Time and cost-intensive process.
3. Complex scenarios might not be thoroughly tested.
Diagram/Representation
Test Test Case Test Defect
Requirements Test Closure
Planning Design Execution Reporting
Conclusion
Software testing is a vital part of the development lifecycle, ensuring the delivery of
high-quality and reliable applications. By employing systematic test processes, various levels
of testing, and appropriate test techniques, organizations can ensure that their software
meets user needs and functions as intended.