Re: HTTP Header Manager uses old variable values?

2010-01-14 Thread Heiko Robert
Hi sebb,

of course the CSV Dataset Config element is the swiss army knife for jmeter 
users ;-) but for these use cases I don't like it because I have to make sure 
that I never use keys twice to be able to map the logs later to the backend 
logs.

Very cool would be a REST Dataset Config element or a JDBC Dataset Config 
element to delegate logic execution and to handle unique keys in a central 
service. I should experience more with the Bean Shell component to find a way 
to get this done.

Thanks a lot anyway for your excellent and promt support

Heiko
- Ursprüngliche Mail -
Von: sebb seb...@gmail.com
An: JMeter Users List jmeter-user@jakarta.apache.org
Gesendet: Mittwoch, 13. Januar 2010 17:44:44 GMT +01:00 
Amsterdam/Berlin/Bern/Rom/Stockholm/Wien
Betreff: Re: HTTP Header Manager uses old variable values?

On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 sebb,

  thanks a lot - that works !!! ;-)

  For everybody who tries to populate a GUID into a HTTP-Header variable here
 is the full solution:

  define a user variable:
  MyGUIDScript =
  var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random,
 r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4';  for (var
 i = 0; i  36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i ==
 19) ? (r  0x3) | 0x8 : r  0xf]; } }; uuid.join('');

  In the HTTP Header Manager:
  X-GUID = ${__javaScript(${MyGUIDScript},GUID)}


Since the code does not rely on any input from the server, you could
use similar code to write the GUIDs to a file, and use the CSV Dataset
Config element to read them.

  sebb schrieb:


  On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 
 
   Hi,
  
when I use HTTP Header Manager to set HTTP header variables old values
 are
   used. Has anybody an idea what I'm doing wrong?
  
  
 
  Header Manager is a Configuration element, and is processed before the
  thread starts.
 
  You can use functions on the Test Plan to define variables.
 
 
 
My Testplan: user defined variables: GUID = not set
 BSF PreProcessor: setting values to variable GUID
 Simple Controller
HTTP Request ${GUID}
   HTTP Header Manager: setting X-GUID = ${GUID}
HTTP Request ${GUID}
   HTTP Header Manager: setting X-GUID = ${GUID}
 View Results Tree
  
The results:
  
HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
GET
  
 http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf
Request Headers:
X-GUID: not set
  
HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
GET
  
 http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e
Request Headers:
X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  
I tried with latest jmeter versions and also with the nightly build
  
Thanks
Heiko
  
  
 -
To unsubscribe, e-mail:
   jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail:
   jmeter-user-h...@jakarta.apache.org
  
  
  
  
 
 
 -
  To unsubscribe, e-mail:
 jmeter-user-unsubscr...@jakarta.apache.org
  For additional commands, e-mail:
 jmeter-user-h...@jakarta.apache.org
 
 
 


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



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


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



Re: HTTP Header Manager uses old variable values?

2010-01-14 Thread sebb
On 14/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 Hi sebb,

  of course the CSV Dataset Config element is the swiss army knife for jmeter 
 users ;-) but for these use cases I don't like it because I have to make sure 
 that I never use keys twice to be able to map the logs later to the backend 
 logs.

It's not possible the ensure uniqueness if you use random numbers,
unless you keep track of evey number used so far which can take a lot
of memory and affect the testing.

However, if you generate the IDs in advance, the memory issue does not
affect the tests.

  Very cool would be a REST Dataset Config element or a JDBC Dataset Config 
 element to delegate logic execution and to handle unique keys in a central 
 service. I should experience more with the Bean Shell component to find a way 
 to get this done.

Think of CSV Dataset as a poor man's database ...

  Thanks a lot anyway for your excellent and promt support

  Heiko
  - Ursprüngliche Mail -
  Von: sebb seb...@gmail.com
  An: JMeter Users List jmeter-user@jakarta.apache.org
  Gesendet: Mittwoch, 13. Januar 2010 17:44:44 GMT +01:00 
 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien
  Betreff: Re: HTTP Header Manager uses old variable values?


  On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
   sebb,
  
thanks a lot - that works !!! ;-)
  
For everybody who tries to populate a GUID into a HTTP-Header variable 
 here
   is the full solution:
  
define a user variable:
MyGUIDScript =
var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = 
 Math.random,
   r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4';  for 
 (var
   i = 0; i  36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i 
 ==
   19) ? (r  0x3) | 0x8 : r  0xf]; } }; uuid.join('');
  
In the HTTP Header Manager:
X-GUID = ${__javaScript(${MyGUIDScript},GUID)}
  

  Since the code does not rely on any input from the server, you could
  use similar code to write the GUIDs to a file, and use the CSV Dataset
  Config element to read them.

sebb schrieb:
  
  
On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
   
   
 Hi,

  when I use HTTP Header Manager to set HTTP header variables old values
   are
 used. Has anybody an idea what I'm doing wrong?


   
Header Manager is a Configuration element, and is processed before the
thread starts.
   
You can use functions on the Test Plan to define variables.
   
   
   
  My Testplan: user defined variables: GUID = not set
   BSF PreProcessor: setting values to variable GUID
   Simple Controller
  HTTP Request ${GUID}
 HTTP Header Manager: setting X-GUID = ${GUID}
  HTTP Request ${GUID}
 HTTP Header Manager: setting X-GUID = ${GUID}
   View Results Tree

  The results:

  HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  GET

   http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf
  Request Headers:
  X-GUID: not set

  HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  GET

   http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e
  Request Headers:
  X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf

  I tried with latest jmeter versions and also with the nightly build

  Thanks
  Heiko


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




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

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


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



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



Re: HTTP Header Manager uses old variable values?

2010-01-13 Thread sebb
On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 Hi,

  when I use HTTP Header Manager to set HTTP header variables old values are
 used. Has anybody an idea what I'm doing wrong?

Header Manager is a Configuration element, and is processed before the
thread starts.

You can use functions on the Test Plan to define variables.

  My Testplan: user defined variables: GUID = not set
BSF PreProcessor: setting values to variable GUID
Simple Controller
   HTTP Request ${GUID}
  HTTP Header Manager: setting X-GUID = ${GUID}
   HTTP Request ${GUID}
  HTTP Header Manager: setting X-GUID = ${GUID}
View Results Tree

  The results:

  HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  GET
 http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf
  Request Headers:
  X-GUID: not set

  HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  GET
 http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e
  Request Headers:
  X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf

  I tried with latest jmeter versions and also with the nightly build

  Thanks
  Heiko

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



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



Re: HTTP Header Manager uses old variable values?

2010-01-13 Thread sebb
On 13/01/2010, Andrey Pohilko a...@fininfor.ru wrote:
 Hi,
  I have a question - how can I use function in test plan to set variable in
  runtime? Which component type I should use to do that?

If you want to ask a new question, please start a new thread with a
relevant subject.

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



Re: HTTP Header Manager uses old variable values?

2010-01-13 Thread Heiko Robert

sebb,

thanks a lot - that works !!! ;-)

For everybody who tries to populate a GUID into a HTTP-Header variable 
here is the full solution:


define a user variable:
MyGUIDScript =
var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = 
Math.random, r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] 
= '4';  for (var i = 0; i  36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; 
uuid[i] = chars[(i == 19) ? (r  0x3) | 0x8 : r  0xf]; } }; uuid.join('');


In the HTTP Header Manager:
X-GUID = ${__javaScript(${MyGUIDScript},GUID)}

sebb schrieb:

On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
  

Hi,

 when I use HTTP Header Manager to set HTTP header variables old values are
used. Has anybody an idea what I'm doing wrong?



Header Manager is a Configuration element, and is processed before the
thread starts.

You can use functions on the Test Plan to define variables.

  

 My Testplan: user defined variables: GUID = not set
   BSF PreProcessor: setting values to variable GUID
   Simple Controller
  HTTP Request ${GUID}
 HTTP Header Manager: setting X-GUID = ${GUID}
  HTTP Request ${GUID}
 HTTP Header Manager: setting X-GUID = ${GUID}
   View Results Tree

 The results:

 HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
 GET
http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf
 Request Headers:
 X-GUID: not set

 HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
 GET
http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e
 Request Headers:
 X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf

 I tried with latest jmeter versions and also with the nightly build

 Thanks
 Heiko

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





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

  



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



Re: HTTP Header Manager uses old variable values?

2010-01-13 Thread sebb
On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 sebb,

  thanks a lot - that works !!! ;-)

  For everybody who tries to populate a GUID into a HTTP-Header variable here
 is the full solution:

  define a user variable:
  MyGUIDScript =
  var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random,
 r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4';  for (var
 i = 0; i  36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i ==
 19) ? (r  0x3) | 0x8 : r  0xf]; } }; uuid.join('');

  In the HTTP Header Manager:
  X-GUID = ${__javaScript(${MyGUIDScript},GUID)}


Since the code does not rely on any input from the server, you could
use similar code to write the GUIDs to a file, and use the CSV Dataset
Config element to read them.

  sebb schrieb:


  On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote:
 
 
   Hi,
  
when I use HTTP Header Manager to set HTTP header variables old values
 are
   used. Has anybody an idea what I'm doing wrong?
  
  
 
  Header Manager is a Configuration element, and is processed before the
  thread starts.
 
  You can use functions on the Test Plan to define variables.
 
 
 
My Testplan: user defined variables: GUID = not set
 BSF PreProcessor: setting values to variable GUID
 Simple Controller
HTTP Request ${GUID}
   HTTP Header Manager: setting X-GUID = ${GUID}
HTTP Request ${GUID}
   HTTP Header Manager: setting X-GUID = ${GUID}
 View Results Tree
  
The results:
  
HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
GET
  
 http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf
Request Headers:
X-GUID: not set
  
HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf
GET
  
 http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e
Request Headers:
X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf
  
I tried with latest jmeter versions and also with the nightly build
  
Thanks
Heiko
  
  
 -
To unsubscribe, e-mail:
   jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail:
   jmeter-user-h...@jakarta.apache.org
  
  
  
  
 
 
 -
  To unsubscribe, e-mail:
 jmeter-user-unsubscr...@jakarta.apache.org
  For additional commands, e-mail:
 jmeter-user-h...@jakarta.apache.org
 
 
 


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



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



Re: HTTP Header Manager?

2009-12-01 Thread Deepak Shetty
hi
as far as I know all should work.
What headers are you adding? can you show an example
What makes you think they aren't being sent (i..e did you add a view results
tree and check the values in the request?)
regards
deepak


On Tue, Dec 1, 2009 at 2:45 PM, danomano dshopk...@earthlink.net wrote:


 Hi all, I've been attempting to send some custom Header fields in test, yet
 for some reason what ever I try, the values I put in the HTTP Header
 Manager
 are simply being ignored (i.e. they are never sent).

 I have had the HTTP Header Manager specified at 3 different scores to the
 HTTP Request Node:

 1) Above (the thread group)
 2) Same Level (but placed above in the tree)
 3) Added as child to Http Request

 What am I missing?


 --
 View this message in context:
 http://old.nabble.com/HTTP-Header-Manager--tp26600411p26600411.html
 Sent from the JMeter - User mailing list archive at Nabble.com.


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




Re: HTTP Header Manager?

2009-12-01 Thread danomano

Interesting, I learned today that it is in fact ignoring 1 header value
specifically: namely:
Authorization
if I have this field populated, it will not get sent with the requests, but
any fields I add will get sent with the requests...
any thoughts?



danomano wrote:
 
 Hi all, I've been attempting to send some custom Header fields in test,
 yet for some reason what ever I try, the values I put in the HTTP Header
 Manager are simply being ignored (i.e. they are never sent).
 
 I have had the HTTP Header Manager specified at 3 different scores to the
 HTTP Request Node:
 
 1) Above (the thread group)
 2) Same Level (but placed above in the tree)
 3) Added as child to Http Request
 
 What am I missing?
 
 
 

-- 
View this message in context: 
http://old.nabble.com/HTTP-Header-Manager--tp26600411p26601044.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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



Re: HTTP Header Manager?

2009-12-01 Thread sebb
On 02/12/2009, danomano dshopk...@earthlink.net wrote:



  Deepak Shetty wrote:
  
   hi
   as far as I know all should work.
   What headers are you adding? can you show an example
   What makes you think they aren't being sent (i..e did you add a view
   results
   tree and check the values in the request?)
   regards
   deepak
  


 Yes I am using the View Results Tree.  I am currently sending 2 headers
  values for a PUT Rest call, namely:

  Content-Type: application/xml,charset=UTF-8
  Authorization: Basic SOMEGARBAGE

  The Authorization header never makes it through..


Because that's what the Authorization Manager is for ...


  --
  View this message in context: 
 http://old.nabble.com/HTTP-Header-Manager--tp26600411p26601045.html

 Sent from the JMeter - User mailing list archive at Nabble.com.


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



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



Re: HTTP Header Manager

2004-11-06 Thread sebb
On Mon, 1 Nov 2004 17:14:02 +0100, Coret Bob [EMAIL PROTECTED] wrote:
 Hi all,
 
 I want to force my proxy server to fetch the pages from the webserver instead 
 of the cache. This can be achieved by adding the header Cache-control: 
 no-cache.
 
 Do I have to add this header to all HTTP requests (in the Browser-derived 
 headers element) or do I just add one extra HTTP Header Manager within the 
 Thread Group? In the latter case: will this header value be added to all 
 requests or will it override the headers of the HTTP requests?
 

At present, if more than one Header Manager is in scope, there is no
control over which one is used, so yes, you will need to add it to all
the existing Browser-derived Header Managers. Unfortunately fixing
this is non-trivial. See bug 31503.

 BTW, is it a know bug that you can't delete headers? The Delete button is 
 always disabled in the HTTP Header Manager.
 

There is a work-round - just add a new row, and the delete button is
then enabled.
But I've now fixed it in CVS (2.0 branch) so that the Delete/Save
buttons are enabled.

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


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



Re: HTTP Header Manager

2004-05-14 Thread Sebastian Bazley
Perhaps it would be worth adding an option to the regex extractor to allow
it to look at headers?

S.
- Original Message - 
From: Michael Stover [EMAIL PROTECTED]
To: JMeter Users List [EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 8:31 PM
Subject: Re: HTTP Header Manager


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

[snip]


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



Re: HTTP Header Manager

2004-05-12 Thread Ryo Sode

Good point. Yes, I can use variables from the user defined variables in the
root test plan. However, what I was trying to do was to use the Regex
Extractor to assign a dynamic value to a reference name and try using it in
the HTTP Header Manager (which I hoped would look up the variable before
every HTTP sampler execution and refresh the value).

Ryo

 Can you verify that you can add a variable to the Header Manager via a
 user-defined variable (ala from the Test Plan root element)?
 
 If so, then it would seem likely that the value you were using was
 faulty, maybe a bad regular expression.  Hard to say since you didn't
 say how where your dynamic value comes from.
 
 Post your test plan is the best way to get help.
 
 -Mike
 
 On Tue, 2004-05-11 at 19:34, Ryo Sode wrote:
 No one's got a clue?
 
 Ryo
 
 Hi guys,
 
 I am a bit stuck here. Is there a way to using a dynamic value in HTTP
 Header Manager or is that impossible according to the spec?
 
 I am trying to dynamically specify the Value in a particular HTTP header
 that I added in HTTP header manager, based on the response coming back from
 the previous request. I tried inserting ${[my-value} expression in the Value
 field under HTTP Header Manager. but looking at actual request that gets
 sent out, I see that the ${xxx} expression isn't calculated.
 
 Any help is appreciated. Thanks.
 
 
 
 -
 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]


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]



Re: HTTP Header Manager

2004-05-12 Thread Michael Stover
I suspected that would be the case.  In which case, the problem is most
like in your use of the regular expression extractor, either placement,
syntax of the regex, or naming of the resulting variables.

As I said, you'll have to post your test plan with the details to get
some advice on all this.

-Mike

On Wed, 2004-05-12 at 13:24, Ryo Sode wrote:
 Good point. Yes, I can use variables from the user defined variables in the
 root test plan. However, what I was trying to do was to use the Regex
 Extractor to assign a dynamic value to a reference name and try using it in
 the HTTP Header Manager (which I hoped would look up the variable before
 every HTTP sampler execution and refresh the value).
 
 Ryo
 
  Can you verify that you can add a variable to the Header Manager via a
  user-defined variable (ala from the Test Plan root element)?
  
  If so, then it would seem likely that the value you were using was
  faulty, maybe a bad regular expression.  Hard to say since you didn't
  say how where your dynamic value comes from.
  
  Post your test plan is the best way to get help.
  
  -Mike
  
  On Tue, 2004-05-11 at 19:34, Ryo Sode wrote:
  No one's got a clue?
  
  Ryo
  
  Hi guys,
  
  I am a bit stuck here. Is there a way to using a dynamic value in HTTP
  Header Manager or is that impossible according to the spec?
  
  I am trying to dynamically specify the Value in a particular HTTP header
  that I added in HTTP header manager, based on the response coming back from
  the previous request. I tried inserting ${[my-value} expression in the Value
  field under HTTP Header Manager. but looking at actual request that gets
  sent out, I see that the ${xxx} expression isn't calculated.
  
  Any help is appreciated. Thanks.
  
  
  
  -
  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]
 
 
 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]



