Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 16197 invoked from network); 17 Jun 2004 20:28:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Jun 2004 20:28:19 -0000 Received: (qmail 74108 invoked by uid 500); 17 Jun 2004 20:28:01 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 74060 invoked by uid 500); 17 Jun 2004 20:28:00 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 73986 invoked by uid 99); 17 Jun 2004 20:27:59 -0000 Received: from [151.193.220.17] (HELO sgtulmg01.sabre.com) (151.193.220.17) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 17 Jun 2004 13:27:59 -0700 Received: from sghdqbh01.global.ad.sabre.com (10.128.30.112) by sgtulmg01.sabre.com with ESMTP; 17 Jun 2004 15:42:35 -0500 Received: from sghdqms01.Global.ad.sabre.com ([10.128.30.110]) by sghdqbh01.Global.ad.sabre.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 17 Jun 2004 15:27:29 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Syntax for Condition in If Controller? Date: Thu, 17 Jun 2004 15:27:29 -0500 Message-ID: <4D7CDDE72C44C84D9DBB031AAA935820014701BB@sghdqms01.global.ad.sabre.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Syntax for Condition in If Controller? Thread-Index: AcRUn7/bsrPA77lTTMix4LdR9PbKeQAATy3QAAIQneA= From: "Johnson, Tommy" To: "JMeter Users List" X-OriginalArrivalTime: 17 Jun 2004 20:27:29.0477 (UTC) FILETIME=[82DA5750:01C454A9] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks again, Udele, that worked. Guess I've been doing Java for too = long and forget about single quote syntax in JavaScript. I was really = thrown by the fact that "true" (no quotes) worked, but now I realize = that is a reserved word in JavaScript. Regards, -Tommy -----Original Message----- From: Udele Malabanan [mailto:Udele.Malabanan@na.whiteclarkegroup.com] Sent: Thursday, June 17, 2004 2:28 PM To: JMeter Users List Subject: RE: Syntax for Condition in If Controller? Have you tried using single quotes? This condition works for me: '${abc}' =3D=3D 'Alphabet' -----Original Message----- From: Johnson, Tommy [mailto:Tommy.Johnson@sabre-holdings.com]=20 Sent: Thursday, June 17, 2004 3:18 PM To: jmeter-user@jakarta.apache.org Subject: Syntax for Condition in If Controller? I'm running JMeter 2.0.1 now, and having great difficulty with the syntax of the "Condition" field of the If Controller. The only way I've managed to get it to evaluate as TRUE was to put the string "true" in as the Condition. I can't figure our the JavaScript syntax it wants to execute a conditional. What is the correct syntax to compare a JMeter variable to a static string and return a boolean? I want to compare my variable ${res} to the string "ERROR", and return true if they are equivalent. I tried these syntaxes: "${res}"=3D=3D"ERROR" ${res}=3D=3D"ERROR" ${res}=3D=3DERROR ${javascript(("${res}"=3D=3D"ERROR"),foo)}=20 ${javascript((${res}=3D=3D"ERROR"),foo)}=20 ${javascript((${res}=3D=3DERROR),foo)} I also tried setting the value of ${res} to "true" directly and simply putting "${res}" as the Condition, but that did not work either. Only hardcoding the condition as "true" caused the samplers under the If Controller to run for me. Thanks in advance! --------------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org