|
在服务器(本机localhost)上安装有Xitami Web Server,启动Mercury WebTours示例网站,使用LoadRunner进行负载测试。
录制登录和退出动作(并发登陆, 登陆完成后退出),出现以下情况请问是不是我的机器本身的性能问题导致失败?
单独回放没有错误,使用Controller负载(忽略思考时间):
1个用户, passed;
10个用户, passed;
15个用户, passed;
20个用户, 8--passed, 12--failed;
25个用户, 21--passed, 4--failed;
30个用户, 15--passed, 15--failed;
35个用户, 31--passed, 4--failed;
40个用户, 17--passed, 23--failed;
45个用户, 29--passed, 16--failed;
50个用户, 28--passed, 22--failed;
LR提示的错误信息:
Action.c(7): Error -27796: Failed to connect to server "localhost:1080": [10061] Connection refused
录制脚本都在Action中, 如下
Action()
{
web_add_header("Accept-Language",
"zh-cn");
web_url("mercuryWebTours",
"URL=http://localhost:1080/mercuryWebTours",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_find("Text=Welcome",
"Fail=NotFound",
"SaveCount=num",
"Search=All",
LAST);
lr_think_time( 14 );
lr_rendezvous("login");
lr_think_time( 2 );
lr_start_transaction("login");
lr_think_time( 12 );
web_submit_form("login.pl",
"Snapshot=t8.inf",
ITEMDATA,
"Name=username", "Value={loginname}", ENDITEM,
"Name=password", "Value=mellinium", ENDITEM,
"Name=login.x", "Value=60", ENDITEM,
"Name=login.y", "Value=14", ENDITEM,
LAST);
lr_think_time( 5 );
lr_end_transaction("login", LR_AUTO);
return 0;
} |
|