1

I have the following Jmeter configuration where I have

1 Thread Group with Number of Threads 1 and under this 4 HttpRequest I have defined. The loop count is forever.

enter image description here

My question is how will my requests be fired ? Since I defined 1 as number of threads in our thread group , will it fire the above 4 requests sequentially or parallel ?

If I had defined 2 as number of threads in our thread group , then how would request would have been fired then ?

To make things simple, assume ramp up time is 0.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Number945
  • 4,631
  • 8
  • 45
  • 83
  • To best of my knowledge with 1 as number of thread the calls will be sequential and if the thread court t is 4 they will be parallel – Soumen Mukherjee Sep 21 '19 at 17:20

2 Answers2

1

In same thread, unless you are using Parallel Controller, requests are executed sequentially

If you have more than one thread, it will execute threads according to ramp up period, if set to zero, all threads will start at same time, notice that theoretically they can execute requests sequentially, but mostly sporadically.

You can control threads using Synchronizing Timer

purpose of the SyncTimer is to block threads until X number of threads have been blocked, and then they are all released at once

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
  • When you say `they can execute requests sequentially, but mostly sporadically` , do you mean - parallel but not at same time ? I am not able to understand `sporadically` – Number945 Sep 21 '19 at 18:15
  • @BreakingBenjamin Operating system decide when to switch between threads, thread can finish its operations and then switch to other thread – Ori Marko Sep 21 '19 at 18:25
  • I have loop counter infinite. So, assuming , all 2 threads in one single thread group start at same time (ramp up time 0) , then they fire request - `parallel` or `sequentially` or `sequentially but not in order` ? – Number945 Sep 21 '19 at 18:29
  • @BreakingBenjamin threads will run in parallel, you will see requests order sporadically – Ori Marko Sep 22 '19 at 07:29
  • Can u pls have a look at this https://stackoverflow.com/questions/58066367/jmeter-multiple-concurrent-users-in-single-thread-group . This is continuation to above. – Number945 Sep 23 '19 at 16:14
0

Each thread will execute the test plan in its entirety and completely independently of other test threads. Multiple threads are used to simulate concurrent connections to your server application.

For further details please refer

https://jmeter.apache.org/usermanual/test_plan.html

dassum
  • 4,727
  • 2
  • 25
  • 38