jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Question on XML comparison
Date Thu, 14 Oct 2010 17:39:26 GMT
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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message