Thanks for the response.

I'm little confused by the syntax used within the 'If Controllers' condition 
field.

If my regular expression extractor reference name is regex, following your 
example would my condition read:

"regex_matchNr" != "0"

Including all the "'s?

Wouldn't this always return true?

Apologies if I'm misunderstanding.

Thanks again.


Simon.
-----Original Message-----
From: Noel O'Brien [mailto:[email protected]] 
Sent: 24 February 2009 16:21
To: [email protected]
Cc: Woodcock, Simon
Subject: Re: Reg Expression & If Controller

On Tuesday 24 February 2009 15:59:30 Woodcock, Simon wrote:
> I want to be able to do the following:
>
> If a regular expression Is not found do not execute the next two nodes.
>
> First of all if a regular expression is not found how does the variable get
> populated? null, ""?

Try using the "refName_matchNr" variable created by the REGEX:
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor

If there's no match it will be 0, so IFController will be:
"refName_matchNr" == "0"
or something like that

> Secondly using the 'If Controller' I want to be able to add the following
> condition:
>
> ${regex}!=null
>
> Where null is replaced by the value that gets populated by a regular
> expression find failure.

similar to above, try using its negative:

"refName_matchNr" != "0"

> I've tried a number of scenarios ( incl trying to use the Regular
> Expression Extractor default value ), but whatever I try fails to execute
> the If Controller as expected.
>
> Any help or examples would be greatly appreciated,
>
> Thanks in advance,
>
>
> Simon.
>
> --
> Simon Woodcock
> Staff Engineer / Manager
>
> QUALCOMM Poole Limited
> Voyager House, 253-257 High Street North, Poole, Dorset, BH15 1DX UK
> Tel: +44 (0)1202 440610, Fax: +44 (0)1202 440601
> www.qualcomm.com<http://www.qualcomm.com>
> This e-mail transmission, and any documents, files or previous e-mail
> messages attached to it, may contain confidential information that is
> legally privileged. If you are not the intended recipient, or a person
> responsible for delivering it to the intended recipient, you are hereby
> notified that any disclosure, copying, distribution or use of any of the
> information contained in or attached to this message is STRICTLY
> PROHIBITED. Interception of e-mail is a crime under the Electronic
> Communications Privacy Act, 18 U.S.C. 2510-2521 and 2107-2709. If you have
> received this transmission in error, please immediately notify me by reply
> e-mail at [email protected]<mailto:[email protected]>
> or by telephone at +44 (0)1202 207397 and destroy the original transmission
> and its attachments without reading them or saving them to disk. Thank you.


Reply via email to