Sorry, I should have spotted the missing quotes.

Note that JMeter sets the variable  "JMeterThread.last_sample_ok" to
"true" or "false" after all Assertions have been run:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#assertions

so you could have used Assertions, and then written the If condition as:

'${JMeterThread.last_sample_ok}' == 'true'

S.
On 07/09/06, Sacha Michel Mallais <[EMAIL PROTECTED]> wrote:
Hi Sebb,

Thanks for your response.


On Sep 7, 2006, at 11:13 AM, sebb wrote:

> Checking the content of a response is usually handled by using an
> Assertion:
> http://jakarta.apache.org/jmeter/usermanual/
> component_reference.html#assertions

Yes, I have successfully used a Response Assertion to check the
content of a response, but in this case I want to control which
sampler gets executed next.  If the login succeeds, sampler A gets
run, if not, sampler B gets run.


> But if you do want to use the RE function, then I suggest you try it
> in a JavaSampler so you can see what is returned.
>
> Or wrap it in the __log() function.

Yes, that did help, thanks.

After much trial and error, this appears to work:
'${__regexFunction((<title>My Title</title>),$1$,1)}' == '<title>My
Title</title>'

Cheers,


sacha


--
Sacha Michel Mallais             Code Sculptor
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65             AIM: smallais
Roses are #FF0000, violets are #0000FF, all my base are belong to you.



---------------------------------------------------------------------
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]

Reply via email to