Content
- Overview
- Test Case Design Strategies
- Black-box Testing
- Equivalence Class Partitioning
- Guideline for Selecting Equivalence Classes
- Develop Test Cases
- Boundary Value Analysis
- Equivalence Class Partitioning
- Black-box Testing
Overview
- Common levels of testing
Unit/Component test: defects in a single component -> Integration test: defects in their interactions -> System test: evaluating usability, performance, ... -> Acceptance test: validation - did we build the right system?
- Goal
- Effective: reveal as many defects as possible
- Efficient: reveal defects with minimum costs
Test Case Design Strategies
Black-box Testing
Functional or specification-based testing; no knowledge of inner structure of code.
Equivalence Class Partitioning
Partition the input domain into equivalence classes where all members of a class will be processed the same way.
- Select 1 test case per equivalence class
- Assume a defect revealed by a member of a class will be revealed by all others
- If a member doesn't reveal a defect, no other members will, unless they are some subset of other equivalence classes
Guideline for Selecting Equivalence Classes
- Range values
- 1 valid covering the range
- 2 invalid outside the range
- Set of values
- 1 valid covering all set of values
- 1 invalid outside the set
Develop Test Cases
- Develop test cases for all valid ECs; a case may cover >= 1 EC (single fault assumption)
- Develop test cases for all invalid ECs; they are covered individually (the correct EC can mask the defect in another)
Single Fault Assumption
Failures are NOT the result of >= 2 faults occuring together.
Sufficient to partition into the number of ECs. Otherwise (multi-mode), partition into the product of all ECs.
Boundary Value Analysis
Probe on boundaries, where mistakes happen often, rather than elsewhere -> efficiency.
- Boundary value
- Value just below boundary
- Value just above boundary