Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..
2375 views

lr_vuser_status_message Capability in Ajax TruClient

In the "old" Web (HTTP/HTTP) protocol for scripting, I found the lr_vuser_status_message function quite handy to keep track of how things were going in a test run: Which users were working, which parameters they were choosing, etc. Now with Ajax TruClient, this capability is gone.

 

Has anyone figured out a way around this? I feel like I am running my tests "in the blind"... I do not get the impression that HP is working very much on these "shortcomings" in the tool, or, if they are, I am not hearing about it.

 

Thanks!

Randy at Deere
0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: lr_vuser_status_message Capability in Ajax TruClient

 

You can use the C code function like the following:
 
void log_status()
{
               lr_vuser_status_message( "%s", lr_eval_string( "{my_message}" ) );
}
 
Put the above in a C function file.
 
The usage from TruClient is in an “Evaluate JavaScript code” step with suitable code:
 
LR.setParam("my_message","text to show in Vuser status bar”);
LR.evalC("log_status");
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: lr_vuser_status_message Capability in Ajax TruClient

Simply using an "Evaluate JavaScript code" step and typing, in the field "Code" of the section "Arguments", something like the following :
 
LR.log("text to show in Vuser Status Bar","Status");
 
You can also use concatenation operator (+) with a parameter previously set.
 
LR.log("text to show in Vuser Status Bar " + LR.getParam("aParameter"),"Status");
 
But keep in mind that too much log can affect the resources consumption on Load Generators and on Controllers.
In this particular case, a little bit more CPU consumption on Load Generators in order to process the message; and a little bit more bandwidth consumption between Load Generators and Controller in order to display it.

 

Regards.
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: lr_vuser_status_message Capability in Ajax TruClient

I see this thread is rather old... Since I am using HP PC 11.52 patch 1, I noticed in VUgen there is the command LR.vuserStatusMessage(string). I expected this to print a status message in the Vuser overview window. However I only see users are "running" and no other status is shown.

 

Is this a bug, or is it not yet supported?

 

Regards,

Peet

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.