BETAPlatform actively being built — new topics and features added regularly.

ISTQB Foundation Level (CTFL 4.0.1)~5 min read12/26

Equivalence Partitioning & BVA

// how to calculate partitions and boundary values step by step for the exam.

loading...
// content

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

Scenario: PayPal's password policy requires passwords between 8 and 20 characters. A tester must design an efficient test suite without testing every possible length. Using EP: Three partitions are identified — invalid-low (1–7 characters), valid (8–20 characters), invalid-high (21+ characters). One representative value per partition is selected: 5, 12, and 25 characters. Using BVA: The boundaries are tested — 7 (min−1), 8 (min), 20 (max), 21 (max+1). These four values catch the most common off-by-one defects in validation logic. What happened: EP reduced the test count from millions to 3. BVA added 4 precise boundary tests. Together, 7 test cases provided high confidence — and one BVA test (21 characters being accepted instead of rejected) actually found a validation defect. Why it matters: Systematic input selection finds more defects with fewer tests than random or intuitive selection.

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.

TechniqueStepTest ValuesCount
EPIdentify valid partition: 18–65Any value, e.g. 403 test cases
Identify invalid-low partition: below 18Any value, e.g. 10
Identify invalid-high partition: above 65Any value, e.g. 80
2-value BVALower boundary min−1174 test cases
Lower boundary min18
Upper boundary max65
Upper boundary max+166
3-value BVALower boundary min−1176 test cases
Lower boundary min18
Lower boundary min+119
Upper boundary max−164
Upper boundary max65
Upper boundary max+166

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)

min−1: 17
min: 18
max: 65
max+1: 66

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

AspectEquivalence PartitioningBoundary Value Analysis
FocusGroups of inputs that behave the sameThe edges of those groups
Values selectedOne representative per partitionmin−1, min, max, max+1 (or min+1, max−1 for 3-value)
Defects foundMissing or incorrect partition handlingOff-by-one errors in boundary conditions
Test countEqual to number of partitions2 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

3Q
Q1.A field accepts quantities between 1 and 99. Using 2-value BVA, which test values should be selected?
Q2.A discount field accepts percentage values from 0 to 100. How many test cases does 3-value BVA produce?
Q3.A system has a quantity field with three equivalence partitions: below minimum (invalid), valid range, above maximum (invalid). How many test cases does EP require?
// end