Loadrunner11测试ajax接口

前端之家收集整理的这篇文章主要介绍了Loadrunner11测试ajax接口前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

用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

猜你在找的Ajax相关文章