|
我想模拟10个不同IP用户用10组帐号同时登录。
我首先录制编辑脚本如下:
Action()
{
lr_start_transaction("login");
web_url("login.aspx",
"URL=http://localhost/TomProject/Tom/sysmanage/login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=../SysManage/images/05.gif", ENDITEM,
"Url=../SysManage/images/01.gif", ENDITEM,
"Url=../SysManage/IMAGES/20.gif", ENDITEM,
LAST);
web_submit_form("login.aspx_2",
"Snapshot=t2.inf",
ITEMDATA,
"Name=TUserName", "Value={username}", ENDITEM,
"Name=TPwd", "Value={password}", ENDITEM,
"Name=Btn_Land", "Value=登录", ENDITEM,
EXTRARES,
"Url=images/black_white.gif", "Referer=http://localhost/TomProject/Tom/sysmanage/Menu.aspx", ENDITEM,
"Url=../SysManage/images/02.gif", "Referer=http://localhost/TomProject/Tom/sysmanage/Menu.aspx", ENDITEM,
"Url=../SysManage/images/08.gif", "Referer=http://localhost/TomProject/Tom/sysmanage/Menu.aspx", ENDITEM,
LAST);
lr_think_time(12);
web_submit_form("Top.aspx",
"Snapshot=t3.inf",
ITEMDATA,
"Name=ImgBtn_QuitSysTem.x", "Value=23", ENDITEM,
"Name=ImgBtn_QuitSysTem.y", "Value=20", ENDITEM,
LAST);
web_url("Login.aspx",
"URL=http://localhost/TomProject/Tom/sysmanage/Login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
lr_end_transaction("login", LR_AUTO);
return 0;
}
然后在controller中设定10个用户(Enable IP spoofer 也选中了),IP Wizard中也添加了10个IP,运行脚本OK通过。
我这样可以完成要求吗,那我怎么知道确实是10不同IP,10组不同帐号并发运行呢。
我刚学loadrunner,是不是很菜呀,别笑我,^^ |
|