51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2229|回复: 2
打印 上一主题 下一主题

[求助] 选择Winsockets协议录制脚本时出错

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-6-26 14:54:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
公司一个C/S结构的程序,用CSharp语言开发,客户端与服务器间采用TCP进行通讯 ,我在Windows server 2003 SP1系统上用Loadrunner8.1中文版选择Windows Sockets协议对其进行脚本录制,在录制日志中连续报错:/* Error -   WSPrecv: asynchronous receive call */
   
   脚本如下:
     lrs_startup(257);

    lrs_create_socket("socket0", "TCP", "RemoteHost=192.168.3.105:1433",  LrsLastArg);

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

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

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

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

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

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

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

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

   
    return 0;

   前半部分录制日志如下:

14:05:39.109 /* WSAStartup(): process 888 using flags 0 */

14:05:39.171 /* ReadCommWindowInfo: HttpInterceptMode = 0 */

14:05:39.187 /* socket(): created with handle: 888:816, address format 2, type 1, protocol 0. */

14:05:39.187 /* connect(): socket 888:816 tried to connect with family 2, port 1433, and address 0xc0a80369. Return value: 0 */

14:05:39.187 /* setsockopt(): socket 888:816, level: 0x6, optname: 0x1, optval: 1 */

14:05:39.203 /* send(): 47 bytes were sent to socket 888:816 using flags 0 */

(send_0, 47, 816)
        "\x12\x01\x00"
        "/"
        "\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
        " "
        "\x00\x01\x02\x00"
        "!"
        "\x00\x01\x03\x00"
        "\""
        "\x00\x04\x04\x00"
        "&"
        "\x00\x01\xff"
        "\t"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "4"
        "\x00"


14:05:39.218 /* Error -   WSPrecv: asynchronous receive call */

14:05:39.218 /* recv(): 43 bytes were received from socket 888:816 using flags 0 (4096 were asked for) */

(recv_1, 4096, 816)
        "\x04\x01\x00"
        "+"
        "\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
        " "
        "\x00\x01\x02\x00"
        "!"
        "\x00\x01\x03\x00"
        "\""
        "\x00\x00\x04\x00"
        "\""
        "\x00\x01\xff"
        "\t"
        "\x00\x05"
        "w"
        "\x00\x00\x00\x00\x00"


14:05:39.218 /* send(): 78 bytes were sent to socket 888:816 using flags 0 */

(send_2, 78, 816)
        "\x12\x01\x00"
        "N"
        "\x00\x00\x00\x00\x16\x03\x01\x00"
        "A"
        "\x01\x00\x00"
        "="
        "\x03\x01"
        "Hc1躇8=狆"
        "\x12"
        "N賏"
        "\xb7"
        "2<院"
        "\x9b\x12"
        "涓+"
        "\xcc"
        "68"
        "\xc5"
        "*仅"
        "\xc7\x00\x00\x00\x16\x00\x04\x00\x05\x00"
        "\n"
        "\x00"
        "\t"
        "\x00"
        "d"
        "\x00"
        "b"
        "\x00\x03\x00\x06\x00\x13\x00\x12\x00"
        "c"
        "\x01\x00"


14:05:39.218 /* Error -   WSPrecv: asynchronous receive call */

   在data.ws文件中对应的内容是:

;WSRData 2 1

send  buf0 47
        "\x12\x01\x00"
        "/"
        "\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
        " "
        "\x00\x01\x02\x00"
        "!"
        "\x00\x01\x03\x00"
        "\""
        "\x00\x04\x04\x00"
        "&"
        "\x00\x01\xff"
        "\t"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "4"
        "\x00"

recv  buf1 43
        "\x04\x01\x00"
        "+"
        "\x00\x00\x01\x00\x00\x00\x1a\x00\x06\x01\x00"
        " "
        "\x00\x01\x02\x00"
        "!"
        "\x00\x01\x03\x00"
        "\""
        "\x00\x00\x04\x00"
        "\""
        "\x00\x01\xff"
        "\t"
        "\x00\x05"
        "w"
        "\x00\x00\x00\x00\x00"

send  buf2 78
        "\x12\x01\x00"
        "N"
        "\x00\x00\x00\x00\x16\x03\x01\x00"
        "A"
        "\x01\x00\x00"
        "="
        "\x03\x01"
        "Hc1躇8=狆"
        "\x12"
        "N賏"
        "\xb7"
        "2<院"
        "\x9b\x12"
        "涓+"
        "\xcc"
        "68"
        "\xc5"
        "*仅"
        "\xc7\x00\x00\x00\x16\x00\x04\x00\x05\x00"
        "\n"
        "\x00"
        "\t"
        "\x00"
        "d"
        "\x00"
        "b"
        "\x00\x03\x00\x06\x00\x13\x00\x12\x00"
        "c"
        "\x01\x00"


   对脚本进行回放时则在最后一句脚本处提示:错误: socket0 - 软件造成连接终止。错误代码: 10053

   我花了很多时间在网上搜索相关的问题和资料,以及按照帮助中提供的关于错误码10053对应的解决办法,但是均未能成功解决该问题,请各位指点一二,谢谢!
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-6-29 00:16:09 | 只看该作者
1433是SQL SERVER的默认端口,该被测试程序的客户端是直接对数据库进行的操作? 如果是数据库相关操作的程序,可以选择ODBC协议试验下.
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2008-6-29 14:41:17 | 只看该作者
多谢指点,呵呵
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-5-8 09:06 , Processed in 0.068587 second(s), 25 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表