51Testing软件测试论坛
标题:
contraller 运行时参数不累加
[打印本页]
作者:
senyu0529
时间:
2008-9-22 09:57
标题:
contraller 运行时参数不累加
哪位大虾遇到过??
我在vug录完脚本,替换完参数后,把number of iterations设置为2回放脚本,参数可以累加。为什么用contraller多用户测试脚本时,参数不累加呢?
作者:
Zee
时间:
2008-9-22 10:15
设置是什么样的?
描述问题要描述清楚,不然还要一问一答,影响你得到答案的速度。
作者:
senyu0529
时间:
2008-9-22 11:28
程序是一个基于pushlet的在线聊天系统,用户登录后Ajax根据用户ID请求聊天室人员列表。我把用户ID设置为参数。
参数
1
2
3
4
5
6
。。。。。
参数设置:
select column
bynumber :1
column delimiter: comma
first data line :1
select next row :sequential
update value on:each iteraton
作者:
senyu0529
时间:
2008-9-22 11:35
以下是部分脚本
Action_enter_chat()
{
/*web_add_cookie("BAIDUID=EB5362904602684A377C40EADC752472:FG=1; DOMAIN=utk.baidu.com");
web_add_cookie("BD_UTK_CD=FEC7A7E01BC9C130; DOMAIN=utk.baidu.com");*/
lr_think_time(30);
lr_rendezvous("进入聊天室");/*近入聊天室的集合点*/
web_submit_data("enterChat.do",
"Action=http://localhost:10000/enterChat.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:10000/index.jsp",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=chatname", "Value=绗\xAC8涓\xAA\xE8亰澶╁\xAE\xA4", ENDITEM,
"Name=GroupID", "Value=8a8080851a0a192b011a0a3ae7900007", ENDITEM,
"Name=chatadmin", "Value=8a8080851a13d350011a13e283300003", ENDITEM,
EXTRARES,
"Url=http://utk.baidu.com/usv/uc.sv?pe=oUXwXrl7Knoxzm3l6dIT9cguAq-ITg==&sn=3762&an=304412&rn=747", ENDITEM,
"Url=http://utk.baidu.com/usv/ur.sv?&an=304412&sn=3762&rf=http://localhost:10000/index.jsp&os=w_2k&bs=ie_6.0&sc=10240768&la=zh-cn&ck=1", ENDITEM,
"Url=/images/2.jpg", "Referer=http://localhost:10000/contents.html", ENDITEM,
"Url=/images/3.jpg", "Referer=http://localhost:10000/chatmessage.html", ENDITEM,
"Url=/images/5.jpg", "Referer=http://localhost:10000/staffList.html", ENDITEM,
"Url=http://www.google-analytics.com/__utm.gif?utmwv=1.3&utmn=1067630282&utmcs=utf-8&utmsr=1024x768&utmsc=8-bit&utmul=zh-cn&utmje=1&utmfl=9.0%20r124&utmcn=1&utmdt=%E7%AC%AC8%E4%B8%AA%E8%81%8A%E5%A4%A9%E5%AE%A4&utmhn=localhost&utmhid=325742164&utmr=0&utmp=/enterChat.do&utmac=UA-1790860-1&utmcc=", ENDITEM,
LAST);
web_custom_request("pushlet.srv",
"URL=http://localhost:10000/pushlet.srv?p_event=join-listen&p_format=xml-strict&p_mode=pull&p_subject=/chat&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t5.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=join-listen&p_format=xml-strict&p_mode=pull&p_subject=/chat&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_2",
"URL=http://localhost:10000/pushlet.srv?p_event=publish&p_subject=/chat&action=enter&nick=乐山市-普通用户-1realname&roomID=8a8080851a0a192b011a0a3ae7900007&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t6.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=publish&p_subject=/chat&action=enter&nick=乐山市-普通用户-1realname&roomID=8a8080851a0a192b011a0a3ae7900007&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_3",
"URL=http://localhost:10000/pushlet.srv?p_event=refresh&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t7.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=refresh&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_4",
"URL=http://localhost:10000/pushlet.srv?p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t8.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_5",
"URL=http://localhost:10000/pushlet.srv?p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t9.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
LAST);
lr_think_time(20);
web_custom_request("pushlet.srv_6",
"URL=http://localhost:10000/pushlet.srv?p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t10.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_7",
"URL=http://localhost:10000/pushlet.srv?p_event=refresh&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t11.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=refresh&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_8",
"URL=http://localhost:10000/pushlet.srv?p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t12.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}", /*参数用户ID*/
LAST);
web_custom_request("pushlet.srv_9",
"URL=http://localhost:10000/pushlet.srv?p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}",
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t13.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getroomcount&p_subject=/chat&action=getroomcount&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}",
LAST);
web_custom_request("pushlet.srv_10",
"URL=http://localhost:10000/pushlet.srv?p_event=refresh&p_id={userID}",
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t14.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=refresh&p_id={userID}",
LAST);
web_custom_request("pushlet.srv_11",
"URL=http://localhost:10000/pushlet.srv?p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}",
"Method=GET",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://localhost:10000/enterChat.do",
"Snapshot=t15.inf",
"Mode=HTML",
"EncType=application/x-www-form-urlencoded",
"Body=p_event=getList&p_subject=/chat&action=userListData&roomID=8a8080851a0a192b011a0a3ae7900007&p_to={userID}&p_id={userID}",
LAST);
return 0;
}
作者:
drlong
时间:
2008-9-22 11:49
标题:
学习中...
交流学习。请到qq群:19041959 (lr性能测试)
作者:
rcpp
时间:
2008-9-22 12:20
lz根据什么说它没有累加?
根据你的描述,我可以简单介绍一下:
1.你用vugen调试脚本,假如设循环3次
然后参数会第一次循环取1,第二次取2,第三次取3
2.再用controller运行,设3个并发
第一个vuser:第一次循环取1,第二次取2,第三次取3……
第二个vuser:第一次循环取1,第二次取2,第三次取3……
第三个vuser:第一次循环取1,第二次取2,第三次取3……
对于第一次循环,无论是哪一个vuser都是从1开始的,能理解吧?
这就是
select next row :sequential
update value on:each iteraton
这样设置的效果
不知道对你有没有帮助
作者:
drlong
时间:
2008-9-22 12:35
标题:
忽略了一个问题
用户1在广州登录了,同时在北京也能登录吗?如果可以,那么设置应该没问题,否则设置问题;
交流学习。请到qq群:19041959 (lr性能测试)
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2