Overview
Introduction
This tool outputs a ready-made list of numeric edge cases that commonly break integer-handling code: zero, small negatives, values straddling power-of-two boundaries, and the classic limits of 32-bit signed integers and JavaScript's safe integer range.
If you ask for more values than the curated list contains, it pads the rest out with additional deduplicated pseudo-random integers so you always get exactly the count you asked for.
What Is Integer Fuzzer?
A generator for a fixed, documented set of integer edge cases, ordered from the most universally relevant (zero, +/-1) to more specific boundary values (bit-width limits, JavaScript's safe-integer limits).
Unlike this category's uniformly-random integer generators, this list is deliberately curated: every value in it is chosen because it's historically a common source of bugs, not because it's statistically representative.
How Integer Fuzzer Works
The curated list is a fixed array of edge-case integers, checked in order and deduplicated (though none of the curated values repeat with each other).
As many curated values as fit are copied into the output in order, up to your requested count.
If the requested count is larger than the curated list, a seeded pseudo-random generator (not Math.random()) fills the remainder with additional integers, skipping any that would duplicate a value already in the list.
When To Use Integer Fuzzer
Use it to build a quick regression-test list for any code that parses, stores, or does arithmetic on integers, especially code that might truncate into a fixed-width type.
It's also handy as a sanity-check list when validating a new integer input field or API parameter for boundary handling.
Often used alongside Integer Digit Fuzzer, Integer Error Introducer and Small Integer Generator.
Features
Advantages
- Front-loads the most likely-to-matter edge cases first, so even a small requested count still gets meaningful coverage.
- Always deduplicated, so you never see the same value twice even when padding kicks in.
- Deterministic padding means the same count always reproduces the same full list, useful for repeatable tests.
Limitations
- The curated list is fixed and opinionated; it reflects common integer bugs in general-purpose code, not every language's or platform's specific numeric quirks.
- Padding values are pseudo-random integers in a wide range and aren't themselves curated edge cases, so they're filler rather than deliberately chosen boundaries.
- Capped at 500 requested values to keep the output a reasonable size.
Examples
Best Practices & Notes
Best Practices
- Request at least 17 values if you want the entire curated edge-case set included before any padding begins.
- Combine this tool's output with your own domain-specific edge cases; it covers general integer pitfalls, not anything specific to your data model.
Developer Notes
The curated list is a plain, documented array (see `CURATED_INTEGER_FUZZ_VALUES`); padding beyond that list uses a mulberry32 PRNG seeded with a fixed internal constant (not user-configurable) purely so the tool's output stays deterministic and testable, drawing from a wide range and skipping any candidate already present in the output set.
Integer Fuzzer Use Cases
- Building a regression-test list for integer parsing, storage, or arithmetic code
- Sanity-checking a new numeric input field's boundary handling
- Quickly generating example edge-case values for a bug report or test plan
Common Mistakes
- Assuming the padding values are meaningful edge cases; only the curated portion is deliberately chosen, the rest is filler to reach your requested count.
- Expecting different results on repeated runs with the same count; the padding is deterministic by design, not freshly randomized each time.
- Requesting a very small count and missing boundary values you actually needed; check the curated list's order if a specific edge case matters to you.
Tips
- Request the full curated count (17) at minimum if boundary coverage matters more than a short list.
- Use the output directly as a one-per-line test fixture for a parser or validator you're testing.