- 9
- 0
- 约6.31千字
- 约 8页
- 2024-07-26 发布于上海
- 举报
LoadRunner模拟Json请求
一、loadrunner脚本创建
1.Insert-Newstep-选择CustomRequest-web_custom_request2.填入相应参数
生成脚本,并修改如下(参数中的引号前需要加斜杠\转译)Action()
{
web_custom_request(web_custom_request,URL=http://urlhead/CpcService.ashx?Method=checkXXXed,Method=POST,
Resource=0,RecContentType=application/json,Referer=,
Mode=HTTP,
EncType=application/json,Body={\user\:{\uid\:\C8-9C-DC-70-BD-B2\}},LAST);
return0;
}
捕获页面返回值
返回格式{IsError:0,ErrorMsg:,user_tags:[0]}
将光标移动到脚本顶部,插入关联点insert-newstep-service-web_reg_save_param
在脚本顶部,插入并修改脚本如下
web_reg_save_param(user_tags,
LB=user_tags\:[\,
RB=\]},LAST);
在脚
原创力文档

文档评论(0)