Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 39732 invoked from network); 6 Mar 2009 13:00:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 13:00:46 -0000 Received: (qmail 26725 invoked by uid 500); 6 Mar 2009 13:00:44 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 26709 invoked by uid 500); 6 Mar 2009 13:00:44 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 26698 invoked by uid 99); 6 Mar 2009 13:00:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 05:00:44 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 13:00:37 +0000 Received: by yw-out-2324.google.com with SMTP id 2so205965ywt.13 for ; Fri, 06 Mar 2009 05:00:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=qCkEMqGKtzpqepQQ8MEp9GSDpEalKgTjVFiizrD019Q=; b=SdNCy2Riz0fqqMF3VMqrARg+RF//EsIk5cXC6ZnUdiHYXLzbOaz9PdQhEqbz0PYcVG 8xHLjvJ4Da3A9b8RLbzNansIjNSh0fQ/h5Bqh0svbHRygeWcgi47Y7wNAMt5zWXkx726 A1DBkYxgdeSL2t6cZqbOdD66U2qjvfYZfHZTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=fcwK+VuhhwPqejSvaV6KiP92VYUbhs1NSOndShN7Rap08b0Fuoe6Of0Og3mLbOOKlk O0gkhJ/jdEtJF7xLprY+P5Ptpjw7xkzGvEom98S+3oMRuzoo5/RsaZy7wi3UYPD+y2xR uxNrwdndpNCEPej9C0OmqfeoV2DCHQ1LJFOXQ= MIME-Version: 1.0 Received: by 10.151.98.11 with SMTP id a11mr3215086ybm.146.1236344416816; Fri, 06 Mar 2009 05:00:16 -0800 (PST) In-Reply-To: <423221B70204ED438BDF4981455C5AD30221C86C@ex2k.bankofamerica.com> References: <200903060936.38728.nobrien@newbay.com> <423221B70204ED438BDF4981455C5AD30221C86C@ex2k.bankofamerica.com> Date: Fri, 6 Mar 2009 13:00:16 +0000 Message-ID: <25aac9fc0903060500q15c38bf3vf837f19cbc07d054@mail.gmail.com> Subject: Re: Using the __V function in an HTTP sampler From: sebb To: JMeter Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 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=3D${__V(gameId_${C})}. This implies that the function is not runni= ng > 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, disseminat= ion, distribution or duplication of this communication is strictly prohibit= ed. If you received this email in error, please contact the sender immediat= ely by reply e-mail and destroy all copies of the original message. This em= ail 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