On Tue, 12 Oct 2004 17:16:01 -0400, Kyle McAbee <[EMAIL PROTECTED]> wrote:
> Dear JMeter Users:
> 
> Is there a way to test the number of matches extracted by a Regular Expression 
> Extractor element?

Yes, the xxx_matchNr  variable

> The following code works. Unfortunately, it ALWAYS works. I used a regular 
> expression tester to make sure that the target string occurs 4 times in the HTTP 
> response text. If I understand the manual, when the condition in the If Controller 
> evaluates to false, the test plan should stop. So specifying the wrong number of 
> matches in the condition should stop the test plan. But it does not.

The If controller only controls whether or not its children are
invoked. It does not stop a test, nor does it set the status of the
sampler to failed.
 
If you can work out the appropriate regex, you could use the Regex
Assertion to mark the sample as failed, and cause the test to stop
that way.

> HTTP Request
>   Regular Expression Extractor element
>     Reference Name: Matches
>     Regular Expression: string
>     Template: $1$
>     Match No: 1
>     Default Value: NoMatches
> 
>   If Controller element
>     Condition: Matches_matchNr == 4

This means to invoke any child samples of the If controller
 
> Sincerely yours,
> 
> Kyle
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to