|
先说明一下:
b/s结构;
目的:测试下载的最大负载数;
录制脚本说明:
协议:http/html;
录制的脚本如下:
#include "as_web.h"
Action()
{
web_add_cookie("UNIPROPATH=1098147841656|*|1098147841656|pid:31-11-12-0-1088273|finance.sina.com.cn/x/20041019/07141088273.shtml|st:18.219|et:1098147841656||*|; DOMAIN=www.sina.com.cn");
web_add_cookie("UNIPROCT=31-11-12:1; DOMAIN=www.sina.com.cn");
web_url("day.html",
"URL=http://www.sina.com.cn/allnews/day.html",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_add_cookie("music%5Fextver=M3k; DOMAIN=www.iwmusic.com");
web_url("go.asp",
"URL=http://www.iwmusic.com/go.asp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=/images/040916/01.swf", "Referer=", ENDITEM,
"Url=/images/040916/countdown.swf", "Referer=", ENDITEM,
"Url=/images/040916/go_08.gif", ENDITEM,
"Url=/images/040916/go_14.jpg", ENDITEM,
"Url=/images/040916/bg.gif", ENDITEM,
"Url=/images/040916/go2_17_17.gif", ENDITEM,
"Url=/images/040916/go2_17_18.gif", ENDITEM,
"Url=/images/040916/go2_17_19.gif", ENDITEM,
"Url=/images/040916/go2_17_20.gif", ENDITEM,
"Url=http://download.kuro.com.cn/KuroM7.exe", "Referer=", ENDITEM,
LAST);
lr_rendezvous("IntDownLoad");
lr_start_transaction("DownLoad");
lr_think_time( 60 );
lr_end_transaction("DownLoad", LR_AUTO);
return 0;
}
我把下载这个功能定义为一个事务,在该事务插入集合点
设计的方案为:
虚拟用户数:20个Vusers;
并发数:20Vusers/s;
集合点设置:当100%Vusers到达集合点时,释放所有的Vusers。
运行时间:10分钟;
运行后的结果是:(详细情况见附件)
通过的事务:44;
失败的事务:98;
错误:98
Action.c(21): 错误 -27727: 在下载资源时,步骤下载超时(120 秒)已过期。将“资源页面超时作为警告”运行时设置设置为“是”或“否”,可分别将此消息作为“警告”或“错误” |
|