51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

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

[原创] 参数化后脚本回放提示socket1 - Connection reset by peer. Error code : 10054

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2009-2-4 16:05:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
脚本如下:
    lrs_create_socket("socket0", "TCP", "RemoteHost=TEMP:6998",  LrsLastArg);

        lrs_set_recv_timeout(120,0);

        lrs_set_recv_timeout2(120,0);

        lr_output_message("username:%s",lr_eval_string("<username>"));

        lr_output_message("password:%s",lr_eval_string("<password>"));

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

        lrs_save_param("socket0","buf0","param0",3,20);

        lr_output_message("param0:%s",lr_eval_string("<param0>"));

        lr_output_message("username:%s",lr_eval_string("<username>"));

        lr_output_message("password:%s",lr_eval_string("<password>"));


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

        lrs_save_param("socket0","buf1","param1",19,20);

        lr_output_message("param1:%s",lr_eval_string("<param1>"));

        lr_output_message("username:%s",lr_eval_string("<username>"));

        lr_output_message("password:%s",lr_eval_string("<password>"));

    lrs_close_socket("socket0");

    lrs_create_socket("socket1", "TCP", "RemoteHost=TEMP:6998",  LrsLastArg);

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

        lrs_save_param("socket1","buf2","param2",10,20);

        lr_output_message("param2:%s",lr_eval_string("<param2>"));

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

    lrs_create_socket("socket2", "UDP", "LocalHost=10000",  LrsLastArg);

    lrs_send("socket2", "buf4", "TargetSocket=TEMP:10000", LrsLastArg);

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

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

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

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

    lrs_send("socket2", "buf9", "TargetSocket=TEMP:10000", LrsLastArg);

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

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

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

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

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

    lrs_send("socket1", "buf15", LrsLastArg);
data.ws如下:
send  buf0 44
        "\xff\xcd"
        "&"
        "\x00\xff\xcd\x02"
        "<username>"
        "\x00"
        "<password>"
        "\x00"
        ""
        "\xfd"

recv  buf1 136
        "\xff\x00\x82\x00\xff\xff\x00\x00\xa2"
        "\""
        "\x00\x00"
        "监控中心"
        "\x00"
        "?username>"
        "\x00"
        ""
        "\x03\x01\x00"
        "F"
        "\x00\x00\x00"
        "7000"
        "\x00"
        "p"
        "\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "d"
        "\x00\x00\x00\x00\x00"
        "G"
        "\x00\x00\x00"
        "77787"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00"
        "\x00\x00\x00\x00\x1f\x00\x00\x00"
        "866"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
        "\n"
        "\x00\x00\x00\x00\x00"

send  buf2 54
        "\xff\xcd"
        "0"
        "\x00\xff\xcd\x03\x10\x00\x00\xa2"
        "\""
        "\x00\x00"
        "ii"
        "\x00"
        "ii"
        "\x00"
        "齱&"
        "\x00"

recv  buf3 114
        "\xff"
        "?\b"
        "\x00\xff\x00"
        "D\b"
        "\x00\x00\xa2"
        "\""
        "\x00\x00\xff\x00"
        "^"
        "\x00\xff"
        "t"
        "\x00\x00\x00\x00\x00\x00\xa2"
        "\""
        "\x00\x00"
        "\a"
        "\x00\x00"
        "H"
        "\x01\x00\x10"
        "'"
        "\x10"
        "'"
        "\x01\x00\xa2"
        "\""
        "\x00\x00\x00\x00\x00"
        "H系统管理员"
        "\x00"
        ""
        "\x01\x00\x00\x00\x00\x00\xff\xa2"
        "\""
        "\x00\x00"
        "\a"
        "\x00\x00"
        "Hii"
        "\x00"
        ""
        "\x01\x00\x00\x00\x00\x00\x00"

send  buf4 13
        "\x01\xa2"
        "\""
        "\x00\x00"
        "\a"
        "\x00\x00"
        "H"
        "\x00\x00\x00\x00"

recv  buf5 9
        "\x01"
        "\a"
        "\x00\x00"
        "H"
        "\x01\x00\x00\x00"

send  buf6 132
        "\xff\xcd"
        "\f"
        "\x00\xff\xcd\x01\x11\x00\x00\xff\xff\xff\xff\xc8\x00\x97\x01\xff\xcd"
        "\f"
        "\x00\xff\xcd\x01\x11\x00\x00\xff\xff\xff\xff\xc8\x00\x97\x01\xff\xcd"
        "\f"
        "\x00\xff\xcd\x01\x11\x00\x00\xff\xff\xff\xff\xc8\x00\x97\x01\xff\xcd"
        "\f"
        "\x00\xff\xcd\x01\x11\x00\x00\xff\xff\xff\xff\xc8\x00\x97\x01\xff\xcd\x02\x00"
        "\xff\xcd"
        ",\b"
        "\xff\xcd\x06\x00\xff\xcd\x01"
        "\b"
        "\x01\x00\x00\xff\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"

recv  buf7 8
        "\xff"
        "V"
        "\x02\x00\xff\xff"
        ",\b"

send  buf8 24
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"

send  buf9 13
        "\x01\xa2"
        "\""
        "\x00\x00"
        "\a"
        "\x00\x00"
        "H"
        "\x00\x00\x00\x00"

recv  buf10 9
        "\x01"
        "\a"
        "\x00\x00"
        "H"
        "\x01\x00\x00\x00"

send  buf11 16
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"

recv  buf12 8
        "\xff"
        "V"
        "\x02\x00\xff\x00"
        ",\b"

send  buf13 40
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"

recv  buf14 8
        "\xff"
        "V"
        "\x02\x00\xff\x00"
        ",\b"

send  buf15 16
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
        "\xff\xcd\x02\x00\xff\xcd"
        ",\b"
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2009-2-4 16:47:55 | 只看该作者
没有人知道么?我不参数化时回放便是正常的,一参数化就出问题
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2012-6-1 13:48:53 | 只看该作者
我的脚本回放就有问题,求解...
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-4 05:16 , Processed in 0.085132 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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