jmeterperformance-testingload-testingthreadgroup

JMeter Thread group Ramp up time plus duration question


Running JMeter version 5.4.1

I have the following setup for a JMeter thread group:

Thread group is set to continue after a sample error.

So with the above setup, I'm expecting the test to spin up 1 thread per second, when it reaches 300(5min) seconds, it will have a full 300 threads running. Each thread should be running for 600 seconds(10min) before stopping. I'm expecting the total run time to be 900 seconds (Last thread starts at minute 5 + 10 min run time = 15min).

But the actual behavior is different and I can't figure out why.

Actual behavior:

--300 threads spin up after 300 seconds, 1 thread per second. Cool this is what I'm expecting.

--at 600 second mark, the first thread start to die. Cool so far so good

--at 12min which is 720 seconds, ALL threads have died off, and the test is complete... umm.. what happened here? I was expecting a full 300 seconds wind down time, not 120 seconds?

As a result, the full test finished at 720 seconds (12min), instead of the full 900 seconds (15min).

Can anyone explain to me what is going on here?


Solution

  • You have to configure your test duration accordingly.

    In your case, the test finishes at 600 seconds. The last 120 seconds was the ramp-down time of those active threads. You can observe it through Active Threads Over Time Listener.

    Your total test duration would be like warm-up period + hold load activity + warm-down period. i.e (300+600+300)= 1200 seconds or 20 mins.

    300 threads will be active in 300 seconds, then all the 300 threads will hit requests to the server for 600 seconds, and then those 300 threads will be down in the next 300 seconds.

    You can also use Ultimate Thread Group like this as well for a better understanding of your test, where the warm-down period is used as 120 seconds, so the total duration of the test is (5+10+2)=17 mins or 1020 seconds.

    enter image description here