Reputation: 43
Can we increase Thread count in JMeter during load test ? i am using Jmeter3.2 version , how can i configure this or increase thread count during load test
Upvotes: 1
Views: 1936
Reputation: 168147
You cannot manipulate the number of threads (virtual users) however you can control the number of requests per minute (aka throughput) in the real time, it should be a feasible alternative.
Define desired initial throughput as a JMeter Property using __P() function like ${__P(throughput,)}
:
throughput
property for example using __setProperty() function. Moreover, you can even do this outside of JMeter via for example Beanshell Server Upvotes: 0
Reputation: 463
You can use plugin Ultimate thread group. You'll have to set it up before running the test. Unfortunately, you will not be able to add threads manually during the test.
Upvotes: 0
Reputation: 13996
You cannot increase number of threads (as Vins said), but you can start maximum threads you need, and get most threads to idle until test tells them to do something.
For example: lets say you want to start with 5 threads, and increase them to 10 when myVar
becomes true
:
Thread Group
Number of threads: 10
While Controller
Condition: ${__javaScript(${__threadNum} > 5 && '${myVar}' != 'true')}
Constant Timer <-- thread will idle here for a bit and check condition again
Samplers <-- when not idling, script starts here
So threads above 5 will idle under While Controller, checking condition periodically (period is dictated by Constant Timer). When condition is no longer satisfied, they will exit While and continue with script execution.
Of course this just shows a method, you can tailor it to your needs (e.g. condition can be simple or complex, you can enable and disable threads dynamically by modifying variable multiple times, and so on).
Upvotes: 3
Reputation: 15400
You can parameterize the thread count using variables / properties. However once the test started, say with 5 threads, you can not change it to 10 threads while the test is running.
Upvotes: 1