Computer Address (%COMP) Macro

Applies to TestComplete 15.63, last modified on April 10, 2024

Description

The Computer Address macro is used to insert IP and MAC addresses into strings generated with the Custom String generator.

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

Syntax

The macro has the following syntax:

%COMP(AddressFormat, *xN)

Parameters

AddressFormat

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

Value Description
IPv4 Default. Generates IP addresses, for example –

131.88.16.212
211.74.60.151
218.81.119.175
...

MAC48    Generates MAC addresses, for example –

77:D6:85:8A:69:74
85:E9:F0:F2:DC:4C
35:31:F1:4F:1F:8C
...

The values are case-insensitive.

If you specify any other value, the macro will use the default value (IPv4).

*xN

Optional parameter. Specifies the number of possible repetitions of each value in series of generated strings. N is a positive number that specifies the number of repetitions: 1, 2, 3, and so on. The default parameter value is *x1 (no repetitions).

Examples

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

  • %COMP(IPv4)

    Generates IP addresses.

  • %COMP(IPv4, *x2)

    Generates IP addresses and repeats each generated address twice in the sequence of generated custom strings.

  • %COMP(mac48)

    Generates MAC addresses (parameter values are case-insensitive).

  • %COMP(IPv6) <— Invalid value

    This value is not supported. The macro will use the default value, IPv4, and generate IP addresses.

Remarks

See Also

Macro Reference
Custom String Generator Rules
Custom String Generator
Computer Address Generator
Using Data Generators
Generate Data Dialog

Highlight search results