51Testing软件测试论坛

标题: 事务响应时间越来越大,不知道为什么 [打印本页]

作者: shirley1024    时间: 2009-6-16 15:39
标题: 事务响应时间越来越大,不知道为什么
不管测试什么,事务的响应时间都是越来越大,例如刚才录了个最简单的脚步,就是打开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,大家指点一下,谢谢了
作者: lenglovelin    时间: 2009-6-16 15:55
不用设集合点,即使设的话位置也不对.事务里要删除思考时间.否则会干扰测试.
你是用url录制的脚本,又因为有大量的链接,图片,响应时间增加应该是正常的吧(新手推测)
建议你用html录制一下看看.
作者: shirley1024    时间: 2009-6-17 09:09
集合点应该设置在哪里
作者: lenglovelin    时间: 2009-6-17 10:04
建议你看看帮助文档吧 一句两句也说不清
我感觉 需要并发的时候要用到集合点
你只是打开一个网站 并不是模拟多个用户并发登录
所以应该不需要设置集合点
我也是新手 仅供参考啊
作者: jingling410    时间: 2009-6-17 10:11
不设置集合点,就不能执行同时并发多少用户,去掉集合点,表示有多少人在线登录,集合点是根据你的设计要求来设置加还是不加,请你还是仔细看看文档吧,不要盲目去做,要不然你会更迷惑。
作者: jingling410    时间: 2009-6-17 10:13
至于思考时间,建议不要去掉,因为他很符合实际操作,只要在最后分析结果中去掉思考时间就ok了。
作者: shirley1024    时间: 2009-6-17 10:21
受教了,谢谢各位,^_^




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2