Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 17372 invoked from network); 22 Dec 2010 11:34:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Dec 2010 11:34:30 -0000 Received: (qmail 11344 invoked by uid 500); 22 Dec 2010 11:34:30 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 10968 invoked by uid 500); 22 Dec 2010 11:34:28 -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 10960 invoked by uid 99); 22 Dec 2010 11:34:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 11:34:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of duimdog@gmail.com designates 209.85.216.179 as permitted sender) Received: from [209.85.216.179] (HELO mail-qy0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Dec 2010 11:34:20 +0000 Received: by qyj19 with SMTP id 19so5255959qyj.10 for ; Wed, 22 Dec 2010 03:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Du5rEyvgph4Scliu9fSMuoygHmtQfIcImLux4YYjiHk=; b=W+n9w3KjNKDlPOenzZoHEa974u4DIz0oQCTPEXXodrPnjaKjD+PCdCP3Cw8JrbL5mX cCHA205jZ2OnbCtogPud5ZHbRHQD7jYrIY228yKgo95vKWFtl8NS2kXFXQtrbkaV0Mlr 1quzHB0Mv7YJ3ctPYE1iC1TNDpXmzVvZh3BmE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=T4t19iGNddpzx6LCg5o1OVVSxFemwF392dhOBGfhaGYwJV5mjnWstNBJ2HKJufqsHF U00K8W6FveRAPATnPNZmfEIA0Vzsi1Kkz90/Ifr4RUK2O+8Rf+cfrtY0YnSwLSdEUV1m c7kY0GAb6PtzISXUTfbY+B8SE7mGyDGQ8qZlE= MIME-Version: 1.0 Received: by 10.229.86.13 with SMTP id q13mr5916597qcl.148.1293017638844; Wed, 22 Dec 2010 03:33:58 -0800 (PST) Received: by 10.229.32.66 with HTTP; Wed, 22 Dec 2010 03:33:58 -0800 (PST) Date: Wed, 22 Dec 2010 12:33:58 +0100 Message-ID: Subject: Using JMeter variables in Javascript function From: Michel Duijvestijn To: JMeter Users List Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org In the documentation about the __javaScript function is stated that: "The following variables are made available to the script: * ... * vars - JMeterVariables object * ..." Being rather new to JMeter I don't understand how to use this vars-object. I found out that you can use a variable name within quotes like ${__javaScript(myOutput='${myVar}';,myOutput)} but is this the only/best way to work with JMeter variables? What I finally want to do is joining the value of quite a number of JMeter variables (obtained with the ForEach controller) into a long string. Something like ${__javaScript(myOutput ='';for (i=0;i<=99;i++){myOutput = myOutput + '${myVar_' + i + '}';},myOutput)}. This should join the values of ${myVar_1} to ${myVar_99} into one (parameter)string. Thanks for your help! --- Michel Duijvestijn Rotterdam University --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org