测试并发该怎样设置????????
如果一个系统有个考试,需要测试1、150个人考试,五分钟内提交;2、150个人考试,2分钟内提交;3、150个人考试,同时提交。那么问题来了?1、这150个人该是录制时用同一个账号登陆,用150个vuser一起用这个账号登陆考试吗?
2、如果插入集合点,是不是在提交试卷的submit之前插入lr_rendezvous
3、如果要测试150个5分钟内提交设置的global schedule中开始是150,15vusers every 30s,这样设置对不对?
麻烦哪位大神帮忙解答一些 Action()
{
web_url("toFrontMainPage.action",
"URL=http://58.154.128.129:7006/home/toFrontMainPage.action",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=../common/images/hb_bg_top01.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav01.jpg", ENDITEM,
"Url=../common/images/hb_img_top01.jpg", ENDITEM,
"Url=../common/images/hb_bg_top02.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav03.jpg", ENDITEM,
"Url=../common/flash/flashBanner03.swf", ENDITEM,
"Url=../common/flash/flashBanner01.swf", ENDITEM,
"Url=images/hb_bg_wNews01.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav02.jpg", ENDITEM,
"Url=images/hb_bg_siteNav01.jpg", ENDITEM,
"Url=images/hb_bg_bLink01.jpg", ENDITEM,
"Url=images/hb_bg_siteNav02.jpg", ENDITEM,
"Url=images/hb_bg_siteNav03.jpg", ENDITEM,
"Url=images/hb_bg_listTit01.jpg", ENDITEM,
"Url=images/hb_bg_date01.jpg", ENDITEM,
"Url=images/hb_bg_count01.jpg", ENDITEM,
"Url=images/hb_bg_netWork02.jpg", ENDITEM,
"Url=images/hb_bg_count02.jpg", ENDITEM,
"Url=images/hb_bg_infoCount01.jpg", ENDITEM,
"Url=images/hb_bg_netWork01.jpg", ENDITEM,
"Url=../common/images/hb_ico_list01.jpg", ENDITEM,
"Url=images/hb_bg_listTit02.jpg", ENDITEM,
"Url=../common/images/hb_bg_footer01.jpg", ENDITEM,
LAST);
lr_think_time(9);
lr_start_transaction("登录");
web_submit_data("login.action",
"Action=http://58.154.128.129:7006/user/front/login.action",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://58.154.128.129:7006/home/toFrontMainPage.action",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=user_Login_UID", "Value=920706197801283333", ENDITEM,
"Name=user_Login_Password", "Value=123456", ENDITEM,
LAST);
lr_end_transaction("登录", LR_PASS);
web_url("toFrontMainPage.action_2",
"URL=http://58.154.128.129:7006/home/toFrontMainPage.action",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=../common/images/hb_bg_top02.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav03.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav01.jpg", ENDITEM,
"Url=../common/images/hb_img_top01.jpg", ENDITEM,
"Url=../common/images/hb_bg_top01.jpg", ENDITEM,
"Url=images/hb_bg_netWork01.jpg", ENDITEM,
"Url=images/hb_bg_netWork02.jpg", ENDITEM,
"Url=images/hb_bg_infoCount01.jpg", ENDITEM,
"Url=images/hb_bg_count01.jpg", ENDITEM,
"Url=../common/images/hb_ico_list01.jpg", ENDITEM,
"Url=images/hb_bg_date01.jpg", ENDITEM,
"Url=images/hb_bg_siteNav02.jpg", ENDITEM,
"Url=images/hb_bg_count02.jpg", ENDITEM,
"Url=images/hb_bg_siteNav03.jpg", ENDITEM,
"Url=images/hb_bg_bLink01.jpg", ENDITEM,
"Url=images/hb_bg_listTit01.jpg", ENDITEM,
"Url=images/hb_bg_listTit02.jpg", ENDITEM,
"Url=../common/images/hb_bg_Snav02.jpg", ENDITEM,
"Url=../common/images/hb_bg_footer01.jpg", ENDITEM,
"Url=images/hb_bg_wNews01.jpg", ENDITEM,
"Url=images/hb_bg_siteNav01.jpg", ENDITEM,
LAST);
lr_start_transaction("进入考试系统");
web_url("考试系统",
"URL=http://58.154.128.129:7006/exam/ExamNameList.action",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://58.154.128.129:7006/home/toFrontMainPage.action",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=../common/flash/flashBanner04.swf", ENDITEM,
"Url=images/hb_bg_Snav02.jpg", ENDITEM,
"Url=images/hb_img_sideTit02.jpg", ENDITEM,
"Url=images/hb_bg_mBox01.jpg", ENDITEM,
"Url=images/hb_bg_mBox02.jpg", ENDITEM,
"Url=images/hb_bg_Snav01.jpg", ENDITEM,
"Url=images/hb_bg_footer01.jpg", ENDITEM,
"Url=images/hb_bg_sideBox02.jpg", ENDITEM,
"Url=images/hb_bg_header01.jpg", ENDITEM,
"Url=images/hb_bg_mBody01.jpg", ENDITEM,
"Url=images/hb_bg_mBody02.jpg", ENDITEM,
"Url=images/hb_bg_sideBox01.jpg", ENDITEM,
LAST);
web_url("for test",
"URL=http://58.154.128.129:7006/exam/ReadExamInfo.action?exam_Id=7462",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://58.154.128.129:7006/exam/ExamNameList.action",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=../manage/Exam/pages/images/bg_examBtn01.jpg", "Referer=http://58.154.128.129:7006/exam/ReadExamInfo.action?exam_Id=7462", ENDITEM,
LAST);
lr_end_transaction("进入考试系统", LR_PASS);
lr_start_transaction("开始考试");
web_submit_data("EnterExam.action",
"Action=http://58.154.128.129:7006/exam/EnterExam.action",
"Method=POST",
"TargetFrame=",
"RecContentType=application/json",
"Referer=http://58.154.128.129:7006/exam/ReadExamInfo.action?exam_Id=7462",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=exam_Id", "Value=7462", ENDITEM,
"Name=enter_Code", "Value=111", ENDITEM,
LAST);
web_url("ReadExamQusetion.action",
"URL=http://58.154.128.129:7006/exam/ReadExamQusetion.action?exam_Id=7462&cacheDate=1423624796000",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t8.inf",
"Mode=HTML",
EXTRARES,
"Url=../manage/Exam/pages/images/bg-0092.gif", "Referer=http://58.154.128.129:7006/exam/ReadExamQusetion.action?exam_Id=7462&cacheDate=1423624796000", ENDITEM,
"Url=../manage/Exam/pages/images/bg-0421.gif", "Referer=http://58.154.128.129:7006/exam/ReadExamQusetion.action?exam_Id=7462&cacheDate=1423624796000", ENDITEM,
LAST);
lr_end_transaction("开始考试", LR_PASS);
lr_think_time(12);
lr_start_transaction("提交考试");
lr_rendezvous("kaoshibingfa");
web_submit_data("SubmitExamination.action",
"Action=http://58.154.128.129:7006/exam/SubmitExamination.action",
"Method=POST",
"TargetFrame=_self",
"RecContentType=text/html",
"Referer=http://58.154.128.129:7006/exam/ReadExamQusetion.action?exam_Id=7462&cacheDate=1423624796000",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=userAge", "Value=#request.userAge", ENDITEM,
"Name=pageFromFlag", "Value=#request.pageFromFlag", ENDITEM,
"Name=typingFocusFlag", "Value=0", ENDITEM,
"Name=typingIndex", "Value=", ENDITEM,
"Name=typingTime", "Value=", ENDITEM,
"Name=typingActContent", "Value=", ENDITEM,
"Name=typingFocusFlag", "Value=0", ENDITEM,
"Name=typeId", "Value=currentExamination.typeId", ENDITEM,
"Name=focusElementId", "Value=", ENDITEM,
"Name=exam_BaseInfoDao.single_Choice_Count", "Value=2", ENDITEM,
"Name=exam_BaseInfoDao.single_Choice_Score", "Value=2.0", ENDITEM,
"Name=exam_BaseInfoDao.multi_Choice_Count", "Value=2", ENDITEM,
"Name=exam_BaseInfoDao.multi_Choice_Score", "Value=2.0", ENDITEM,
"Name=exam_BaseInfoDao.true_False_Count", "Value=2", ENDITEM,
"Name=exam_BaseInfoDao.true_False_Score", "Value=2.0", ENDITEM,
"Name=exam_BaseInfoDao.completion_Blank_Count", "Value=0", ENDITEM,
"Name=exam_BaseInfoDao.completion_Blank_Score", "Value=0.0", ENDITEM,
"Name=exam_BaseInfoDao.short_Answer_Count", "Value=0", ENDITEM,
"Name=exam_BaseInfoDao.shortAnswerScore", "Value=0.0", ENDITEM,
"Name=exam_BaseInfoDao.exam_ID", "Value=7462", ENDITEM,
"Name=exam_BaseInfoDao.exam_Name", "Value=for test", ENDITEM,
"Name=exam_BaseInfoDao.exam_Time", "Value=2", ENDITEM,
"Name=singleChoiceList.question_Text", "Value=122121212。", ENDITEM,
"Name=singleChoiceList.question_ID", "Value=7783", ENDITEM,
"Name=singleChoiceList.question_Answer", "Value=C", ENDITEM,
"Name=singleChoiceList.userAnswer", "Value=A", ENDITEM,
"Name=singleChoiceList.question_Text", "Value=3234242423424", ENDITEM,
"Name=singleChoiceList.question_ID", "Value=7721", ENDITEM,
"Name=singleChoiceList.question_Answer", "Value=A", ENDITEM,
"Name=singleChoiceList.userAnswer", "Value=A", ENDITEM,
"Name=multiChoiceList.question_Text", "Value=234234234234234234", ENDITEM,
"Name=multiChoiceList.question_ID", "Value=7807", ENDITEM,
"Name=multiChoiceList.question_Answer", "Value=A,B,D", ENDITEM,
"Name=multiChoiceList.userAnswer", "Value=A", ENDITEM,
"Name=multiChoiceList.userAnswer", "Value=B", ENDITEM,
"Name=multiChoiceList.question_Text", "Value=2342342342342432", ENDITEM,
"Name=multiChoiceList.question_ID", "Value=7740", ENDITEM,
"Name=multiChoiceList.question_Answer", "Value=B,C,D", ENDITEM,
"Name=multiChoiceList.userAnswer", "Value=A", ENDITEM,
"Name=multiChoiceList.userAnswer", "Value=B", ENDITEM,
"Name=trueFalseList.question_Text", "Value=234234242423424234", ENDITEM,
"Name=trueFalseList.question_ID", "Value=57612", ENDITEM,
"Name=trueFalseList.question_Answer", "Value=Y", ENDITEM,
"Name=trueFalseList.userAnswer", "Value=Y", ENDITEM,
"Name=trueFalseList.question_Text", "Value=23424234234234", ENDITEM,
"Name=trueFalseList.question_ID", "Value=7768", ENDITEM,
"Name=trueFalseList.question_Answer", "Value=N", ENDITEM,
"Name=trueFalseList.userAnswer", "Value=Y", ENDITEM,
LAST);
lr_end_transaction("提交考试", LR_PASS);
return 0;
}
1、应该把用户参数化,用150个账号。
2、1、150个人考试,五分钟内提交;2、150个人考试,2分钟内提交;这两个不用集合点。
150个人同时提交需要集合点,集合点的位置在submit之前没错。
3、这样设置可以。 这个 lr_rendezvous("kaoshibingfa");是不是应该放在 lr_start_transaction("提交考试");之前?!! 我回复的为什么看不到??? lr_rendezvous("kaoshibingfa");是不是应该放在lr_start_transaction("提交考试");的前面?!!!!!
saharaqs 发表于 2015-2-11 14:25
1、应该把用户参数化,用150个账号。
2、1、150个人考试,五分钟内提交;2、150个人考试,2分钟内提交;这 ...
我按照你的方式参数化了150个人,但是回放的时候报错了,以下是报错的信息,是否能看出是什么原因呢Action.c(152): Notify: Transaction "开始考试" ended with "Pass" status (Duration: 0.4902 Wasted Time: 0.0054).
Action.c(156): Notify: Transaction "提交考试" started.
Action.c(160): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://58.154.128.129:7006/exam/SubmitExamination.action"
Action.c(160): web_submit_data("SubmitExamination.action") highest severity level was "ERROR", 12173 body bytes, 192 header bytes
Action.c(160): Notify: Transaction "提交考试" ended with "Fail" status (Duration: 0.1753 Wasted Time: 0.0010).
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
Farrah 发表于 2015-2-11 15:31
lr_rendezvous("kaoshibingfa");是不是应该放在lr_start_transaction("提交考试");的前面?!!!! ...
这个应该放在事务的里面吧 把这句放事物开始之前。。。
参数取值设置的 唯一值,每一次迭代
页:
[1]