Real Generator

Applies to ReadyAPI 3.56, last modified on November 21, 2024

The Real generator is one of the Data Generators in ReadyAPI. It generates various real numbers and uses them in requests and responses.

To activate the Real generator, select the desired property and set the Property Type to Real:

Real Data Generator

Click the image to enlarge it.

Parameters

After you have selected the Real generator, ReadyAPI offers you to specify some additional parameters for the generated data:

Generation Mode

Contains a drop-down list that allows you to specify a generation mode:

  • Random – Select this mode to generate random real number values within the specified range.

  • Sequential – Default. Select this mode to generate a sequence of values that will start with the value of the Minimum Value parameter (if the Increment value is positive) or with the Maximum Value parameter (if the Increment value is negative). The sequence’s increment value is specified by the Increment value parameter. If the generated sequence goes beyond the specified bounds and the number of generated values is less than it is needed, the test engine repeats the generated sequence from the beginning as many times as necessary.

Minimum Value

Specifies the lower bound of the real numbers to be generated. The default value of the parameter is 125.2.

Maximum Value

Specifies the upper bound of the real numbers to be generated. The default value of the parameter is 500.7.

Note: The value of the Maximum value parameter must be greater than or equal to the value of the Minimum value parameter. Both parameters can be specified as an integer or as a real number.

Increment Value

Specifies an increment value for the generated sequence. You can also specify a real number as the value of this parameter. The default value of the parameter is 12.3.

Note: If you want to generate a descending sequence, you should specify a negative value for this parameter.
This parameter is available only if you select the Sequential item in the Generation mode drop-down list.

Decimal Places Count

Specifies the number of decimal digits in the generated numbers. If you want to generate integer numbers only, you can either specify 0 as the value of this parameter or use the Integer data generator. The default value of the parameter is 3.

Duplicate Each Value … Time(s)

Specifies how many times each generated value will be duplicated. The default value of the parameter is False.

After you specify the needed parameters, you can obtain the sample values that have been generated by the engine. The values are displayed in the Sample field.

Also, you can discard all the changes you made in the generator’s parameters and restore the parameters set by default. To do that, click Set Default Values below the Sample field.

See Also

Real (%REAL) Macro
Data Generator

Highlight search results