TA的每日心情 | 擦汗 2016-2-22 16:35 |
---|
签到天数: 4 天 连续签到: 1 天 [LV.2]测试排长
|
为什么loadrunner用sockets测试手机游戏登陆没有用户名和密码 我测的是手机网游 代码如下
vuser_init()
{
lrs_startup(257);
lr_start_transaction("输入后");
lr_think_time(21);
lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.1.180:7605", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", LrsLastArg);
lrs_receive("socket0", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "RemoteHost=192.168.1.180:10000", LrsLastArg);
lrs_send("socket1", "buf7", LrsLastArg);
lrs_receive("socket1", "buf8", LrsLastArg);
lrs_send("socket1", "buf9", LrsLastArg);
lrs_receive("socket1", "buf10", LrsLastArg);
lrs_send("socket1", "buf11", LrsLastArg);
lrs_receive("socket1", "buf12", LrsLastArg);
lrs_send("socket1", "buf13", LrsLastArg);
lrs_receive("socket1", "buf14", LrsLastArg);
lrs_send("socket1", "buf15", LrsLastArg);
lrs_receive("socket1", "buf16", LrsLastArg);
lrs_send("socket1", "buf17", LrsLastArg);
lrs_receive("socket1", "buf18", LrsLastArg);
lrs_send("socket1", "buf19", LrsLastArg);
lr_end_transaction("退出前", LR_AUTO);
lrs_send("socket1", "buf20", LrsLastArg);
lrs_close_socket("socket1");
return 0;
} |
|