51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1926|回复: 7
打印 上一主题 下一主题

[求助] LR录制时事物里没有脚本,但是事物之外都有脚本,求原因

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2016-9-20 22:47:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本人使用LR11.0录制脚本,录制过程中在Action里插入两个事物,一个是“login”,一个是“search”,但是不知道为什么,“search”里没有脚本,但“login”里就有。
操作系统:win7,IE8。在html和url下都试过,都没有脚本。注:由于发帖有长度限制,所以脚本我删除了写部分,原本会比这个长很多。
以下是脚本请大神帮看看:这是html下录制的
Action()
{

    web_url("default.jsp",
        "URL=http://192.168.1.100:9000/evm/loginTo/default.jsp",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=",
        "Snapshot=t1.inf",
        "Mode=HTML",
        
        LAST);

    web_url("login.jsp",
        "URL=http://192.168.1.100:9000/evm/loginTo/workbench/login.jsp?rnd=0.19001930245101922",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
        "Snapshot=t2.inf",
        "Mode=HTML",
        LAST);

    lr_start_transaction("login");

    web_custom_request("validate",
        "URL=http://192.168.1.100:9000/evm/iscintegrate/rest/common/loginuser/validate?rnd=0.2646557110074934",
        "Method=POST",
        "Resource=0",
        "RecContentType=application/json",
        "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
        "Snapshot=t3.inf",
        "Mode=HTML",
        "EncType=application/json",
        "Body={\"params\":{\"userName\":\"zl\",\"password\":\"efe5f492d66028e364d88dd0e0db3626\"}}",
        LAST);

    lr_end_transaction("login",LR_AUTO);

    web_url("index.jsp",
        "URL=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364",
        "Resource=0",
        "RecContentType=text/html",
        "Referer=http://192.168.1.100:9000/evm/loginTo/default.jsp",
        "Snapshot=t4.inf",
        "Mode=HTML",
        EXTRARES,
        "Url=scripts/weblet.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=scripts/views/MainViewController.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=resources/locales/zh_CN/messages.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=scripts/views/MainView.js", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=resources/css/expertSignIn.css", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=resources/img/linkman.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=resources/img/time.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=resources/img/site.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=../rest/eexperttasksign/getExperts/task/null?rnd=0.442307750483315&_=1474334214943", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/drop_down_button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/data_grid_head_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_previousPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_nextPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/button_active.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_firstPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_lastPage.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_refresh.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=../rest/eexperttasksign/querySignInByExpert/%7B%22items%22:[%7B%22taskId%22:%22ca8ae0ea46f5481bb80c6bc1f668c9a1%22,%22searchFashion%22:%22expert%22,%22time%22:null,%22expert%22:null,%22state%22:null%7D]%7D?rnd=0.2192632580960126&params=%7B%22columns%22%3A%22id%2CexpertName%2CunitName%2CsignStartDay%2CsignDays%2CsignEndDay%2CtaskState%2CtaskId%22%2C%22pageIndex%22%3A1%2C%22pageSize%22%3A20%7D&_=1474334218640", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id="
        "M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/calendar_button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_firstPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_previousPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_lastPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/pagenavibar_nextPage_disabled.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/deleteContainer_but.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=/evm/mx/resources/themes/aero/images/button_bg.png", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id=M00000014&rnd=0.15398777873437364", ENDITEM,
        "Url=../rest/eexperttasksign/querySignInByExpert/%7B%22items%22:[%7B%22taskId%22:%221684744b5707490dbafcd65d761c6e7b%22,%22searchFashion%22:%22expert%22,%22time%22:null,%22expert%22:null,%22state%22:null%7D]%7D?rnd=0.9189602636882137&params=%7B%22columns%22%3A%22id%2CexpertName%2CunitName%2CsignStartDay%2CsignDays%2CsignEndDay%2CtaskState%2CtaskId%22%2C%22pageIndex%22%3A1%2C%22pageSize%22%3A20%7D&_=1474334229092", "Referer=http://192.168.1.100:9000/evm/reportManagement/expertSignIn/index.jsp?id="
        "M00000014&rnd=0.15398777873437364", ENDITEM,
        LAST);

    lr_start_transaction("search");

    lr_end_transaction("search",LR_AUTO);

    return 0;
}

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    开心
    2018-5-3 18:09
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    2#
    发表于 2016-9-21 14:32:05 | 只看该作者
    请同学贴下你的Search操作时的抓包信息  

    评分

    参与人数 1测试积点 +10 收起 理由
    lsekfe + 10 积极回复获得测试积点10

    查看全部评分

    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
     楼主| 发表于 2016-9-21 20:48:20 | 只看该作者
    菜鸟@大虾 发表于 2016-9-21 14:32
    请同学贴下你的Search操作时的抓包信息

    怎么抓包,我不会,我是刚学会用的。谢谢指教!
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    15 小时前
  • 签到天数: 2804 天

    连续签到: 3 天

    [LV.Master]测试大本营

    4#
    发表于 2016-9-21 23:08:55 | 只看该作者
    确保search有协议操作
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
     楼主| 发表于 2016-9-22 15:25:53 | 只看该作者
    jingzizx 发表于 2016-9-21 23:08
    确保search有协议操作

    录制时,事件条上的数字一直都有变化的。这算是有协议操作吗?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-5-3 18:09
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    6#
    发表于 2016-9-23 14:19:06 | 只看该作者
    周苏 发表于 2016-9-21 20:48
    怎么抓包,我不会,我是刚学会用的。谢谢指教!

    你可以安装下HttpWatch  或者 直接开启Fiddler,然后 你要操作下你的Search事务中的步骤
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
     楼主| 发表于 2016-9-25 09:00:28 | 只看该作者
    菜鸟@大虾 发表于 2016-9-23 14:19
    你可以安装下HttpWatch  或者 直接开启Fiddler,然后 你要操作下你的Search事务中的步骤

    好的,谢谢!
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-6 23:29 , Processed in 0.070304 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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