|
本帖最后由 75876997 于 2011-5-11 16:38 编辑
各位好,
本人刚刚接触loadRunner软件,现在有一个疑惑,我搜索资料阅读查找后未国,特来请教。
我以我测试的登录模块为例:
我录制脚本并测试登录模块后发现平均耗时13秒,感觉非常不可思议,因为我设置的vuser并不多,而且我在loadRunner运行中,也打开浏览器进行自己访问,通过fireBug查看,得到3秒的结果。于是我分析loadrunner平均13秒的原因, 发现 servlet其实 只用了0.3秒,其他的均为js、css、image、等东西的加载耗时(我们项目首页元素比较多)。
可是我们大家都明白,图片及AJAX等请求都是异步的。 所以 1 +1 并不等于2。 但是我看loadrunner的结果似乎完全是将这些时间加起来求和算出耗时。
请各位达人帮我解惑,非常感激。 难道大家在录制脚本时,删除加载css、js、等?不会吧。
发段我录制的脚本,也许有帮助。-
- ……省略 ……
- web_custom_request("icon_bg4.png",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/icon_bg4.png",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/png",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("icon_bg6.png",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/icon_bg6.png",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/png",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("icon_bg8.png",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/icon_bg8.png",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/png",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("icon_bg5.png",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/icon_bg5.png",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/png",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("bg_c.gif",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/bg_c.gif",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/gif",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("rw_a.gif",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/rw_a.gif",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/gif",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("pic_2.gif",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/pic_2.gif",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/gif",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- web_custom_request("gujia_a.gif",
- "URL=http://11.205.32.74:8805/images/company/zgrs/mainpage/gujia_a.gif",
- "Method=GET",
- "Resource=1",
- "RecContentType=image/gif",
- "Referer=http://11.205.32.74:8805/servlet/com.zotn.screens.HomeServlet",
- LAST);
- ……省略 ……
复制代码 |
|