You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Heiko Robert <he...@ecm4u.de> on 2010/01/13 11:05:31 UTC

HTTP Header Manager uses old variable values?

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?

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-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HTTP Header Manager uses old variable values?

Posted by sebb <se...@gmail.com>.
On 13/01/2010, Andrey Pohilko <ap...@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-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: Setting jmeter variables in runtime

Posted by Andrey Pohilko <ap...@fininfor.ru>.
Hi, Thibaut!

Sampler potentially does what I need, but I don't want fake samples to be
recorded in my results.
Also I'd like to conveniently manage a list of variables similar to UDV's
list.
Also I'm not familiar with beanshell and don't know how to set variables
there.
Also I'm afraid of beanshell performance - is it economic at hundreds of
threads with many beanshell samplers in each of them?
 
С уважением,
Андрей Похилько

-----Original Message-----
From: Thibaut Raballand [mailto:thibaut.raballand@gmail.com] 
Sent: Wednesday, January 13, 2010 3:10 PM
To: JMeter Users List
Subject: Re: Setting jmeter variables in runtime

Hi,

You can easily create or modify a variable with a beanshell sample placed
anywhere in the script. Variable creation or modification will be done when
the sample will be executed, as for beanshell preprocessors or
postprocessors.

Beanshell Code:
vars.get("VARIABLE_NAME");
vars.put("VARIABLE_NAME","whatYouWant");

You can also use BSF samples or many other samples...

What exactly is your need ? I hope I'm not getting your need wrong.

Regards,
Tibo

On Wed, Jan 13, 2010 at 12:00, Andrey Pohilko <ap...@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?
> Especially I'd like to define variable in one place and later redefine
this
> variable value in another.
> I've experimented with pre-processors, but it's unapplicable, because of
> scope requirement. I need something like "Runtime User Defined Variables"
> in
> my plan, which processed like Controller items - in their order.
>
> I even tried to write my own Controller plugin, which will do this, but
> stuck with variables and function evaluation approach in code. (Maybe sebb
> can help me with this ;)
>
> Best regards,
> Andrey Pohilko
>
>
> ---------------------------------------------------------------------
> 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


Re: Setting jmeter variables in runtime

Posted by Thibaut Raballand <th...@gmail.com>.
Hi,

You can easily create or modify a variable with a beanshell sample placed
anywhere in the script. Variable creation or modification will be done when
the sample will be executed, as for beanshell preprocessors or
postprocessors.

Beanshell Code:
vars.get("VARIABLE_NAME");
vars.put("VARIABLE_NAME","whatYouWant");

You can also use BSF samples or many other samples...

What exactly is your need ? I hope I'm not getting your need wrong.

Regards,
Tibo

On Wed, Jan 13, 2010 at 12:00, Andrey Pohilko <ap...@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?
> Especially I'd like to define variable in one place and later redefine this
> variable value in another.
> I've experimented with pre-processors, but it's unapplicable, because of
> scope requirement. I need something like "Runtime User Defined Variables"
> in
> my plan, which processed like Controller items - in their order.
>
> I even tried to write my own Controller plugin, which will do this, but
> stuck with variables and function evaluation approach in code. (Maybe sebb
> can help me with this ;)
>
> Best regards,
> Andrey Pohilko
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Setting jmeter variables in runtime

Posted by Andrey Pohilko <ap...@fininfor.ru>.
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?
Especially I'd like to define variable in one place and later redefine this
variable value in another.
I've experimented with pre-processors, but it's unapplicable, because of
scope requirement. I need something like "Runtime User Defined Variables" in
my plan, which processed like Controller items - in their order.

I even tried to write my own Controller plugin, which will do this, but
stuck with variables and function evaluation approach in code. (Maybe sebb
can help me with this ;)
 
Best regards,
Andrey Pohilko


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


RE: HTTP Header Manager uses old variable values?

Posted by Andrey Pohilko <ap...@fininfor.ru>.
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?
Especially I'd like to define variable in one place and later redefine this
variable value in another.
I've experimented with pre-processors, but it's unapplicable, because of
scope requirement. I need something like "Runtime User Defined Variables" in
my plan, which processed like Controller items - in their order.

I even tried to write my own Controller plugin, which will do this, but
stuck with variables and function evaluation approach in code. (Maybe sebb
can help me with this ;)
 
Best regards,
Andrey Pohilko

С уважением,
Андрей Похилько

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Wednesday, January 13, 2010 1:11 PM
To: JMeter Users List
Subject: Re: HTTP Header Manager uses old variable values?

On 13/01/2010, Heiko Robert <he...@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-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


Re: HTTP Header Manager uses old variable values?

Posted by sebb <se...@gmail.com>.
On 14/01/2010, Heiko Robert <he...@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" <se...@gmail.com>
>  An: "JMeter Users List" <jm...@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 <he...@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 <he...@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-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


Re: HTTP Header Manager uses old variable values?

Posted by Heiko Robert <he...@ecm4u.de>.
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" <se...@gmail.com>
An: "JMeter Users List" <jm...@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 <he...@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 <he...@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-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


Re: HTTP Header Manager uses old variable values?

Posted by sebb <se...@gmail.com>.
On 13/01/2010, Heiko Robert <he...@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 <he...@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-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


Re: HTTP Header Manager uses old variable values?

Posted by Heiko Robert <he...@ecm4u.de>.
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 <he...@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-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


Re: HTTP Header Manager uses old variable values?

Posted by sebb <se...@gmail.com>.
On 13/01/2010, Heiko Robert <he...@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-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