Enum and Range Boundary Probe
Send values at and just outside each declared enumeration and range, because a boundary enforced on the documented edge but not past it is where an unexpected state enters
Use when: fields declare enumerations or numeric ranges that have not been exercised at their edges
Avoid when: the schema enforces bounds strictly and an out-of-range test confirms rejection
Procedure
- List enumerated and ranged fields with their documented boundaries.
- For each, send the maximum in-range value, the value just outside it, and one clearly invalid value.
- Read the object back and record accepted, rejected or coerced for each case.
- Check whether an out-of-range value is clamped into range, which silently changes what was requested.
- For enumerations, test a value that is plausible but undeclared rather than an obviously invalid string.
- Record a boundary table with one row per field and its three test cases.
Signals
- A value just outside the documented range is accepted
- An out-of-range value is clamped rather than rejected
- An undeclared but plausible enumeration value is accepted
- The documented boundary differs from the enforced one
Patterns
1. Boundary table
field | declared | max in-range | just outside | invalid
quantity | 1..100 | 100 ok | 101 stored 101 | 0 rejected
state | draft|active|paid | paid ok | refunded accepted | xyz rejected
2. Clamp flag
a clamped value is recorded separately from an accepted one, because the caller asked for something else than what was stored
3. Plausible-enum rule
test an undeclared value that looks legitimate, since a clearly invalid string is usually caught by the most basic check
Pitfalls
- Testing only a clearly invalid value while the plausible undeclared one passes
- Recording a clamp as an acceptance, which hides that stored state differs from the request
- Not comparing the documented boundary with the enforced one
Done when
- Each enumerated or ranged field has three boundary cases with a result
- Clamped values are distinguished from accepted ones in the table