How to pass one variable of a thread group extracted from JSON extractor into another thread group as request header value in JMeter?

760 Views Asked by At

Eg: I have token grneration api in a thread group and the token generated in this request need to be sent as header value HTTP header manager for the api request present in another thread group

1

There are 1 best solutions below

0
Dmitri T On
  1. If thread groups are being run sequentially you can use __setProperty() function in 1st Thread Group to convert the JMeter Variable holding the token into a JMeter Property. JMeter Properties are global and can be accessed by all threads no matter in which thread group they are and JMeter Variables are local to the thread. In 2nd Thread Group the property can be read using __P() function
  2. If thread groups are being run in parallel - use Inter-Thread Communication Plugin