Re: HTTP Header Manager

2004-05-12 Thread Michael Stover
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.  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.

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=

-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=006C9BD4BB61F0220009
 
 So I tried extracting the id=006C9BD4BB61F0220009 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=006C9BD4BB61F0220009
 
 Thanks again for your help.
 
 Ryo
 
 
 
 __
 -
 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]



Re: HTTP Header Manager

2004-05-12 Thread Ryo Sode

 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=006C9BD4BB61F0220009
 
 So I tried extracting the id=006C9BD4BB61F0220009 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=006C9BD4BB61F0220009
 
 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]



Re: HTTP Header Manager

2004-05-12 Thread Michael Stover
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=006C9BD4BB61F0220009
  
  So I tried extracting the id=006C9BD4BB61F0220009 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=006C9BD4BB61F0220009
  
  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]



Re: HTTP Header Manager

2004-05-12 Thread Ryo Sode
Sweet. I'll look into this.

Ryo


 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



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



Re: HTTP Header Manager

2004-05-11 Thread Ryo Sode

No one's got a clue?

Ryo

 Hi guys,
 
 I am a bit stuck here. Is there a way to using a dynamic value in HTTP
 Header Manager or is that impossible according to the spec?
 
 I am trying to dynamically specify the Value in a particular HTTP header
 that I added in HTTP header manager, based on the response coming back from
 the previous request. I tried inserting ${[my-value} expression in the Value
 field under HTTP Header Manager. but looking at actual request that gets
 sent out, I see that the ${xxx} expression isn't calculated.
 
 Any help is appreciated. Thanks.
 
 
 
 -
 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]



Re: HTTP Header Manager

2004-05-11 Thread Michael Stover
Can you verify that you can add a variable to the Header Manager via a
user-defined variable (ala from the Test Plan root element)?

If so, then it would seem likely that the value you were using was
faulty, maybe a bad regular expression.  Hard to say since you didn't
say how where your dynamic value comes from.

Post your test plan is the best way to get help. 

-Mike

On Tue, 2004-05-11 at 19:34, Ryo Sode wrote:
 No one's got a clue?
 
 Ryo
 
  Hi guys,
  
  I am a bit stuck here. Is there a way to using a dynamic value in HTTP
  Header Manager or is that impossible according to the spec?
  
  I am trying to dynamically specify the Value in a particular HTTP header
  that I added in HTTP header manager, based on the response coming back from
  the previous request. I tried inserting ${[my-value} expression in the Value
  field under HTTP Header Manager. but looking at actual request that gets
  sent out, I see that the ${xxx} expression isn't calculated.
  
  Any help is appreciated. Thanks.
  
  
  
  -
  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]



Re: HTTP Header Manager

2002-12-10 Thread Mike Stover
A better way to do it is to use user-defined variables.  By doing this, you can use 
the same 
variable name in HTTP Requests, HTTP Header Manager - just about everywhere.  Also, if 
you 
define your user-defined variables before recording using the proxy, JMeter will 
substitute the 
values for you automatically.

However, yes, the HTTP Header Manager should work to add in specific headers, but the 
header in question must be deleted from the specific Header Manager.

-Mike

On 10 Dec 2002 at 14:43, Eugene Grant wrote:

 Hi,
   I have Version 1.8 of JMeter.
 I have recorded a scenario against a test server.
 I now want to run that recording against a production server.
 
 However the referer attribute in the Browser-derived headers node still 
 refers to the test server.
 I am using a HTTP Request Defaults node which I thought might be used to 
 replace the domain name in the referer value as it already does with the 
 domain name in all my HTTP Request nodes
 Is it possible to use the HTTP Header Manager to replace the domain name 
 part of the referer value in the Browser-derived headers?
 
 Regards, Eugene
 Software Developer
 Email: [EMAIL PROTECTED]
 
 _
 Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
 http://join.msn.com/?page=features/featuredemail
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



--
Michael Stover
[EMAIL PROTECTED]
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

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