Jmeter--如何调用Response返回值

将上一个接口Response中的值设置为变量,便于其他接口使用

前期准备:gson-xxx.jar

1、导入gson-xxx.jar:将gson-xxx.jar放在jmeter-->lib-->ext目录下

2、需要使用哪个接口response值就在哪个接口加一个后置处理器--BeanShell PostProcessor

3、使用gson-xxx.jar中的方法将response转化为json格式,提取所需字段的值,并将其赋值给变量

4、使用设置的变量,格式为 ${token}

 

posted @ 2017-07-17 19:34  荔枝Wlilee  阅读(1458)  评论(0)    收藏  举报