Boundary Values: Driving Licence

Equivalence partitioning and boundary value analysis on an age check.

Requirements

  • The form has two fields, Name and Age, and an Approve button. The button is disabled until both fields are filled in.
  • After Approve is pressed, a block with the applicant’s name (Applicant) and the decision (Decision) appears under the form.
  • If the age is 18 to 80 inclusive, the decision is “Decision: APPROVED” in green.
  • If the age is 0 to 17, or 81 and above, the decision is “Decision: NOT APPROVED” in red.
  • If Name or Age is left empty and you move out of it, the error “Name is required” or “Age is required” is shown under the field.
  • If the age is fractional (for example, 17.5), the error “Age must be a whole number” is shown under the Age field.

Task

Split the possible age values into equivalence classes and find the boundary values. Build a minimal set of tests and check each one in the app below.

Application under test

Quick reference

Equivalence partitioning

Input data is split into groups (classes) in which the system behaves the same way. One value per class is enough: if it works, the other values in the class most likely work too. Classes can be valid (acceptable data) or invalid (unacceptable data).

Boundary value analysis

Bugs most often hide at the edges of ranges, for example when “<” and “≤” are mixed up in a condition. So you test the boundary value itself and the nearest value on the other side of the boundary.