You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "张为东(为东)" <we...@alibaba-inc.com> on 2015/08/04 13:23:46 UTC

How to use variable between thread groups

Hi all,

 

I’d like to get one variable (eg. Token string )from thread group A, then
in thread group B, JMeter can use the variable. Does anyone know how to use
it between thread groups?

 

Background:

Thread group A is run one time to get access token, Thread group B is run
for loop.

 

Thanks.

--Weidong


RE: How to use variable between thread groups

Posted by Erez Naim <er...@theneura.com>.
Hi,

There are two ways of doing it:
1. Go to http://jmeter-plugins.org/ and download plugin (there are
instructions how to do this).
2. then in your script use jp@gc - Inter-Thread Communication PreProcessor
and jp@gc - Inter-Thread Communication PostProcessor. 
3. follow this link for examples:
http://jmeter-plugins.org/wiki/AsyncDownloadTutorial/

Second way is using beanshell postprocessor: 

Follow this link:
https://blazemeter.com/blog/knit-one-pearl-two-how-use-variables-different-t
hread-groups

Enjoy! 

--Erez--

-----Original Message-----
From: 张为东(为东) [mailto:weidong.zwd@alibaba-inc.com] 
Sent: Tuesday, August 04, 2015 2:24 PM
To: user@jmeter.apache.org
Subject: How to use variable between thread groups

Hi all,

 

I’d like to get one variable (eg. Token string )from thread group A, then
in thread group B, JMeter can use the variable. Does anyone know how to use
it between thread groups?

 

Background:

Thread group A is run one time to get access token, Thread group B is run
for loop.

 

Thanks.

--Weidong



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org