51Testing软件测试论坛
标题:
这个脚本应该在哪插入集合点进行并发测试!
[打印本页]
作者:
belie
时间:
2007-5-17 18:25
标题:
这个脚本应该在哪插入集合点进行并发测试!
请问,下面的脚本应该在哪插入集合点进行并发测试!
#include "web_api.h"
Action()
{
web_url("index.jsp",
"URL=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=../js/Calendar.js", ENDITEM,
"URL=../js/office.js", ENDITEM,
"URL=../js/basic.js", ENDITEM,
"URL=../images/logo.swf", ENDITEM,
"URL=../images/menu_bg4.gif", ENDITEM,
"URL=../images/login3.gif", ENDITEM,
"URL=../images/line_01.gif", ENDITEM,
"URL=../images/b_06.gif", ENDITEM,
"URL=../images/b_05.gif", ENDITEM,
"URL=../images/b_08.gif", ENDITEM,
"URL=../images/b_09.gif", ENDITEM,
"URL=../images/new_01.gif", ENDITEM,
"URL=../images/b_line.gif", ENDITEM,
"URL=../images/b_07.gif", ENDITEM,
"URL=../images/new_01_bg.gif", ENDITEM,
"URL=../images/top_02.gif", ENDITEM,
"URL=../images/top_04.gif", ENDITEM,
"URL=../images/new_03.gif", ENDITEM,
"URL=../images/di.gif", ENDITEM,
"URL=../images/input_bg.gif", ENDITEM,
LAST);
lr_think_time(2);
web_submit_data("index.jsp_2",
"Action=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=name", "Value=admin", ENDITEM,
"Name=a", "Value=A", ENDITEM,
"Name=password", "Value=123", ENDITEM,
"Name=x", "Value=40", ENDITEM,
"Name=y", "Value=9", ENDITEM,
EXTRARES,
"URL=../js/Calendar.js", ENDITEM,
"URL=../js/office.js", ENDITEM,
"URL=../images/logo.swf", ENDITEM,
"URL=../images/menu_bg4.gif", ENDITEM,
"URL=../images/line_01.gif", ENDITEM,
"URL=../images/login3.gif", ENDITEM,
"URL=../images/b_05.gif", ENDITEM,
"URL=../images/b_08.gif", ENDITEM,
"URL=../images/b_09.gif", ENDITEM,
"URL=../images/b_06.gif", ENDITEM,
"URL=../images/b_07.gif", ENDITEM,
"URL=../images/b_line.gif", ENDITEM,
"URL=../images/new_01.gif", ENDITEM,
"URL=../images/new_01_bg.gif", ENDITEM,
"URL=../images/top_02.gif", ENDITEM,
"URL=../images/top_04.gif", ENDITEM,
"URL=../images/new_03.gif", ENDITEM,
"URL=../images/di.gif", ENDITEM,
LAST);
return 0;
}
谢谢!!
作者:
ireneyao
时间:
2007-5-17 18:35
你想让哪个动作并发就在哪个动作之前加集合点.
作者:
sunxy5291
时间:
2007-5-18 09:45
同意楼上
我看那脚本估计你是要测试并发登录
那你就在login前后插入集合点吧
作者:
rickyzhu
时间:
2007-5-18 10:16
为什么一定要加集合点吗?
如果要加,单凭这段代码,应该加在web_submit_data之前吧。
作者:
belie
时间:
2007-5-18 10:33
请问应该,在哪设集合!
这是我设集合点的脚本,但在场景中运行后,结果,总是失败,没有一个成功.(我把集合点设为1个人也失败!但我不写集合点,结果又恢复成功了!)
#include "web_api.h"
Action()
{
web_url("index.jsp",
"URL=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=../js/Calendar.js", ENDITEM,
"URL=../js/office.js", ENDITEM,
"URL=../js/basic.js", ENDITEM,
"URL=../images/logo.swf", ENDITEM,
"URL=../images/menu_bg4.gif", ENDITEM,
"URL=../images/login3.gif", ENDITEM,
"URL=../images/line_01.gif", ENDITEM,
"URL=../images/b_06.gif", ENDITEM,
"URL=../images/b_05.gif", ENDITEM,
"URL=../images/b_08.gif", ENDITEM,
"URL=../images/b_09.gif", ENDITEM,
"URL=../images/new_01.gif", ENDITEM,
"URL=../images/b_line.gif", ENDITEM,
"URL=../images/b_07.gif", ENDITEM,
"URL=../images/new_01_bg.gif", ENDITEM,
"URL=../images/top_02.gif", ENDITEM,
"URL=../images/top_04.gif", ENDITEM,
"URL=../images/new_03.gif", ENDITEM,
"URL=../images/di.gif", ENDITEM,
"URL=../images/input_bg.gif", ENDITEM,
LAST);
lr_think_time(2);
web_submit_data("index.jsp_2",
"Action=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.0.2:81/JudgeServer/common/index.jsp",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
lr_rendezvous("bingfa");
"Name=name", "Value=admin", ENDITEM,
"Name=a", "Value=A", ENDITEM,
"Name=password", "Value=123", ENDITEM,
"Name=x", "Value=40", ENDITEM,
"Name=y", "Value=9", ENDITEM,
EXTRARES,
"URL=../js/Calendar.js", ENDITEM,
"URL=../js/office.js", ENDITEM,
"URL=../images/logo.swf", ENDITEM,
"URL=../images/menu_bg4.gif", ENDITEM,
"URL=../images/line_01.gif", ENDITEM,
"URL=../images/login3.gif", ENDITEM,
"URL=../images/b_05.gif", ENDITEM,
"URL=../images/b_08.gif", ENDITEM,
"URL=../images/b_09.gif", ENDITEM,
"URL=../images/b_06.gif", ENDITEM,
"URL=../images/b_07.gif", ENDITEM,
"URL=../images/b_line.gif", ENDITEM,
"URL=../images/new_01.gif", ENDITEM,
"URL=../images/new_01_bg.gif", ENDITEM,
"URL=../images/top_02.gif", ENDITEM,
"URL=../images/top_04.gif", ENDITEM,
"URL=../images/new_03.gif", ENDITEM,
"URL=../images/di.gif", ENDITEM,
LAST);
return 0;
}
作者:
guxingyun
时间:
2007-5-18 11:56
应该将 lr_rendezvous("bingfa"); 加到 web_submit_data("index.jsp_2", 语句之前。
[
本帖最后由 guxingyun 于 2007-5-18 11:57 编辑
]
作者:
iblues
时间:
2007-5-29 14:47
如果在登陆时,插入集合点并发的同时还插入一个事务,请问一下,集合点在放在事务之间呢?还是放在事务的其它哪个位置?
作者:
Zee
时间:
2007-5-29 15:06
晕。把函数都断开了。sdlkfj8 sdlkfj8
作者:
just_cici
时间:
2007-5-29 15:46
zee被打败了,呵呵:)
LZ不仅将集合点插在函数中间,还没有加transaction
一般是将集合点加在transaction之前的
作者:
liujg
时间:
2008-6-28 19:49
标题:
呵呵
比较逗...
作者:
majun915
时间:
2009-5-6 10:46
我个人觉得是在动作前加
作者:
晓桐
时间:
2009-5-12 13:22
将提交数据放于事务中,然后在事务前加集合点。
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2