Bỏ qua

IntegerGenerator generator

Warning

The current page still doesn't have a translation for this language.

But you can help translating it: Contributing.

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.