Name (%NAME) Macro

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

The macro is an analog of the Name data generator.

Syntax

The macro has the following syntax:

%NAME(Gender, NameKind)

Parameters

Examples

The following example demonstrates how to use the Name macro:

  • Customer's name: %NAME(Any, Full)
    
    Example: Name macro in Data Generator

    Generates a string containing full names of any gender.

  • %NAME(Male, FirstName)
    

    Generates only first male names.

  • %NAME(LastName, Female) <- Invalid value
    

    The parameters swapped places, so ReadyAPI will not parse the custom string.

  • %NAME(Any) <- Invalid value
    

    The NameKind parameter is missing, so ReadyAPI will not parse the custom string.

  • %NAME(ANY, FULL) <- Invalid value
    

    The parameters are case-sensitive, 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: