jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil_Ev...@rcomext.com
Subject RE: using the regular expression extractor to obtain a form value
Date Tue, 22 Jul 2003 08:38:30 GMT

So what value do you see for the variable? -  presumably "failed", or is it
some other text?

Does the text that you're trying to match all appear on one line?


Phil



                                                                                         
                                
                      "luke                                                              
                                
                      cassady-dorion"                                                    
                                
                      <luke@netraker.co                                               
                                   
                      m>                                                              
                                   
                                                                                         
                                
                                               To:       "'JMeter Users List'" <jmeter-user@jakarta.apache.org>
          
                                               cc:       (bcc: Phil Evans/External)      
                                
                      21/07/2003 18:51         Subject:  RE: using the regular expression
extractor to obtain a form      
                      Please respond to         value                                    
                                
                      "JMeter Users                                                      
                                
                      List"                                                              
                                
                                                                                         
                                
                                                                                         
                                




hi, thnx for the help on this last week ... i am able to see the
variable name now, but my regular expression doesn't seem to be working.
my test plan is laid out as follows:

-Test Plan
 - Thread Group
  -Recording cotoller
  -http cookie manager
  -http request
  -http request
  -http request
  -regex
  -http request (using the value from the regex)

i'm trying to parse out the 60 from this html

<input value="60" name="questionID" type="hidden">

using this as values to the regular expression extractor:

reference name: questionID
regular expression: input value="(\d+)" name="questionID"
template: $1$
match no: 1
default value: failed




> -----Original Message-----
> From: mstover1@apache.org [mailto:mstover1@apache.org]
> Sent: Thursday, July 17, 2003 7:11 PM
> To: JMeter Users List
> Subject: Re: using the regular expression extractor to obtain
> a form value
>
>
> You could name your sampler something like:
>
> sampler_${questionID}
>
> Then, in the View Results Tree, the name of the sampler
> appears, and you can see
> what questionID got set to. I would recommend making your
> default value something
> more obvious, like "failed!"
>
> Also, shouldn't your regex look like this:
> input value="(\d{1,3})" name="questionID"
>
> I'm not positive about that as I'm not an expert on regexes,
> it's just something I noticed
> about it - that maybe the whole value needs to be in the
> parentheses?  I know when I
> do .*, I use (.*) rather than (.)*, which seems analogous.
>
> -Mike
>
> On 17 Jul 2003 at 13:53, luke cassady-dorion wrote:
>
> > using jmeter 1.9.RC3 (yesterday afternoon's source) on windows
> >
> > i'm trying to use the regular expression extractor to
> obtain the value
> > of a hidden form element, which i then use as part of a condition
> > evaluation (using cyrus montakab's IfController
> controller). i'm not
> > sure why but for some reason it appears that the value i'm
> extracting
> > is not getting set.
> >
> > the form value looks like (where n 0<n<=999):
> >
> > <input value="n" name="questionID" type="hidden">
> >
> > and the values i'm using with the regex extractor are
> >
> > reference name: questionID
> > regular expression: input value="(\d){1,3}" name="questionID"
> > template: $1$
> > match no: 0
> > default value: 1
> >
> > then i have a series of IfController controllers using conditions
> > along the lines of: ${questionID}==1
> >
> > none of my IfControllers appear to execute, so i'm guessing
> that the
> > value is being set to something other than a digit. does
> anyone have
> > any ideas what could cause this? is there a way to debug
> the process
> > and see the value being set?
> >
> > thnx
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
>
>
>
> --
> Michael Stover
> mstover1@apache.org
> Yahoo IM: mstover_ya
> ICQ: 152975688
> AIM: mstover777
>
> ---------------------------------------------------------------------
> 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