51Testing软件测试论坛

标题: 用LR的Windows Sockets协议录制客户端脚本,调试出错 [打印本页]

作者: chenmaochuan    时间: 2009-7-23 15:04
标题: 用LR的Windows Sockets协议录制客户端脚本,调试出错
脚本运行到此行
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=VVS-SERVER:3188", LrsLastArg);

报以下的错
vuser_init.c(40): Error : callConnect - Connection refused. Error code : 10061.
vuser_init.c(40): Error : Timeout expired while trying to connect. Error code : 9017.

是不是没做关联问题?如果是,应该如何关联?谢谢!
作者: chenmaochuan    时间: 2009-7-28 10:16
以下是录制了两遍的脚本比较:
脚本一:
Action
{
lrs_save_param("Socket0", "buf12", "param1",42, 2);\\通过关联获取13
lrs_save_param("Socket0", "buf12", "param2",45, 3);\\通过关联获取144
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=VVS-SERVER:3472", LrsLastArg);

}
data.ws
{
recv  buf12 51
        "227 Entering Passive Mode (10,188,180,221,13,144)\r\n"
}

脚本二:
Action
{
lrs_save_param("Socket0", "buf12", "param1",42, 2);\\通过关联获取13
lrs_save_param("Socket0", "buf12", "param2",45, 3);\\通过关联获取229
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=VVS-SERVER:3557", LrsLastArg);

}
data.ws
{
recv  buf12 51
        "227 Entering Passive Mode (10,188,180,221,13,229)\r\n"
}

上面已经实现了关联的问题,接下来如何解决把关联到的数据转换为端口呢???




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2