SoftwareTestPilot
Software Testing FundamentalsPublished: 11 min read

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.

Avinash Kamble
Founder & QA Engineer at SoftwareTestPilot
Reviewed by Priyanka G.
Share:XLinkedInWhatsApp
Editorial cover showing a number line from 0 to 100 with boundary markers at 18 and 60, valid and invalid input dots labeled BVA, and the SoftwareTestPilot.com wordmark.
Editorial cover showing a number line from 0 to 100 with boundary markers at 18 and 60, valid and invalid input dots labeled BVA, and the SoftwareTestPilot.com wordmark.

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?
Boundary Value Analysis (BVA) is a black-box test design technique that selects test inputs at, just inside, and just outside the boundaries of a valid range. It works because defects cluster at boundaries — developers commonly use the wrong comparison operator or make off-by-one errors that only manifest at edge values.
2.What is the difference between 2-value and 3-value BVA?
2-value BVA tests six values around each boundary: min-1, min, min+1, max-1, max, max+1. 3-value BVA (Robust BVA) adds a middle value inside the partition, giving seven tests. Use 2-value by default; upgrade to 3-value only when the interior of the partition has distinct behaviour worth spot-checking.
3.How is BVA different from equivalence partitioning?
Equivalence partitioning divides the input domain into classes that behave the same and picks one representative per class. BVA specifically picks values at and around the boundaries between those classes. Use both together: equivalence partitioning for coverage, BVA for boundary rigour.
4.How many test cases does BVA typically produce?
For a single-variable valid range, 2-value BVA produces 6 tests; 3-value produces 7. For n variables, count grows to roughly 4n+1 tests in 2-value BVA if you hold others at nominal values — still an order of magnitude fewer than exhaustive testing.
5.Is BVA still relevant in 2026 with AI test generation?
Yes. AI test generators like Copilot and Meticulous propose BVA cases because BVA is the technique with the highest defect-catch ratio per test written. Understanding BVA is still the fastest way to review or improve AI-generated test suites.
Keep going

Practice these questions

Run a live QA mock interview tailored to this topic and get per-skill scoring in minutes.

Found this useful?
Share:XLinkedInWhatsApp

Was this article helpful?

Keep building your QA edge

Continue reading

Join the QA Community

Connect with fellow testers, share job leads, and get career advice.

Premium QA Resources

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
4.9/5 rating
Explore All Products

⭐⭐⭐⭐⭐ Trusted by 1,000+ Software Test Pilots • Instant Access