51Testing软件测试论坛
标题:
录制登录脚本,回放能成功,用Controller模拟50个用户登录怎么总失败呢?
[打印本页]
作者:
zhangqiang17
时间:
2010-5-13 19:59
标题:
录制登录脚本,回放能成功,用Controller模拟50个用户登录怎么总失败呢?
下面是登录的代码:(LoadRunner 中带的飞机订票系统)
Action()
{
web_reg_save_param("usersession",
"LB=name=userSession value=",
"RB=>",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
lr_rendezvous("login"); /*50个用户集合点*/
lr_start_transaction("submit");
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"TargetFrame=body",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t5.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value={usersession}", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={pwd}", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=53", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
lr_end_transaction("submit", LR_AUTO);
lr_log_message("用户名是:%s",lr_eval_string("{username}"));
web_url("SignOff Button",
"URL=http://127.0.0.1:1080/WebTours/welcome.pl?signOff=1",
"TargetFrame=body",
"Resource=0",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?page=menu&in=home",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
return 0;
}
Controller 中设置了50个用户,RunTime—Setting中设置的是循环50次,运行结果总是出错。附图,请求各位老师帮忙。
作者:
PrefTest
时间:
2010-5-13 21:28
参数表是否有足够的用户名和密码?
作者:
msnshow
时间:
2010-5-13 22:03
根本应用就访问不了嘛,压力太大,估计都死了
作者:
zhangqiang17
时间:
2010-5-13 22:23
参数中有50个用户,10个并发也是报错。感觉是哪里设置的问题?还是怎么回事
作者:
archonwang
时间:
2010-5-14 09:52
连接数超过服务器的配置了,修改下再进行测试。
施压量值太大了。。。降低点再试下。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2