|
前提:本人用loadrunner选择mobile application-http/html 录制了app上的一次搜索路径。
最终脚本如下:
Action()
{
lr_start_transaction("searchtime");
web_submit_data("searchProduct",
"Action=http://47.88.31.59:803/search/queryProduct",
"Method=POST",
"RecContentType=application/json",
"Referer=",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=countryId", "Value=3", ENDITEM,
"Name=deviceId", "Value=352135071040305", ENDITEM,
"Name=appVersion", "Value=4.4.5", ENDITEM,
"Name=osType", "Value=android", ENDITEM,
"Name=lang", "Value=en", ENDITEM,
"Name=searchSortType", "Value=1001", ENDITEM,
"Name=distinctId", "Value=a6fd0395-79f9-4668-9d82-83f12f155d24", ENDITEM,
"Name=page", "Value=1", ENDITEM,
"Name=higeDefinition", "Value=true", ENDITEM,
"Name=pagesize", "Value=20", ENDITEM,
"Name=keyWord", "Value={searchkeyword}", ENDITEM,
LAST);
lr_end_transaction("searchtime", LR_AUTO);
return 0;
}
因为就一个操作我就自己在web_submit_data这个方法前后加了个事务。。
回放脚本,能在服务器看到日志(应该就是录制的没毛病吧),服务器日志上面有一个响应时间,开发说这是服务器响应时间 6MS
然后我在controller上面设置场景如图:
运行出来的结果是这样的:
结果是正常的吗
|
|