51Testing软件测试论坛

标题: LoadRunner:Adding Vuser Status Message to Controller [打印本页]

作者: pcl2004_27    时间: 2006-10-25 14:09
标题: LoadRunner:Adding Vuser Status Message to Controller
Description

      Adding this line of code:

static int i_iteration=0;

after the #include "as_web_.h"

and adding:

lr_vuser_status_message("Iteration %d", ++i_iteration);

directly after the Action1() {

will place the iteration number of each Vuser into the controller.


Solution

      #include "as_web.h"
static int i_iteration=0;

Action1()
{

lr_vuser_status_message("Iteration %d", ++i_iteration);

web_set_user(...);

//scipt body

return 0;

}

These two lines of code will show each Vuser's iteration number at in the Controller window. This makes it MUCH easier to see which iteration a Vuser is on then by clicking on "Vuser details" in the Controller and then searching for the iteration. I have had to do this numerous times and what a pain!

This was given to me by another coworker who received it from someone. I felt it was worth sharing.




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2