Testing every possible input is impossible — structured selection is the only practical alternative
A password field that accepts 8 to 20 characters has millions of possible inputs. Testing all of them would take years. Yet testers routinely achieve high confidence in such fields with just 4 to 6 carefully chosen values.
Equivalence Partitioning (EP) and Boundary Value Analysis (BVA) are the two most tested techniques on the CTFL exam. They turn the problem of "which inputs to test" from a guessing game into a calculation.
// example: paypal — password field testing
Equivalence Partitioning & BVA — CTFL 4.0.1
Equivalence Partitioning (EP)
EP divides input data into partitions (groups) where all members of a partition are expected to be processed the same way. If one value in a partition causes a defect, all values in that partition should cause the same defect.
- Valid partitions — inputs the system should accept and process correctly
- Invalid partitions — inputs the system should reject with an appropriate error
- Test one representative value from each partition
- Number of test cases = number of partitions
Boundary Value Analysis (BVA)
BVA focuses on the edges of each partition — where off-by-one defects typically hide. CTFL 4.0.1 defines two variants:
2-value BVA — tests the minimum and maximum of each partition boundary: min and min−1; max and max+1. Total boundary values = 2 per boundary point.
3-value BVA — tests min−1, min, and min+1; max−1, max, and max+1. More thorough. Total boundary values = 3 per boundary point.
BVA is always applied in addition to EP, not instead of it. EP selects partitions; BVA refines the selection at the edges.
// tip: Exam Tip: CTFL 4.0.1 explicitly introduces 2-value and 3-value BVA. Know how many test cases each produces. For a range with one lower and one upper boundary (e.g., 1–100): 2-value BVA = 4 values (0, 1, 100, 101). 3-value BVA = 6 values (0, 1, 2, 99, 100, 101). The exam will give you a range and ask how many test cases BVA produces.
Step-by-Step Calculation: Age Field (18–65)
Scenario: A form accepts age values between 18 and 65 (inclusive). Design test cases using EP and both BVA variants.
| Technique | Step | Test Values | Count |
|---|---|---|---|
| EP | Identify valid partition: 18–65 | Any value, e.g. 40 | 3 test cases |
| Identify invalid-low partition: below 18 | Any value, e.g. 10 | ||
| Identify invalid-high partition: above 65 | Any value, e.g. 80 | ||
| 2-value BVA | Lower boundary min−1 | 17 | 4 test cases |
| Lower boundary min | 18 | ||
| Upper boundary max | 65 | ||
| Upper boundary max+1 | 66 | ||
| 3-value BVA | Lower boundary min−1 | 17 | 6 test cases |
| Lower boundary min | 18 | ||
| Lower boundary min+1 | 19 | ||
| Upper boundary max−1 | 64 | ||
| Upper boundary max | 65 | ||
| Upper boundary max+1 | 66 |
Combined EP + 2-value BVA: 3 (EP) + 4 (BVA) = 7 test cases, but 18 and 65 overlap. Effective unique count = 5 test cases.
EP & BVA Calculator
Min value
Max value
// Equivalence Partitions
Invalid (low)
< 18
Test: 8
Valid
18–65
Test: 41
Invalid (high)
> 65
Test: 75
EP test cases: 3 (one per partition)
// Boundary Values (2-value)
BVA test cases: 4
Combined EP + BVA
Unique test values after removing overlaps (e.g., min and max appear in both EP and BVA):
7 test cases
// Exam tip: EP selects partitions; BVA refines boundaries. Always apply BVA in addition to EP.
// Exam trap
EP selects one value from the middle of each partition. BVA selects values at the edges. A common wrong answer is "BVA tests one value per partition" — that is EP, not BVA.
EP vs BVA — Key Differences
| Aspect | Equivalence Partitioning | Boundary Value Analysis |
|---|---|---|
| Focus | Groups of inputs that behave the same | The edges of those groups |
| Values selected | One representative per partition | min−1, min, max, max+1 (or min+1, max−1 for 3-value) |
| Defects found | Missing or incorrect partition handling | Off-by-one errors in boundary conditions |
| Test count | Equal to number of partitions | 2 or 3 values per boundary point |
| Used together? | Yes — EP identifies the partitions, BVA refines the boundaries | |
// warning: Exam Trap: Confusing EP with BVA. EP selects one representative value from the middle of each partition. BVA selects values at the edges. A common wrong answer is "BVA tests one value per partition" — that is EP. BVA specifically targets boundary points, not partition midpoints.
Exam Practice Questions
// ctfl 4.0.1 style — select an answer to reveal explanation