Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 25653 invoked from network); 14 Oct 2010 17:39:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Oct 2010 17:39:56 -0000 Received: (qmail 34702 invoked by uid 500); 14 Oct 2010 17:39:54 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 34512 invoked by uid 500); 14 Oct 2010 17:39:54 -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 34495 invoked by uid 99); 14 Oct 2010 17:39:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 17:39:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shettyd@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-iw0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Oct 2010 17:39:47 +0000 Received: by iwn10 with SMTP id 10so9823876iwn.31 for ; Thu, 14 Oct 2010 10:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=OG2N6jS1PH45bgvtm1azv8L3IJc4EX0rb5KvxWGDcd8=; b=qVf+ZFhZEoMyGH+4BJjqNXj01kC2yueZSeJePmnjZo4H74ofa8pRk809Co8PdHea1y g+WV65lGpJwTO8C8CKBMUCJ1A7jDjqikA+KVVdt6KPiycWneihuAZyGdOudw/UTU1td2 eXjGJmBD1G8JcaN+E7vAsyfGJH8PzDhgVFopY= 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; b=gvQkdUG/fRzrvPjjfOOAXaJanA/0ANnGGF7Nr+QhXjH1LC2pghXzleV6luEKbzrKP9 tKLAVft2xgIem+kruPrGep7vjP9gSVhEe3t/l4Z27dMi8xw6JmE7wFLtqFdo1sKIIOoU 5r0fdE5+Il06moWhVr3BiHl99ej9S2pyL7BFk= MIME-Version: 1.0 Received: by 10.231.169.149 with SMTP id z21mr8820555iby.11.1287077966787; Thu, 14 Oct 2010 10:39:26 -0700 (PDT) Received: by 10.231.149.133 with HTTP; Thu, 14 Oct 2010 10:39:26 -0700 (PDT) In-Reply-To: <7372D9734C591745A4C1D81017D5ABF61D0524DF@NJCHLEXCMB01.cable.comcast.com> References: <7372D9734C591745A4C1D81017D5ABF61D0524DF@NJCHLEXCMB01.cable.comcast.com> Date: Thu, 14 Oct 2010 10:39:26 -0700 Message-ID: Subject: Re: Question on XML comparison From: Deepak Shetty To: JMeter Users List Content-Type: multipart/alternative; boundary=001636920b8b02342d0492973118 X-Virus-Checked: Checked by ClamAV on apache.org --001636920b8b02342d0492973118 Content-Type: text/plain; charset=ISO-8859-1 The beanshell assertion doesnt need the function Also you need to follow java rules for comparisons of strings Failure=!(vars.get("FolderIDAlias191").equals(vars.get("FolderIDAlias20"))); if(Failure) { FailureMessage ="Expected " + vars.get("FolderIDAlias191") + " got " + vars.get("FolderIDAlias20"); } regards deepak On Thu, Oct 14, 2010 at 10:24 AM, Anupindi, Satish < Satish_Anupindirao@cable.comcast.com> wrote: > Hi, > I am testing an application on 2 separate servers that responds with > XML. I added a XPath Extractor after both the SOAP\XML samplers, and I > stored the values from the extractor in variable (i.e. reference name). > I'd like to compare the 2 variables (they should be the same), and if > they are the same, pass the test. So, I added a Beansheel assertion to > do the comparison - but it does not seem to work - here's the Beanshell > statement: > > ${__BeanShell(FolderIDAlias191==FolderIDAlias20);} > > The error I get is Assertion failure message: > org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval > Parse error at line 1, column 49. Encountered: ; > > Any idea why? > > Thanks, > Satish > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org > > --001636920b8b02342d0492973118--