Retrieving the IP address of a virtual user

This example shows how to retrieve the local IP address of a virtual user. Retrieving IP addresses is particularly useful when virtual users are using IP aliases.

The following custom code retrieves the IP address that was assigned to a virtual user:

IP aliasing must be enabled. If not, vui.getIPAddress() returns null. For information on enabling IP aliasing, see Enable virtual users to use IP aliases.

IP aliases must be configured at the remote location. For information on configuring IP aliases, see Emulate network traffic from multiple hosts.

The Log Level must be set to a value granular enough to include the IP address, so the tlm.reportMessage() method can retrieve it. If you insert custom code at the page level, keep Log Level at the default value, Primary Test Actions. If you insert custom code at the request level, set Log Level to Secondary Test Actions, a more granular value.


Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.