Reputation: 97
I've set up a jmeter distributed testing setup with one master and multiple slaves.
In my test plan I'm using a ThreadGroup with 5 threads, a HTTPRequest Sampler and a Constant Throughput timer with target set as - ${__P(throughput, 100)} for all active threads in current threadgroup.
I want to change the expected request 'throughput' value in runtime for my setup.
Eg. initially the default value of requests/minute (throughput) = 100. After 1 hour of execution, I want to change the requests/minute to 6000.
Using beanshell script to change throughput only changes the value on jmeter master while there's no effect on jmeter slaves and overall requests throughput.
Thanks for any pointers and guidance.
Upvotes: 0
Views: 471
Reputation: 168002
You can consider using Beanshell Server, it will launch an endpoint where it will be listening to the commands so you would be able to change the throughput
property value "on the fly"
Add the next lines to user.properties file:
beanshell.server.port=9000
beanshell.server.file=../extras/startup.bsh
Create a Beanshell file like changeThroughput.bsh
in "lib" folder of your JMeter installation with the following content:
setprop("throughput", args[0]);
That's it, now you should be able to set the throughput
property value during your test execution:
java -jar bshclient.jar localhost 9000 throughput 6000
Check out How to Change JMeter´s Load During Runtime article for more information.
Upvotes: 1