I have the following scenario using Jmeter 3.3:
I would like to run "Get auth token
" once every 2.5 minutes and meanwhile to run [GET]
thread group non stop.
In other words, [GET]
is taking the auth token from the first thread group and I would like to run them in parallel and only change the token once at 2.5 min.
I tried to add a Constant Timer to the first thread but the second thread is not running until the timer passed.
How can I keep the [GET]
running non-stop and "Get Auth token
" only once at 2.5min?
LE:
[GET]
Thread is used for load tests and should be run with ~100 active users (all using the same token)
Constant Timer was added under HTTP Sampler
> Get Auth token
>> [POST] Auth token
>>> HTTP Header Manager
>>> Regular Expression Extractor
>>> Response Assertion
>>> Constant Timer
LE2: I have tried adding a Test action under the first thread group. I did not manage to make Thread 2 run without waiting after Thread's 1 delay.
As per Functions and Variables User Manual chapter
So I would suggest converting your
authToken
into a JMeter Property via __setProperty() function inGet auth token
Thread Group and refering the value inGet
Thread Group using __P() function so once theauthToken
value is updated all the threads will be using the new value instead of the old one.More information: Knit One Pearl Two: How to Use Variables in Different Thread Groups