|
不管测试什么,事务的响应时间都是越来越大,例如刚才录了个最简单的脚步,就是打开51testing的首页,脚本如下:
#include "web_api.h"
Action()
{
lr_rendezvous("51test");
lr_think_time( 5 );
lr_start_transaction("51test");
web_add_cookie("AJSTAT_ok_pages=2; DOMAIN=www.51testing.com");
web_add_cookie("AJSTAT_ok_times=1; DOMAIN=www.51testing.com");
web_add_cookie("cdb_sid=4xiUOI; DOMAIN=www.51testing.com");
web_add_cookie("cdb_oldtopics=D153076D77917D; DOMAIN=www.51testing.com");
web_add_cookie("cdb_visitedfid=67; DOMAIN=www.51testing.com");
web_add_cookie("cdb_fid67=1245121294; DOMAIN=www.51testing.com");
web_add_cookie("__utma=24129278.2704051729731849700.1245134803.1245134803.1245134879.2; DOMAIN=www.51testing.com");
web_add_cookie("__utmb=24129278.1.10.1245134879; DOMAIN=www.51testing.com");
web_add_cookie("__utmz=24129278.1245134803.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); DOMAIN=www.51testing.com");
web_url("www.51testing.com",
"URL=http://www.51testing.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t10.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/new/left.jpg", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/close.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/right.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/mysearch.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-susuo.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/sz.swf", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/list_icon.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/813diancom.swf", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/hotspace_bg.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/xb4.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/xb3.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/xb2.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/searchL.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/menu_hbg_l.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/menu_hbg_r.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-jingxuan.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/menu_hbg_l1.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-shang-gengxin1.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-shang-gengxin.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/menu_hbg.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-luntan.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=/images/new/com-boke.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=http://icon.ajiang.net/icon_9.gif", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=http://www.google-analytics.com/ga.js", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=4.3&utmn=2135556240&utmhn=www.51testing.com&utmcs=gb2312&utmsr=1024x768&utmsc=16-bit&utmul=zh-cn&utmje=1&utmfl=10.0%20r12&utmdt=51Testing%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95%E7%BD%91-%E4%B8%AD%E5%9B%BD%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95%E4%BA%BA%E7%9A%84%E7%B2%BE%E7%A5%9E%E5%AE%B6%E5%9B%AD&utmhid=1661995858&utmr=-&utmp=/html/index.html&utmac=UA-5060678-1&utmcc=__utma%3D24129278.2704051729731849700.1245134803.1245134879.1245135729.3%3B%2B__utmz%3D24129278.1245134803.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B", "Referer=http://www.51testing.com/html/index.html", ENDITEM,
LAST);
lr_think_time( 5 );
web_url("sunbtob.asp",
"URL=http://95599.hk/sunbtob.asp?id=805&frmurl=&curURL=http%3A//www.51testing.com/html/index.html&p=1024*768&vid=undefined&rt=undefined&lvp=undefined&ck=true",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.51testing.com/html/index.html",
"Mode=HTML",
LAST);
web_url("go.asp",
"URL=http://web2.51.la/go.asp?svid=9&id=831631&tpages=3&ttimes=1&tzone=8&tcolor=16&sSize=1024,768&referrer=&vpage=http%3A//www.51testing.com/html/index.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.51testing.com/html/index.html",
"Mode=HTML",
LAST);
web_add_cookie("AJSTAT_ok_pages=3; DOMAIN=www.51testing.com");
web_add_cookie("__utma=24129278.2704051729731849700.1245134803.1245134879.1245135729.3; DOMAIN=www.51testing.com");
web_add_cookie("__utmb=24129278.1.10.1245135729; DOMAIN=www.51testing.com");
web_add_cookie("__utmc=24129278; DOMAIN=www.51testing.com");
web_url("batch.html.php",
"URL=http://www.51testing.com/batch.html.php?code=http%253A%252F%252Fwww.51testing.com%252Findex.php%253Faction%252Findex%2F1245136879%2F600%2F0%2F0%2Findex&lastmodified=1245135728000",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.51testing.com/html/index.html",
"Mode=HTML",
LAST);
lr_end_transaction("51test", LR_AUTO);
return 0;
}
controller中参数我没有修改过,都是默认的,测试结果的响应时间总是成增长趋势,如下图所示,觉得好像不太对,但是不知道什么地方问题
第一次使用LR,大家指点一下,谢谢了 |
|