求助!loadrunner 请求中有ajax变值的关联问题解决方法
提交的请求中有ajax计算出的变值id,关联后脚本回放提示关联失败:web_submit_data("appApply.ajax",
"Action=http://172.16.2.138:8080/CloudOP/siapp/appApply.ajax?agencyId=1318470302163",
"Method=POST",
"RecContentType=application/x-json",
"Referer=http://172.16.2.138:8080/CloudOP/siapp/applyWelcome.do?funcid=09150202&module=OP&isOp=1",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=id", "Value=", ENDITEM,
"Name=siId", "Value={siId}", ENDITEM,
"Name=applicationType", "Value=1", ENDITEM,
"Name=appModules", "Value=", ENDITEM,
"Name=appServices", "Value=", ENDITEM,
"Name=appResTypes", "Value=[{\"id\":\"3-{id1}\",\"resType\":\"ff8080813c5d486e013c6018abf20015\",\"resTypeName\":\"应用服务器\"},{\"id\":\"2-{id2}\",\"resType\":\"ff8080813c5d486e013c60174e1e0010\",\"resTypeName\":\"虚拟机\"},{\"id\":\"1-{id3}\",\"resType\":\"1\",\"resTypeName\":\"数据库\"}]", ENDITEM,
"Name=applicationCode", "Value=OH{applicationCode}", ENDITEM,
"Name=applicationName", "Value=OH{applicationCode}", ENDITEM,
"Name=isSaas", "Value=0", ENDITEM,
"Name=applicationVersion", "Value=V1.0", ENDITEM,
"Name=applicationTypeName", "Value=协同办公", ENDITEM,
"Name=applicationIntro", "Value=OH{applicationCode}", ENDITEM,
"Name=applicationDiscription", "Value=OH{applicationCode}", ENDITEM,
"Name=applicationResource", "Value=OH{applicationCode}", ENDITEM,
"Name=operant", "Value=", ENDITEM,
LAST);
其中{id1}、{id2}、{id3}为关联值,哪位遇到过这种情况啊? 你这种情况需要扩展才行。先从响应消息获取,然后在扩展代码计算。loadrunner我还没用过这个功能。
kylinPET性能工具的话,在响应消息里勾选“调用外部”和并添加获取关联参数,然后自己实现JAVA代码把他们加起来,再存放到映射表里。
参照《kylinPET 调用外部java类实现扩展.chm》
下载地址:www.kylinpet.com 能再具体些么?我是第一次遇到这种问题,还是不清楚怎么解决啊。
页:
[1]