Skip to main content

Test Case Design Technique: Boundary Value Analysis (BVA)

Overview

Boundary Value Analysis (BVA) is a black-box testing technique that focuses on testing at the edges (boundaries) of input ranges where errors are most likely to occur. The idea is simple: bugs often occur at the limits of input values, not in the middle.

This technique complements Equivalence Partitioning (EP) by zeroing in on the critical “just-at-the-edge” conditions for maximum bug detection.


Why Use Boundary Value Analysis?

  • Many defects occur at the boundaries of input ranges.
  • Helps ensure limit conditions are handled properly.
  • Reduces test cases while still increasing coverage.
  • Especially useful for numeric fields, date ranges, loops, counters, arrays, etc.

How It Works

  1. Identify input ranges (e.g., min & max values).
  2. Determine boundaries for valid and invalid input.
  3. Create test cases for:
    • Minimum value (valid)
    • Minimum - 1 (invalid)
    • Maximum value (valid)
    • Maximum + 1 (invalid)
    • Optionally, midpoint or typical valid value

Example 1: Age Field (Valid Range: 18–65)

Test Case DescriptionInput ValueExpected Result
Lower boundary (valid)18Accepted
Just below lower boundary17Rejected
Upper boundary (valid)65Accepted
Just above upper boundary66Rejected
Mid-range value (optional)30Accepted

Example 2: Password Length (Valid: 8–16 characters)

Test Case DescriptionInput (Length)Expected Result
Lower boundary valid8Accepted
Lower boundary invalid7Rejected
Upper boundary valid16Accepted
Upper boundary invalid17Rejected
Mid-value12Accepted

Boundary Value Testing for Multiple Fields

If multiple fields have numeric or range-based constraints, test boundaries independently and together.

Example: For a login form with username (3–10 chars) and password (8–16 chars), test:

  • Username = 3 (valid), Password = 8 (valid)
  • Username = 2 (invalid), Password = 8 (valid)
  • Username = 3 (valid), Password = 7 (invalid)
  • ... etc.

Variants of BVA

1. Single Boundary Testing

Test only one input at a time while keeping others valid.

2. Multiple Boundary Testing

All input fields are tested with their boundary values simultaneously.


When to Use BVA

  • Input ranges (e.g., min/max limits)
  • Form validations (e.g., age, salary, percentages)
  • Date validations (e.g., start date/end date)
  • Loops, pagination, counters, numeric APIs

Best Practices

  • Always pair BVA with Equivalence Partitioning for full test coverage.
  • Watch out for off-by-one errors—common bugs around boundaries.
  • Don't forget negative test cases (outside the boundary).
  • Use BVA for both input fields and output values when applicable.

Summary

Boundary Value Analysis is a powerful technique to catch errors that commonly occur at the extremes of input domains. It's a must-use method in a senior QA's toolkit for designing efficient, high-impact test cases.

"If you want to find bugs fast, push the system to its limits—right at the boundaries."


Quick BVA Template

For any field with range [min, max]:

CaseValueDescription
Lower Invalidmin - 1Just below range
Lower BoundaryminLowest valid
Upper BoundarymaxHighest valid
Upper Invalidmax + 1Just above range
Midpoint (optional)(min+max)/2A typical valid input