Sobes.tech
Junior

How many checks need to be performed when analyzing boundary values?

sobes.tech AI

Answer from AI

To analyze boundary values, at least three checks are required for each boundary condition:

  1. On the boundary: The value is exactly on the boundary of the range.
  2. Near the boundary (inside the range): The value minimally differs from the boundary but is within the permissible range.
  3. Near the boundary (outside the range): The value minimally differs from the boundary but is outside the permissible range.

Example for a numeric field with a range from 1 to 10:

  • 1 (at the lower boundary)
  • 2 (close to the lower boundary, inside)
  • 0 (close to the lower boundary, outside)
  • 10 (at the upper boundary)
  • 9 (close to the upper boundary, inside)
  • 11 (close to the upper boundary, outside)

For logical or string boundaries (e.g., minimum/maximum string length), the principle remains the same: tests at the boundary itself, slightly less, and slightly more.