发上等愿,结中等缘,享下等福;择高处立,寻平处住,向宽处行

Brick walls are there for a reason :they let us prove how badly we want things

代码改变世界

jmeter跨线程组获取cookie

2026-03-12 12:31  kowme  阅读(13)  评论(0)    收藏  举报

jmeter跨线程组获取cookie

1、添加setup线程组

填写http请求用作登录,添加后置处理器-json提取器、beanShell后置处理程序

后置处理器-json提取器:提取登录后返回的token

image

beanShell后置处理程序:将token转换为全局变量

image

 2、添加线程组

-  添加http请求,用作业务使用

- 添加http信息头管理器:通过${__property(token)} 来指定获取的token 值。

image

 

It's not who you are underneath, it's what you do that defines you

Brick walls are there for a reason :they let us prove how badly we want things