ShiftQA LessonsQA GuidesBoundary Value Analysis with Examples

Practical QA guide · 10 min

Boundary Value Analysis with Examples

Learn one-value, two-value, and practical boundary testing with worked examples for ranges, counts, dates, sizes, and ordered data.

Written and reviewed by ShiftQA Labs QA Education Team · Updated September 2, 2026

Browse Lessons modules

Find where expected behavior changes

A boundary separates neighboring partitions. It may be numeric, chronological, spatial, ordinal, or based on a count. Common examples include minimum password length, maximum upload size, subscription expiry, pagination limits, rate thresholds, and supported viewport widths.

The requirement must state whether the edge is included. “Up to 10 files” normally includes 10; “less than 10” does not. Ambiguous language is itself a review finding that should be resolved before expected results are finalized.

One-value and two-value coverage

One-value boundary coverage exercises each boundary value. Two-value coverage exercises the boundary and its closest neighbor in the adjacent partition. For a valid integer range of 1 through 100, that produces 0 and 1 at the lower boundary, then 100 and 101 at the upper boundary.

In real work, teams often add the nearest valid interior value as well when off-by-one risk is high. The important point is to name the chosen coverage rather than call any collection of near-edge values “boundary testing.”

Use realistic units and transitions

The closest neighbor depends on the domain. For whole numbers it may be one unit. For currency it may be one cent. For timestamps it may be the smallest supported precision. For file sizes it may be one byte—or the interface may round values and require tests at both displayed and stored boundaries.

Boundaries can also occur between states: before and after expiry, just below and at a free-shipping threshold, or the last item on one page and the first item on the next.

Worked example

Password length of 8 to 64 characters

A password policy accepts lengths from 8 through 64 characters inclusive.

  1. 1Length 7: invalid value immediately below the minimum.
  2. 2Length 8: valid lower boundary.
  3. 3Length 9: valid value immediately inside the lower boundary when stronger coverage is warranted.
  4. 4Length 63: valid value immediately inside the upper boundary when stronger coverage is warranted.
  5. 5Length 64: valid upper boundary.
  6. 6Length 65: invalid value immediately above the maximum.
  7. 7Test character counting rules separately when Unicode, composed characters, or whitespace may change the effective length.

Frequently asked questions

Questions testers ask

Why do defects cluster at boundaries?

Comparisons, loop limits, indexing, rounding, date calculations, and misunderstood inclusive or exclusive rules commonly produce edge failures.

Can boundary analysis test dates?

Yes. Examples include immediately before, at, and after expiry, renewal, cutoff, or age-eligibility dates using the system’s actual time precision.

Is zero always a boundary?

No. Zero is a boundary only when it separates partitions or has distinct expected behavior in the modeled domain.

Learn together

Discussion & learner questions

Ask about a concept, share a practical example, or add context that may help another tester. ShiftQA reviews submissions before they become public.

Questions and comments stay distinct. Questions can receive an official ShiftQA response; comments support learner discussion and real-world examples.
Loading the discussion…
ShiftQA Lessons is independent, unofficial study support. Official certification materials remain the source of truth.