Boolean (%BOOL) Macro

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

Examples

The following examples demonstrate how to use the Boolean macro:

  • %BOOL(True/False)
    
    Example: Boolean macro in Data Generator

    Generates True or False.

  • %BOOL(1/0)
    

    Generates 1 or 0 and repeats the generated value 3 times in a sequence of generated custom strings.

  • %BOOL(YES/NO)
    

    Generates Yes or No (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.

See Also

Publication date: