The Boolean macro is used to insert boolean data (true
or false
) into the strings generated by a data source using the Custom String data generator.
The macro is an analogue of the Boolean data generator.
Syntax
The macro has the following syntax:
%BOOL(ValueFormat)
Parameters
ValueFormat
Specifies the format of the generated data. The parameter can be one of the following values:
true/false
(default)Yes/No
1/0
If you specify any other value, the custom string will not be parsed.
The values are case-insensitive. |
Examples
The following examples demonstrate how to use the Boolean macro:
-
%BOOL(True/False)
Generates
True
orFalse
. -
%BOOL(1/0)
Generates
1
or0
and repeats the generated value 3 times in a sequence of generated custom strings. -
%BOOL(YES/NO)
Generates
Yes
orNo
(the values are case-insensitive). -
%BOOL(False/True) <— Invalid value
This value is not supported. 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.