Home > Mobile >  JMeter - How to run two thread group concurrently?
JMeter - How to run two thread group concurrently?

Time:11-15

I have two thread group:

  1. Authentication Thread Group
  2. REST API Thread Group.

In the first thread group(Authentication Thread Group) I will be generating "access token" using "refresh token" using HTTP request and using JSON parser "access token" is taken. The access token is passed to second thread group(REST API Thread Group) using Inter thread communicator.

The passed access token is used for authenticating the REST APIs in REST API Thread Group.

Using Flow Control Action I had set the Authentication Thread Group to run on interval, so that I can get the new "access token" before it gets expired. Now I am trying to run REST APIs with the current "access token".

So basically I want to run RESP APIs with its respective Thread Group logic, meanwhile the authentication Thread Group has to be executed for given delay time.

Suggest a way to achieve the above? Alternate solution for authenticated REST API is also appreciated.

CodePudding user response:

There is a special box in the enter image description here

if you untick it - JMeter will run all the Thread Groups in parallel.

Apart from this your "way to achieve the above" is correct.

Alternative solution would be switching to JMeter Properties from the Inter-Thread Communication plugin, i.e. :

check out Using JMeter Variables With Multiple Thread Groups guide for more details.

  • Related