Effective Software Testing for Quality Assurance
Software Testing
Software testing is the process of evaluating a program to identify defects before it reaches end-users.
Test Objectives
- Uncover software flaws.
- A test is successful if a defect is found.
- A test fails if defects are present but not detected.
Test Types
- Verification Test: Checks if the software meets design specifications.
- Validation Test: Checks if the software fulfills analysis qualifications.
- Operational Test: Ensures the software operates correctly.
Test Characteristics
- Observability: The results of each test case are observable.
- Controllability: The degree to which tests can be automated and optimized.
- Decomposability: Tests can be broken down into smaller parts.
- Simplicity: Reducing complex architecture and logic simplifies testing.
- Stability: Minimal changes are required during testing.
- Understandability: Clear design facilitates understanding.
Test Outcomes
Tests reveal errors, compliance issues, performance limitations, and provide an indication of quality.
Testers
- Developer: Understands the system but may be biased towards “deliverables.”
- Independent Tester: Understands the system and focuses on finding failures, driven by quality.
White Box Testing
White box testing examines the internal structure of the code.
Objective
Ensure that all statements and conditions are executed at least once.
Test Types
- Coverage testing
- Condition testing
- Loop testing
Techniques
- Flow Graph Notation: Represents the logical control flow.
- Cyclomatic Complexity: Measures the logical complexity of a program.
- Matrix Graphs: Used to derive the flow graph and determine basic paths.
Coverage Types
- Statement Coverage: Execute every statement at least once.
- Trace Coverage: The ratio of observed traces to possible traces.
- Loop Coverage: Testing loops with various iterations.
Limitations
White box testing verifies what the program does but not necessarily what it should do.
Black Box Testing
Black box testing focuses on the functional requirements without knowledge of the internal code.
Objective
Exercise every interface element.
Test Types
- Coverage testing (100% function invocation)
- Equivalence class testing
- Boundary value testing
Equivalence Class Testing
Dividing the input domain into classes to derive test cases.
Boundary Value Testing
Testing values at the edges of input ranges.
Specialized Test Environments
- GUI testing on Windows
- Menu and mouse testing
- Data entry testing
- Documentation and help testing
Software Testing Strategies
- Unit testing
- Integration testing
- Regression testing
- Validation testing
- System testing
Integration Testing
Testing during system construction, involving increasing numbers of modules.
Validation Testing
Verifying that the system meets requirements.
Unit Testing
Testing individual code modules.
System Testing
Testing the complete system for functionality, performance, reliability, security, usability, and installation.