Beware of expressions in Jmeter fields

jmeter expression in fields

I was working in Jmeter this morning and through I should make my think time timers in the script scalable, by using simple user defined variable pScale. So, in the delay field I simply multiplied the think time by the valiable 10000*${pScale}. Running the script for a single thread to test the change I noticed that the delay was not being executed. After some time I discovered that Jmeter will only process literals (e.g. 245) , variable (e.g. ${pScale}) or functions (e.g. ${__intSum…} in the timer delay field.

To achieve the multiplication of my think times I needed to use the BeanShell function like this: ${__BeanShell(10000*${pScale})}


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s