jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruthm <>
Subject Some help with Regex please
Date Mon, 13 Feb 2012 16:57:36 GMT

I've got the following setup in JMeter:

    -- Simple Controller
         -- User Defined Variable (defines a variable responseFail with
value true)
         -- While controller (with condition ${responseFail} - meaning
repeat look while responseFail == true) 
             -- HTTP Request
                 -- Post Processor - Regex extractor 

The behavior I would like is for the HTTP request response to be analysed.
If a page displaying the message " ..... unhandled exception encountered" is
returned then I want the request to be attempted until it succeeds. To be
exact the page returned would include the following text:

<title>E-commerce system - unhandled exception encountered</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

The way I've implemented this is by setting up the following in the Regex
extractor settings:
ReferenceName: responseFail
Regular Expression: unhandled exception (.+?)</title> =~m/encountered/

The behavior I am trying to achieve is that, if the page body contains the
message 'unhandled exception encountered' then this will match the RegExp
and return true in $1. If the response is succesful then a page not
containing the msg is returned and $1 will be false thus having the variable
$responseFail set to false, breaking out of the while loop.
Instead for now JMeter remains stuck in while loop - therefore i must have
something wrong in the way i defined my regular expression.

Does anyone have any suggestions on how i can fix this?

THanks in advance,

View this message in context:
Sent from the JMeter - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message