I am looking for an option to pause and resume JMeter execution (single/multiple threads).
1. Pausing and Resuming through command line
2. From the Jmeter UI
3. By coding in some language in a sampler of Jmeter
4. Using a JMeter plugin
Any of the above methods is fine.
Any thoughts and solutions are greatly appreciated.
I would suggest going for Constant Throughput Timer
Despite word "constant" in its name, you can use i.e. JMeter Property via __P() function as "Target Throughput" value.
Command-line: you can pass this property value via -J command-line argument like:
throughput
property as: ${__P(throughput,)}
jmeter -Jthroughput=100 -n -t ....
You can also amend the property value during the runtime
for example from Beanshell Test Elements using the following script:
props.put("throughput", "300");
using Beanshell Server
I'm pretty much sure that you'll receive a number of suggestions to use Test Action sampler from not very competent people who didn't bother to familiarize themselves with documentation which states:
TargetCurrent Thread / All Threads (ignored for Pause)
So please don't waste your time on the Test Action sampler