Output a Vuser IP address in script replay log.

Use lr_get_vuser_ip() function in the Vuser script

Note: This function is a part of function reference in LR 7.x but was undocumented in LR 6.5

Use the lr_get_vuser_ip() function within a lr_output_message() function in the vuser_init() section. This function will return the Vuser IP address as a C string. For example,

lr_output_message("Vuser IP -> %s", lr_get_vuser_ip());

This is advantageous because you can now use the Vusers output log of errors and its IP in conjunction with the Web server logs (which should list IP addresses) to track down errors faster and more accurately.

To have the IP address show in the Controller Vuser Status field, use the function

lr_vuser_status_message("Vuser IP -> %s", lr_get_vuser_ip());

1 thought on “Output a Vuser IP address in script replay log.”

  1. Start auto log messages stack – Iteration 12900. [MsgId: MMSG-10545]
    Starting action Ac. [MsgId: MMSG-15919]
    Action.c(3): Vuser IP -> [MsgId: MMSG-17999]
    Error: Two Way Communication Error: Function two_way_comm_post_message / two_way_comm_post_message_ex failed. [MsgId: MERR-60990]
    Error: Service client with id=1 failed to post a message ,reason – communication error. [MsgId: MERR-29739]
    Error: Failed to post xdr buffers data array by post_ex. [MsgId: MERR-16895]
    Error: Failed to send xdr buffers data array to the transaction server. [MsgId: MERR-16897]
    Error: Failed to add transaction to the transactions data array for optimization. [MsgId: MERR-16894]
    End auto log messages stack. [MsgId: MMSG-10544]

    Is it a success or failed IP Spoofing.


Leave a Comment