用Loadrunner11工具录制脚本,选择HTTP/HTML->URL-basedscript录制方式,回放过程中,发现系统出现错误:
Action.c(327):ContinuingafterError-26627:HTTPStatus-Code=404(NotFound)for"http://192.168.53.233:8017/amountdeposit-test/demo.con" [MsgId:MERR-26627]
通过httpWatch发现页面提交过成功中有好多Headers需要添加
web_add_header("Accept","application/json,text/javascript,*/*;q=0.01");
web_add_header("X-Requested-With","XMLHttpRequest");
web_submit_data("demo.con",
"Action=http://192.168.53.233:8017/amountdeposit-test/demo.con",
"Method=POST",
"RecContentType=application/json",
"Referer=http://192.168.53.233:8017/amountdeposit-test/amount-test/withdraw.jsp",
"Snapshot=t18.inf",
"Mode=HTTP",
ITEMDATA,
"Name=dd","Value=0000000003|20151110152631|张三|111111|CCB|201511101526315454ffffff",ENDITEM,
LAST);
代码脚本运行通过
原文链接:https://www.f2er.com/ajax/162736.html