这个脚本应该在哪插入集合点进行并发测试!
请问,下面的脚本应该在哪插入集合点进行并发测试!#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;
}
谢谢!! 你想让哪个动作并发就在哪个动作之前加集合点. 同意楼上
我看那脚本估计你是要测试并发登录
那你就在login前后插入集合点吧 为什么一定要加集合点吗?
如果要加,单凭这段代码,应该加在web_submit_data之前吧。 请问应该,在哪设集合!
这是我设集合点的脚本,但在场景中运行后,结果,总是失败,没有一个成功.(我把集合点设为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;
} 应该将 lr_rendezvous("bingfa"); 加到web_submit_data("index.jsp_2", 语句之前。
[ 本帖最后由 guxingyun 于 2007-5-18 11:57 编辑 ] 如果在登陆时,插入集合点并发的同时还插入一个事务,请问一下,集合点在放在事务之间呢?还是放在事务的其它哪个位置? 晕。把函数都断开了。sdlkfj8 sdlkfj8 zee被打败了,呵呵:)
LZ不仅将集合点插在函数中间,还没有加transaction
一般是将集合点加在transaction之前的
呵呵
比较逗... 我个人觉得是在动作前加 将提交数据放于事务中,然后在事务前加集合点。
页:
[1]