Skip to content

IntegerGenerator generator

Generate integer values within a configurable range, granularity, and distribution.

Why: Use IntegerGenerator for bounded counts, scores, and ordinal fixtures with optional granularity and distribution; use IncrementGenerator when values must follow row order.

Category: core.

Output: int.

1
<key name="value" generator="IntegerGenerator(min=1, max=100, granularity=5, distribution='uniform')"/>

Parameters

  • min: int | null; Default None โ€” Inclusive lower bound of generated integers.
  • max: int | null; Default None โ€” Inclusive upper bound of generated integers.
  • granularity: int | null; Default None โ€” Positive step defining the permitted integer grid.
  • distribution: str | null; Default None โ€” Statistical distribution used across the bounded grid.