TestPrepPro

Boundary Value Analysis Explained with Real-World Examples

boundary value analysis examplesBVA testingboundary value analysis tutorial

What Is Boundary Value Analysis?

Boundary value analysis (BVA) is a black-box test design technique that focuses on testing at the edges of equivalence partitions. The core insight behind BVA is simple: defects tend to cluster at boundaries. A developer might write "greater than" when they meant "greater than or equal to," and that off-by-one error only shows up at the boundary.

Understanding boundary value analysis with concrete examples is the fastest way to master this technique for both real-world testing and the ISTQB exam.

Two-Value vs Three-Value BVA

The ISTQB v4.0 syllabus distinguishes between two-value and three-value boundary value analysis.

Two-value BVA tests the boundary value and its closest neighbor outside the partition. For a valid range of 1-100: - Lower boundary: test 0 (invalid) and 1 (valid) - Upper boundary: test 100 (valid) and 101 (invalid) - Total test values: 4

Three-value BVA adds the value just inside the boundary. For the same range of 1-100: - Lower boundary: test 0 (invalid), 1 (valid), 2 (valid) - Upper boundary: test 99 (valid), 100 (valid), 101 (invalid) - Total test values: 6

Boundary Value Analysis Example 1: Age Verification

A website requires users to be between 18 and 65 years old to register.

Equivalence partitions: below 18 (invalid), 18-65 (valid), above 65 (invalid).

Two-value BVA test values: 17, 18, 65, 66.

Expected results: 17 should be rejected, 18 accepted, 65 accepted, 66 rejected.

Boundary Value Analysis Example 2: Shopping Cart Discount

An online store offers free shipping for orders between $50 and $500. Orders below $50 pay shipping. Orders above $500 get free shipping plus a bonus gift.

Partitions: under $50 (shipping charged), $50-$500 (free shipping), over $500 (free shipping + gift).

Two-value BVA test values: $49.99, $50.00, $500.00, $500.01.

This example shows how BVA applies to decimal values. The boundary precision must match the system's precision.

Boundary Value Analysis Example 3: Password Length

A system requires passwords between 8 and 20 characters.

Two-value BVA: test passwords of length 7, 8, 20, and 21 characters.

Three-value BVA: test passwords of length 7, 8, 9, 19, 20, and 21 characters.

Common BVA Mistakes on the ISTQB Exam

The most frequent mistake is forgetting to test values outside the boundary. If the valid range is 1-10, many candidates only test 1 and 10 but forget 0 and 11. Both sides of each boundary must be tested.

Another common error is confusing two-value and three-value BVA. Read the question carefully to determine which variant is being asked for, as the number of test cases differs.

Applying BVA in Practice

In real projects, boundary value analysis examples extend beyond simple numeric ranges. Consider date boundaries (end of month, leap years), string length limits, array size limits, and timeout thresholds. Anywhere a specification defines a limit, BVA applies.

Want to practice BVA questions under exam conditions? Try our free ISTQB practice questions — our Chapter 4 questions include detailed worked examples for every boundary value calculation.

Ready to Practice?

Try our free ISTQB practice questions with detailed explanations.

Start Free Practice