Great work!

XP to next level

BugEater

Boundary Testing in Practice

Learning Objectives

By the end of this lesson you will be able to:

  • Design a complete boundary test suite for a multi-field form
  • Identify and test implicit boundaries in real systems
  • Document boundary test results systematically

From Theory to Test Cases

Boundary Value Analysis is only useful when you can execute it systematically on a real specification. In this lesson we work through a complete, realistic example.

Scenario: An online ticket booking system. Users can book 1–10 tickets per order, and each ticket costs $5–$500. The system also applies a 10% discount for orders of 5 or more tickets.

Step 1: Identify All Inputs and Their Boundaries

Input Valid Range Lower Boundary Upper Boundary
Ticket quantity 1–10 1 (min valid) 10 (max valid)
Ticket price $5–$500 $5 (min valid) $500 (max valid)

Step 2: Apply Two-Point BVA

Quantity:

  • 0 (invalid), 1 (valid), 10 (valid), 11 (invalid)

Price:

  • $4 (invalid), $5 (valid), $500 (valid), $501 (invalid)

Step 3: Don't Forget the Business Rule Boundary

The discount triggers at quantity 5. This is a boundary too:

  • 4 tickets: no discount expected
  • 5 tickets: 10% discount expected
  • The boundary at 5 is as important as the min/max boundaries

Extended test set:

  • 4 tickets, $100 → total $400 (no discount)
  • 5 tickets, $100 → total $450 (10% off → $450)

The Trap: Ignoring Calculated Boundaries

A common mistake is testing only the input fields themselves and forgetting that calculations introduce their own boundaries. In the ticket example:

  • 10 tickets at $500 each → $5,000 total → is that within the Int32 range? Yes.
  • But what about a system that accumulates daily orders? 1,000 orders × $5,000 = $5,000,000 — still fine for Int32 (max 2.1B).
  • 1,000,000 orders? Now we're at $5 billion — Int32 overflow territory.

Pro Tip: When you see a calculated output field, ask: "What data type stores the result? What's the maximum possible calculation?" Then test near that maximum.

Documenting Boundary Tests

A professional boundary test table format:

ID Field Input Expected Actual Status
BT-01 Quantity 0 Reject: below minimum
BT-02 Quantity 1 Accept
BT-03 Quantity 5 Accept + 10% discount
BT-04 Quantity 10 Accept
BT-05 Quantity 11 Reject: above maximum

Leave the "Actual" and "Status" columns to fill in during test execution.

Key Takeaways

  • Apply BVA to every field's minimum, maximum, and any business-rule thresholds
  • Calculated outputs have their own boundaries — test those too
  • Document tests before executing to avoid unconscious confirmation bias
  • The discount/trigger boundary is as important as the min/max boundary

Quiz

A system grants a 10% discount to purchases between $50 and $200. Which BVA set is MOST complete?

A courier service charges flat rate for packages up to 5 kg and extra per kg above that. A tester tests at 4.9 kg and 5.1 kg. What is missing?

Why do testers often find bugs AT the boundary rather than slightly inside the valid range?

A hotel booking system accepts check-in dates from today up to 365 days in advance. Today is June 1. Which date MOST likely reveals a defect?