51Testing软件测试论坛
标题:
如何模拟1000用户在线?详细一点的设置!高手指教啊!!
[打印本页]
作者:
pooler1122
时间:
2009-7-13 21:48
标题:
如何模拟1000用户在线?详细一点的设置!高手指教啊!!
如何模拟1000用户在线?详细一点的设置!高手指教啊!!
我模拟1000用户,脚本是登陆的脚本,没3秒加载50用户,等到加载完1000个,是不是就是1000用户在线呢?
作者:
泊涯
时间:
2009-7-14 09:44
如果你的脚本是 登录退出脚本 ,而且脚本语言都是放在action 里面的
让他循环运行的,还有每个用户几秒钟内就循环一次的这种算是并发的用户
如果你是隔很长时间在运行一次的那算是在线,在线用户就是登录进去长时间占用session,但是不做任何点击等操作。
作者:
lele8662
时间:
2009-7-14 21:17
如果没有录制退出的话,场景设置时,run mode选择“Run until complete”或者选择“Real-life schedule”时,Duration时间改为1s,应该是1000个人同时在线了。
最简单的验证方法,加载之后,登陆到系统看下在线人数嘛
--我是这么理解滴,欢迎拍砖~~
[
本帖最后由 lele8662 于 2009-7-14 21:19 编辑
]
作者:
qiuyangzh
时间:
2009-7-15 09:20
关键是你模拟1000用户在线后做什么?如果你只是想制造1000个用户在线系统,你描述的方法是可以的(可以把系统的超时时间设置的长一些)。
很多情况是想测试当1000用户在线的情况下,系统各项业务的性能表现如何。这个时候制造1000用户在线只是为执行测试制造的条件,后面开始运行具体的测试。
作者:
navy2008
时间:
2009-7-15 17:40
说下我的看法:
把这1000个在线用户转换成有多少个并发用户数
作者:
cafard-haibin
时间:
2009-7-15 17:53
1:如果你模拟1000个用户同时登录系统的话,那么就需要在你登录脚本中加集合点;
2:如果你想模拟1000人登录系统后同时在线,那么就在场景中设置了Duration时间。这个时间应该大于你所有用户加载完的时间。场景运行完毕,打开结果分析查看Maximum Running Vusers的值是不是1000已确定是否做到1000人同时在线。
作者:
cafard-haibin
时间:
2009-7-15 17:54
1:如果你模拟1000个用户同时登录系统的话,那么就需要在你登录脚本中加集合点;
2:如果你想模拟1000人登录系统后同时在线,那么就在场景中设置了Duration时间。这个时间应该大于你所有用户加载完的时间。场景运行完毕,打开结果分析查看Maximum Running Vusers的值是不是1000已确定是否做到1000人同时在线。
作者:
okanpipi
时间:
2009-7-16 11:06
标题:
回复 7# 的帖子
集合点这个应该具体怎么设置呢?
我录制的脚本里面并没有我想要得到的 username = passwd= 这样的东东 请大大指点
作者:
cafard-haibin
时间:
2009-7-16 15:32
1:先回答你怎么插入集合点的问题:在录制脚本的时候在录制工具条上就可以看到插入集合点的快捷按钮。请参见附图。
2:你说你录制的登录脚本中没有用户名和密码相关信息。说明也许你根本就没有录制成功。请看一段登录脚本示例。
web_submit_data("login.do",
"Action=http://192.168.0.x/front/login.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.x/",
"Snapshot=t80.inf",
"Mode=HTML",
ITEMDATA,
"Name=context", "Value=", ENDITEM,
"Name=userName", "Value={name}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=usertype", "Value=0", ENDITEM,
LAST);
复制代码
作者:
meizimeizi
时间:
2011-8-9 17:26
为什么我录的登录脚本有这么多?
web_add_cookie("username={{NewParam_1}}; DOMAIN=130.120.2.142");
web_url("130.120.2.142:8080",
"URL=http://130.120.2.142:8080/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_url("130.120.2.142:8080_2",
"URL=http://130.120.2.142:8080/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTTP",
LAST);
lr_rendezvous("Rendezvous");
web_submit_data("check_outchain.php",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTTP",
ITEMDATA,
"Name=urls", "Value=0e142683f0b0ff51d8bb8a6ca9e32d5f|dfc1fe2269dfe6b7678698f4416e254d|54eb893bc24b33e8546ca3279ee4632b|a8baa56554f96369ab93e4f3bb068c22|a2a972ca4b9d8191f139fb0c34756faa|082574e48ea7d787be65775d991da2bc|dfc1fe2269dfe6b7678698f4416e254d\tZGZjYwRlZP4lYwR0Zt==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=51d2394f", ENDITEM,
"Name=mid", "Value=3bafe5b823ef0e544242a672e7c948c7", ENDITEM,
LAST);
web_submit_data("check_outchain.php_2",
"Action=http://qurl.f.360.cn/check_outchain.php",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTTP",
ITEMDATA,
"Name=urls", "Value=0e142683f0b0ff51d8bb8a6ca9e32d5f|dfc1fe2269dfe6b7678698f4416e254d|54eb893bc24b33e8546ca3279ee4632b|a8baa56554f96369ab93e4f3bb068c22|a2a972ca4b9d8191f139fb0c34756faa|082574e48ea7d787be65775d991da2bc|dfc1fe2269dfe6b7678698f4416e254d\tZGZjYwRlZP4lYwR0Zt==\n", ENDITEM,
"Name=src", "Value=addrbar", ENDITEM,
"Name=product", "Value=wd", ENDITEM,
"Name=combo", "Value=urlproc", ENDITEM,
"Name=v", "Value=1", ENDITEM,
"Name=vk", "Value=51d2394f", ENDITEM,
"Name=mid", "Value=3bafe5b823ef0e544242a672e7c948c7", ENDITEM,
LAST);
web_url("main.css",
"URL=http://130.120.2.142:8080/res/main.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t5.inf",
LAST);
web_url("main.css_2",
"URL=http://130.120.2.142:8080/res/main.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t6.inf",
LAST);
web_url("frame-dotted.css",
"URL=http://130.120.2.142:8080/res/frame-dotted.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t7.inf",
LAST);
web_url("frame-dotted.css_2",
"URL=http://130.120.2.142:8080/res/frame-dotted.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t8.inf",
LAST);
web_url("frame-solid.css",
"URL=http://130.120.2.142:8080/res/frame-solid.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t9.inf",
LAST);
web_url("frame-solid.css_2",
"URL=http://130.120.2.142:8080/res/frame-solid.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t10.inf",
LAST);
web_url("style.css",
"URL=http://130.120.2.142:8080/res/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t11.inf",
LAST);
web_url("style.css_2",
"URL=http://130.120.2.142:8080/res/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t12.inf",
LAST);
web_url("menu.js",
"URL=http://130.120.2.142:8080/res/js/menu.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t13.inf",
LAST);
web_url("string.js",
"URL=http://130.120.2.142:8080/res/js/string.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t14.inf",
LAST);
web_url("login2.jpg",
"URL=http://130.120.2.142:8080/login2.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t15.inf",
LAST);
web_url("login2.jpg_2",
"URL=http://130.120.2.142:8080/login2.jpg",
"Resource=1",
"RecContentType=image/jpeg",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t16.inf",
LAST);
lr_think_time(10);
web_submit_data("login.jsp",
"Action=http://130.120.2.142:8080/frame/login.jsp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t17.inf",
"Mode=HTTP",
ITEMDATA,
"Name=key_id", "Value=", ENDITEM,
"Name=pub_key", "Value=", ENDITEM,
"Name=username", "Value=litiangui", ENDITEM,
"Name=password", "Value=0", ENDITEM,
"Name=remember_user_name", "Value=on", ENDITEM,
LAST);
web_submit_data("login.jsp_2",
"Action=http://130.120.2.142:8080/frame/login.jsp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/",
"Snapshot=t18.inf",
"Mode=HTTP",
ITEMDATA,
"Name=key_id", "Value=", ENDITEM,
"Name=pub_key", "Value=", ENDITEM,
"Name=username", "Value=litiangui", ENDITEM,
"Name=password", "Value=0", ENDITEM,
"Name=remember_user_name", "Value=on", ENDITEM,
LAST);
web_url("title.jsp",
"URL=http://130.120.2.142:8080/frame/title.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/frame/login.jsp",
"Snapshot=t19.inf",
"Mode=HTTP",
LAST);
web_url("title.jsp_2",
"URL=http://130.120.2.142:8080/frame/title.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/frame/login.jsp",
"Snapshot=t20.inf",
"Mode=HTTP",
LAST);
web_url("left.html",
"URL=http://130.120.2.142:8080/frame/left.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/frame/login.jsp",
"Snapshot=t21.inf",
"Mode=HTTP",
LAST);
web_url("left.html_2",
"URL=http://130.120.2.142:8080/frame/left.html",
"Resource=0",
"RecContentType=text/html",
"Referer=http://130.120.2.142:8080/frame/login.jsp",
"Snapshot=t22.inf",
"Mode=HTTP",
LAST);
web_url("frame-dotted.css_3",
"URL=http://130.120.2.142:8080/res/frame-dotted.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/frame/title.jsp",
"Snapshot=t23.inf",
LAST);
web_url("style.css_3",
"URL=http://130.120.2.142:8080/res/style.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/frame/title.jsp",
"Snapshot=t24.inf",
LAST);
web_url("menu.js_2",
"URL=http://130.120.2.142:8080/res/js/menu.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://130.120.2.142:8080/frame/title.jsp",
"Snapshot=t25.inf",
LAST);
web_concurrent_start(NULL);
web_url("main.css_3",
"URL=http://130.120.2.142:8080/css/main.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/frame/left.html",
"Snapshot=t26.inf",
LAST);
web_url("framecontrol.js",
"URL=http://130.120.2.142:8080/frame/framecontrol.js",
"Resource=1",
"RecContentType=text/javascript",
"Referer=http://130.120.2.142:8080/frame/left.html",
"Snapshot=t29.inf",
LAST);
web_concurrent_end(NULL);
web_url("main.css_4",
"URL=http://130.120.2.142:8080/css/main.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://130.120.2.142:8080/frame/left.html",
"Snapshot=t27.inf",
LAST);
web_url("string.js_2",
"URL=http://130.120.2.142:8080/res/js/string.js",
"Resource=1",
作者:
wuming_68
时间:
2011-8-10 17:01
楼上,你是基于URL模式录制的:)
作者:
emilyzhang68
时间:
2011-12-23 15:54
为什么我录制的脚本,Mode=HTML,web_submit_data,这是2中模式的混合模式吗??初学LoadRunner,对这些都还没搞清楚呢,希望哪个热心的大侠帮帮忙哦,tks
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2