jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nair, Pramod" <>
Subject RE: Using the __V function in an HTTP sampler
Date Fri, 06 Mar 2009 09:47:21 GMT
I think you should be using something like this -
${__evalVar(gameId_${C })}

-----Original Message-----
From: Noel O'Brien [] 
Sent: Friday, March 06, 2009 3:07 PM
To: JMeter Users List
Subject: Re: Using the __V function in an HTTP sampler

Maybe have a look at the For Each Controller instead of the loop
it's more suited to looping over variables in the format that your
are in (var_n)

If that doesn't work for you, you can try something like this (I use
this and 
it works);

${__BeanShell(vars.get("sns.testdata." + vars.get("current.sns") +

which takes the value of "current.sns" e.g. 'BB' and when resolved, the
for the variable 'sns.testdata.BB.user' is returned successful


On Thursday 05 March 2009 19:02:12 Jason Frank wrote:
> I'm trying to accomplish something relatively basic, and getting
stuck.  I
> want to use the __V() function in order to get the value of a
> whose name I have to generate from another varible.  (I've seen this
> referred to as a "nested variable".)
> I have an HTTP Sampler inside of a Loop controller, and I want to send
> evaluated variable's value as one of the request params.  In the
> titled "Send Parameters With the Request", I add a parameter with name
> and value of ${__V(gameId_${C})}, where C is the name of a counter
> variable.  What I want to happen is that in the first iteration, the
> foo gets the value of the evaluation of variable ${gameId_1}, then in
> next iteration around the loop it would use the evaluation of
> and so forth.
> When I look at the HTTP Sampler request, what I see is
> foo=${__V(gameId_${C})}. This implies that the function is not running
> all.  Perhaps I am confused about where to put function calls, but the
> reference says they can go just about anywhere in the test.  I also
> setting a different parameter's value to another function,
> just to see if it was something particular to the variables I was
trying to
> use.  This also resulted in the literal ${__time(YMD)} being included
> the request, rather than the function's result.
> If anyone can help me out, I would appreciate it.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

The information contained in this transmission may contain privileged and confidential information
and is intended only for the use of the person(s) named above. If you are not the intended
recipient, any review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you received this email in error, please contact the sender immediately
by reply e-mail and destroy all copies of the original message. This email is not intended
as an offer or solicitation for the purchase or sale of any financial instruments.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message