做登录的并发测试,为什么session不做关联也不会报错
录制了一个登录、退出的操作,vuser的数量设置的是10,场景是默认的没改过...不是说session 要做关联的吗?为什么不关联也不会报错呢...???
下面是我录制的代码...
Action()
{
web_reg_save_param("sessionId",
"LB=ASP.NET_SessionId",
"RB=;",
"Search=Headers",
LAST);
web_url("system",
"URL=http://192.168.1.163:82/system",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t6.inf",
"Mode=HTML",
LAST);
lr_message("sessionId==============%s",lr_eval_string("{sessionId}"));
lr_think_time(7);
// web_add_cookie("ASP.NET_SessionId={sessionId};domain=location"); --这sessionid要放哪呀..?
lr_rendezvous("rz_login");
lr_start_transaction("tr_login");
web_submit_data("login",
"Action=http://192.168.1.163:82/system/login",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.1.163:82/system",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=Account", "Value={account}", ENDITEM,
"Name=Password", "Value=123456", ENDITEM,
"Name=ValidCode", "Value=1234", ENDITEM,
LAST);
web_reg_find("Search=Body",
"SaveCount=aaa",
"Text=欢迎您,{name}",
LAST);
web_url("home",
"URL=http://192.168.1.163:82/home",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
LAST);
lr_end_transaction("tr_login", LR_AUTO);
web_link("退出系统",
"Text=退出系统",
"Snapshot=t9.inf",
LAST);
return 0;
} 问题太简单了么。为什么木有大神解答... 如果系统登录后,不校验session,那当然不会有错误啊。
如果系统明确表示,不支持异地登录,那不做关联,应该会有问题,不知道你明白没有?
页:
[1]