51Testing软件测试论坛
标题:
LR参数化用户名web_reg_find错误问题
[打印本页]
作者:
707196395
时间:
2016-6-3 11:44
标题:
LR参数化用户名web_reg_find错误问题
Action()
{
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(6);
web_reg_find("Text={name}",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=118665.333657351zVADitipVDzzcDpAiiz", ENDITEM,
"Name=username", "Value={name}", ENDITEM,
"Name=password", "Value={paswrd}", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=49", ENDITEM,
"Name=login.y", "Value=14", ENDITEM,
LAST);
web_url("Search Flights Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?page=search",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
web_url("FormDateUpdate.class",
"URL=http://127.0.0.1:1080/WebTours/FormDateUpdate.class",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("CalSelect.class",
"URL=http://127.0.0.1:1080/WebTours/CalSelect.class",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_url("Calendar.class",
"URL=http://127.0.0.1:1080/WebTours/Calendar.class",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Mode=HTML",
LAST);
web_submit_data("reservations.pl",
"Action=http://127.0.0.1:1080/WebTours/reservations.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl?page=welcome",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=depart", "Value=London", ENDITEM,
"Name=departDate", "Value=06/04/2016", ENDITEM,
"Name=arrive", "Value=Paris", ENDITEM,
"Name=returnDate", "Value=06/05/2016", 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=48", ENDITEM,
"Name=findFlights.y", "Value=12", ENDITEM,
LAST);
web_submit_data("reservations.pl_2",
"Action=http://127.0.0.1:1080/WebTours/reservations.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=outboundFlight", "Value=240;108;06/04/2016", 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=32", ENDITEM,
"Name=reserveFlights.y", "Value=10", ENDITEM,
LAST);
web_submit_data("reservations.pl_3",
"Action=http://127.0.0.1:1080/WebTours/reservations.pl",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/reservations.pl",
"Snapshot=t6.inf",
"Mode=HTML",
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=", 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=240;108;06/04/2016", ENDITEM,
"Name=advanceDiscount", "Value=0", ENDITEM,
"Name=returnFlight", "Value=", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=.cgifields", "Value=saveCC", ENDITEM,
"Name=buyFlights.x", "Value=68", ENDITEM,
"Name=buyFlights.y", "Value=15", ENDITEM,
LAST);
web_url("welcome.pl",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=flights",
"Snapshot=t7.inf",
"Mode=HTML",
LAST);
return 0;
}
作者:
707196395
时间:
2016-6-3 11:50
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 9.50 for WIN2003; WebReplay9a build 6220 (Dec 28 2008 17:01:56) [MsgId: MMSG-27143]
Run Mode: HTML [MsgId: MMSG-26000]
Run-Time Settings file: "C:\Documents and Settings\Administrator\Local Settings\Temp\noname18\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6897 body bytes, 1808 header bytes [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" = "jojo"
Action.c(16): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" = "jojo"
Action.c(19): Notify: Next row for parameter paswrd = 1 [table = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" = "bean"
Action.c(19): Error -26366: "Text=jojo" not found for web_reg_find [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 1.
Starting iteration 2.
Notify: Next row for parameter name = 2 [table = name].
Notify: Getting new value for parameter 'name': table = 'name.dat' column = '0' row = '2'.
Notify: Next row for parameter paswrd = 2 [table = paswrd].
Notify: Getting new value for parameter 'paswrd': table = 'name.dat' column = '1' row = '2'.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6903 body bytes, 1808 header bytes [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" = "koko"
Action.c(16): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" = "koko"
Action.c(19): Notify: Next row for parameter paswrd = 2 [table = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" = "bean"
Action.c(19): Error -26366: "Text=koko" not found for web_reg_find [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 2.
Starting iteration 3.
Notify: Next row for parameter name = 3 [table = name].
Notify: Getting new value for parameter 'name': table = 'name.dat' column = '0' row = '3'.
Notify: Next row for parameter paswrd = 3 [table = paswrd].
Notify: Getting new value for parameter 'paswrd': table = 'name.dat' column = '1' row = '3'.
Starting action Action.
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/header.html" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" in "http://127.0.0.1:1080/WebTours/" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/hp_logo.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/webtours.png" in HTML "http://127.0.0.1:1080/WebTours/header.html" [MsgId: MMSG-26659]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?in=home" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Detected non-resource "http://127.0.0.1:1080/WebTours/home.html" in "http://127.0.0.1:1080/WebTours/welcome.pl?signOff=true" [MsgId: MMSG-26574]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/JSFormSubmit.js" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): Found resource "http://127.0.0.1:1080/WebTours/images/mer_login.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?in=home" [MsgId: MMSG-26659]
Action.c(4): web_url("WebTours") was successful, 6901 body bytes, 1808 header bytes [MsgId: MMSG-26386]
Action.c(16): Notify: Parameter Substitution: parameter "name" = "lolo"
Action.c(16): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(19): Notify: Parameter Substitution: parameter "name" = "lolo"
Action.c(19): Notify: Next row for parameter paswrd = 3 [table = paswrd].
Action.c(19): Notify: Parameter Substitution: parameter "paswrd" = "bean"
Action.c(19): Error -26366: "Text=lolo" not found for web_reg_find [MsgId: MERR-26366]
Action.c(19): web_submit_data("login.pl") highest severity level was "ERROR", 741 body bytes, 225 header bytes [MsgId: MMSG-26388]
Ending action Action.
Ending iteration 3.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
作者:
mengmengda
时间:
2016-6-3 15:13
没做关联 没登陆成功 以上
作者:
wuxi88
时间:
2016-6-3 15:30
楼上回答正确,你需要对userSession做下关联,具体怎么关联,自己研究。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2