I was given some already done test plan. I added (simple) groovy script that changes number of threads (users) for thread groups by using standard setNumThreads method. https://jmeter.apache.org/api/org/apache/jmeter/engine/StandardJMeterEngine.html
I noted that if in test plan number of threads (users) for thread group is set to be constant number, the script works fine, but if number is set as ${somevar} (in GUI for for thread group), the script seams to have no effect (JMeter version 5 tested).
As variables are not shared between thread groups, what is simplest to implement way of changing number of threads (users) at runtime in such case?
Source: Read More