int Vuser,ProductNumber;
lr_whoami(&Vuser, NULL, NULL);
ProductNumber = Vuser%10 + 1;
switch(ProductNumber)
{
case 1:
/* In reality, this block here would contain the LR
functions for buying product1. Since we don't have
a real website, lets pretend with the message below */
lr_vuser_status_message("I am buying product1");
break;
case 2:
lr_vuser_status_message("I am buying product2");
break;
case 3:
lr_vuser_status_message("I am buying product3");
break;
case 4:
lr_vuser_status_message("I am buying product4");
break;
case 5:
lr_vuser_status_message("I am buying product5");
break;
case 6:
lr_vuser_status_message("I am buying product6");
break;
case 7:
lr_vuser_status_message("I am buying product7");
break;
case 8:
lr_vuser_status_message("I am buying product8");
break;
case 9:
lr_vuser_status_message("I am buying product9");
break;
case 10:
lr_vuser_status_message("I am buying product10");
break;
default:
lr_vuser_status_message("invalid product %d",ProductNumber);
}
lr_think_time(100);
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |