A function is simplest - you don't have to write a gui.  There is some
support for automatic guis if you make a full-blown post-processor
component, but you'll have to ask Jordi about that.

you could make a function like ${__httpHeader(KEY)}

So, to write that, you would copy the basics from the other functions
(such as org.apache.jmeter.functions.Property2).  Also refer to
org.apache.jmeter.functions.RegexFunction to see how to get access to
the server response data and to see how values are inserted into
JMeter's context (if you want to do that - you should).

It's often nice to make a function, get it working, then, if you like
it, make it a component, which is often easier to use.

-Mike


On Wed, 2004-05-12 at 16:22, Ryo Sode wrote:
> > Is that a cookie?  Have you tried using the cookie manager?  The regex
> > extractor doesn't look at the headers - they are held separately from
> > the html body response.
> 
> Yeah, I was starting to suspect that was the reason why
> 
> 
> >  A component or function that read response
> > headers and made the values available as variables is what you need if
> > this is a non-cookie response header.  Such a thing doesn't exist as far
> > as I know, but it'd be easy to write.
> 
> Hm... Would you direct me in the right direction as far as writing a new
> component for JMeter? I have been thinking about writing new compoenents for
> Jmeter, but maybe this is a good excuse to get down and do it.
> 
> > Also, this is the second time you've include square brackets in your
> > variable name - ${[ref name]}.  That would not be a valid variable name
> > if that's a literal value.
> > 
> > Also, "Id=" does not match "id="
> 
> Yeah, that was my typo. You may have noticed, I couldn't share the stuff I
> do so I had to mock up the Jmeter file that looked like mine. Sorry about
> that.
> 
> Ryo
> 
> 
> > 
> > -Mike
> > 
> > On Wed, 2004-05-12 at 15:03, Ryo Sode wrote:
> >> Hey Mike,
> >> 
> >> Thanks. Here's the kind of dummy test file. I actually figured out that the
> >> first request will always contain the actual string "${[ref name]}" stuck
> >> right in the HTTP header because regex extractor hasn't even kicked in at
> >> that point. In the second request, I do get the default value in place of
> >> where I wanted the value to be. So it might just be a problem with my regex
> >> itself.
> >> 
> >> Basically, with the web app I am working with, the server responds to my
> >> request with a session id in the HTTP Header that looks like this:
> >> 
> >> SESSION-ID: id=006C9BD4BB61F02200000009
> >> 
> >> So I tried extracting the "id=006C9BD4BB61F02200000009" part by having regex
> >> like this:
> >> 
> >> Id=\S{24}
> >> 
> >> Does that look right?
> >> 
> >> Once this works, all I have to do is have something like this in my HTTP
> >> request header and keep the same session id throughout my test.
> >> 
> >> SESSION-REQUEST: id=006C9BD4BB61F02200000009
> >> 
> >> Thanks again for your help.
> >> 
> >> Ryo
> >> 
> >> 
> >> 
> >> ______________________________________________________________________
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --------
> Ryo Sode
> SQA Lead Engineer
> Internet Division
> FileMaker Inc.
> TEL 408.987.7500
> AIM ScreenName: ryosode
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Michael Stover <[EMAIL PROTECTED]>
Apache Software Foundation


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to