jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoffman, Matthew" <hoffm...@ctc.com>
Subject RE: Regular Expression Text
Date Mon, 17 Jan 2005 18:57:30 GMT
I forgot to add the assertion.  This now works.  Thanks

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Monday, January 17, 2005 1:54 PM
To: JMeter Users List
Subject: Re: Regular Expression Text

On Mon, 17 Jan 2005 12:55:54 -0500, Hoffman, Matthew <hoffmanm@ctc.com>
wrote:
> Thanks.  This will help, but I am still not getting the correct
> behavior.  Here is what I have in my script:
> 
> While Controller
> - Condition:  !${results}

This is not a valid Condition for the While Controller.
Please see the help file.

> 
> -- Java Request
>         -  View Results Tree
>         I put the variable "results" in here and when it runs, it will
> say it is false, until it reaches find the regex below and then
> displayes the value of the regex.
> 
> --  HTTP Request
>         - Regular expression extractor
>                 -Reference Name:  results
>                 -Regular Expression:
(Search[\s]+Results[\s]+Complete)
>                 -Template: $1$
>                 -Match No: 1
>                 -Default Value: false
>         - View Results Tree
>                 This will continue to run even after "Search Results
> Complete" is displayed, but the java request above will not display
> false for that variable once it is found in the page.
> 
> Thanks for any help on this.

Use the LAST condition of the While controller, and make sure that
there is an Assertion in the loop that fails when you want to exit.

> 
> -----Original Message-----
> From: Kyle McAbee [mailto:k.mcabee@treev.com]
> Sent: Monday, January 17, 2005 12:28 PM
> To: JMeter Users List
> Subject: RE: Regular Expression Text
> 
> Dear Mr. Hoffman:
> 
> 1. Does the the test plan actually receive an HTTP response?
> 
> Use a View Results in Tree element to make sure.
> 
> 2. Does the regular expression actually match the target text?
> 
> Use a regular expression tester to make sure that the regular
expression
> matches the text you want to match. If there is a line break in the
> middle of the phrase you mention, that would cause the regular
> expression to fail.
> 
> Text:
> (Search
> Results
>  Complete)
> 
> Regex fails: (Search Results Complete)
> Regex succeeds: (Search[\s]+Results[\s]+Complete)
> 
> Good luck.
> 
> Sincerely yours,
> 
> Kyle
> 
> -----Original Message-----
> From: Hoffman, Matthew [mailto:hoffmanm@ctc.com]
> Sent: Monday, January 17, 2005 11:29 AM
> To: JMeter Users List
> Subject: RE: Regular Expression Text
> 
> Thanks for the suggestions.  I did create the Java sampler and it will
> display false and then display null when the actual RE is displayed.
> 
> Any ideas?
> 
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Friday, January 14, 2005 6:17 PM
> To: JMeter Users List
> Subject: Re: Regular Expression Text
> 
> On Fri, 14 Jan 2005 14:19:32 -0500, Hoffman, Matthew
<hoffmanm@ctc.com>
> wrote:
> > I am just trying to extract text from the html code.
> >
> > I want to get (Search Results Complete) from the text, so I have:
> >
> > Reference name:  results
> >
> > Regular Expression: (Search Results Complete)
> >
> > Template:  $1$
> >
> > Match: 1
> >
> > Default Value:  false
> >
> > Do you see any issues with this?
> 
> Add something to display the contents of the variable, e.g. add a
> JavaTest sampler and put the variable in one of the fields.
> 
> >
> > The script I am running is:
> >
> > While Controller
> >
> > -         !${results}
> 
> value looks wrong, see:
> 
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Whi
> le_Controller
> 
> Try using LAST instead; possibly negate the assertion.
> 
> >
> > o        Request
> >
> > o        Regular Expression Extractor from above
> >
> > o        Assertion
> >
> > I want the request to keep looping until it finds {results}. This
> > doesn't seem to work.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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



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


Mime
View raw message