ConcurrencyThreadGroup and variables

240 views
Skip to first unread message

raranda...@gmail.com

unread,
Apr 6, 2016, 6:44:47 PM4/6/16
to jmeter-plugins
Hello,

I'm testing the new ConcurrencyThreadGroup, I'm trying to use it with with variables to parametrize its config values:
* Target Concurrency: ${concurrency}
* Ramp Up Time: ${ramptime}
* Ramp Up Steps: ${steps}
* Hold Target Rate Time: ${holdtime}

With this configuration, that is similar to others that I've used in others ThreadGroups, I get errors like this:
ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NumberFormatException: For input string: "${ramptime}"
    at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
    at sun.misc.FloatingDecimal.parseDouble(Unknown Source)
    at java.lang.Double.parseDouble(Unknown Source)
    at com.blazemeter.jmeter.threads.AbstractDynamicThreadGroupModel.getRampUpSeconds(AbstractDynamicThreadGroupModel.java:110)
    at com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadStarter.getPlannedConcurrency(ConcurrencyThreadStarter.java:38)
    at com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadStarter.supplyActiveThreads(ConcurrencyThreadStarter.java:26)
    at com.blazemeter.jmeter.threads.AbstractThreadStarter.run(AbstractThreadStarter.java:42)


I've done different tests, and the only field that supports vars as input is the TargetConcurrency, the others one only accept directly a number.

Is there another way to use parameters to configure this Thread Group?

Thanks,

Best regards,

Raúl

and...@blazemeter.com

unread,
Apr 8, 2016, 3:59:34 AM4/8/16
to jmeter-plugins, raranda...@gmail.com
Hi,

Thread groups in JMeter are processed very early. Much earlier than variables set. Only couple of calls done later that might access variables. This is the common issue for all thread groups, not only CTG.

Usually people use properties in thread group fields, through function ${__P()}

--
Andrey
Reply all
Reply to author
Forward
0 new messages