Variable substitution issue with the Arrivals Thread Group

28 views
Skip to first unread message

ben.p...@xoom.com

unread,
Sep 9, 2016, 5:02:55 PM9/9/16
to jmeter-plugins
I'm seeing an issue when I try to use the Arrivals Thread Group with variables.  Instead of parsing the variable substitution, it looks like it's trying to interpret the variable substitution string as a number, so JMeter is throwing a number format exception.

In the attached example, I have two thread groups.  One uses the Arrivals Thread Group, and the other uses a standard JMeter thread group.  Both use the substitution string ${ramp_up_time_seconds} for one of the fields.  The standard thread group accepts the variable, but the Arrivals one doesn't parse it correctly.

I'm using JMeter 3.0.

Here's the exception:
2016/09/09 13:56:11 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NumberFormatException: For input string: "${ramp_up_time_seconds}"
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.lang.Double.parseDouble(Double.java:538)
        at com.blazemeter.jmeter.threads.AbstractDynamicThreadGroupModel.getRampUpSeconds(AbstractDynamicThreadGroupModel.java:110)
        at com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadStarter.getCurrentRate(ArrivalsThreadStarter.java:69)
        at com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadStarter.needMoreArrivals(ArrivalsThreadStarter.java:49)
        at com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadStarter.supplyActiveThreads(ArrivalsThreadStarter.java:22)
        at com.blazemeter.jmeter.threads.AbstractThreadStarter.run(AbstractThreadStarter.java:42)

Any insights?

Thanks,
Ben
arrivals_thread_group_variable_test.jmx

Andrey Pokhilko

unread,
Sep 9, 2016, 8:24:10 PM9/9/16
to jmeter-...@googlegroups.com

In JMeter, you cannot use variables in Thread Groups. Because variables belong to threads, but threads are summoned by Thread Groups, thus variables not exist when Thread Group settings are processed.

Use jmeter properties instead.

Andrey Pokhilko

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages