Number generators
Here is a list of predefined generators for generating numeric values.
Random Integer
Random integer generator returns a number in a specified range.
Configuration fields are min and max, while min is optional; when not provided, the
default minimum value will be used (0).
Throws an error when min > max or when max is not provided.
Examples
Random Float
Random float generator returns a number in a specified range with stripping the number of decimal digits to specified number. Of course, this is a maximum number of digits, in the most extreme situation, it might end up with returning an integer - when all the decimal digits are zeros.
Configuration fields are min, max and decimalDigits. Fields min and decimalDigits are optional:
- when
minnot provided, it usesmin: 0. - when
decimalDigitsnot provided, it usesdecimalDigits: 2.
It throws an error when min > max, when max is not provided or
when the decimalDigits is negative.