|
我今天录了段脚本,是socket协议的,测试C/S系统的登录.录入的脚本回放的时候可以运行,而且在回放的时候也可以迭代,但是在跑2个虚拟用户的时候,就一直停在初始化状态,下面是录制的脚本.
vuser_init
/* -------------------------------------------------------------------------------
Script Title :
Script Description :
Recorder Version : 1196
------------------------------------------------------------------------------- */
vuser_init()
{
return 0;
}
Action
Action()
{
lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.1.230:1700", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lr_think_time(5);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lrs_send("socket0", "buf4", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "RemoteHost=192.168.1.230:1700", LrsLastArg);
lrs_send("socket1", "buf5", LrsLastArg);
lrs_receive("socket1", "buf6", LrsLastArg);
lrs_send("socket1", "buf7", LrsLastArg);
lrs_receive("socket1", "buf8", LrsLastArg);
lrs_send("socket1", "buf9", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "RemoteHost=192.168.1.230:1700", LrsLastArg);
lrs_send("socket2", "buf10", LrsLastArg);
lrs_receive("socket2", "buf11", LrsLastArg);
lrs_send("socket2", "buf12", LrsLastArg);
lrs_receive("socket2", "buf13", LrsLastArg);
lrs_send("socket2", "buf14", LrsLastArg);
lrs_close_socket("socket2");
return 0;
}
vuser_end
[ 本帖最后由 xuefeng 于 2007-7-4 17:09 编辑 ] |
|