jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Frank <>
Subject Using the __V function in an HTTP sampler
Date Thu, 05 Mar 2009 19:02:12 GMT

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 variable, 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 the evaluated variable's
value as one of the request params.  In the section titled "Send Parameters With the Request",
I add a parameter with name foo, 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 param foo gets
the value of the evaluation of variable ${gameId_1}, then in the next iteration around the
loop it would use the evaluation of ${gameId_2} 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 at 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 tried setting
a different parameter's value to another function, ${__time(YMD)}, 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 in 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:

View raw message