51Testing软件测试论坛

标题: LR9.0无法回放socket协议的脚本 [打印本页]

作者: wenlt2005    时间: 2009-7-16 09:35
标题: LR9.0无法回放socket协议的脚本
LR9.0无法回放socket协议的脚本提示如下信息:vuser_init.c(36): Error : socket1 - Software caused connection abort. Error code : 10053. 什么原因?
作者: kf11859    时间: 2009-7-16 11:59
建立连接的目的端为你的LR开放了吗?或者是端口是否被占用?
作者: wenlt2005    时间: 2009-7-16 14:46
端口是开放的,在录制脚本时要选择端口吗?
作者: kf11859    时间: 2009-7-16 15:15
我没录制过,都是自己写的。创建套接字的时候不是需要你输入参数吗,有个参数正是目的IP和端口啦
作者: 云层    时间: 2009-7-16 16:37
需要重新建一下sockets连接
作者: boymarco    时间: 2009-7-17 09:21
10053是很常见的socket协议错误,网上相关这个资料很多,找一下
一般情况就入云层版主说的那样,你的socket连接没有调整,有的socket连接打开没有关闭
作者: wenlt2005    时间: 2009-7-17 17:24
标题: 这是小弟的录制的请大侠看看
Action()
{

        lrs_create_socket("socket0", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:4305", LrsLastArg);

        lrs_send("socket0", "buf0", LrsLastArg);

        lrs_receive("socket0", "buf1", LrsLastArg);

        lrs_send("socket0", "buf2", LrsLastArg);

        lrs_receive("socket0", "buf3", LrsLastArg);

        lrs_close_socket("socket0");

        lrs_create_socket("socket1", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket1", "buf4", 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_receive("socket1", "buf10", LrsLastArg);

        lrs_send("socket1", "buf11", LrsLastArg);

        lrs_close_socket("socket1");

    lrs_create_socket("socket2", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket2", "buf12", LrsLastArg);

        lrs_send("socket2", "buf13", LrsLastArg);

        lrs_receive("socket2", "buf14", LrsLastArg);

        lrs_send("socket2", "buf15", LrsLastArg);

        lrs_receive("socket2", "buf16", LrsLastArg);

        lrs_send("socket2", "buf17", LrsLastArg);

        lrs_receive("socket2", "buf18", LrsLastArg);

        lrs_send("socket2", "buf19", LrsLastArg);

        lrs_receive("socket2", "buf20", LrsLastArg);

        lrs_send("socket2", "buf21", LrsLastArg);

        lrs_receive("socket2", "buf22", LrsLastArg);

        lrs_send("socket2", "buf23", LrsLastArg);

        lrs_send("socket2", "buf24", LrsLastArg);

        lrs_receive("socket2", "buf25", LrsLastArg);

        lrs_close_socket("socket2");

        lrs_create_socket("socket3", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket3", "buf26", LrsLastArg);

        lrs_send("socket3", "buf27", LrsLastArg);

        lrs_receive("socket3", "buf28", LrsLastArg);

        lrs_send("socket3", "buf29", LrsLastArg);

        lrs_receive("socket3", "buf30", LrsLastArg);

        lrs_send("socket3", "buf31", LrsLastArg);

        lrs_receive("socket3", "buf32", LrsLastArg);

        lrs_send("socket3", "buf33", LrsLastArg);

        lrs_receive("socket3", "buf34", LrsLastArg);

        lrs_send("socket3", "buf35", LrsLastArg);

        lrs_close_socket("socket3");

        lrs_create_socket("socket4", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket4", "buf36", LrsLastArg);

        lrs_send("socket4", "buf37", LrsLastArg);

        lrs_receive("socket4", "buf38", LrsLastArg);

        lrs_send("socket4", "buf39", LrsLastArg);

        lrs_receive("socket4", "buf40", LrsLastArg);

        lrs_send("socket4", "buf41", LrsLastArg);

        lrs_receive("socket4", "buf42", LrsLastArg);

        lrs_send("socket4", "buf43", LrsLastArg);

        lrs_receive("socket4", "buf44", LrsLastArg);

        lrs_send("socket4", "buf45", LrsLastArg);

        lrs_close_socket("socket4");

        lrs_create_socket("socket5", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket5", "buf46", LrsLastArg);

        lrs_send("socket5", "buf47", LrsLastArg);

        lrs_receive("socket5", "buf48", LrsLastArg);

        lrs_send("socket5", "buf49", LrsLastArg);

        lrs_receive("socket5", "buf50", LrsLastArg);

        lrs_send("socket5", "buf51", LrsLastArg);

        lrs_receive("socket5", "buf52", LrsLastArg);

        lrs_send("socket5", "buf53", LrsLastArg);

        lrs_receive("socket5", "buf54", LrsLastArg);

        lrs_send("socket5", "buf55", LrsLastArg);

        lrs_send("socket5", "buf56", LrsLastArg);

        lrs_receive("socket5", "buf57", LrsLastArg);

        lrs_close_socket("socket5");

        lrs_create_socket("socket6", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket6", "buf58", LrsLastArg);

        lrs_send("socket6", "buf59", LrsLastArg);

        lrs_receive("socket6", "buf60", LrsLastArg);

        lrs_send("socket6", "buf61", LrsLastArg);

        lrs_receive("socket6", "buf62", LrsLastArg);

        lrs_send("socket6", "buf63", LrsLastArg);

        lrs_receive("socket6", "buf64", LrsLastArg);

        lrs_send("socket6", "buf65", LrsLastArg);

        lrs_receive("socket6", "buf66", LrsLastArg);

        lrs_send("socket6", "buf67", LrsLastArg);

        lrs_send("socket6", "buf68", LrsLastArg);

        lrs_receive("socket6", "buf69", LrsLastArg);

        lrs_close_socket("socket6");

        lrs_create_socket("socket7", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket7", "buf70", LrsLastArg);

        lrs_send("socket7", "buf71", LrsLastArg);

        lrs_receive("socket7", "buf72", LrsLastArg);

        lrs_send("socket7", "buf73", LrsLastArg);

        lrs_receive("socket7", "buf74", LrsLastArg);

        lrs_send("socket7", "buf75", LrsLastArg);

        lrs_receive("socket7", "buf76", LrsLastArg);

        lrs_send("socket7", "buf77", LrsLastArg);

        lrs_receive("socket7", "buf78", LrsLastArg);

        lrs_send("socket7", "buf79", LrsLastArg);

        lrs_send("socket7", "buf80", LrsLastArg);

        lrs_receive("socket7", "buf81", LrsLastArg);

        lrs_close_socket("socket7");

        lrs_create_socket("socket8", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket8", "buf82", LrsLastArg);

        lrs_send("socket8", "buf83", LrsLastArg);

        lrs_receive("socket8", "buf84", LrsLastArg);

        lrs_send("socket8", "buf85", LrsLastArg);

        lrs_receive("socket8", "buf86", LrsLastArg);

        lrs_send("socket8", "buf87", LrsLastArg);

        lrs_receive("socket8", "buf88", LrsLastArg);

        lrs_send("socket8", "buf89", LrsLastArg);

        lrs_receive("socket8", "buf90", LrsLastArg);

        lrs_send("socket8", "buf91", LrsLastArg);

        lrs_send("socket8", "buf92", LrsLastArg);

    lrs_receive("socket8", "buf93", LrsLastArg);

        lrs_close_socket("socket8");

        lrs_create_socket("socket9", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket9", "buf94", LrsLastArg);

        lrs_send("socket9", "buf95", LrsLastArg);

        lrs_receive("socket9", "buf96", LrsLastArg);

        lrs_send("socket9", "buf97", LrsLastArg);

        lrs_receive("socket9", "buf98", LrsLastArg);

        lrs_send("socket9", "buf99", LrsLastArg);

        lrs_receive("socket9", "buf100", LrsLastArg);

        lrs_send("socket9", "buf101", LrsLastArg);

        lrs_receive("socket9", "buf102", LrsLastArg);

        lrs_send("socket9", "buf103", LrsLastArg);

        lrs_close_socket("socket9");

        lrs_create_socket("socket10", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket10", "buf104", LrsLastArg);

        lrs_send("socket10", "buf105", LrsLastArg);

        lrs_receive("socket10", "buf106", LrsLastArg);

        lrs_send("socket10", "buf107", LrsLastArg);

        lrs_receive("socket10", "buf108", LrsLastArg);

        lrs_send("socket10", "buf109", LrsLastArg);

        lrs_receive("socket10", "buf110", LrsLastArg);

        lrs_send("socket10", "buf111", LrsLastArg);

        lrs_receive("socket10", "buf112", LrsLastArg);

        lrs_send("socket10", "buf113", LrsLastArg);

        lrs_close_socket("socket10");

        lrs_create_socket("socket11", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket11", "buf114", LrsLastArg);

        lrs_send("socket11", "buf115", LrsLastArg);

        lrs_receive("socket11", "buf116", LrsLastArg);

        lrs_send("socket11", "buf117", LrsLastArg);

        lrs_receive("socket11", "buf118", LrsLastArg);

        lrs_send("socket11", "buf119", LrsLastArg);

        lrs_receive("socket11", "buf120", LrsLastArg);

        lrs_send("socket11", "buf121", LrsLastArg);

        lrs_receive("socket11", "buf122", LrsLastArg);

        lrs_send("socket11", "buf123", LrsLastArg);

        lrs_close_socket("socket11");

        lrs_create_socket("socket12", "TCP", "LocalHost=127.0.0.1", "RemoteHost=192.168.100.198:3306", LrsLastArg);

        lrs_receive("socket12", "buf124", LrsLastArg);

        lrs_send("socket12", "buf125", LrsLastArg);

        lrs_receive("socket12", "buf126", LrsLastArg);

        lrs_send("socket12", "buf127", LrsLastArg);

        lrs_receive("socket12", "buf128", LrsLastArg);

        lrs_send("socket12", "buf129", LrsLastArg);

        lrs_receive("socket12", "buf130", LrsLastArg);

        lrs_send("socket12", "buf131", LrsLastArg);

        lrs_receive("socket12", "buf132", LrsLastArg);

        lrs_send("socket12", "buf133", LrsLastArg);

        lrs_close_socket("socket12");

        lrs_create_socket("socket19", "TCP", "LocalHost=127.0.0.1", "RemoteHost=searchme.3322.org:80", LrsLastArg);

        lrs_send("socket19", "buf194", LrsLastArg);

        lrs_receive("socket19", "buf195", LrsLastArg);

        return 0;
}




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