|
Action()
{
web_reg_save_param("Sn_ID",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path=/CHP",
"Ord=1",
"IgnoreRedirections=Yes",
LAST);
web_url("CHP",
"URL=http://172.18.97.79:8080/CHP",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTTP",
LAST);
web_custom_request("dwrChangeEmergencyPhone.initEP.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeEmergencyPhone.initEP.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t56.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\n"
"page=/CHP/index.do?action=init\n"
"httpSessionId={Sn_ID}\n"
"scriptSessionId=BA912538F322B43E844119F461FF0C1C879\n"
"c0-scriptName=dwrChangeEmergencyPhone\n"
"c0-methodName=initEP\n"
"c0-id=0\n"
"batchId=1\n",
LAST);
web_custom_request("dwrChangeKnowledgeBase.initKB.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeKnowledgeBase.initKB.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t58.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\n"
"page=/CHP/index.do?action=init\n"
"httpSessionId={Sn_ID}\n"
"scriptSessionId=BA912538F322B43E844119F461FF0C1C879\n"
"c0-scriptName=dwrChangeKnowledgeBase\n"
"c0-methodName=initKB\n"
"c0-id=0\n"
"batchId=0\n",
LAST);
web_custom_request("dwrChangeHospital.initHp.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeHospital.initHp.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t59.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\n"
"page=/CHP/index.do?action=init\n"
"httpSessionId={Sn_ID}\n"
"scriptSessionId=BA912538F322B43E844119F461FF0C1C879\n"
"c0-scriptName=dwrChangeHospital\n"
"c0-methodName=initHp\n"
"c0-id=0\n"
"batchId=2\n",
LAST);
return 0;
}
这是我的脚本 关联后的
Action()
{
web_url("CHP",
"URL=http://172.18.97.79:8080/CHP",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTTP",
LAST);
web_custom_request("dwrChangeEmergencyPhone.initEP.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeEmergencyPhone.initEP.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t60.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\npage=/CHP/index.do?action=init\nhttpSessionId=F6E3D5E55BF50FEA79AAE2EE587984DF\nscriptSessionId=F144FADF67CDFB6DE6ECDFAF1F14DB50476\nc0-scriptName=dwrChangeEmergencyPhone\nc0-methodName=initEP\nc0-id=0\nbatchId=1\n",
LAST);
web_custom_request("dwrChangeKnowledgeBase.initKB.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeKnowledgeBase.initKB.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t61.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\npage=/CHP/index.do?action=init\nhttpSessionId=F6E3D5E55BF50FEA79AAE2EE587984DF\nscriptSessionId=F144FADF67CDFB6DE6ECDFAF1F14DB50476\nc0-scriptName=dwrChangeKnowledgeBase\nc0-methodName=initKB\nc0-id=0\nbatchId=0\n",
LAST);
web_custom_request("dwrChangeHospital.initHp.dwr",
"URL=http://172.18.97.79:8080/CHP/dwr/call/plaincall/dwrChangeHospital.initHp.dwr",
"Method=POST",
"Resource=0",
"RecContentType=text/javascript",
"Referer=http://172.18.97.79:8080/CHP/index.do?action=init",
"Snapshot=t62.inf",
"Mode=HTTP",
"EncType=text/plain",
"Body=callCount=1\npage=/CHP/index.do?action=init\nhttpSessionId=F6E3D5E55BF50FEA79AAE2EE587984DF\nscriptSessionId=F144FADF67CDFB6DE6ECDFAF1F14DB50476\nc0-scriptName=dwrChangeHospital\nc0-methodName=initHp\nc0-id=0\nbatchId=2\n",
LAST);
return 0;
}
这是关联前的~
回放后
Virtual User Script started at : 2010-12-29 15:00:51
Starting action vuser_init.
Web Turbo Replay of LoadRunner 11.0.0 for WINXP; build 8859 (Aug 18 2010 20:14:31) [MsgId: MMSG-27143]
Run Mode: HTML [MsgId: MMSG-26000]
Run-Time Settings file: "E:\练习Loadrunder\GuanLian1\\default.cfg" [MsgId: MMSG-27141]
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(3): Registering web_reg_save_param was successful [MsgId: MMSG-26390]
Action.c(10): Redirecting "http://172.18.97.79:8080/CHP" (redirection depth is 0) [MsgId: MMSG-26694]
Action.c(10): To location "http://172.18.97.79:8080/CHP/" [MsgId: MMSG-26693]
Action.c(10): Redirecting "http://172.18.97.79:8080/CHP/" (redirection depth is 1) [MsgId: MMSG-26694]
Action.c(10): To location "http://172.18.97.79:8080/CHP/index.do?action=init" [MsgId: MMSG-26693]
Action.c(10): Error -26377: No match found for the requested parameter "Sn_ID". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-26377]
Action.c(10): web_url("CHP") highest severity level was "ERROR", 179504 body bytes, 821 header bytes, 186 chunking overhead bytes [MsgId: MMSG-26387]
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
就这样了 呜呜 |
|