Skip to content

FloatGenerator generator

Generate floating-point values within a configurable range and distribution.

Why: Use FloatGenerator for bounded measurements, ratios, or monetary test values that require decimal granularity; use IntegerGenerator when fractional values are invalid.

Category: core.

Output: float.

1
<key name="value" generator="FloatGenerator(min=0.0, max=100.0, granularity=0.01, distribution='uniform')"/>

Parameters

  • min: float | null; Default None โ€” Inclusive lower bound of generated values.
  • max: float | null; Default None โ€” Inclusive upper bound of generated values.
  • granularity: float | null; Default None โ€” Smallest permitted step between generated values.
  • distribution: str | null; Default None โ€” Statistical distribution used across the bounded numeric grid.