51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 840|回复: 0
打印 上一主题 下一主题

[求助] 生成的数据都一样,求帮助

[复制链接]
  • TA的每日心情
    开心
    2015-5-30 09:20
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2015-5-30 09:01:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    Action()
    {

            lr_start_transaction("购票");

            lr_think_time(18);

            web_reg_find("Text=Find Flight",
                    LAST);


            web_submit_data("reservations.pl_2",
                    "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
                    "Snapshot=t45.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=depart", "Value=Denver", ENDITEM,
                    "Name=departDate", "Value=05/28/2015", ENDITEM,
                    "Name=arrive", "Value={arrive}", ENDITEM,
                    "Name=returnDate", "Value=05/29/2015", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=seatPref", "Value={seatPref}", ENDITEM,
                    "Name=seatType", "Value={seatType}", ENDITEM,
                    "Name=.cgifields", "Value=roundtrip", ENDITEM,
                    "Name=.cgifields", "Value=seatType", ENDITEM,
                    "Name=.cgifields", "Value=seatPref", ENDITEM,
                    "Name=findFlights.x", "Value=52", ENDITEM,
                    "Name=findFlights.y", "Value=10", ENDITEM,
                    LAST);

            web_submit_data("reservations.pl_3",
                    "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                    "Snapshot=t46.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=outboundFlight", "Value=010;386;05/28/2015", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=seatType", "Value={seatType}", ENDITEM,
                    "Name=seatPref", "Value={seatPref}", ENDITEM,
                    "Name=reserveFlights.x", "Value=37", ENDITEM,
                    "Name=reserveFlights.y", "Value=6", ENDITEM,
                    LAST);

            web_submit_data("reservations.pl_4",
                    "Action=http://127.0.0.1:1080/WebTours/reservations.pl",
                    "Method=POST",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
                    "Snapshot=t47.inf",
                    "Mode=HTTP",
                    ITEMDATA,
                    "Name=firstName", "Value=Joseph", ENDITEM,
                    "Name=lastName", "Value=Marshall", ENDITEM,
                    "Name=address1", "Value=234 Willow Drive", ENDITEM,
                    "Name=address2", "Value=San Jose/CA/94085", ENDITEM,
                    "Name=pass1", "Value=Joseph Marshall", ENDITEM,
                    "Name=creditCard", "Value=123456", ENDITEM,
                    "Name=expDate", "Value=01/16", ENDITEM,
                    "Name=saveCC", "Value=on", ENDITEM,
                    "Name=oldCCOption", "Value=on", ENDITEM,
                    "Name=numPassengers", "Value=1", ENDITEM,
                    "Name=seatType", "Value={seatType}", ENDITEM,
                    "Name=seatPref", "Value={seatPref}", ENDITEM,
                    "Name=outboundFlight", "Value=010;386;05/28/2015", ENDITEM,
                    "Name=advanceDiscount", "Value=0", ENDITEM,
                    "Name=returnFlight", "Value=", ENDITEM,
                    "Name=JSFormSubmit", "Value=off", ENDITEM,
                    "Name=.cgifields", "Value=saveCC", ENDITEM,
                    "Name=buyFlights.x", "Value=39", ENDITEM,
                    "Name=buyFlights.y", "Value=7", ENDITEM,
                    LAST);

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

            lr_end_transaction("购票", LR_AUTO);

            lr_think_time(5);

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

            web_concurrent_start(NULL);

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

            web_url("nav.pl_4",
                    "URL=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=itinerary",
                    "Resource=0",
                    "RecContentType=text/html",
                    "Referer=http://127.0.0.1:1080/WebTours/welcome.pl?page=itinerary",
                    "Snapshot=t51.inf",
                    "Mode=HTTP",
                    LAST);

            web_concurrent_end(NULL);

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

            web_concurrent_start(NULL);

            web_url("cancelallreservations.gif",
                    "URL=http://127.0.0.1:1080/WebTours/images/cancelallreservations.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
                    "Snapshot=t53.inf",
                    LAST);

            web_url("cancelreservation.gif",
                    "URL=http://127.0.0.1:1080/WebTours/images/cancelreservation.gif",
                    "Resource=1",
                    "RecContentType=image/gif",
                    "Referer=http://127.0.0.1:1080/WebTours/itinerary.pl",
                    "Snapshot=t54.inf",
                    LAST);

            web_concurrent_end(NULL);

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

    使用道具 举报

    本版积分规则

    关闭

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

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

    GMT+8, 2024-11-7 09:28 , Processed in 0.061955 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

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