Reputation: 147
As the title says. What does Jmeters thread group duration exactly mean? In my case.
The settings are: 100 threads 1 loop count and 30 seconds thread duration.
Does this mean, every thread gets 30 seconds and if it takes longer we get an 5xx Error? Or is the duration for the whole thread group. which means if 30 seconds are over, the test fails?
Upvotes: 1
Views: 1999
Reputation: 168002
Duration means that after 30 seconds all threads will receive "shut down" signal.
JMeter acts as follows:
All threads are being started within the ramp-up period
Once started threads start executing Samplers upside down (or according to Logic Controllers)
Threads will execute Samplers that many times as you have "Loops" defined
When:
the threads will be shut down
In your case JMeter will start executing samplers 1 time each and if you have a lot of samplers under the Thread Group and 30 seconds pass - the threads will stop where they're at the moment. If you don't have enough Samplers you won't be able to achieve 100 virtual users concurrency as some threads will finish third work and the others won't be yet started. More information: JMeter Test Results: Why the Actual Users Number is Lower than Expected
You can observe the actual delivered load using i.e. Active Threads Over Time chart
Upvotes: 3
Reputation: 1821
When you need to run JMeter tests for specific amount for time (e.g 30 seconds), set the Loop Count to infinite by checking the infinite checkbox and set the duration of the test in seconds in Duration input as shown below.
Once the duration is over test execution will stop gracefully. It will not send new requests after the duration, but it will wait for the test results of the already initiated requests.
JMeter Thread Group documentation
Upvotes: 1