|
脚本:两个不同用户同时登录系统后,再退出(就这么简单的步骤)
参数化了用户,设置Select next row 为 unique
设置Update value on 为 Each iteration
录制两份脚本后,比较动态数据,发现3处是动态的
web_submit_data("default.aspx", web_submit_data("mainpage2.aspx_2", web_submit_data("mainpage2.aspx_3",.
在脚本里对这3处做了关联,运行通过.
在场景里设置两个用户,执行后,一个pass,一个failed.
错误
Action.c(741): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://10.122.10.208/DevelopmentR2_5/Themes/default/SysMain2.aspx?availWidth=1024&availHeight=708"
附上部分脚本代码:
web_set_max_html_param_len("1024");
web_reg_save_param("CSRule_1",
"LB=IFCAViewStatePersist",
"RB=\"",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"SaveOffset=1",
LAST);
web_url("DevelopmentR2_5",
"URL=http://10.122.10.208/DevelopmentR2_5/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_submit_data("default.aspx",
"Action=http://10.122.10.208/DevelopmentR2_5/default.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/",
"Snapshot=t3.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\{CSRule_1}", ENDITEM,
"Name=__VIEWSTATE", "Value=", ENDITEM,
"Name=EmpNo", "Value=", ENDITEM,
"Name=", "Value=", ENDITEM,
"Name=EmpPassWord", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=__Page", ENDITEM,
"Name=__CALLBACKPARAM", "Value={NewParam},11", ENDITEM,
LAST);
web_url("SysMain2.aspx",
"URL=http://10.122.10.208/DevelopmentR2_5/Themes/default/SysMain2.aspx?availWidth=1024&availHeight=708",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTTP",
LAST);
web_reg_save_param("CSRule_2",
"LB=IFCAViewStatePersist",
"RB=\"",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"SaveOffset=1",
LAST);
web_url("mainpage2.aspx",
"URL=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/Themes/default/SysMain2.aspx?availWidth=1024&availHeight=708",
"Snapshot=t5.inf",
"Mode=HTTP",
LAST);
web_submit_data("mainpage2.aspx_2",
"Action=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Snapshot=t6.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\{CSRule_2}", ENDITEM,
"Name=__VIEWSTATE", "Value=", ENDITEM,
"Name=CalendarControl1_Calendar1_selecteddates", "Value=2008.5.29", ENDITEM,
"Name=CalendarControl1_Calendar1_visibledate", "Value=0001.1.1", ENDITEM,
"Name=CalendarControl1_Calendar1_apparentvisibledate", "Value=2008.5", ENDITEM,
"Name=textKey", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=NotesControl1", ENDITEM,
"Name=__CALLBACKPARAM", "Value=", ENDITEM,
LAST);
lr_think_time(10);
web_submit_data("mainpage2.aspx_3",
"Action=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Snapshot=t7.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\{CSRule_2}", ENDITEM,
"Name=__VIEWSTATE", "Value=", ENDITEM,
"Name=CalendarControl1_Calendar1_selecteddates", "Value=2008.5.29", ENDITEM,
"Name=CalendarControl1_Calendar1_visibledate", "Value=0001.1.1", ENDITEM,
"Name=CalendarControl1_Calendar1_apparentvisibledate", "Value=2008.5", ENDITEM,
"Name=textKey", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=NotesControl2", ENDITEM,
"Name=__CALLBACKPARAM", "Value=payableoverdue,cashreceiptoverdue,budgetoverestimate,projectcostovertop,mcorprequestescalate,mcexpiredcontract,mcarrearage,mcorptrxvoid,mcorpreceiptvoid,mcorprefund,mcorptrx,rentaltenancy,rentaagentcommission,rentalprospect,rt_prospectcustomertrack", ENDITEM,
LAST);
以下是部分录制日志:
web_submit_data("default.aspx",
"Action=http://10.122.10.208/DevelopmentR2_5/default.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/",
"Snapshot=t3.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\4ea4f2cb-7bd3-45bb-8656-6e375f20a8a8", ENDITEM, "Name=__VIEWSTATE", "Value=", ENDITEM,
web_submit_data("mainpage2.aspx_3",
"Action=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Snapshot=t7.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\11583e0f-be23-459e-b5bb-918d11e64b7d", ENDITEM, "Name=__VIEWSTATE", "Value=", ENDITEM,
"Name=CalendarControl1_Calendar1_selecteddates", "Value=2008.5.29", ENDITEM,
"Name=CalendarControl1_Calendar1_visibledate", "Value=0001.1.1", ENDITEM,
"Name=CalendarControl1_Calendar1_apparentvisibledate", "Value=2008.5", ENDITEM,
"Name=textKey", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=NotesControl2", ENDITEM,
"Name=__CALLBACKPARAM", "Value=payableoverdue,cashreceiptoverdue,budgetoverestimate,projectcostovertop,mcorprequestescalate,mcexpiredcontract,mcarrearage,mcorptrxvoid,mcorpreceiptvoid,mcorprefund,mcorptrx,rentaltenancy,rentaagentcommission,rentalprospect,rt_prospectcustomertrack", ENDITEM,
LAST);
"Name=EmpNo", "Value=", ENDITEM,
"Name=", "Value=", ENDITEM,
"Name=EmpPassWord", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=__Page", ENDITEM,
"Name=__CALLBACKPARAM", "Value=yanjiali,11", ENDITEM,
LAST);
web_submit_data("mainpage2.aspx_2",
"Action=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.122.10.208/DevelopmentR2_5/main/mainpage2.aspx",
"Snapshot=t6.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE_KEY", "Value=C:\\Temp\\IFCAViewStatePersist\\11583e0f-be23-459e-b5bb-918d11e64b7d", ENDITEM, "Name=__VIEWSTATE", "Value=", ENDITEM,
"Name=CalendarControl1_Calendar1_selecteddates", "Value=2008.5.29", ENDITEM,
"Name=CalendarControl1_Calendar1_visibledate", "Value=0001.1.1", ENDITEM,
"Name=CalendarControl1_Calendar1_apparentvisibledate", "Value=2008.5", ENDITEM,
"Name=textKey", "Value=", ENDITEM,
"Name=__CALLBACKID", "Value=NotesControl1", ENDITEM,
"Name=__CALLBACKPARAM", "Value=", ENDITEM,
LAST);
[ 本帖最后由 galiji 于 2008-6-2 10:07 编辑 ] |
|