|
我的脚本是:
Action()
{
web_set_max_html_param_len("1024");
web_url("db",
"URL=http://192.168.10.150/db",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
/* Registering parameter(s) from source task id 6
// {Siebel_Analytic_ViewState3} = "dDwtNjk4NzgyMzY2Ozs+oEZ9VL2AqHlheROvB25oUtk03Qk="
// */
web_reg_save_param("Siebel_Analytic_ViewState3",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"RelFrameId=1",
"Search=Body",
LAST);
lr_think_time(4);
web_url("main_Logon_frm.aspx",
"URL=http://192.168.10.150/db/main_Logon_frm.aspx",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"URL=img/b1.jpg", ENDITEM,
"URL=img/b2.jpg", ENDITEM,
"URL=img/b5.jpg", ENDITEM,
"URL=img/b3.jpg", ENDITEM,
"URL=img/b4.jpg", ENDITEM,
LAST);
lr_rendezvous("login");
lr_start_transaction("login");
web_submit_data("main_Logon_frm.aspx_2",
"Action=http://192.168.10.150/db/main_Logon_frm.aspx",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.10.150/db/main_Logon_frm.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState3}", ENDITEM,
"Name=UserLogon:txtUserID", "Value=ep", ENDITEM,
"Name=UserLogon:TextBox1", "Value=ep", ENDITEM,
"Name=UserLogon:btnLogon", "Value=\xC8\xB7\xB6\xA8", ENDITEM,
"Name=UserLogon:txtPwd", "Value=", ENDITEM,
EXTRARES,
"URL=img/ba.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
"URL=img/bb.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
"URL=img/bc.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
"URL=img/bd.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
"URL=img/be.jpg", "Referer=http://192.168.10.150/db/main_frm.aspx", ENDITEM,
LAST);
web_image_check("web_image_check","Src=img/be.jpg",LAST);
lr_end_transaction("login", LR_AUTO);
return 0;
}
运行的log是:
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.0.0 for WINXP; Web build 4121 [MsgId: MMSG-27143]
Run-Time Settings file: "E:\LoadRunner\Script\login\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(4): web_set_max_html_param_len was successful [MsgId: MMSG-26392]
Action.c(6): Redirecting "http://192.168.10.150/db" (redirection depth=0) [MsgId: MMSG-26694]
Action.c(6): To location "http://192.168.10.150/db/" [MsgId: MMSG-26693]
Action.c(6): web_url("db") was successful, 940 body bytes, 423 header bytes [MsgId: MMSG-26386]
Action.c(20): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(30): Found resource "http://192.168.10.150/db/common/css/StyleBasic.css" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b1.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/spacer.gif" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b2.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b5.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/common/css/StyleBasic.css" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Found resource "http://192.168.10.150/db/img/b3.jpg" in HTML "http://192.168.10.150/db/main_Logon_frm.aspx" [MsgId: MMSG-26659]
Action.c(30): Downloading resource "http://192.168.10.150/db/img/b4.jpg" (specified by argument number 18) [MsgId: MMSG-26577]
Action.c(30): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/common/css/StyleBasic.css" [MsgId: MWAR-26627]
Action.c(30): web_url("main_Logon_frm.aspx") highest severity level was "warning", 133264 body bytes, 2128 header bytes [MsgId: MMSG-26388]
Action.c(46): Rendezvous login
Action.c(48): Notify: Transaction "login" started.
Action.c(50): Redirecting "http://192.168.10.150/db/main_Logon_frm.aspx" (redirection depth=0) [MsgId: MMSG-26694]
Action.c(50): To location "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26693]
Action.c(50): Resource "http://192.168.10.150/db/common/css/StyleBasic.css" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/ba.jpg" (specified by argument number 26) [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bb.jpg" (specified by argument number 29) [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bc.jpg" (specified by argument number 32) [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/bd.jpg" (specified by argument number 35) [MsgId: MMSG-26577]
Action.c(50): Downloading resource "http://192.168.10.150/db/img/be.jpg" (specified by argument number 38) [MsgId: MMSG-26577]
Action.c(50): Found resource "http://192.168.10.150/ig_common/20061/scripts/ig_shared.js" in HTML "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/ig_common/20061/scripts/ig_weblistbar2_2.js" in HTML "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26659]
Action.c(50): Resource "http://192.168.10.150/db/img/spacer.gif" is in the cache already and will not be downloaded again [MsgId: MMSG-26655]
Action.c(50): Found resource "http://192.168.10.150/ig_common/images/WindowsClassic/trans.gif" in HTML "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/ig_common/images/uparrows_white.gif" in HTML "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26659]
Action.c(50): Detected non-resource "http://192.168.10.150/db/common/blank.htm" in "http://192.168.10.150/db/main_frm.aspx" [MsgId: MMSG-26574]
Action.c(50): Found resource "http://192.168.10.150/db/common/css/menuStyle.css" in HTML "http://192.168.10.150/db/common/blank.htm" [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/db/common/css/treeStyle.css" in HTML "http://192.168.10.150/db/common/blank.htm" [MsgId: MMSG-26659]
Action.c(50): Found resource "http://192.168.10.150/db/common/controls/img/normalbackline2.jpg" in HTML "http://192.168.10.150/db/common/blank.htm" [MsgId: MMSG-26659]
Action.c(50): Warning -26627: HTTP Status-Code=404 (Object Not Found) for "http://192.168.10.150/db/common/controls/img/normalbackline2.jpg" [MsgId: MWAR-26627]
Action.c(50): web_submit_data("main_Logon_frm.aspx_2") highest severity level was "warning", 111959 body bytes, 3762 header bytes [MsgId: MMSG-26388]
Action.c(71): Error -27191: "web_image_check" failed (0 occurrence(s) found. Alt="", Src="img/be.jpg") [MsgId: MERR-27191]
Action.c(71): web_image_check highest severity level was "ERROR" [MsgId: MMSG-26391]
Action.c(71): Notify: Transaction "login" ended with "Fail" status (Duration: 0.6911).
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
我在Recording Options里选的是HTML-base script ,HTML Advanced里选的是A script containing explicit URLs only。
去掉检查点后就运行成功
不知道为什么
哪位大虾指教一下? |
|