jmeter-user mailing list archives

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

I've got the following setup in JMeter:

--ThreadGroup
    -- 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:

<html>
<head>
<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/
Template:$1$
MatchNo:0

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,
Ruth


--
View this message in context: http://jmeter.512774.n5.nabble.com/Some-help-with-Regex-please-tp5479839p5479839.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message