|
我在做一个性能测试。其中有一个部分是在一个搜索界面输入一个条件,点击查询会查出来10个对应的结果。 然后这个操作要由5个虚拟用户来同时操作。这个场景要持续跑一个小时。
搜索用的数据类似:
DEDO 100000
(Vuser A)
DEDO 200000(Vuser B)
对应结果类似:
1364667,DEDO 1000000
1363487,DEDO 1000001
1364668,DEDO 1000002
1363488,DEDO 1000003
1364669,DEDO 1000004
1363489,DEDO 1000005
1364670,DEDO 1000006
1363490,DEDO 1000007
1364671,DEDO 1000008
1363491,DEDO 1000009
(Vuser A)
1364672,DEDO 2000000
1363492,DEDO 2000001
1364673,DEDO 2000002
1363493,DEDO 2000003
1364674,DEDO 2000004
1363494,DEDO 2000005
1364675,DEDO 2000006
1363495,DEDO 2000007
1364676,DEDO 2000008
1363496,DEDO 2000009
(Vuser B)
前面的数字是无序的箱子ID,后面是箱子的名字,有顺序。
搜索条件有300个,结果有3000个。足够5个用户不重复数据的跑1个小时。
我应该怎么做参数化?
下面是我录制的脚本:
Action()
{
web_submit_data("DOCCntrServlet_2",
"Action=http://192.168.1.61/doc/DOCCntrServlet",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.61/doc/DOCCntrServlet?requestID=DOC.EnquireCntr",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=requestID", "Value=DOC.EnquireCntr", ENDITEM,
"Name=voyages", "Value=ACACIA(0416W/0416E)", ENDITEM,
"Name=voyages", "Value=ALBERT MAERSK(0711/0712)", ENDITEM,
"Name=operatorCs", "Value=ZIM", ENDITEM,
"Name=vesselVoyage", "Value=", ENDITEM,
"Name=vesselVoyage_new_value", "Value=false", ENDITEM,
"Name=cntrNBlur", "Value={SelectCntr}", ENDITEM,
"Name=billNo", "Value=", ENDITEM,
"Name=operatorC", "Value=", ENDITEM,
"Name=operatorC_new_value", "Value=false", ENDITEM,
"Name=action", "Value=查询", ENDITEM,
LAST);
web_submit_form("DOCCntrServlet_3",
"Snapshot=t9.inf",
ITEMDATA,
"Name=all", "Value=on", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=cntrCheckBoxs", "Value={Cntr}", ENDITEM,
"Name=action", "Value=退关", ENDITEM,
LAST);
lr_start_transaction("DOSO");
web_submit_form("DOCCntrServlet_4",
"Snapshot=t10.inf",
ITEMDATA,
"Name=action", "Value=提交", ENDITEM,
LAST);
lr_end_transaction("DOSO",LR_AUTO);
web_submit_form("DOCCntrServlet_5",
"Snapshot=t11.inf",
ITEMDATA,
"Name=action", "Value=确定", ENDITEM,
LAST);
return 0;
} |
|