Assigning a variable to another variable in JMeter -


i have assigned variable ${wh} 22 , want assign ${wh} variable called ${w_id}. have tried couple of things, none of them seem working.

none of below working (used in user defined variable page):

w_id=${__eval(${wh})}  w_id=${__evalvar(wh)}  w_id=${__v(${wh})} 

i can't figure out why value doesn't stored in w_id. how can done?

you can use __groovy() function available since jmeter 3.1.

the relevant groovy expression read ${wh} variable value , save result ${w_id} variable like:

${__groovy(vars.get('wh'),w_id)} 

demo:

jmeter groovy create variable

you can put function anywhere in script. see functions , variables jmeter user manual chapter more information.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -