PRAKASH RAMANATHAN
PRAKASH RAMANATHAN

Reputation: 161

How to prioritize multiple controllers in Apache JMeter

I have a requirement in JMeter, while executing several recorded HTTP Request (placed inside Transaction Controller) in Thread Group, They should start its execution from one by one ie) Controller 1, Controller 2, ... & Final Controller.

But when I gave 100 threads it start execute, Controller 1 for 100 times then Controller 2 for 100 times and it continues the same till last controller.

enter image description here

From the above shown image you can verify my results. And I need to know, how can I prioritize my controllers when I gave multiple thread counts. My exact output for 100 threads should be like as mentioned below,

1. Controller 1, 2, and till final controller should run as 1st thread count
2. Controller 1, 2, and till final controller should run as 2nd thread count
3. Same like it should continue till the 100th thread count

Please let me know how this requirement is possible in JMeter 4.0

Thanks in advance

Upvotes: 0

Views: 1190

Answers (1)

Dmitri T
Dmitri T

Reputation: 168082

This is default JMeter behaviour, JMeter threads (virtual users) are absolutely independent so:

  1. When you start your test with 1 user it starts executing Samplers upside down, one by one
  2. When you start your test with 100 users - all 100 users start executing samplers upside down. And given you have 100 concurrent users it might be the case that first sampler is being executed by multiple users at once.

Normally this is what the majority of people require. If you got the requirement to run all requests by 1st user followed by all request by 2nd user and having 100 users in parallel - suggest the person, who gave you this requirement to quit IT and become a lawnmower as the requirement doesn't make sense and is contradictory.

You can still achieve it using Concurrency Thread Group configured like:

JMeter Concurrency Thread Group

Which will give you what you're looking for:

JMeter concurrency Thread GRoup in action

You can install Concurrency Thread Group using JMeter Plugins Manager.

Upvotes: 1

Related Questions