Skip to content
faker.tools
All 79

Plate VIII · Localization, Edge Cases & Data Sanitizers

Boundary Value Generator

The values just inside and just outside every limit.

#CaseValueShould Accept
1below minimum0false
2minimum1true
3minimum + 12true
4midpoint50true
5maximum − 199true
6maximum100true
7above maximum101false
8zero0false
9negative-1false
10int32 maximum2147483647false
10 rows · 565 BGenerated in your browser · Boundary Value Generator

Boundary value analysis is the highest-yield testing technique there is: bugs cluster at limits, not in the middle. Every case here comes labelled with whether a correct implementation should accept it, so the test assertions write themselves.

What you can control

  • Six data types, each with the boundaries that matter for it.
  • Every case carries an accept-or-reject expectation, which is half of a test case already.
  • Integer cases include the int32 and int64 limits and the point where JavaScript loses precision.
  • Date cases cover leap days, DST transitions, the year-2038 problem and the leap second.

What this is not

Expectations assume a straightforward inclusive range. If your rules differ — an exclusive upper bound, a trimmed string — adjust the expected column accordingly.

Questions

What is boundary value analysis?

Testing at and around every limit rather than in the middle of a range. If a field accepts 1 to 100, you test 0, 1, 2, 99, 100 and 101 — because that is where off-by-one errors live.

Why is 9007199254740993 a boundary?

It is one past JavaScript's Number.MAX_SAFE_INTEGER. Beyond that, integers lose precision silently — the value simply becomes a different number with no error.

What breaks about DST?

In spring-forward zones, 02:30 does not exist on the transition day. A date parser will either reject it, shift it, or accept something impossible, and all three cause real bugs.

Next in Edge cases

All 7