Computer Address (%COMP) Macro

Applies to ReadyAPI 3.54, last modified on September 23, 2024

The Computer Address macro is used to insert IP and MAC addresses into the strings generated by a data source using the Custom String data generator.

The macro is an analog of the Computer Address data generator.

Syntax

The macro has the following syntax:

%COMP(AddressFormat)

Parameters

AddressFormat

Specifies the format of generated data. The parameter can have one of the following values:

  • IPv4 – Default. Generates IP addresses – for example, 131.88.16.212.

  • Mac48 – Generates MAC addresses – for example, 77:D6:85:8A:69:74.

The values are case-sensitive.

Examples

The following examples demonstrate how to use the Computer Address macro:

  • http://%COMP(IPv4):8080

    Example: Computer Address macro in Data Generator

    Click the image to enlarge it.

    Generates a URL to an IPv4 address.

  • %COMP(Mac48)

    Generates MAC addresses.

  • %COMP(MAC48) <- Invalid value

    The parameter is 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

Computer Address Generator
Custom String Generator
Macro Reference

Highlight search results