51Testing软件测试论坛

标题: 飞机订票系统参数化所有表单信息后回放报错,求助~~~ [打印本页]

作者: owen0529    时间: 2014-2-17 18:52
标题: 飞机订票系统参数化所有表单信息后回放报错,求助~~~
loadrunner飞机订票系统:
1、参数化find flight页面出发地点、时间、到达地点、时间等;
2、参数化payment detail页面用户所有信息;
3、在参数化中select next row中存在关联关系的,都是选择same line as ***
4、当回放时脚本在payment details页面时回放日志提示:Error -27979: Requested form not found          [MsgId: MERR-27979]
web_submit_form("reservations.pl_2") highest severity level was "ERROR", 0 body bytes, 0 header bytes          [MsgId: MMSG-26388]

脚本如下:

vuser_init()
{              web_reg_save_param(
                "guanlian",
                "LB=userSession value=",
                "RB=>",
                LAST);

        web_url("WebTours",
                "URL=http://localhost:1080/WebTours/",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                LAST);
return 0;
}

Action()
{

//设置登陆集合点   
        lr_rendezvous("start");

//设置登陆事务开始
        lr_start_transaction("登陆");
//设置文本检查点
        web_reg_find("Fail=NotFound",
                "Search=Body",
                "Text= <b>{name}",
                "SaveCount=num",
                LAST);

        web_submit_data("login.pl",
                "Action=http://localhost:1080/WebTours/login.pl",
                "Method=POST",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/nav.pl?in=home",
                "Snapshot=t2.inf",
                "Mode=HTML",
                ITEMDATA,
                "Name=userSession", "Value={guanlian}", ENDITEM,
                "Name=username", "Value={name}", ENDITEM,
                "Name=password", "Value={passwd}", ENDITEM,
                "Name=JSFormSubmit", "Value=off", ENDITEM,
                "Name=login.x", "Value=53", ENDITEM,
                "Name=login.y", "Value=7", ENDITEM,
                LAST);

//登陆事务结束
        lr_end_transaction("登陆", LR_AUTO);

//设置机票查询事务
        lr_start_transaction("查询");

        web_image("Search Flights Button",
                "Alt=Search Flights Button",
                "Snapshot=t3.inf",
                LAST);

        web_submit_form("reservations.pl",
                "Snapshot=t4.inf",
                ITEMDATA,
                "Name=depart", "Value={DEPART}", ENDITEM,
                "Name=departDate", "Value={DEPART_DT}", ENDITEM,
                "Name=arrive", "Value={ARRIVAL}", ENDITEM,
                "Name=returnDate", "Value={ARRIVAL_DT}", ENDITEM,
                "Name=numPassengers", "Value=1", ENDITEM,
                "Name=roundtrip", "Value=<OFF>", ENDITEM,
                "Name=seatPref", "Value={SEAT_PRF}", ENDITEM,
                "Name=seatType", "Value={TYPE_ST}", ENDITEM,
                "Name=findFlights.x", "Value=38", ENDITEM,
                "Name=findFlights.y", "Value=11", ENDITEM,
                LAST);

        lr_end_transaction("查询", LR_AUTO);

        web_submit_form("reservations.pl_2",
                "Snapshot=t5.inf",
                ITEMDATA,
                "Name=outboundFlight", "Value=033;206;02/14/2014", ENDITEM,
                "Name=reserveFlights.x", "Value=60", ENDITEM,
                "Name=reserveFlights.y", "Value=9", ENDITEM,
                LAST);

        web_submit_form("reservations.pl_3",
                "Snapshot=t6.inf",
                ITEMDATA,
                "Name=firstName", "Value={first_name}", ENDITEM,
                "Name=lastName", "Value={last_name}", ENDITEM,
                "Name=address1", "Value={street_address}", ENDITEM,
                "Name=address2", "Value={city_state}", ENDITEM,
                "Name=pass1", "Value={Passenger_Names}", ENDITEM,
                "Name=creditCard", "Value={creditCard}", ENDITEM,
                "Name=expDate", "Value={Exp_Date}", ENDITEM,
                "Name=saveCC", "Value=<OFF>", ENDITEM,
                "Name=buyFlights.x", "Value=32", ENDITEM,
                "Name=buyFlights.y", "Value=12", ENDITEM,
                LAST);

        web_image("Home Button",
                "Alt=Home Button",
                "Ordinal=1",
                "Snapshot=t7.inf",
                LAST);

//获取当前登陆用户名
        lr_log_message("用户名:%s", lr_eval_string("{name}"));

//检查点判断
        if(strcmp(lr_eval_string("{num}"))==0)
                lr_output_message("登陆失败!");
        else
                lr_output_message("登陆成功!");

return 0;
}

vuser_end()
{

        lr_think_time(6);

        web_url("welcome.pl",
                "URL=http://localhost:1080/WebTours/welcome.pl?signOff=1",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=http://localhost:1080/WebTours/nav.pl?page=menu&in=home",
                "Snapshot=t8.inf",
                "Mode=HTML",
                LAST);

        return 0;
}
作者: lsekfe    时间: 2014-5-9 16:42
loadrunner飞机订票系统:
1、参数化find flight页面出发地点、时间、到达地点、时间等;
2、参数化payme ...
owen0529 发表于 2014-2-17 18:52



    是不是关联上有点问题。。。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2