51Testing软件测试论坛
标题:
LR测试脚本的回放问题
[打印本页]
作者:
fafeiboy
时间:
2007-10-30 11:57
标题:
LR测试脚本的回放问题
为什么我在录LR自带的旅行脚本的时候,回放不了,请高手帮我看看
脚本:
Action()
{
web_url("MercuryWebTours",
"URL=http://localhost:1080/MercuryWebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(7);
web_submit_data("login.pl",
"Action=http://localhost:1080/MercuryWebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:1080/MercuryWebTours/nav.pl?in=home",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=96696.2295666262tQHDiVcpDAiDDDDDcQitcpiHDif", ENDITEM,
"Name=username", "Value=jojo", ENDITEM,
"Name=password", "Value=bean", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=47", ENDITEM,
"Name=login.y", "Value=6", ENDITEM,
LAST);
lr_think_time(4);
web_image("Search Flights Button",
"Alt=Search Flights Button",
"Snapshot=t4.inf",
EXTRARES,
"Url=FormDateUpdate.class", "Referer=", ENDITEM,
"Url=CalSelect.class", "Referer=", ENDITEM,
LAST);
web_submit_form("reservations.pl",
"Snapshot=t5.inf",
ITEMDATA,
"Name=depart", "Value=Denver", ENDITEM,
"Name=departDate", "Value=10/31/2007", ENDITEM,
"Name=arrive", "Value=Los Angeles", ENDITEM,
"Name=returnDate", "Value=11/01/2007", ENDITEM,
"Name=numPassengers", "Value=1", ENDITEM,
"Name=roundtrip", "Value=<OFF>", ENDITEM,
"Name=seatPref", "Value=None", ENDITEM,
"Name=seatType", "Value=Coach", ENDITEM,
"Name=findFlights.x", "Value=39", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST);
web_submit_form("reservations.pl_2",
"Snapshot=t6.inf",
ITEMDATA,
"Name=outboundFlight", "Value=030;251;10/31/2007", ENDITEM,
"Name=reserveFlights.x", "Value=38", ENDITEM,
"Name=reserveFlights.y", "Value=10", ENDITEM,
LAST);
lr_think_time(6);
web_submit_form("reservations.pl_3",
"Snapshot=t7.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=12345678", ENDITEM,
"Name=expDate", "Value=06/06", ENDITEM,
"Name=saveCC", "Value=<OFF>", ENDITEM,
"Name=buyFlights.x", "Value=71", ENDITEM,
"Name=buyFlights.y", "Value=8", ENDITEM,
LAST);
web_image("Itinerary Button",
"Alt=Itinerary Button",
"Ordinal=1",
"Snapshot=t8.inf",
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Ordinal=1",
"Snapshot=t9.inf",
LAST);
return 0;
}
运行日志:
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.1.0 for WINXP; Web build 4788 [MsgId: MMSG-27143]
Run-Time Settings file: "E:\test\1030test1\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/header.html" in "http://localhost:1080/MercuryWebTours/" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true" in "http://localhost:1080/MercuryWebTours/" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/mercury_logo.gif" in HTML "http://localhost:1080/MercuryWebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/nav.pl?in=home" in "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://localhost:1080/MercuryWebTours/home.html" in "http://localhost:1080/MercuryWebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/fma-gateway.jpg" in HTML "http://localhost:1080/MercuryWebTours/home.html" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://localhost:1080/MercuryWebTours/images/mer_login.gif" in HTML "http://localhost:1080/MercuryWebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): web_url("MercuryWebTours") was successful, 52180 body bytes, 1566 header bytes [MsgId: MMSG-26386]
Action.c(17): web_submit_data("login.pl") was successful, 748 body bytes, 225 header bytes [MsgId: MMSG-26386]
Action.c(35):
Error -27987: Requested image not found
[MsgId: MERR-27987]
Action.c(35):
web_image("Search Flights Button") highest severity level was "ERROR", 0 body bytes, 0 header bytes
[MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
总是报这样的错。
回放的时候我没设置任何参数
作者:
fafeiboy
时间:
2007-10-30 14:23
怎么没有一个人帮忙啊?
作者:
zhangyhmm25
时间:
2007-10-31 10:12
需要做关联
作者:
eio353
时间:
2010-4-16 11:30
在HP Web Tours 主页上的administration管理链接,打开管理页面,
把里面所有复选框取消,点击Update
其实主要是第3个Set LOGIN form's action tag to an error page.(将 LOGIN 表单的操作标记设置为错误页面。)
然后重新启动后重新录制,就没这个问题了
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2