TESTING
Software Engineering tutorial · PySpark.in
1. INTRODUCTION TO SOFTWARE TESTING
Definition
Software Testing is the process of evaluating a software system to identify defects, ensure quality, and verify that the software meets user requirements.
Objectives
-
Find defects
-
Ensure quality
-
Prevent failures
-
Verify requirements
-
Validate customer expectations
-
Reduce maintenance cost
-
Improve reliability
Why Testing is Important?
-
Software is complex
-
Users expect high reliability
-
Failures cause financial loss
-
Defects cost more when found late
-
Better user satisfaction
⭐ 2. SOFTWARE QUALITY
Quality
Degree to which software meets customer expectations.
Quality Assurance (QA)
-
Process-oriented
-
Ensures correct processes are followed
-
Prevents defects
Quality Control (QC)
-
Product-oriented
-
Ensures the product meets quality standards
-
Detects defects
Difference: QA vs QC
| QA | QC |
|---|---|
| Prevents defects | Detects defects |
| Process oriented | Product oriented |
| Proactive | Reactive |
⭐ 3. VERIFICATION & VALIDATION (V&V)
Verification
“Are we building the product right?”
Ensures the software meets design and requirements.
Validation
“Are we building the right product?”
Ensures the final product matches user needs.
Difference:
| Verification | Validation |
|---|---|
| Static process | Dynamic process |
| Reviews, walkthroughs | Testing, execution |
| No code execution | Code execution required |
⭐ 4. SOFTWARE TESTING LEVELS
1. Unit Testing
-
Testing individual modules
-
Done by developers
-
Tools: JUnit, NUnit
-
Focus: Functions, logic, loops
2. Integration Testing
Tests combined modules.
Types:
-
Big Bang
-
Top-down
-
Bottom-up
-
Sandwich (Hybrid)
3. System Testing
-
Complete application testing
-
Done by independent testers
-
Functional + Non-functional testing
4. Acceptance Testing
Performed by client/user
Types:
-
UAT – User Acceptance Testing
-
Alpha Testing
-
Beta Testing
⭐ 5. SOFTWARE TESTING TECHNIQUES
A. Black-Box Testing
Focus on inputs & outputs, NOT internal code.
Techniques:
-
Equivalence Partitioning
-
Divide input into valid/invalid classes
-
-
Boundary Value Analysis
-
Test at boundaries (min, max, min+1, max-1)
-
-
Decision Table
-
For complex business rules
-
-
State Transition
-
Based on states & events (ATM, login)
-
-
Use Case Testing
-
End-to-end scenarios
-
B. White-Box Testing
Focus on internal code.
Techniques:
-
Statement Coverage
-
Branch/Decision Coverage
-
Condition Coverage
-
Path Coverage
-
Loop Testing
C. Gray-Box Testing
Combination of both. Tester knows logic partially.
⭐ 6. TESTING TYPES
Functional Testing
-
Smoke testing
-
Sanity testing
-
Regression testing
-
Retesting
-
Exploratory testing
-
Ad-hoc testing
Non-Functional Testing
-
Performance testing
-
Load testing
-
Stress testing
-
Volume testing
-
Security testing
-
Compatibility testing
-
Usability testing
-
Reliability testing
-
Recovery testing
⭐ 7. STATIC TESTING
No code execution.
Includes:
-
Reviews
-
Walkthroughs
-
Inspections
-
Static analysis tools
⭐ 8. DYNAMIC TESTING
Requires execution of software.
⭐ 9. SMOKE, SANITY, REGRESSION
Smoke Testing
-
Basic build acceptance test
-
Ensures major functions work
Sanity Testing
-
Narrow & deep test
-
Checks specific functions after a build
Regression Testing
-
Ensures new changes didn’t break old features
-
Automated tools: Selenium, Cypress, QTP
⭐ 10. SOFTWARE TESTING LIFE CYCLE (STLC)
-
Requirement Analysis
-
Test Planning
-
Test Case Design
-
Test Environment Setup
-
Test Execution
-
Defect Reporting
-
Test Closure
⭐ 11. DEFECT LIFE CYCLE
Defect States:
-
New
-
Assigned
-
Open
-
Fixed
-
Retest
-
Verified
-
Reopen
-
Closed
-
Deferred
-
Rejected
More Software Engineering tutorials
All tutorials · Try the free PySpark compiler · Practice challenges