Raffaele
Raffaele

Reputation: 19

How to execute 2 flows sequentially in parallel with 1 Thread Group in JMeter

We have to simulate a real scenario of my application. We have 2 services that work at the same time in the same system and the different users can arriving at the same time, and each flows can work together.

In JMeter we want simulating with the total virtual users that we have estimated (for only 1 thread group) and we want to put the real virtual user for each flow with a Throughtput Controller, because we have estimated a number of virtual users different for each flow in the application.

In a real scenario each flow (group of samplers) can to be execute at the same time in parallel sequentially, and we want simulate this.

Look the example in the image.

Is it possible use only 1 Ultimate Thread Group with the total of virtual users and Run each flow sequentially in parallel (with the virtual users distributed with Throughtput Controller) in the same Ultimate Thread Group ?

Let me know, thank you.

Example

Upvotes: 0

Views: 44

Answers (2)

Yugal
Yugal

Reputation: 424

Give a try to this approach:


Test Plan: 
bzm - Concurrency Thread Group (define concurrency) 
    > bzm - Weighted Switch Controller (define distribution of txns) 
      > jp@gc - Throughput Shaping Timer (define throuhput) 
      > Transaction Controller : txn_1, txn_n 
      
Cheers!      

Upvotes: 0

Ivan G
Ivan G

Reputation: 2872

Yes it's possible and it's default behaviour of JMeter:

  1. Once started each thread (virtual user) executes Samplers upside down (or according to the Logic Controllers)
  2. When last Sampler in thread group is reached the next iteration starts
  3. When there are no more Samplers to execute and loops to iterate the thread is being shut down
  4. When all threads are stopped the test ends (unless you specify test duration, in this case threads will be running for the specified time and then they will all be stopped at the same time)

You can check which thread (virtual user) is doing what by temporarily adding i.e. ${__threadNum} and ${__groovy(vars.getIteration(),)} functions to your Samplers labels, this way you will see which user is doing what as your test runs.

Upvotes: 0

Related Questions