Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 17251 invoked from network); 6 Mar 2009 09:48:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 09:48:22 -0000 Received: (qmail 78393 invoked by uid 500); 6 Mar 2009 09:48:20 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 78367 invoked by uid 500); 6 Mar 2009 09:48:19 -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 78356 invoked by uid 99); 6 Mar 2009 09:48:19 -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 01:48:19 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pramod.nair@bankofamerica.com designates 171.159.64.13 as permitted sender) Received: from [171.159.64.13] (HELO sfdmzmailmx06.bankofamerica.com) (171.159.64.13) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 09:48:10 +0000 Received: from sfdmzmailmx01.bankofamerica.com ([171.182.72.78]) by sfdmzmailmx06.bankofamerica.com (8.13.8/8.13.6) with ESMTP id n269lmd8023597 for ; Fri, 6 Mar 2009 09:47:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bankofamerica.com; s=corp1; t=1236332868; bh=LivdPzVroEhH6NOFNUfNiOc6qd3jFztr+Bz3bkpFdd4=; h=Date:From:Subject:In-reply-to:To:Message-id:MIME-version: Content-type:Content-transfer-encoding; b=NYg/tjStL9Xl/nM1lFlgl0M7zDxUlLnRLWztrTc9DRWmduhq9YMmkgvN2JZp7+qKH 8gpRE3iniF1b3dyzUqYo6TYH3ziY62Ucjdg38NBHmNgoOen82TFwQTNxOaTBAt5+WB ji0VC3Y6uB3/LKT+AvUykS/mhU1wAdqSPTKE72FQ= Received: from memca5mta02.bankofamerica.com (memca5mta02.bankofamerica.com [171.186.104.144]) by sfdmzmailmx01.bankofamerica.com (8.13.8/8.13.6) with ESMTP id n269lmvi012783 for ; Fri, 6 Mar 2009 09:47:48 GMT Date: Fri, 06 Mar 2009 17:47:21 +0800 From: "Nair, Pramod" Subject: RE: Using the __V function in an HTTP sampler In-reply-to: <200903060936.38728.nobrien@newbay.com> To: JMeter Users List Message-id: <423221B70204ED438BDF4981455C5AD30221C86C@ex2k.bankofamerica.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-class: urn:content-classes:message Importance: normal Priority: normal Thread-topic: Using the __V function in an HTTP sampler Thread-index: AcmePykqaT4Sq4SoSqGt4MsvDPqp/AAATkXw X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 06 Mar 2009 09:47:22.0454 (UTC) FILETIME=[8C3AF760:01C99E40] X-Proofpoint-Virus-Version: vendor=fsecure engine=1.12.7400:2.4.4,1.2.40,4.0.166 definitions=2009-03-06_03:2009-03-05,2009-03-06,2009-03-06 signatures=0 X-Virus-Checked: Checked by ClamAV on apache.org 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