Returns information about the Vuser executing the script.

ExampleInformational Functions


lr.whoami ( vuserID );


vuserID The Vuser id number.

The lr.whoami function gets information about the Vuser.

To access the scenario ID, add the scenario attribute to the runtime settings. Add scenario to the Additional Attributes on the General tab. If the scenario attribute is not added to the runtime settings, the scenario ID is always zero (0).

Return Values

Returns a JavaScript array containing the Vuser ID, the Vuser group, and the scid. The scid is the Scenario or Session step ID number.


You cannot use standard parameterization for any arguments in this function.


result = lr.whoami();
lr.message(" vuser id: " + result[0]+
          " scenario id: "+ result[1] +
          " Group: " + result[2]);
// vuser id: -1 scenario id: 0 Group: undefined