Software Testing - Boundary Value Analysis

Last Updated : 28 Apr, 2026

Boundary Value Analysis (BVA) is a black-box testing technique that focuses on testing the boundary values (edges) of valid and invalid input ranges. It helps identify errors that commonly occur at the limits of input conditions

  • It checks input values near the minimum and maximum of each partition.
  • Every partition has a minimum and maximum value, which are considered the boundary values.
  • Testing these edge cases helps identify defects that might occur in real use.

For each variable, BVA tests

For each input variable, Boundary Value Analysis (BVA) focuses on testing values at and around the boundary limits to ensure correct system behavior.

  • Minimum value
  • Just above minimum
  • Maximum value
  • Just below maximum
  • Invalid values outside the range
419253543

Example

Consider a system that accepts ages from 18 to 56.

  • Valid Test cases: Valid test cases include values between 18 and 56.
  • Invalid Testcases: It include values less than 18 or greater than 56.

Boundary Value Analysis(Age accepts 18 to 56)

Invalid

(min-1)

Valid

(min, min + 1, nominal, max - 1, max)

Invalid

(max + 1)

17

18, 19, 37, 55, 56

57

Types of BVA

Boundary Value Analysis (BVA) is a testing technique that focuses on checking values at the boundaries of input ranges. It helps detect errors that commonly occur at the edges of valid input limits.

1. Normal BVA

Tests only valid boundary values within the specified input range, ensuring that the system behaves correctly at the minimum, maximum, and values just inside the acceptable limits.

  • Covers minimum, maximum, and values just inside the valid range to ensure correct system behavior.
  • Focuses on verifying that the application works properly for all valid boundary conditions.

2. Robust BVA

Tests both valid and invalid boundary values around the limits, including values just below the minimum and just above the maximum, to verify how the system handles out-of-range inputs.

  • Includes values just below minimum and above maximum to check system response for invalid inputs.
  • Helps identify errors and exceptions that occur due to out-of-range values.

3. Worst Case BVA

Tests combinations of boundary values for multiple input variables, ensuring that the system can handle different boundary conditions together and behave correctly under combined input scenarios.

  • Considers all possible combinations of minimum and maximum values across inputs.
  • Ensures the system can handle multiple boundary conditions simultaneously without failure.

4. Robust Worst Case BVA

Combines worst case and robust testing approaches to achieve maximum coverage by testing both valid and invalid boundary value combinations across multiple input variables.

  • Tests combinations including both valid and invalid boundary values across inputs.
  • Provides thorough validation by covering extreme and out-of-bound scenarios.

Single Fault Assumption

Single Fault Assumption is a concept in Boundary Value Analysis where only one input variable is tested at its boundary values while all other variables are kept at normal values. It is based on the idea that most defects occur due to a single faulty condition at a time.

  • Reduces the number of test cases while maintaining effective coverage.
  • Focuses on testing one variable at a time for boundary conditions.
  • For n variables, maximum test cases = 4n + 1.

Example

Consider a Program for determining the Previous Date.

Input: Day, Month, Year with valid ranges as

1 ≤ Month≤12
1 ≤ Day ≤31
1900 ≤ Year ≤ 2000

Taking the year as a Single Fault Assumption i.e. year will be having values varying from 1900 to 2000 and others will have nominal values.

Test Cases

Month

Day

Year

Output

1

6

15

1900

14 June 1900

2

6

15

1901

14 June 1901

3

6

15

1960

14 June 1960

4

6

15

1999

14 June 1999

5

6

15

2000

14 June 2000

Taking Day as Single Fault Assumption i.e. Day will be having values varying from 1 to 31 and others will have nominal values.

Test Case

Month

Day

Year

Output

6

6

1

1960

31 May 1960

7

6

2

1960

1 June 1960

8

6

30

1960

29 June 1960

9

6

31

1960

Invalid day

Taking Month as Single Fault Assumption i.e. Month will be having values varying from 1 to 12 and others will have nominal values.

Test Case

Month

Day

Year

Output

10

1

15

1960

14 Jan 1960

11

2

15

1960

14 Feb 1960

12

11

15

1960

14 Nov 1960

13

12

15

1960

14 Dec 1960

For the n variable to be checked Maximum of 4n + 1 test case will be required. Therefore, for n = 3, the maximum test cases are: 4 × 3 + 1 =13

Real-World Applications

Boundary Value Analysis (BVA) is widely used in real-world applications to detect errors at input limits. It helps ensure systems behave correctly under boundary conditions.

  • Form Validation: Checking input fields like age, password length, or phone numbers.
  • E-Commerce Systems: Validating product quantity limits and price ranges.
  • Banking Applications: Testing transaction limits and account balance boundaries.
  • Login Systems: Verifying username/password length constraints.

Advantages of BVA

Boundary Value Analysis (BVA) is an effective testing technique used to identify errors at the boundaries of input values. It improves testing efficiency by focusing on critical edge cases.

  • Detects boundary errors where defects are most likely to occur.
  • Reduces number of test cases compared to exhaustive testing.
  • Improves test coverage by focusing on edge values.
  • Simple and easy to apply in most testing scenarios.

Best Practices for Effective BVA

Boundary Value Analysis (BVA) is effective when boundaries are properly identified and tested. It helps detect errors at edge values and improves test coverage.

  • Identify correct boundaries including minimum and maximum input limits
  • Test both valid and invalid values around the boundaries
  • Include edge cases just inside and outside boundary values
Comment

Explore