|
8#
楼主 |
发表于 2011-5-5 17:25:38
|
只看该作者
本帖最后由 gcm_xp 于 2011-5-5 17:32 编辑
脚本执行的动作(网页版的即时通讯):登录系统,选择聊天对象,发送对话(接收对话的动作后台自动执行,已包含在脚本中了)
Action()
{
web_url("LogOn",
"URL=http://io10-deploy:1100/SSO/LogOn?ReturnUrl=%2f",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_submit_form("LogOn_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=Name", "Value=gcm", ENDITEM,
"Name=Password", "Value=123456", ENDITEM,
EXTRARES,
...
...
,
"Url=../Content/images/rightArrow.gif", "Referer=http://io10-deploy:1100/", ENDITEM,
LAST);
lr_start_transaction("jishitongxun");
lr_rendezvous("bingfa");
web_submit_data("Initial",
"Action=http://io10-deploy:1100/Chat/Initial",
"Method=POST",
"RecContentType=application/json",
"Referer=http://io10-deploy:1100/Home/Chat",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=userID", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
LAST);
web_submit_data("Connect",
"Action=http://io10-deploy:1100/Chat/Connect",
"Method=POST",
"RecContentType=application/json",
"Referer=http://io10-deploy:1100/Home/Chat",
"Snapshot=t11.inf",
"Mode=HTML",
ITEMDATA,
"Name=USERNAME", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
"Name=USERID", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
LAST);
web_submit_data("Buildsession",
"Action=http://io10-deploy:1100/Chat/Buildsession",
"Method=POST",
"RecContentType=application/json",
"Referer=http://io10-deploy:1100/Home/Chat",
"Snapshot=t12.inf",
"Mode=HTML",
ITEMDATA,
"Name=sender", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
"Name=receivers", "Value=b097cdef-361d-439a-aa07-b8535e0707a2", ENDITEM,
"Name=sessionName", "Value=", ENDITEM,
LAST);
web_submit_data("SendMessage",
"Action=http://io10-deploy:1100/Chat/SendMessage",
"Method=POST",
"RecContentType=application/json",
"Referer=http://io10-deploy:1100/Home/Chat",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=sender", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
"Name=message", "Value=test", ENDITEM,
"Name=sessionID", "Value=341a4a02-91ad-4014-9b1e-8556299eeafd", ENDITEM,
LAST);
web_submit_data("GetChatRecord",
"Action=http://io10-deploy:1100/Chat/GetChatRecord",
"Method=POST",
"RecContentType=application/json",
"Referer=http://io10-deploy:1100/Home/Chat",
"Snapshot=t18.inf",
"Mode=HTML",
ITEMDATA,
"Name=userID", "Value=d6b47fab-3feb-484e-942b-f2fb62a7723e", ENDITEM,
LAST);
lr_end_transaction("jishitongxun", LR_AUTO);
return 0;
}
场景:300个用户 每30s加载60个用户 运行直到所有负载加载完
集合点策略:当所有正在运行的 Vuser 中的 20% 到达集合点时释放
运行结果:图片中已包含了running vuser 、Rendezvous、Average Transaction Response Time
请各位再帮忙看看。。。。 |
|