Sobes.tech
Junior

What are the two approaches to boundary value testing?

sobes.tech AI

Answer from AI

There are two main approaches to Boundary Value Analysis (BVA):

  1. Testing at the "edges" of permissible values: Testing values that are directly on the boundary of the acceptable range. For example, if the acceptable range is from 0 to 100, testing 0 and 100.

  2. Testing "one step" away from permissible values: Testing values that are one step or increment/decrement away from the boundaries of the acceptable range. For example, if the range is from 0 to 100, testing -1, 1, 99, and 101.

These two approaches are often combined to ensure more comprehensive test coverage:

  • Inside the boundaries: Testing a single value within the permissible range.
  • At the boundaries: Testing the minimum and maximum values of the range.
  • Outside the boundaries (close): Testing values one step less than the minimum and one step more than the maximum.
  • Outside the boundaries (far): Testing values that significantly exceed the range (sometimes).

Example for the range [1, 10]:

  • Inside the boundaries: 5
  • At the boundaries: 1, 10
  • Outside the boundaries (close): 0, 11
  • Outside the boundaries (far): -10, 100

The specific choice of values depends on the data type (integers, floating-point, strings) and the logic of the processed field.