51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

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

[原创] url中的动态数据如何获取或参数化?哪位帮忙解答

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-8-24 07:35:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
录制一脚本,发现url中的数据是获取的,如"Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
其中的u=15为学号,un=lu15为学生姓名,登陆时已对登陆学生进行参数化,请问这边的url中的u=15和un=lu15如何获取?
部分录制代码如下
Action()
{       

        web_url("Login.aspx_2",
                "URL=http://192.168.0.10/allpasshrct/ashx/Login.aspx?_=1282296616421&username={NewParam}&password=1&model=1",
                "Resource=1",
                "RecContentType=text/plan",
                "Referer=http://192.168.0.10/allpasshrct/Login.aspx",
                "Snapshot=t17.inf",
                LAST);

        web_concurrent_end(NULL);

        lr_think_time(7);

        web_url("Main.aspx",
                "URL=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t18.inf",
                "Mode=HTTP",
                LAST);

        web_concurrent_start(NULL);

        web_url("textBg.gif_2",
                "URL=http://192.168.0.10/allpasshrct/images/login/textBg.gif",
                "Resource=1",
                "Referer=http://192.168.0.10/allpasshrct/Login.aspx",
                LAST);

        web_url("main.css",
                "URL=http://192.168.0.10/allpasshrct/styles/main.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t19.inf",
                LAST);

        web_url("frame.css",
                "URL=http://192.168.0.10/allpasshrct/styles/frame.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t20.inf",
                LAST);

        web_url("jquery-1.3.2.js_2",
                "URL=http://192.168.0.10/allpasshrct/js/jquery-1.3.2.js",
                "Resource=1",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                LAST);

        web_url("png.js_2",
                "URL=http://192.168.0.10/allpasshrct/js/png.js",
                "Resource=1",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                LAST);

        web_url("logo.gif_2",
                "URL=http://192.168.0.10/allpasshrct/images/main/logo.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t21.inf",
                LAST);

        web_url("left_ico11.png",
                "URL=http://192.168.0.10/allpasshrct/images/main/left_ico11.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t22.inf",
                LAST);

        web_url("exit.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/exit.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t23.inf",
                LAST);

        web_url("left_ico10.png",
                "URL=http://192.168.0.10/allpasshrct/images/main/left_ico10.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t24.inf",
                LAST);

        web_url("left_ico13.png",
                "URL=http://192.168.0.10/allpasshrct/images/main/left_ico13.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t25.inf",
                LAST);

        web_url("CaseList.aspx",
                "URL=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t26.inf",
                "Mode=HTTP",
                LAST);

        web_url("left_ico12.png",
                "URL=http://192.168.0.10/allpasshrct/images/main/left_ico12.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t30.inf",
                LAST);

        web_url("left_ico8.png",
                "URL=http://192.168.0.10/allpasshrct/images/main/left_ico8.png",
                "Resource=1",
                "RecContentType=image/png",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t32.inf",
                LAST);

        web_concurrent_end(NULL);

        web_concurrent_start(NULL);

        web_url("leftnav_title.jpg",
                "URL=http://192.168.0.10/allpasshrct/images/main/leftnav_title.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t27.inf",
                LAST);

        web_url("leftnav_bottom.jpg",
                "URL=http://192.168.0.10/allpasshrct/images/main/leftnav_bottom.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t28.inf",
                LAST);

        web_url("arrowTitle.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/arrowTitle.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t29.inf",
                LAST);

        web_url("sub.css",
                "URL=http://192.168.0.10/allpasshrct/styles/sub.css",
                "Resource=1",
                "RecContentType=text/css",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t33.inf",
                LAST);

        web_url("ie.js",
                "URL=http://192.168.0.10/allpasshrct/js/ie.js",
                "Resource=1",
                "RecContentType=application/x-javascript",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t36.inf",
                LAST);

        web_url("arrowSearch.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/arrowSearch.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t37.inf",
                LAST);

        web_url("arrowList.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/arrowList.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t38.inf",
                LAST);

        web_url("arrowPages.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/arrowPages.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t40.inf",
                LAST);

        web_concurrent_end(NULL);

        web_url("bottomBg.jpg",
                "URL=http://192.168.0.10/allpasshrct/images/main/bottomBg.jpg",
                "Resource=1",
                "RecContentType=image/jpeg",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t31.inf",
                LAST);

        web_concurrent_start(NULL);

        web_url("topBg.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/topBg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t34.inf",
                LAST);

        web_url("leftNavbg.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/leftNavbg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t35.inf",
                LAST);

        web_concurrent_end(NULL);

        web_url("tipBg.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/tipBg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t39.inf",
                LAST);

        web_concurrent_start(NULL);

        web_url("btnBg.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/btnBg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t41.inf",
                LAST);

        web_url("headBg.gif",
                "URL=http://192.168.0.10/allpasshrct/images/main/headBg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t42.inf",
                LAST);

        web_url("btnBg.gif_2",
                "URL=http://192.168.0.10/allpasshrct/images/main/btnBg.gif",
                "Resource=1",
                "RecContentType=image/gif",
                "Referer=http://192.168.0.10/allpasshrct/Student/CaseList.aspx",
                "Snapshot=t43.inf",
                LAST);

        web_concurrent_end(NULL);

        web_url("案例实验",
                "URL=http://192.168.0.10/allpasshrct/Student/ExamList.aspx",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.10/allpasshrct/Student/Main.aspx?u=15&un=lu15",
                "Snapshot=t44.inf",
                "Mode=HTTP",
                LAST);

        web_url("进入",
                "URL=http://192.168.0.10/allpasshrct/Student/ExamCaseList.aspx?eid=1&role=2&gid=2",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://192.168.0.10/allpasshrct/Student/ExamList.aspx",
                "Snapshot=t45.inf",
                "Mode=HTTP",
                LAST);
        return 0;
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

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

    连续签到: 1 天

    [LV.7]测试师长

    2#
    发表于 2010-8-24 13:58:10 | 只看该作者
    动态数据要用关联
    回复 支持 反对

    使用道具 举报

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

    连续签到: 1 天

    [LV.1]测试小兵

    3#
    发表于 2010-8-25 22:01:07 | 只看该作者

    答:

    在上一个请求的返回值里。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

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

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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