Excellent. Thanks Deepak. Appreciate the help!
-----Original Message-----
From: Deepak Shetty [mailto:[email protected]]
Sent: Thursday, October 14, 2010 1:39 PM
To: JMeter Users List
Subject: Re: Question on XML comparison
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 <
[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]