51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3463|回复: 4
打印 上一主题 下一主题

[原创] loadrunner录制时的重定向问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-5-29 19:51:06 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
我也不确定是不是重定向的问题,姑且这里先这么叫着吧
录制时的脚本如下:


        web_url("mms",
                "URL=http://192.168.161.44:9081/mms",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "URL=/mms/images/blue/frame/login_Bg.png", "Referer=http://192.168.161.44:9081/mms/", ENDITEM,
                "URL=/mms/images/blue/frame/dImg2.gif", "Referer=http://192.168.161.44:9081/mms/", ENDITEM,
                LAST);

        web_submit_form("login.xhtml",
                "Snapshot=t2.inf",
                ITEMDATA,
                "Name=form1:txt_staffId", "Value=914000990", ENDITEM,
                "Name=form1:txt_password", "Value=tydic", ENDITEM,
                "Name=form1:j_id9.x", "Value=46", ENDITEM,
                "Name=form1:j_id9.y", "Value=12", ENDITEM,
                LAST);


          
        web_url("crmIndex.seam",
                "URL=http://192.168.161.44:9081/mms/frame/crmIndex.seam",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "URL=../js/Lib/base/Mask.js", ENDITEM,
                "URL=../js/Lib/base/Base.js", ENDITEM,
                "URL=../js/Lib/base/Clew.js", ENDITEM,
                "URL=../js/Lib/base/Cookies.js", ENDITEM,
                "URL=../js/Lib/base/PopUp.js", ENDITEM,
                "URL=../css/blue/main.css", ENDITEM,
                "URL=../css/blue/frame.css", ENDITEM,
                "URL=../css/blue/forms.css", ENDITEM,
                "URL=../css/blue/layout.css", ENDITEM,
                "URL=../css/blue/img.css", ENDITEM,
                "URL=../css/blue/ico.css", ENDITEM,
                "URL=../css/blue/default.css", ENDITEM,
                "URL=../css/blue/base.css", ENDITEM,
                "URL=../images/blue/frame/logo.jpg", ENDITEM,
                "URL=../a4j/g/3_2_2.GAorg.richfaces.renderkit.html.images.background.MenuListBackground/DATB/eAF7-e7j1XuPmQAYZQVh.do", ENDITEM,
                "URL=../images/blue/menu-zhi-bg.gif", ENDITEM,
                "URL=../images/blue/frame/banner_theme.jpg", ENDITEM,
                "URL=../images/blue/frame/banner_bg.jpg", ENDITEM,
                "URL=../images/blue/menu-bg.gif", ENDITEM,
                "URL=../images/blue/frame/menuIcon.gif", ENDITEM,
                "URL=../images/blue/shade.gif", ENDITEM,
                "URL=../images/blue/frame/selectAction.png", ENDITEM,
                "URL=../images/blue/frame/arrowUpDown.gif", "Referer=http://192.168.161.44:9081/mms/frame/C.xhtml", ENDITEM,
                "URL=../images/blue/frame/MaxMinClose.gif", "Referer=http://192.168.161.44:9081/mms/frame/C.xhtml", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/base.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/ico.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/layout.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/img.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/layout1.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/forms.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=914000990127512945394539&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Mask.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/PopUp.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Clew.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Cookies.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Base.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                LAST);



红色标记的地方时需要关联的地方,但是关联的内容也是在web_url("crmIndex.seam",)这里地方获取的。现在存在一个问题:抓取关联的地方时web_url("crmIndex.seam",),我需要使用关联结果的地方也是web_url("crmIndex.seam",)。我郁闷了~~~~~

服务器返回的结果:   Location: http://192.168.161.44:9080/cmcus ... doPageUrlByRoleId.a
  ction?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode=9140009901275129

我试过在web_reg_save_param()函数中加这个参数 IgnoreRedirections=Yes ,结果还是不行:
web_reg_save_param("authCode",
                "LB=authCode=",
                "RB=\"",
                "Ord=1",
                "IgnoreRedirections=Yes",
                LAST);

          
        web_url("crmIndex.seam",
                "URL=http://192.168.161.44:9081/mms/frame/crmIndex.seam",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t3.inf",
                "Mode=HTML",
                EXTRARES,
                "URL=../js/Lib/base/Mask.js", ENDITEM,
                "URL=../js/Lib/base/Base.js", ENDITEM,
                "URL=../js/Lib/base/Clew.js", ENDITEM,
                "URL=../js/Lib/base/Cookies.js", ENDITEM,
                "URL=../js/Lib/base/PopUp.js", ENDITEM,
                "URL=../css/blue/main.css", ENDITEM,
                "URL=../css/blue/frame.css", ENDITEM,
                "URL=../css/blue/forms.css", ENDITEM,
                "URL=../css/blue/layout.css", ENDITEM,
                "URL=../css/blue/img.css", ENDITEM,
                "URL=../css/blue/ico.css", ENDITEM,
                "URL=../css/blue/default.css", ENDITEM,
                "URL=../css/blue/base.css", ENDITEM,
                "URL=../images/blue/frame/logo.jpg", ENDITEM,
                "URL=../a4j/g/3_2_2.GAorg.richfaces.renderkit.html.images.background.MenuListBackground/DATB/eAF7-e7j1XuPmQAYZQVh.do", ENDITEM,
                "URL=../images/blue/menu-zhi-bg.gif", ENDITEM,
                "URL=../images/blue/frame/banner_theme.jpg", ENDITEM,
                "URL=../images/blue/frame/banner_bg.jpg", ENDITEM,
                "URL=../images/blue/menu-bg.gif", ENDITEM,
                "URL=../images/blue/frame/menuIcon.gif", ENDITEM,
                "URL=../images/blue/shade.gif", ENDITEM,
                "URL=../images/blue/frame/selectAction.png", ENDITEM,
                "URL=../images/blue/frame/arrowUpDown.gif", "Referer=http://192.168.161.44:9081/mms/frame/C.xhtml", ENDITEM,
                "URL=../images/blue/frame/MaxMinClose.gif", "Referer=http://192.168.161.44:9081/mms/frame/C.xhtml", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/base.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/ico.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/layout.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/img.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/layout1.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/css/blue/forms.css", "Referer=http://192.168.161.44:9080/cmcust/cust/sys_LoginMainPageDate_doPageUrlByRoleId.action?loginNo=914000990&menuCode=mms_cust_mange_mcust_mcust_cust&authCode={authCode}&target=A&roleId=1288&menuLinkFlag=1&parentRoleId=1279", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Mask.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/PopUp.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Clew.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Cookies.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                "URL=http://192.168.161.44:9080/cmcust/js/Lib/base/Base.js", "Referer=http://192.168.161.44:9080/cmcust/frame/frame.jsp", ENDITEM,
                LAST);


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

使用道具 举报

该用户从未签到

5#
 楼主| 发表于 2010-5-31 09:44:04 | 只看该作者

回复 4# 的帖子

我找了回请求中第一次出现sessionid的地方,发现出现的地方就是他用到的地方
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2010-5-31 09:00:30 | 只看该作者
sessionid这类的东西一定是服务器发给你的,所以在前面的返回请求中一定会出现
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2010-5-31 08:44:58 | 只看该作者

回复 2# 的帖子

如果不做任何的修改,是会报错的啊。报404错误,晕乎
回复 支持 反对

使用道具 举报

  • TA的每日心情
    奋斗
    2022-5-8 19:23
  • 签到天数: 137 天

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2010-5-30 15:35:35 | 只看该作者

    回复 1# 的帖子

    从你的脚本看,这只是referer,不需要参数化的
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-15 03:03 , Processed in 0.072388 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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