jmeter提取A接口返回值传入B接口

A接口的返回值:{"code":0,"message":"success","groupId":"5370eb3d-0ebd-41a7-8502-0ab214de118d"}

需求:提取A接口中的groupId的值,作为B接口参数值传入

一、获取要提取出的值

  • 提取(在HTTP请求上添加,属于HTTP请求中)

  使用后置处理器—Json提取器

 

二、设置为全局变量

  •  转化为全局变量

  在线程组上添加BeanShell后置处理器(${__setProperty(groupid,${groupid},)}也是对的

 

 三、引入全局变量

使用${__P(xx,)}函数

 四、设置运行方式

 

原文地址:https://www.cnblogs.com/hd-test/p/11988478.html