Integer Generator

Applies to ReadyAPI 3.54, last modified on July 23, 2024

The Integer generator is one of the Data Generators in ReadyAPI. It generates various integer values and uses them in requests and responses.

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

Integer Data Generator

Click the image to enlarge it.

Parameters

After you have selected the Integer 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 – Default. Select this mode to generate random integer values within the specified range.

  • Sequential – Select this mode to generate a sequence of values that will start from the Minimum Value parameter. The increment value of the sequence 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 integers to be generated. The default value of the parameter is 1.

Maximum Value

Specifies the upper bound of the integers to be generated. The default value of the parameter is 32,767.

Increment Value

Specifies an increment value for the generated sequence. The default value of the parameter is 1.

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

The value of the Maximum value parameter must be greater than or equal to the value of the Minimum value parameter. The range for all three parameters (Increment value, Maximum value and Minimum value) is specified by the integer data type: -2147483648 … 2147483647.

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

Integer (%INT) Macro
Data Generator

Highlight search results