51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2238|回复: 5
打印 上一主题 下一主题

[原创] 用LR录制C/S程序后的脚本

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-3-19 15:44:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用LR录制C/S程序后的脚本见下,这些脚本要怎么看呢?知道的朋友请指点下。
Action()
{
    lrs_send("socket0", "buf148", LrsLastArg);
    lrs_receive("socket0", "buf149", LrsLastArg);
    lrs_send("socket0", "buf150", LrsLastArg);
    lrs_receive("socket0", "buf151", LrsLastArg);
    lrs_send("socket0", "buf152", LrsLastArg);
    lrs_receive("socket0", "buf153", LrsLastArg);
    lrs_send("socket0", "buf154", LrsLastArg);
    lrs_receive("socket0", "buf155", LrsLastArg);
    lrs_send("socket0", "buf156", LrsLastArg);
    lrs_receive("socket0", "buf157", LrsLastArg);
    lrs_send("socket0", "buf158", LrsLastArg);
    lrs_receive("socket0", "buf159", LrsLastArg);
    lrs_send("socket0", "buf160", LrsLastArg);
    lrs_receive("socket0", "buf161", LrsLastArg);
    lrs_send("socket0", "buf162", LrsLastArg);
    lrs_receive("socket0", "buf163", LrsLastArg);
    lrs_send("socket0", "buf164", LrsLastArg);
    lrs_receive("socket0", "buf165", LrsLastArg);
    lrs_send("socket0", "buf166", LrsLastArg);
    lrs_receive("socket0", "buf167", LrsLastArg);
    lrs_send("socket0", "buf168", LrsLastArg);
    lrs_receive("socket0", "buf169", LrsLastArg);
    lrs_send("socket0", "buf170", LrsLastArg);
    lrs_receive("socket0", "buf171", LrsLastArg);
    lrs_send("socket0", "buf172", LrsLastArg);
    lrs_receive("socket0", "buf173", LrsLastArg);
    lrs_send("socket0", "buf174", LrsLastArg);
    lrs_receive("socket0", "buf175", LrsLastArg);
    lrs_send("socket0", "buf176", LrsLastArg);
    lrs_receive("socket0", "buf177", LrsLastArg);
    lrs_send("socket0", "buf178", LrsLastArg);
    lrs_receive("socket0", "buf179", LrsLastArg);
    lrs_send("socket0", "buf180", LrsLastArg);
    lrs_receive("socket0", "buf181", LrsLastArg);
    lrs_send("socket0", "buf182", LrsLastArg);
    lrs_receive("socket0", "buf183", LrsLastArg);
    lrs_send("socket0", "buf184", LrsLastArg);
    lrs_receive("socket0", "buf185", LrsLastArg);
    lrs_send("socket0", "buf186", LrsLastArg);
    lrs_receive("socket0", "buf187", LrsLastArg);
    lrs_send("socket0", "buf188", LrsLastArg);
    lrs_receive("socket0", "buf189", LrsLastArg);
    lrs_send("socket0", "buf190", LrsLastArg);
    lrs_receive("socket0", "buf191", LrsLastArg);
    lrs_send("socket0", "buf192", LrsLastArg);
    lrs_receive("socket0", "buf193", LrsLastArg);
    lrs_send("socket0", "buf194", LrsLastArg);
    lrs_receive("socket0", "buf195", LrsLastArg);
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-3-20 11:07:29 | 只看该作者
我也遇到过同样的问题,答案寻找中!~~~~
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2014-12-26 13:34
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    3#
    发表于 2008-3-21 10:10:59 | 只看该作者

    针对端口数据的

    lrs_receive("socket0", "buf169", LrsLastArg);
    接收/发送某字符串到指定端口
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2014-12-26 13:34
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    4#
    发表于 2008-3-21 10:11:51 | 只看该作者

    Receives data from a datagram or stream socket.

    The lrs_receive function reads the incoming data from a datagram or stream socket. If no incoming data is available at the socket, lrs_receive waits for data to arrive unless the socket is non-blocking.

    VuGen determines the expected size of the buffer from the recorded session. If the buffer size does not match (smaller or larger), lrs_receive rereads the incoming data carried by the socket, until the receive_timeout. By default the receive_timeout is 10 seconds. You can modify the timeout using lrs_set_recv_timeout or lrs_set_recv_timeout2.

    Note that the successful completion of a lrs_receive does not indicate that all of the data was successfully received. If the received buffer does not match the expected buffer, VuGen sends a message to the output indicating the mismatch and continues with script execution.

    If the socket's type is TCP and the remote side has shut down the connection in an orderly way, lrs_receive finishes without returning any data. If the connection was aborted, lrs_receive returns one of the Windows Sockets error codes.

    This function is recorded during a Windows Socket session
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
    发表于 2008-3-21 10:39:53 | 只看该作者
    怎么不去看data.ws里面的内容,内容都在里面
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2008-3-25 14:27:38 | 只看该作者
    那里面的脚本和ACTION里面的脚本有什么区别啊?
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-5-29 11:14 , Processed in 0.079521 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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