What is test design?
Test design creates test cases that efficiently cover system functionality with as few cases as possible.
Equivalence partitioning
Divide input data into partitions: groups of values the system handles in the same way. Choose one test case from each partition.
💡
Example: an age field accepts 18–65. Partitions are below 18 (invalid), 18–65 (valid), and above 65 (invalid).
Boundary value analysis
Errors most often hide at range boundaries. Test the minimum, minimum−1, maximum, and maximum+1.
python
# Boundary values for ages 18-65
test_cases = [17, 18, 19, 64, 65, 66]
for age in test_cases:
print(f"Age {age}: {'valid' if 18 <= age <= 65 else 'invalid'}")