51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2421|回复: 13
打印 上一主题 下一主题

[讨论] URL模式录制的脚本不用做关联吗?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-7-8 11:00:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
刚用URL模式录了个脚本,没做关联回放也成功了,这是为什么。

这个过程用html模式录制的话是需要做关联的
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情

    2016-12-30 10:59
  • 签到天数: 6 天

    连续签到: 1 天

    [LV.2]测试排长

    2#
    发表于 2008-7-8 11:17:12 | 只看该作者
    代码贴上来
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
     楼主| 发表于 2008-7-8 11:23:49 | 只看该作者
    Action()
    {

            web_url("mercuryWebTours",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=",
                    "Snapshot=t1.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_start(NULL);

            web_url("header.html",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/header.html",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/",
                    "Snapshot=t2.inf",
                    "Mode=HTTP",
                    LAST);

            web_url("welcome.pl",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/",
                    "Snapshot=t4.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_url("mercury_logo.gif",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/images/mercury_logo.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/header.html",
                    "Snapshot=t3.inf",
                    LAST);

            web_concurrent_start(NULL);

            web_url("home.html",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/home.html",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
                    "Snapshot=t5.inf",
                    "Mode=HTTP",
                    LAST);

            web_url("nav.pl",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=true",
                    "Snapshot=t7.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_url("fma-gateway.jpg",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-gateway.jpg",
                    "Resource=1",
                    "RecContentType=image/jpeg",
                    "Referer=http://127.0.0.1:1080/MercuryWebTours/home.html",
                    "Snapshot=t6.inf",
                    LAST);

            web_concurrent_start(NULL);

            web_url("JSFormSubmit.js",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js",
                    "Resource=1",
                    "RecContentType=application/x-javascript",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Snapshot=t8.inf",
                    LAST);

            web_url("mer_login.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/mer_login.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Snapshot=t9.inf",
                    LAST);

            web_concurrent_end(NULL);

            lr_think_time(8);

            web_submit_data("login.pl",
                    "Action=http://127.0.0.1:1080/mercuryWebTours/login.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Snapshot=t10.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=userSession", "Value=98459.4634264885fAztfAipzfDADiHpAfVQ", ENDITEM,
                    "Name=username", "Value=123", ENDITEM,
                    "Name=password", "Value=123456", ENDITEM,
                    "Name=JSFormSubmit", "Value=on", ENDITEM,
                    "Name=login.x", "Value=72", ENDITEM,
                    "Name=login.y", "Value=9", ENDITEM,
                    LAST);

            web_concurrent_start(NULL);

            web_url("nav.pl_2",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl",
                    "Snapshot=t11.inf",
                    "Mode=HTTP",
                    LAST);

            web_url("login.pl_2",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/login.pl?intro=true",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl",
                    "Snapshot=t16.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_concurrent_start(NULL);

            web_url("flights.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/flights.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Snapshot=t12.inf",
                    LAST);

            web_url("itinerary.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/itinerary.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Snapshot=t13.inf",
                    LAST);

            web_url("in_home.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/in_home.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Snapshot=t14.inf",
                    LAST);

            web_url("signoff.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/signoff.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Snapshot=t15.inf",
                    LAST);

            web_concurrent_end(NULL);

            web_url("fma-performance-center.jpg",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-performance-center.jpg",
                    "Resource=1",
                    "RecContentType=image/jpeg",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/login.pl?intro=true",
                    "Snapshot=t17.inf",
                    LAST);

            web_url("Search Flights Button",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=home",
                    "Snapshot=t18.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_start(NULL);

            web_url("nav.pl_3",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
                    "Snapshot=t19.inf",
                    "Mode=HTTP",
                    LAST);

            web_url("reservations.pl",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?page=search",
                    "Snapshot=t22.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_concurrent_start(NULL);

            web_url("in_flights.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/in_flights.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Snapshot=t20.inf",
                    LAST);

            web_url("itinerary.gif_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/itinerary.gif",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Mode=HTTP",
                    LAST);

            web_url("home.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/home.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Snapshot=t21.inf",
                    LAST);

            web_url("signoff.gif_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/signoff.gif",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_concurrent_start(NULL);

            web_url("fma-products.jpg",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/images/fma-products.jpg",
                    "Resource=1",
                    "RecContentType=image/jpeg",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
                    "Snapshot=t23.inf",
                    LAST);

            web_url("button_next.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/button_next.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
                    "Snapshot=t24.inf",
                    LAST);

            web_concurrent_end(NULL);

            lr_think_time(6);

            web_url("FormDateUpdate.class",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/FormDateUpdate.class",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=",
                    "Mode=HTTP",
                    LAST);

            web_url("CalSelect.class",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/CalSelect.class",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=",
                    "Mode=HTTP",
                    LAST);

            web_url("Calendar.class",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/Calendar.class",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=",
                    "Mode=HTTP",
                    LAST);

            lr_think_time(14);

            web_submit_data("reservations.pl_2",
                    "Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl?page=welcome",
                    "Snapshot=t25.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=depart", "Value=Frankfurt", ENDITEM,
                    "Name=departDate", "Value=07/09/2008", ENDITEM,
                    "Name=arrive", "Value=London", ENDITEM,
                    "Name=returnDate", "Value=07/10/2008", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=seatPref", "Value=None", ENDITEM,
                    "Name=seatType", "Value=Coach", ENDITEM,
                    "Name=.cgifields", "Value=roundtrip", ENDITEM,
                    "Name=.cgifields", "Value=seatType", ENDITEM,
                    "Name=.cgifields", "Value=seatPref", ENDITEM,
                    "Name=findFlights.x", "Value=27", ENDITEM,
                    "Name=findFlights.y", "Value=12", ENDITEM,
                    LAST);

    }
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    4#
     楼主| 发表于 2008-7-8 11:23:57 | 只看该作者
    web_submit_data("reservations.pl_3",
                    "Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Snapshot=t26.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=outboundFlight", "Value=120;266;07/09/2008", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=seatType", "Value=Coach", ENDITEM,
                    "Name=seatPref", "Value=None", ENDITEM,
                    "Name=reserveFlights.x", "Value=40", ENDITEM,
                    "Name=reserveFlights.y", "Value=9", ENDITEM,
                    LAST);

            web_submit_data("reservations.pl_4",
                    "Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Snapshot=t27.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=firstName", "Value=1", ENDITEM,
                    "Name=lastName", "Value=23", ENDITEM,
                    "Name=address1", "Value=123", ENDITEM,
                    "Name=address2", "Value=123", ENDITEM,
                    "Name=pass1", "Value=1 23", ENDITEM,
                    "Name=creditCard", "Value=", ENDITEM,
                    "Name=expDate", "Value=", ENDITEM,
                    "Name=oldCCOption", "Value=", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=seatType", "Value=Coach", ENDITEM,
                    "Name=seatPref", "Value=None", ENDITEM,
                    "Name=outboundFlight", "Value=120;266;07/09/2008", ENDITEM,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=returnFlight", "Value=", ENDITEM,
                    "Name=JSFormSubmit", "Value=off", ENDITEM,
                    "Name=.cgifields", "Value=saveCC", ENDITEM,
                    "Name=buyFlights.x", "Value=31", ENDITEM,
                    "Name=buyFlights.y", "Value=10", ENDITEM,
                    LAST);

            web_url("bookanother.gif",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/bookanother.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Snapshot=t28.inf",
                    LAST);

            web_submit_data("reservations.pl_5",
                    "Action=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Snapshot=t29.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=Book Another.x", "Value=44", ENDITEM,
                    "Name=Book Another.y", "Value=9", ENDITEM,
                    LAST);

            web_url("button_next.gif_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/button_next.gif",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/reservations.pl",
                    "Mode=HTTP",
                    LAST);

            web_url("welcome.pl_2",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?page=menu&in=flights",
                    "Snapshot=t30.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_start(NULL);

            web_url("home.html_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/home.html",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
                    "Snapshot=t31.inf",
                    "Mode=HTTP",
                    LAST);

            web_url("nav.pl_4",
                    "URL=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/welcome.pl?signOff=1",
                    "Snapshot=t32.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            web_url("fma-gateway.jpg_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/fma-gateway.jpg",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/MercuryWebTours/home.html",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_start(NULL);

            web_url("JSFormSubmit.js_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Mode=HTTP",
                    LAST);

            web_url("mer_login.gif_2",
                    "URL=http://127.0.0.1:1080/MercuryWebTours/images/mer_login.gif",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/mercuryWebTours/nav.pl?in=home",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

            return 0;
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
     楼主| 发表于 2008-7-8 11:27:00 | 只看该作者
    附件

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

    x
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2008-7-8 11:30:34 | 只看该作者
    Action.c(408): 注册 web_url("nav.pl_4") 成功          [MsgId: MMSG-26390]
    Action.c(417): web_concurrent_end 已成功,1490 个正文字节,253 介标头字节          [MsgId: MMSG-26386]
    Action.c(419): 资源“”已在缓存中,不会再次下载          [MsgId: MMSG-26655]
    Action.c(427): web_concurrent_start 成功          [MsgId: MMSG-26392]
    Action.c(429): 资源“http://127.0.0.1:1080/MercuryWebTours/JSFormSubmit.js”已在缓存中,不会再次下载          [MsgId: MMSG-26655]
    Action.c(437): 资源“”已在缓存中,不会再次下载          [MsgId: MMSG-26655]
    Action.c(445): web_concurrent_end 成功          [MsgId: MMSG-26392]
    正在结束操作 Action。
    正在结束迭代 1。
    正在结束 Vuser...
    正在开始操作 vuser_end。
    正在结束操作 vuser_end。
    Vuser 已终止。

    [ 本帖最后由 test7 于 2008-7-8 11:40 编辑 ]
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    7#
    发表于 2008-7-8 11:45:22 | 只看该作者
    没有特殊情况不要用url_basescript录制脚本看的头疼,然后关不关联和录制无关
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    8#
     楼主| 发表于 2008-7-8 11:54:24 | 只看该作者
    但是没关联回放成功了,怎么回事,用html时是要关联的
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    9#
     楼主| 发表于 2008-7-9 10:06:14 | 只看该作者
    咋回事儿啊,有人知道吗
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2019-9-27 12:46
  • 签到天数: 179 天

    连续签到: 1 天

    [LV.7]测试师长

    10#
    发表于 2008-7-9 11:06:43 | 只看该作者
    你录制的什么操作阿?
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    11#
     楼主| 发表于 2008-7-9 23:09:39 | 只看该作者
    就是LR自带的那个订票系统的订票
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2019-9-27 12:46
  • 签到天数: 179 天

    连续签到: 1 天

    [LV.7]测试师长

    12#
    发表于 2008-7-10 10:31:57 | 只看该作者
    这个不需要做关联吧
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    13#
     楼主| 发表于 2008-7-10 15:42:30 | 只看该作者
    需要
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2019-9-27 12:46
  • 签到天数: 179 天

    连续签到: 1 天

    [LV.7]测试师长

    14#
    发表于 2008-7-10 15:54:03 | 只看该作者
    如果只是进行订票的话,不需要关联。
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-9-25 17:16 , Processed in 0.077607 second(s), 26 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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