Boundary Value Analysis Examples
The short answer
Boundary value analysis tests the smallest and largest value of every equivalence partition, including the partitions of invalid values. In 2-value BVA those boundary values are the coverage items. In 3-value BVA each boundary value also brings both of its neighbours, so a border between two partitions normally ends up with four coverage items.
The definition is short. Applying it is where marks go, because the answer depends on counting the boundary values of the partitions you are not interested in as carefully as the ones you are. The three examples below get progressively less tidy, and the last one has an edge that most worked examples leave out.
Example 1: one valid range, 2-value BVA
A quantity field accepts integers from 1 to 50. Any other integer, including 0 and negative numbers, is rejected.
Start with the partitions, not the numbers in the requirement. There are three: integers up to 0 (rejected), 1 to 50 (accepted), and 51 upwards (rejected). The syllabus defines the minimum and maximum of a partition as its boundary values, and the two rejected partitions are partitions like any other. That gives four boundary values: 0 and 1 at the lower border, 50 and 51 at the upper border. The rejected partitions have no minimum at the bottom or maximum at the top, so they contribute nothing further.
In 2-value BVA each boundary value is paired with its closest neighbour in the adjacent partition. For 1 that neighbour is 0, and 0 is already a boundary value. The pairs collapse into the boundary values themselves, which is why the syllabus says the coverage items are “all identified boundary values”. You need four tests: 0, 1, 50 and 51.
Example 2: the same field, 3-value BVA
Keep the field and switch to 3-value BVA. Now every boundary value brings both of its neighbours, whichever partition they fall in.
| Boundary value | 2-value coverage items | 3-value coverage items |
|---|---|---|
| 0 | 0, 1 | -1, 0, 1 |
| 1 | 1, 0 | 0, 1, 2 |
| 50 | 50, 51 | 49, 50, 51 |
| 51 | 51, 50 | 50, 51, 52 |
| Distinct values | 0, 1, 50, 51 | -1, 0, 1, 2, 49, 50, 51, 52 |
The rows overlap heavily, so count distinct values rather than adding up rows. That gives eight coverage items, four at each border.
A common wrong answer is six: 0, 1, 2, 49, 50 and 51. It comes from treating only 1 and 50 as boundary values and forgetting that 0 and 51 are boundary values of the rejected partitions, each with a neighbour of its own. The syllabus gives the rule but does not work through this case with numbers. ISTQB did, in a 2025 white paper on boundary value analysis, which states that four coverage items at a border between two partitions is the standard case for 3-value BVA.
Example 3: three partitions and a hard floor
A cinema prices tickets by age in whole years: children 0 to 12, adults 13 to 64, seniors 65 and over. An age cannot be negative.
The domain has an end this time. The children’s partition has boundary values 0 and 12, adults have 13 and 64, and seniors have only 65, because there is no oldest age. That is five boundary values, not six.
| Boundary value | 2-value coverage items | 3-value coverage items |
|---|---|---|
| 0 | 0 | 0, 1 |
| 12 | 12, 13 | 11, 12, 13 |
| 13 | 13, 12 | 12, 13, 14 |
| 64 | 64, 65 | 63, 64, 65 |
| 65 | 65, 64 | 64, 65, 66 |
| Distinct values | 0, 12, 13, 64, 65 | 0, 1, 11, 12, 13, 14, 63, 64, 65, 66 |
Age 0 has no neighbour below it, since -1 is not a possible age, so it contributes a single item in 2-value BVA and two in 3-value BVA. The totals are five coverage items for 2-value and ten for 3-value. The two inner borders each still carry the standard four. Only the edge of the domain is short.
This is the case to watch for in exam questions about lengths, counts and ages. A stem that says a value cannot go below zero is changing the answer, even if it reads like a throwaway detail.
Why 3-value BVA is worth the extra tests
The syllabus gives a compact example. A rule meant as if (x <= 10) is implemented as if (x = 10). The 2-value tests are 10 and 11, and the faulty code happens to give the right result for both. 3-value BVA adds 9, where the requirement says yes and the code says no. Defects that only show one step away from the boundary are exactly what the third value is for.
Practise it
The drill below draws only boundary value analysis questions from the question bank, none of which are published with their answers anywhere else on this site. Work them with a pen: list the partitions first, then every boundary value, then the coverage items.
Start the drill
Certified Tester Foundation Level (CTFL v4.0)
Practising Boundary Value Analysis questions only: every question in this set matches that filter. There is no clock. A drill is shorter than a real paper and covers one topic, so timing it would tell you nothing. Work at your own pace and submit when you are ready, and you get a full answer review when you finish.
- Questions
- 0
- Time limit
- None
- Pass mark
- 65%
- Cost
- Free
No timer on a drill. Take as long as you need.
Sources: ISTQB Certified Tester Foundation Level Syllabus v4.0.1, section 4.2.2, and Hamburg & Roman, Boundary Value Analysis According to the ISTQB Foundation Level Syllabus, ISTQB, October 2025.
Keep going
- 2-value vs 3-value boundary value analysisHow to tell which one a question wants
- Equivalence partitioningThe partitions every BVA answer starts from
- Chapter 4 practice questionsAll the test design techniques
- Full ISTQB mock exam40 questions, 60 minutes