Integer (%INT) Macro
The Integer macro is used to insert integer numbers into the strings generated by a data source using the Custom String data generator.
The macro is an analog of the Integer data generator.
Syntax
The macro has the following syntax:
%INT(MinValue, MaxValue, GenerationMode, Increment)
Parameters
Examples
The following example demonstrates how to use the Integer macro:
%INT(1, 10000, true, 20)
Generates a sequence of values starting from
1
with the increment value of20
.
%INT(1, 10000, true, -50)
Generates a sequence of values starting from
10000
with the increment value of-50
.
%INT(1, 10000,, 15)
Generates a random collection of values from
1
to10000
. In this case, the value of theIncrement
parameter (15
) is omitted.
%INT(1, 10000, -3)
The
GenerationMode
parameter is missing, so ReadyAPI will not parse the custom string.
%INT(1, 10000, true)
The
Increment
parameter is missing, so ReadyAPI will not parse the custom string.
Remarks
For more information on adding macros to custom strings, see About Custom String Generator.
For more information on general rules used for specifying macro parameters, see Custom String Generator Rules.