You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Daniel L. Gregoire" <dl...@gmail.com> on 2006/06/15 19:54:41 UTC
Re: Response Assertion variable
Hey Josh,
> I believe the brackets are messing up the test
> pattern, but just wanted to double check
You believe correctly. The Patterns in the Response Assertion are in the form
of Regular Expressions (regexes). For a good tutorial and reference, see
<www.regular-expressions.com>.
Because the Patterns are regexes, any regex metacharacters in your Pattern
will throw off your assertion. Using regexes gives you amazing search power,
but if you're just looking for plain text in the response (like your
variable), you need to escape the metacharacters (precede the characters with
a backslash). So yes, you can search for your variable, if you escape the
opening bracket.
Look in the reference section of the website I mentioned above for a list of
the metacharacters (also include the opening brace "{", which isn't on the
list).
I highly recommend going through most of that tutorial. It's very clear and
goes into good detail about how regex engines search.
Good luck.
Daniel L. Gregoire
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org