|
程序是C/S结构的,用的是 winsock协议录制的,选的是init。录制过程包括:
1、登陆进入程序
2、在程序中输入数据以取得相关信息
在data.ws有录制脚本,在init中的脚本为如下:
lr_think_time(10);
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=192.168.0.56:9080", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_send("socket0", "buf2", LrsLastArg);
lrs_receive("socket0", "buf3", LrsLastArg);
lr_think_time(22);
lrs_create_socket("socket1", "TCP", "RemoteHost=192.168.0.56:9080", LrsLastArg);
lrs_send("socket1", "buf4", LrsLastArg);
lrs_receive("socket1", "buf5", LrsLastArg);
lrs_send("socket0", "buf6", LrsLastArg);
lrs_receive("socket0", "buf7", LrsLastArg);
lrs_send("socket0", "buf8", LrsLastArg);
lrs_receive("socket0", "buf9", LrsLastArg);
lrs_send("socket0", "buf10", LrsLastArg);
lrs_receive("socket0", "buf11", LrsLastArg);
lrs_send("socket0", "buf12", LrsLastArg);
lrs_receive("socket0", "buf13", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "RemoteHost=192.168.0.56:9080", LrsLastArg);
lrs_send("socket2", "buf14", LrsLastArg);
lrs_receive("socket2", "buf15", LrsLastArg);
lrs_send("socket2", "buf16", LrsLastArg);
lrs_receive("socket2", "buf17", LrsLastArg);
lrs_send("socket2", "buf18", LrsLastArg);
lrs_receive("socket2", "buf19", LrsLastArg);
lrs_send("socket2", "buf20", LrsLastArg);
lrs_receive("socket2", "buf21", LrsLastArg);
lrs_close_socket("socket2");
return 0;
在进行回放时,没有自动启动程序,当然也就没有进入程序后在程序里输入数据并得到返回结果的操作了。
这个该如何弄???各位赐教 |
|