0

I have total of 5 requests.

First one is login and it returns JSON response with a token. I will extract the token using JSON Extractor which is to be sent in header as a Authorization key for all other request.

Now, first 4 requests would be working simultaneously but the 5th one will run between a given time period. E.g. I run 100 thread with ramp-up period 50 secs. and the 5th request must be executed after every 5 secs.

So, my question is How to run that 5th request every 5 secs while running the thread.

0
1

Your scenario is not compatible with the JMeter's thread model, you cannot slow down only one request in the Thread Group without slowing down the rest.

You could consider moving the 5th request to another Thread Group and configure the desired requests rate by adding a Constant Timer or a Constant Throughput Timer.

In order to pass the token between 1st and 2nd Thread Groups you can use __setProperty() function in the 1st Thread Group to convert the variable holding the token into a JMeter Property, once done the value can be read via __P() function in the 2nd Thread Group.

1
  • Thanks Dmitri. I tried same with Constant Timer and working as expected.
    – BhavinD.
    Mar 13 '20 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.