Boundary Value Analysis

Manual Testingbeginneraka BVA

// Definition

Testing values immediately at and around boundaries (e.g., min, max, just-below, just-above). Bugs cluster at edges — this technique catches off-by-one errors that equivalence partitioning alone misses.

// Why it matters

Bugs cluster at boundaries — off-by-one errors, < vs <=, the empty case, the max case. BVA says: test the edges of every input range, not the comfortable middle. It's the highest-yield test-design technique because it targets exactly where developers slip, with very few cases.

// How to test

// Field accepts 1–100. Test the boundaries, not just "50".
const cases = [
  { v: 0,   ok: false }, // just below min
  { v: 1,   ok: true  }, // min
  { v: 100, ok: true  }, // max
  { v: 101, ok: false }, // just above max
]
cases.forEach(({ v, ok }) => {
  cy.get('[data-cy=qty]').clear().type(`${v}`)
  cy.get('[data-cy=submit]').click()
  cy.get('[data-cy=error]').should(ok ? 'not.exist' : 'exist')
})

// Common mistakes

  • Testing a value "in range" and assuming the boundaries work too
  • Forgetting the empty / null / zero-length boundary
  • Missing the just-inside vs just-outside pair (the off-by-one catcher)

// Related terms

Learn more · Software Testing Fundamentals

Chapter 4 · Lesson 2: Boundary Value Analysis