|
对用户登陆进行压力测试,但是想插入事务,不知道插入到哪里为好
我自己理解插入如下
Action()
{
web_url("www.gaodasteel.com",
"URL=http://www.gaodasteel.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_start_transaction("登陆");
web_submit_form("checkpass.asp",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={NewParam}", ENDITEM,
"Name=password", "Value={NewParam_1}", ENDITEM,
"Name=submit.x", "Value=16", ENDITEM,
"Name=submit.y", "Value=8", ENDITEM,
EXTRARES,
"Url=/images/di_13.gif", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/092301.swf", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/fuck.swf", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/xzd_0102.gif", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/xzd_0302.gif", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/xzd_0402.gif", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
"Url=/images/xzd_0202.gif", "Referer=http://www.gaodasteel.com/index.asp", ENDITEM,
LAST);
lr_end_transaction("登陆结束", LR_AUTO);
lr_think_time( 3 );
web_url("onlineuser.asp",
"URL=http://www.gaodasteel.com/onlineuser.asp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.gaodasteel.com/index.asp",
"Snapshot=t3.inf",
"Mode=HTML",
LAST);
return 0;
}
运行结果
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.0.0 for WINXP; Web build 4141 [MsgId: MMSG-27143]
Run-Time Settings file: "E:\测试脚本\SQL_script关联\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(7): Error -27796: Failed to connect to server "www.gaodasteel.com:80": [10061] Connection refused [MsgId: MERR-27796]
Action.c(7): web_url("www.gaodasteel.com") 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.
并且我发现插入到不同的地方运行报错的信息不对,不知道自己错在哪,请指教 |
|