Boundary Value Analysis (BVA) with Real Examples (2026)
Boundary Value Analysis (BVA) explained: definition, 2-value and 3-value techniques, worked examples on age fields, dates, file uploads, plus interview-ready answers. Written for QA engineers and SDETs.

Last updated: July 17, 2026 · 11 min read · By Avinash Kamble, reviewed by Priyanka G.
Boundary Value Analysis (BVA) is the black-box test-design technique that catches the widest slice of defects for the least effort. The premise is empirical: bugs cluster at the edges of input ranges, not in the middle. If a field accepts age 18–60, defects live at 17, 18, 19, 59, 60, 61 — not at 42. This guide gives you the precise definition, the 2-value and 3-value BVA variants, five worked examples (age, date, file size, string length, currency), and the interview answers hiring managers listen for.
Pair with the equivalence partitioning guide — the two techniques are typically used together — and the black box testing complete guide.
Key takeaways
- Defects cluster at boundaries — BVA tests the min, min+1, max-1, max, and just-outside values.
- 2-value BVA: min, min+1, max-1, max, min-1, max+1 (6 tests). 3-value BVA adds a middle value.
- Use together with equivalence partitioning to cut test count by 70% while raising defect discovery.
- ISTQB-recognised — a favourite topic in Foundation Level and QA interviews.
1. What is Boundary Value Analysis?
BVA is a black-box test-design technique that selects test inputs at, just inside, and just outside the boundaries of an equivalence partition. It is based on decades of empirical evidence that developers make off-by-one errors, use the wrong comparison operator (> vs >=), or miscalculate array indices — all of which surface at boundary values.
The ISTQB glossary defines a boundary value as “an input value that corresponds to a minimum or maximum value of an equivalence partition”. BVA is the systematic exercise of those values.
2. 2-value vs 3-value BVA
2-value BVA (the standard). For a valid range [min, max], test six values: min-1, min, min+1, max-1, max, max+1. Covers off-by-one errors on both boundaries.
3-value BVA (the robust variant, sometimes called Robust BVA). Adds a middle value inside the partition: min-1, min, min+1, middle, max-1, max, max+1 — seven tests. Useful when the partition contains a distinct interior behaviour (e.g. discounts change tiers).
Pick 2-value BVA as your default. Upgrade to 3-value only when the interior of the partition has behaviour worth spot-checking.
3. Worked example: an age input field (18–60)
+-------------------------------------------------------------+
| BOUNDARY VALUE ANALYSIS: AGE FIELD (valid range 18-60) |
+-------------------------------------------------------------+
| Value | Boundary | Expected result |
+-------+----------------+-------------------------------------+
| 17 | min - 1 | Reject: “Must be 18 or older” |
| 18 | min | Accept |
| 19 | min + 1 | Accept |
| 59 | max - 1 | Accept |
| 60 | max | Accept |
| 61 | max + 1 | Reject: “Must be 60 or under” |
+-------------------------------------------------------------+Six tests replace hundreds of random guesses. If your developer wrote if (age > 18) instead of if (age >= 18), the age = 18 case fails immediately.
4. Worked example: date fields, file uploads, string length
Date field: booking must be at least 24 hours in the future
now + 23:59:59→ reject (min - 1)now + 24:00:00→ accept (min)now + 24:00:01→ accept (min + 1)
File upload: max 10 MB
- 10,485,759 bytes → accept (max - 1)
- 10,485,760 bytes (exactly 10 MB) → accept (max)
- 10,485,761 bytes → reject (max + 1)
String length: password 8–32 chars
- 7 chars → reject
- 8 chars → accept
- 32 chars → accept
- 33 chars → reject
Same pattern, different domain. That transferability is why BVA is worth a permanent slot in your test case design toolkit.
5. Combining BVA with Equivalence Partitioning
BVA and equivalence partitioning are the peanut butter and jelly of black-box design. Partition the input domain into equivalence classes; then apply BVA at every partition boundary. For the age example:
- Partition 1: age < 18 → invalid-low. Representatives: 0, 10, 17.
- Partition 2: 18 ≤ age ≤ 60 → valid. Representatives: 18, 42, 60.
- Partition 3: age > 60 → invalid-high. Representatives: 61, 90.
BVA already picks the boundary values (17, 18, 60, 61); equivalence partitioning adds one interior representative per partition. Together: 6–9 tests covering the entire input domain. Full walkthrough in the equivalence partitioning article.
6. Automating BVA in Playwright and REST-Assured
const boundaryAges = [17, 18, 19, 59, 60, 61];
for (const age of boundaryAges) {
test(`age ${age} boundary`, async ({ request }) => {
const res = await request.post('/api/register', { data: { age } });
if (age >= 18 && age <= 60) {
expect(res.status()).toBe(200);
} else {
expect(res.status()).toBe(400);
}
});
}Data-driven loops turn BVA design into a one-line test matrix. Level up your automation muscle on the Playwright complete guide and the API testing Q&A hub.
7. BVA in interviews
BVA is almost guaranteed to come up in freshers and 1–3 year QA interviews. Standard questions:
- “Explain BVA. When would you use 3-value BVA?”
- “For a password field of 8–32 characters, list your BVA test cases.”
- “How does BVA differ from equivalence partitioning?”
Rehearse the answers out loud on the AI Mock Interview. Deep prep on the freshers Q&A hub and software testing pillar.
8. Your 24-hour action step
Open one input field in your current sprint. List the six BVA values. Add them to your regression suite. That is 15 minutes of work with an outsized defect-catch return. Then benchmark your comp on the QA Salary Guide and audit your resume with the ATS Resume Reviewer. Reference: the ISTQB Foundation syllabus covers BVA in exam depth.
Frequently asked questions
1.What is boundary value analysis in software testing?
2.What is the difference between 2-value and 3-value BVA?
3.How is BVA different from equivalence partitioning?
4.How many test cases does BVA typically produce?
5.Is BVA still relevant in 2026 with AI test generation?
Practice these questions
Run a live QA mock interview tailored to this topic and get per-skill scoring in minutes.
Was this article helpful?
Keep building your QA edge
Pillar guidesContinue reading

What Is Software Testing? The Complete 2026 Guide for QA Engineers
16 min read
Types of Software Testing — Functional vs Non-Functional (25+ Types Explained, 2026)
18 min read
Software Testing Life Cycle (STLC) — 6 Phases with Entry & Exit Criteria (2026 Guide)
14 min readJoin the QA Community
Connect with fellow testers, share job leads, and get career advice.
Stop Reinventing the Wheel. Upgrade Your QA Arsenal.
Take your testing skills from beginner to Lead Engineer. Supercharge your daily workflow with our premium digital resources.
- Ready-to-use testing strategy templates
- Advanced API & UI automation guides
- ⏱️ Save 10+ hours a week on test planning