|
在loadrunner中手动关联,写好了关联函数,也替换了该替换的,可是回放的时候还是有错,谁能给我看看到底错在哪呀,在此感谢各位了
这是写的代码:
Action()
{
web_reg_save_param("login1",
"LB=name=userSession value=", "RB=>", LAST );
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("favicon.ico",
"URL=http://127.0.0.1:1080/favicon.ico",
"Resource=1",
"Referer=",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={login1}", ENDITEM,
"Name=username", "Value=wuyan", ENDITEM,
"Name=password", "Value=wuyan", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
LAST);
web_submit_data("login.pl_2",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=117442.388011341zAtAQtcpiDDDDDDDDzctfpzfH", ENDITEM,
"Name=username", "Value=wuyan", ENDITEM,
"Name=password", "Value=wuyan", ENDITEM,
"Name=JSFormSubmit", "Value=on", ENDITEM,
"Name=login.x", "Value=73", ENDITEM,
"Name=login.y", "Value=10", ENDITEM,
LAST);
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t3.inf",
LAST);
return 0;
}
这是回放日志:
Virtual User Script started at : 2015-12-11 17:44:33
Starting action vuser_init.
Web Turbo Replay of LoadRunner 11.0.0 for WINXP; build 8859 (Aug 18 2010 20:14:31) [MsgId: MMSG-27143]
Run Mode: HTML [MsgId: MMSG-26000]
Run-Time Settings file: "D:\ProgrammeFiles\TestScripts\login1\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(3): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(7): 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(7): 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(7): 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(7): 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(7): 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(7): 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(7): 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(7): 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(7): web_url("WebTours") was successful, 6873 body bytes, 1808 header bytes [MsgId: MMSG-26386]
Action.c(16): Warning -26627: HTTP Status-Code=404 (Not found) for "http://127.0.0.1:1080/favicon.ico" [MsgId: MWAR-26627]
Action.c(16): web_url("favicon.ico") highest severity level was "warning", 114 body bytes, 144 header bytes [MsgId: MMSG-26388]
Action.c(22): Detected non-resource "http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home" in "http://127.0.0.1:1080/WebTours/login.pl" [MsgId: MMSG-26574]
Action.c(22): Detected non-resource "http://127.0.0.1:1080/WebTours/login.pl?intro=true" in "http://127.0.0.1:1080/WebTours/login.pl" [MsgId: MMSG-26574]
Action.c(22): Found resource "http://127.0.0.1:1080/WebTours/images/flights.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659]
Action.c(22): Found resource "http://127.0.0.1:1080/WebTours/images/itinerary.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659]
Action.c(22): Found resource "http://127.0.0.1:1080/WebTours/images/in_home.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659]
Action.c(22): Found resource "http://127.0.0.1:1080/WebTours/images/signoff.gif" in HTML "http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home" [MsgId: MMSG-26659]
Action.c(22): web_submit_data("login.pl") was successful, 5694 body bytes, 1482 header bytes [MsgId: MMSG-26386]
Action.c(34): web_submit_data("login.pl_2") was successful, 795 body bytes, 225 header bytes [MsgId: MMSG-26386]
Action.c(50): Error -27987: Requested image not found [MsgId: MERR-27987]
Action.c(50): web_image("SignOff 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. |
|