State (%STATE) Macro

The State macro is used to insert US state names into the strings generated by a data source using the Custom String data generator.

The macro is an analog of the State data generator.

Syntax

The macro has the following syntax:

%STATE(Format)

Parameters

Examples

The following example demonstrates how to use the State macro:

  • State: %STATE(FULL)
    
    Example: State macro in Data Generator

    Generates a string containing a full state name.

  • %STATE(Abbreviated)
    

    Generates abbreviated state names.

  • %STATE <- Invalid value
    

    The macro requires the parameter, so ReadyAPI will not parse the custom string.

  • %STATE(COUNTY) <— Invalid value
    

    The parameter is specified incorrectly, 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.

See Also

Publication date: