Boundary Values: Username

Equivalence partitioning and boundary value analysis for a text field: length and allowed characters.

Requirements

  • The Username field is required, and its length is 3 to 15 characters inclusive.
  • Only Latin letters (a–z, A–Z) are allowed.
  • Digits, spaces, and special characters are not allowed.
  • If the value meets the requirements, after Verify name is pressed the field turns green and “✓ Valid username” is shown.
  • If the value does not meet the requirements, an error with the reason is shown.
  • Verify name is disabled while the field is empty. Create account becomes enabled only after the name has been verified.

Task

Split the possible username values into equivalence classes (by length and by character type) and find the boundary values. Build a minimal set of tests and check each one in the app below.

Application under test

Create an account

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.

Text fields

A string usually has two independent properties: length and character set. Apply boundary values to the length and equivalence classes to the character set: test each forbidden character type separately so you know which rule was triggered.