You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Paul Rogers <pm...@gmail.com> on 2011/01/11 00:27:24 UTC

Cookie header using Header manager

jmeter 2.4 on Mac

I have a text file that has a list of cookie ids.

It seemed the easiest way to send these with a request was to just use
the Header manager and a csv config.

However, after much trial and error, it seems that a header called
cookie ( or Cookie ) never gets reported in the request section of the
 View Results Tree, even when a simple value like Cookie  and 123 is
put directly into the header manager.

I havent had a chance to see if the header gets sent unfortunaly.

Other headers, like User-Agent or foo seem to work fine, just Cookie,
so Im guessing there is some interference from the internal cookie
manager.

Many thanks

Paul

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


Re: Cookie header using Header manager

Posted by Paul Rogers <pa...@shaw.ca>.
After poking around on this for a while, I found that the cookie, when
set from the header manager actually does get sent, it just doesnt
show in the View-Results-Tree Listener.

Thanks for the help though. I didnt know about the Mirror server until now.

Paul

On Mon, Jan 10, 2011 at 4:52 PM, Deepak Shetty <sh...@gmail.com> wrote:
> use a Beanshell pre processor under your http sampler
> Untested code
> import org.apache.jmeter.protocol.http.control.Cookie;
> Cookie c = new
> Cookie(name,vars.get("csvconfigvariablename"),domain,path,secure,expires);
> sampler.getCookieManager().add(c);
>
> regards
> deepak
>
> On Mon, Jan 10, 2011 at 3:27 PM, Paul Rogers <pm...@gmail.com> wrote:
>
>> jmeter 2.4 on Mac
>>
>> I have a text file that has a list of cookie ids.
>>
>> It seemed the easiest way to send these with a request was to just use
>> the Header manager and a csv config.
>>
>> However, after much trial and error, it seems that a header called
>> cookie ( or Cookie ) never gets reported in the request section of the
>>  View Results Tree, even when a simple value like Cookie  and 123 is
>> put directly into the header manager.
>>
>> I havent had a chance to see if the header gets sent unfortunaly.
>>
>> Other headers, like User-Agent or foo seem to work fine, just Cookie,
>> so Im guessing there is some interference from the internal cookie
>> manager.
>>
>> Many thanks
>>
>> Paul
>>
>> ---------------------------------------------------------------------
>> 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: Cookie header using Header manager

Posted by Deepak Shetty <sh...@gmail.com>.
use a Beanshell pre processor under your http sampler
Untested code
import org.apache.jmeter.protocol.http.control.Cookie;
Cookie c = new
Cookie(name,vars.get("csvconfigvariablename"),domain,path,secure,expires);
sampler.getCookieManager().add(c);

regards
deepak

On Mon, Jan 10, 2011 at 3:27 PM, Paul Rogers <pm...@gmail.com> wrote:

> jmeter 2.4 on Mac
>
> I have a text file that has a list of cookie ids.
>
> It seemed the easiest way to send these with a request was to just use
> the Header manager and a csv config.
>
> However, after much trial and error, it seems that a header called
> cookie ( or Cookie ) never gets reported in the request section of the
>  View Results Tree, even when a simple value like Cookie  and 123 is
> put directly into the header manager.
>
> I havent had a chance to see if the header gets sent unfortunaly.
>
> Other headers, like User-Agent or foo seem to work fine, just Cookie,
> so Im guessing there is some interference from the internal cookie
> manager.
>
> Many thanks
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Cookie header using Header manager

Posted by sebb <se...@gmail.com>.
On 10 January 2011 23:27, Paul Rogers <pm...@gmail.com> wrote:
> jmeter 2.4 on Mac
>
> I have a text file that has a list of cookie ids.
>
> It seemed the easiest way to send these with a request was to just use
> the Header manager and a csv config.
>
> However, after much trial and error, it seems that a header called
> cookie ( or Cookie ) never gets reported in the request section of the
>  View Results Tree, even when a simple value like Cookie  and 123 is
> put directly into the header manager.
>
> I havent had a chance to see if the header gets sent unfortunaly.
>
> Other headers, like User-Agent or foo seem to work fine, just Cookie,
> so Im guessing there is some interference from the internal cookie
> manager.

Yes, the Header Manager does not allow Cookies to be set.

You can add Cookies to the Cookie Manager.

I thiink it may work with dynamic cookie values - try it and see.

The easiest way to test this is probably to use the mirror server with HTTP GET.

> Many thanks
>
> Paul
>
> ---------------------------------------------------------------------
> 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