1.
Definition and Importance of Testing
Definition:
Software testing is the process of evaluating a software application to identify any defects,
ensure it meets specified requirements, and confirm it is free from errors. The primary goal
of testing is to ensure the software's quality, reliability, and performance.
Importance:
- Defect Detection: Identifies errors, bugs, or failures in the software.
- Quality Assurance: Ensures the product meets customer expectations.
- Cost Efficiency: Fixing bugs during development is cheaper than post-deployment.
- Risk Reduction: Reduces the risk of system failures and financial losses.
- Customer Satisfaction: High-quality software leads to better user experience and trust.
2. Black-box vs. White-box Testing
| Aspect | Black-box Testing | White-box Testing |
|-------------------|---------------------------------------------------|---------------------------------------------------|
| Definition | Testing without knowledge of the internal code. | Testing with full knowledge of
internal code. |
| Focus | Input/output and functionality. | Logic, code paths, and internal
structures. |
| Performed by | Testers or end-users. | Developers or skilled testers with
coding knowledge.|
| Techniques | Equivalence partitioning, boundary value analysis.| Statement coverage, branch
coverage, path testing.|
| Example | Testing login functionality by input testing. | Testing all code branches of the
login function. |
3. Testing Levels and Techniques
Definition of Integration Testing:
Integration testing involves testing multiple modules or components of a software system
together to ensure they work as expected when integrated.
Example:
A banking application has modules for login, transactions, and account details. Integration
testing verifies that after login, the user can view account details and perform transactions
seamlessly.
Techniques in Integration Testing:
- Top-down Integration Testing: Testing starts from the top module and progresses to lower
modules.
- Bottom-up Integration Testing: Testing starts from the lower modules and integrates upward.
- Hybrid Integration Testing: Combines both top-down and bottom-up approaches.
4. Test Automation
Advantages of Test Automation:
- Efficiency: Speeds up repetitive testing tasks, especially regression testing.
- Accuracy: Reduces human errors during test execution.
- Reusability: Automated test scripts can be reused across different projects.
- Cost-Effective in Long Run: Although initial setup is costly, it reduces manual efforts over time.
- Continuous Testing: Supports CI/CD pipelines by allowing frequent and fast testing.
- Scalability: Handles large-scale test cases easily.
5. Defect Lifecycle
Definition:
The defect lifecycle (or bug lifecycle) is the process a defect undergoes from its identification to
resolution and closure.
Stages:
1. New: Defect is identified and logged.
2. Assigned: Assigned to a developer for fixing.
3. Open: Developer starts analyzing and fixing the defect.
4. Fixed: Defect is resolved by the developer.
5. Retest: Tester verifies the fix.
6. Closed: Defect is resolved and no longer exists.
7. Reopened (if necessary): If the defect persists, it is reopened.
Diagram:
New -> Assigned -> Open -> Fixed -> Retest -> Closed
^ v
Reopened (if needed)