51Testing软件测试论坛
标题:
参数化后回放脚本失败
[打印本页]
作者:
lzzoz
时间:
2008-10-8 17:56
标题:
参数化后回放脚本失败
录制好登录脚本,验证回放可以通过,但是为什么参数化后,验证回放脚本,结果就是失败,找不到图片,请问一下是什么原因
[
本帖最后由 lzzoz 于 2008-10-9 13:48 编辑
]
作者:
lzzoz
时间:
2008-10-9 11:04
就是LoadRunner航班查询,我只录制航班登录,为什么找不到图片,代码在下面,朋友帮我看看
Action()
{
web_url("mercuryWebTours",
"URL=http://127.0.0.1:1080/mercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(7);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=login.x", "Value=63", ENDITEM,
"Name=login.y", "Value=9", ENDITEM,
LAST);
lr_think_time(5);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t3.inf",
EXTRARES,
"Url=FormDateUpdate.class", "Referer=", ENDITEM,
"Url=CalSelect.class", "Referer=", ENDITEM,
LAST);
lr_think_time(11);
web_submit_form("reservations.pl",
"Snapshot=t4.inf",
ITEMDATA,
"Name=depart", "Value=London", ENDITEM,
"Name=departDate", "Value=10/09/2008", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=10/10/2008", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=Aisle", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=49", ENDITEM,
"Name=findFlights.y", "Value=8", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t5.inf",
ITEMDATA,
"Name=outboundFlight", "Value=230;773;10/09/2008", ENDITEM,
"Name=reserveFlights.x", "Value=53", ENDITEM,
"Name=reserveFlights.y", "Value=11", ENDITEM,
LAST);
lr_think_time(23);
web_submit_form("reservations.pl_3",
"Snapshot=t6.inf",
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=09/10", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=62", ENDITEM,
"Name=buyFlights.y", "Value=12", ENDITEM,
LAST);
lr_think_time(6);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t7.inf",
LAST);
return 0;
}
作者:
猫猫的拖鞋
时间:
2008-10-9 11:08
恩恩,等着高手来解决。
作者:
lzzoz
时间:
2008-10-9 13:51
问题找到了,问题出在参数化里面,参数化里面用户名与密码是不存在,就是出现我刚才情况
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2