51Testing软件测试论坛
标题:
LR中用Socket协议录制无法播放
[打印本页]
作者:
樱qq
时间:
2010-8-25 11:27
标题:
LR中用Socket协议录制无法播放
公司的一个CS软件,我在LR中用Socket协议录制一段登录的脚本,录制完成的脚本如下
可是为什么回放都没反应啊,也不会卡,奇怪,是直接完成了一样,
但Replay log都一直是空的啊?
各位大虾一起讨论下。。。。谢谢咯咯~~~
/*********************************************************************
* Created by Mercury Interactive Windows Sockets Recorder
*
* Created on: Wed Aug 25 11:11:55
*********************************************************************/
#include "lrs.h"
Action()
{
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=121.207.242.219:80", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_create_socket("socket1", "TCP", "RemoteHost=121.207.250.227:4502", LrsLastArg);
lrs_create_socket("socket2", "TCP", "RemoteHost=121.207.247.132:64105", LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket3", "TCP", "RemoteHost=121.207.250.230:7777", LrsLastArg);
lrs_send("socket3", "buf4", LrsLastArg);
lrs_receive("socket2", "buf5", LrsLastArg);
lrs_send("socket2", "buf6", LrsLastArg);
lrs_receive("socket3", "buf7", LrsLastArg);
lrs_send("socket3", "buf8", LrsLastArg);
lrs_receive("socket3", "buf9", LrsLastArg);
lrs_receive("socket2", "buf10", LrsLastArg);
lrs_send("socket2", "buf11", LrsLastArg);
lrs_close_socket("socket2");
lrs_create_socket("socket4", "UDP", "LocalHost=0", LrsLastArg);
lrs_send("socket4", "buf12", "TargetSocket=121.207.247.132:64101", LrsLastArg);
lrs_receive("socket4", "buf13", LrsLastArg);
lrs_create_socket("socket5", "TCP", "RemoteHost=121.207.247.132:64104", LrsLastArg);
lrs_send("socket5", "buf14", LrsLastArg);
lrs_receive("socket4", "buf15", LrsLastArg);
lrs_receive("socket5", "buf16", LrsLastArg);
lrs_send("socket5", "buf17", LrsLastArg);
lrs_receive("socket4", "buf18", LrsLastArg);
lrs_receive("socket5", "buf19", LrsLastArg);
lrs_send("socket0", "buf20", LrsLastArg);
lrs_receive("socket0", "buf21", LrsLastArg);
lrs_send("socket3", "buf22", LrsLastArg);
lrs_send("socket5", "buf23", LrsLastArg);
lrs_receive("socket3", "buf24", LrsLastArg);
lrs_receive("socket5", "buf25", LrsLastArg);
lrs_send("socket0", "buf26", LrsLastArg);
lrs_receive("socket0", "buf27", LrsLastArg);
lrs_send("socket0", "buf28", LrsLastArg);
lrs_receive("socket0", "buf29", LrsLastArg);
lrs_create_socket("socket6", "TCP", "LocalHost=0", "RemoteHost=121.207.247.200:80", LrsLastArg);
lrs_send("socket6", "buf30", LrsLastArg);
lrs_receive("socket6", "buf31", LrsLastArg);
lrs_close_socket("socket0");
lrs_create_socket("socket7", "TCP", "LocalHost=0", "RemoteHost=121.207.242.219:80", LrsLastArg);
lrs_send("socket7", "buf32", LrsLastArg);
lrs_receive("socket7", "buf33", LrsLastArg);
lrs_send("socket7", "buf34", LrsLastArg);
lrs_receive("socket7", "buf35", LrsLastArg);
return 0;
}
作者:
msnshow
时间:
2010-8-29 12:02
建议楼主看看你的操作是否有成功,有没有日志不是最重要的
作者:
PrefTest
时间:
2010-8-30 11:03
建议不要用Socket协议,分析一下你的C/S结构的系统,是不是可以模拟其他协议?
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2