jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Using the __V function in an HTTP sampler
Date Fri, 06 Mar 2009 13:00:16 GMT
The fact that ${__time(YMD)} does not work suggests there is a
different problem.

Which version of JMeter are you using?

FOO      ${__time(YMD)}

works fine for me as a parameter in both the HTTP Samplers

On 06/03/2009, Nair, Pramod <pramod.nair@bankofamerica.com> wrote:
> I think you should be using something like this -
>  ${__evalVar(gameId_${C })}
>
>
>
>
>  -----Original Message-----
>  From: Noel O'Brien [mailto:nobrien@newbay.com]
>  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
>  controller;
>  it's more suited to looping over variables in the format that your
>  variables
>  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") +
>  ".user"))}
>
>  which takes the value of "current.sns" e.g. 'BB' and when resolved, the
>  value
>  for the variable 'sns.testdata.BB.user' is returned successful
>
>  Regards,
>  Noel
>
>  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
>  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: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>
> 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: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message