Test Design Techniques (Black-Box and White-Box)
Domain focus
This domain tests your ability to choose and apply black-box and white-box design techniques, and to derive test cases with the right coverage. You should know equivalence partitioning, boundary value analysis, decision tables, state transition testing, use-case testing, and statement, branch, and path coverage.
Black-box techniques
- Equivalence partitioning divides inputs into classes that should be treated the same; one test per class is the minimum.
- Boundary value analysis tests values at, just below, and just above boundaries, where defects cluster. Two-value BVA uses the boundary and nearest invalid value; three-value BVA adds the nearest valid value inside the boundary.
- Decision tables capture combinations of conditions and actions, including impossible and don’t-care combinations.
- State transition testing models states, events, transitions, and guards; coverage can be all states or all transitions.
- Use-case testing exercises realistic actor–system flows, including alternative and exception paths.
White-box techniques
- Statement coverage requires every executable statement to run.
- Branch (decision) coverage requires every decision outcome to run; it subsumes statement coverage.
- Path coverage requires every path through a control-flow graph; it is usually impractical for loops.
Worked example
An age field accepts 18–65 inclusive. Equivalence partitions are valid 18–65, invalid below 18, and invalid above 65. Two-value BVA yields 17, 18, 65, 66; three-value BVA adds 19 and 64. For code if (age >= 18 && age <= 65), branch coverage needs cases that make the condition true and false; statement coverage alone could be met by a single case. If the condition uses ||, branch coverage may still miss the short-circuit combination that exposes a defect, so condition-level analysis helps.
Traps
Using one value in the middle of a partition and calling it BVA. Missing the invalid side of a boundary. Confusing statement with branch coverage. Building a decision table without checking completeness and consistency. Assuming 100% path coverage is realistic for loops.