tldr: Boundary value analysis is a test design technique that targets the edges of input ranges, because that is where bugs live. For a field that accepts 1 to 100, you test 0, 1, 2, 99, 100, and 101 instead of a handful of values from the middle.
What is boundary value analysis?
Off-by-one mistakes concentrate at edges. A developer writes > where the requirement meant >=, a loop stops one short, a validator treats the maximum as already out of range. Values from the middle of a range all take the same code path and can never expose these. The values on either side of each boundary can.
Boundary value analysis, usually shortened to BVA, turns that observation into a selection rule: for every range in the requirements, test the boundary values and their nearest neighbors.
The technique, applied
Requirement: quantity must be between 1 and 100.
| Test value | Why | Expected |
|---|---|---|
| 0 | Just below minimum | Rejected |
| 1 | Minimum | Accepted |
| 2 | Just above minimum | Accepted |
| 99 | Just below maximum | Accepted |
| 100 | Maximum | Accepted |
| 101 | Just above maximum | Rejected |
Six values, and between them they catch every misplaced comparison operator this field can have. A hundred random mid-range values would catch none of them, since 37 and 62 exercise identical logic.

Two-value vs three-value BVA
ISTQB Foundation distinguishes two coverage variants of the technique:
| Values for a 1 to 100 field | Catches | |
|---|---|---|
| Two-value BVA | 0, 1, 100, 101 | An off-by-one at the edge |
| Three-value BVA | 0, 1, 2, 99, 100, 101 | A boundary whose handling has been shifted |
Three-value costs two extra cases per range, so most teams default to it for anything that matters.
BVA and equivalence partitioning work as a pair
Equivalence partitioning divides inputs into classes that behave the same: below range, in range, above range. One value per class proves each behavior exists. BVA then concentrates extra checks exactly where classes meet. Partitioning tells you how few tests you can get away with; BVA tells you where the remaining risk sits; decision table testing covers the condition combinations both leave out. Applied together on the quantity field: three partitions, six boundary values, total of six to eight cases with nothing redundant.
Boundaries beyond numeric fields
The technique generalizes past number inputs:
- String lengths. A 255-character limit: test 254, 255, 256, and 0 versus 1 character.
- Dates. A "within 30 days" rule: day 29, 30, 31, and the today boundary itself.
- Collections. Pagination at 20 per page: 19, 20, and 21 items. Empty list and single item.
- Money. A 5,000.00 transfer cap: 4,999.99, 5,000.00, 5,000.01, and the zero and negative edges.
Anywhere a requirement contains a number, there is a boundary, and wherever there is a boundary, this checklist applies. It slots into test design as one of the first techniques applied to any spec, and the resulting values become the test data column of your test cases.
FAQs
What is the difference between BVA and equivalence partitioning?
Partitioning picks one representative value per class of equivalent inputs. BVA picks values at the edges between classes. Partitioning minimizes case count; BVA maximizes defect detection at the transition points.
Is boundary value analysis black box or white box?
Black box. It works from requirements and input ranges without reading the code. It happens to be excellent at finding a specific white box mistake, the misplaced comparison operator.
Does BVA apply to outputs?
Yes. The same rule targets the smallest and largest results a function can produce: a discount that caps at 100 percent, a report page that holds 50 rows. Output edges break for the same off-by-one reasons input edges do.
Does BVA apply to invalid inputs too?
Yes, and it should. The values just outside each range are invalid by definition, and asserting they are rejected cleanly is negative testing at its most surgical.
