|
项目组目前要做一下性能测试,本人是菜鸟,以前也没正式做个性能测试,完全就是自己照书学下,会录制下脚本神马的。现求各位大师指点下。项目也就是一个手机软件,领导想看下各页面加载数据的响应时间,目前脚本如下:
Action()
{
lr_start_transaction("lr_start");
web_url("getCatalog",
"URL=http://172.21.11.201:90/msis/getCatalog?version=V001&catalogType=2&userCode=U_05&accessSource=5",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(2);
web_url("ticket.htm",
"URL=http://172.21.11.201:90/msis/getCatalog?version=V001&catalogType=2&userCode=U_05&accessSource=5",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(2);
web_url("getChannelProgram",
"URL=http://172.21.11.201:90/msis/getChannelProgram?version=V001&pageSize=10000&curPage=1&resolution=640*960&userCode=U_05&beginTime=2012-11-21 00:00:00&endTime=2012-11-21 23:59:59&channelResourceCode={channelResourceCode}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(2);
web_url("getRecommendResource",
"URL=http://172.21.11.201:90/msis/getRecommendResource?version=V001&resolution=1200*1600",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(2);
web_url("getAssetList",
"URL=http://172.21.11.201:90/msis/getAssetList?version=V001&pageSize=10&curPage=1&resolution=640*960&userCode=U_05&queryType=4&catalogId={catalogId}&assetType=0&originName=0&publishDate=0&orderTag=2",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("lr_start", LR_AUTO);
lr_rendezvous("jihedian");
return 0;
}
脚本是可以跑的,但是跑出来的结果响应时间平均值都是2秒了,这是不科学的。我场景是这样的:start
VuserS是10,每15秒增加2个,持续时间5分,每30秒减少5个。请各位看看,我的问题出在哪?谢谢了。 |
|