jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Lindsey <mi...@ticketweb.com>
Subject Re: Using Regular Expression Extractor
Date Wed, 03 Dec 2003 21:56:47 GMT
Ok.  I see the problem.  Move the Regexp extractor to the first sampler. 
  The extractor gets run on the -output- of the sampler it's attached 
to.  So, the variable isn't filled with anything in your case, until 
your test is done.

And in your case, you still don't need the _g1.  But after rereading the 
docs, it won't hurt, either.

Bob Jacoby wrote:

> 
> I tried that and the output is just 
> Query Data: timestamp=${stamp}&amp;=
> I've tried every combination I can think of to get the $(stamp} 
> (with/without _g1) variable replaced with _anything_ and it never is.  
> :( Why would I need to drop the _g1 anyways since the manual states that 
> _g1 refers to the first group? If anyone has the time to look at them I 
> wrote a quick test page and a jmeter test plan to use the extractor - 
> which doesn't appear to work. Just put the pages in your doc root.
>  
> Appreciate your help!
>  
> Thanks,
> Bob
>  
> 
>  >>> mikel@ticketweb.com 12/03/03 03:16PM >>>
> Drop the _g1 from your variable.
> 
> ${stamp}
> will do what you want.
> 
> Bob Jacoby wrote:
> 
>  > Using 1.9.1 with Sun 1.3.1 JVM on windows 2k
>  >
>  > For the life of me I can't figure this out. I'm sure I'm missing 
> something stupid, but have wasted too much time trying to figure out 
> what that is. I want to use the Reg Exp. Extractor to dynamically add a 
> value to a http request from the response of the previous one. Per 
> previous posts I have a setup similar to:
>  >
>  > - simple controller
>  >  - http request
>  >  - http request
>  >    - Regular Expression Extractor
>  >
>  > I think i'm messing up the settings in my second http request. I 
> added a parameter:
>  > Name: timestamp
>  > value: ${stamp_g1}
>  >
>  > For my Reg Exp Extractor I have the following:
>  > Ref: stamp
>  > Regular Exp: .*(hidden?)  [note - i just have this cause i know it 
> returns something]
>  > Template: $1$
>  > Match No: 1
>  > Default Value: hello
>  >
>  > When I run it and look at the log file for my simple data writer the 
> request sent for the second request contains:
>  > Query Data: timestamp=${stamp_g1}
>  >
>  > I expected it to replace the ${stamp_g1} with the value of the regexp...
>  >
>  > Any points would be appreciated.
>  >
>  > Thanks,
>  > Bob
>  >
> 
> 
> -- 
> Mike Lindsey
> "Ya know I vass normal once.  I came to work vith a tie and a suit and
> sometimes panfs."
> 
> 
> ---------------------------------------------------------------------
> 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


-- 
Mike Lindsey
"Ya know I vass normal once.  I came to work vith a tie and a suit and 
sometimes panfs."


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