|
LR虚拟用户登陆服务器后掉线现象的原因可能是哪些呢?
此程序用SOCKETS录制的,利用
for (i=0;i<=100;i++)
{
lrs_send("socket2", "buf29", LrsLastArg);
lr_think_time(100);
}
return 0;
来不断的与服务器端交互。此程序的目的是实现登陆服务器成功,并停留在服务器上很长一段时间(如几天时间)而不掉线就可以。
原脚本如下:
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Tue Dec 05 10:02:56
*********************************************************************/
#include "lrs.h"
Action()
{ int i;
lrs_create_socket("socket0", "TCP", "RemoteHost=172.16.4.4:6998", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "RemoteHost=172.16.4.4:6998", LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "RemoteHost=172.16.4.4:6998", LrsLastArg);
lrs_send("socket2", "buf4", LrsLastArg);
/* lrs_receive("socket2", "buf5", LrsLastArg);
lrs_create_socket("socket3", "UDP", "LocalHost=10000", LrsLastArg);
lrs_send("socket3", "buf6", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf7", LrsLastArg);
lrs_send("socket3", "buf8", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf9", LrsLastArg);
lrs_send("socket3", "buf10", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf11", LrsLastArg);
lrs_send("socket3", "buf12", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf13", LrsLastArg);
lrs_send("socket3", "buf14", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf15", LrsLastArg);
lrs_receive("socket2", "buf16", LrsLastArg);
lrs_send("socket3", "buf17", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf18", LrsLastArg);
lrs_send("socket3", "buf19", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf20", LrsLastArg);
lrs_send("socket3", "buf21", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf22", LrsLastArg);
lrs_send("socket3", "buf23", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf24", LrsLastArg);
lrs_send("socket2", "buf25", LrsLastArg);
lrs_send("socket3", "buf26", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf27", LrsLastArg);
lrs_receive("socket2", "buf28", LrsLastArg);
lrs_send("socket2", "buf29", LrsLastArg);
lrs_send("socket3", "buf30", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf31", LrsLastArg);
lrs_send("socket2", "buf32", LrsLastArg);
lrs_send("socket3", "buf33", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf34", LrsLastArg);
lrs_send("socket3", "buf35", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf36", LrsLastArg);
lrs_send("socket2", "buf37", LrsLastArg);
lrs_send("socket3", "buf38", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf39", LrsLastArg);
lrs_send("socket3", "buf40", "TargetSocket=172.16.4.4:10000", LrsLastArg);
lrs_receive("socket3", "buf41", LrsLastArg);
lrs_receive("socket2", "buf42", LrsLastArg);
lrs_send("socket2", "buf43", LrsLastArg);
*/
for (i=0;i<=100;i++)
{
lrs_send("socket2", "buf29", LrsLastArg);
lr_think_time(100);
}
return 0;
}
data.ws文件如下:
;WSRData 2 1
send buf0 7
"\xff\x01\x01\x00\xff\x01\x01"
recv buf1 20
"\xff\xcd\x0e\x00\xff\xcd\x00\x00"
"04.03.21.00"
"\x00"
send buf2 44
"\xff\x00"
"&"
"\x00\xff\xcd\x02"
"<test5>"
"\x00\xff\xff\xff"
"霉竪鉧萲"
"\x00\x00\x00\x00"
"燘1"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\xf8\x12\x00"
"l"
"\xe9"
recv buf3 72
"\xff"
"虰"
"\x00\xff\xcd\x00\x00"
"\""
"\x00\x00\x00"
"test"
"\x00"
"w鉧萲"
"\x00\x00\x00\x00"
"燘1"
"\x00\x00\x00\x00\x00\xc8\x00"
"\b"
"\x00\x18\xf8"
"#"
"\x00\x00\x00"
"lr"
"\x00\xfe\x12\x00"
"栎"
"\x12\x00"
"屯屯屯屯屯屯"
"\xc9\x00\x00\x00"
"屯"
send buf4 54
"\xff"
"60"
"\x00\xff\xcd\x03\x00\x00\x00"
"#"
"\x00\x00\x00"
"<test5>"
"\x00"
"梯"
"\x12\x00"
"0撊k"
"\x15\x03\xff\xff\xda\x02"
"\b"
"\x00\x05"
"1"
"\x00\x00\x00\x00\x00\x00"
"斑"
"\x12\x00"
"羹"
"\x12\x00"
"栎"
"\x12\x00"
recv buf5 60
"\xff\xcd"
"6"
"\x00\xff\xcd\x00\x00\x00"
"烫"
"\xcc"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x02\xcc\x10"
"'"
"\x10"
"'"
"\x01"
"泰"
"\x01\x00\x00"
"<test5>"
"\x00"
"梯"
"\x12\x00"
"0撊k"
"\x15\x03\xff\xff\xda\x02"
"\b"
"\x00\x05\x02\x00\x00\x00\x00\x00\x00"
send buf6 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf7 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf8 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf9 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf10 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf11 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf12 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf13 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf14 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf15 7
"\x01\xa9\x01\x00\x00\x01\x00"
recv buf16 8
"\xff\xcd\x02\x00\xff\xcd"
",\b"
send buf17 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf18 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf19 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf20 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf21 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf22 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf23 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf24 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf25 12
"\xff"
"6"
"\x06\x00\xff\xcd\x01"
"\b"
"\x01\x01\x01\x00"
send buf26 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf27 7
"\x01\xa9\x01\x00\x00\x01\x00"
recv buf28 8
"\xff\xcd\x02\x00\xff\xcd"
",\b"
send buf29 8
"\xff"
"6"
"\x02\x00\xff\xcd"
",\b"
send buf30 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf31 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf32 8
"\xff"
"6"
"\x02\x00\xff\xcd"
",\b"
send buf33 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf34 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf35 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf36 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf37 8
"\xff"
"6"
"\x02\x00\xff\xcd"
",\b"
send buf38 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf39 7
"\x01\xa9\x01\x00\x00\x01\x00"
send buf40 13
"\x01"
"#"
"\x00\x00\x00\xa9\x01\x00\x00\x00\x00\x00\x00"
recv buf41 7
"\x01\xa9\x01\x00\x00\x01\x00"
recv buf42 8
"\xff\xcd\x02\x00\xff\xcd"
",\b"
send buf43 8
"\xff"
"6"
"\x02\x00\xff\xcd"
",\b"
-1
大家觉得最可能的原因是什么而导致自动掉线现象??? |
|