0
votes

I have written a simple test plan with the following steps

Test Plan

  1. View Results in Table
  2. Aggregate Report

Thread group

  • Threads: 5
  • Ramp-up period: 0s
  • Loop count: 1

Inside Thread Group

  1. A dummy sampler to prove that all threads are running concurrently
  2. HTTP request to upload a file

When I run the above tests, the dummy sampler is executed nearly the same time. However, I realize that only 1 thread can execute the HTTP request to upload file at a time, even when I have multiple threads. So the final result will be Thread 1 upload file -> finish -> Thread 2 upload file ... e.t.c.

Is this a normal behaviour and can I make file upload performs concurrently from multiple threads?

1

1 Answers

0
votes

It depends on the number of threads, loop count and ramp-up period. JMeter starts threads within the time frame you specify in "Ramp-up period" input and the threads start executing samplers upside down (or according to the Logic Controllers). When there are no samplers to execute or loops to iterate the thread is being shut down.

If you need to configure JMeter to execute a certain request at exactly the same time by several threads add Synchronizing Timer as a child of this request and configure "Number of Simulated Users to Group by" setting to match the number of simultaneous users

JMeter Synchroinizing Timer

Example execution:

JMeter Synchronizing Timer Example

As you can see, Dummy Samplers were started in 2 seconds while HTTP Request samplers were executed at nearly the same moment.

See Using the JMeter Synchronizing Timer article for more information on implementing these "rendezvous points" in JMeter tests