You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Shilpa Kulkarni <sy...@payasonline.com> on 2015/06/12 04:10:13 UTC
Possible cookie value truncation?
Hi
I have 2 APIs in my jmeter test plan. Just one thread, one user.
1. Login API
- This request succeeds, creates a cookie 'user' with value format
'<user email>:<user name>:<field 3>:<field 4> .
HTTP Cookie Manager with default settings is added to test plan.
2. Get Collection API
Then this API call is made. Correct cookie info is logged on Request panel.
Cookie Data:
user=test@test.com:test@test.com:12345:x0hlveP6ZCQ3m3pHgUgoO1AIj6c=
However on the receiving server, only 'test' is read as user cookie value.
Is it possible that jmeter is truncating cookie value or some encoding is
needed?
When using browser based client to send the same request, the receving
server gets correct value of cookie. It is only when requested from jmeter,
the value is truncated.
Any thoughts on troubleshooting appreciated!
Thanks
Shilpa
Re: Possible cookie value truncation?
Posted by Pravesh Prajapati <pr...@gmail.com>.
You are welcome!!!
On Sat, Jun 20, 2015 at 8:41 PM, Shilpa Kulkarni <sy...@payasonline.com>
wrote:
> Thanks for your help.
>
> A combination of 'clear cookie each iteration', cookie policy -
> 'Compatibility' and Implementation 'HC4CookieHandler' settings fixed my
> problem. The cookies are now being sent correctly.
>
> Shilpa
>
> On Thu, Jun 11, 2015 at 8:45 PM, Pravesh Prajapati <
> prajapati.pravesh@gmail.com> wrote:
>
> > Can you please try with the cookie manager and select default and set
> clear
> > cookie in each iteration.
> >
> > I guess the issue is probably once the cookies are generated dose not get
> > cleared.
> > it will always work for first time but then it will fail.
> > This is because you are not clearing the cache.
> > just try once hope so it will work fine.
> >
> > regards
> > Pravesh Prajapati.
> >
> > On Friday, June 12, 2015, Shilpa Kulkarni <sy...@payasonline.com> wrote:
> >
> > > Hi
> > >
> > > I have 2 APIs in my jmeter test plan. Just one thread, one user.
> > >
> > > 1. Login API
> > > - This request succeeds, creates a cookie 'user' with value format
> > > '<user email>:<user name>:<field 3>:<field 4> .
> > > HTTP Cookie Manager with default settings is added to test plan.
> > >
> > > 2. Get Collection API
> > > Then this API call is made. Correct cookie info is logged on Request
> > panel.
> > >
> > > Cookie Data:
> > > user=test@test.com:test@test.com:12345:x0hlveP6ZCQ3m3pHgUgoO1AIj6c=
> > >
> > > However on the receiving server, only 'test' is read as user cookie
> > value.
> > > Is it possible that jmeter is truncating cookie value or some encoding
> is
> > > needed?
> > >
> > > When using browser based client to send the same request, the receving
> > > server gets correct value of cookie. It is only when requested from
> > jmeter,
> > > the value is truncated.
> > >
> > > Any thoughts on troubleshooting appreciated!
> > >
> > > Thanks
> > > Shilpa
> > >
> >
> >
> > --
> > Regards,
> > Pravesh prajapati.
> > Mob:-9702600170
> >
>
--
Regards,
Pravesh prajapati.
Mob:-9702600170
Re: Possible cookie value truncation?
Posted by Shilpa Kulkarni <sy...@payasonline.com>.
Thanks for your help.
A combination of 'clear cookie each iteration', cookie policy -
'Compatibility' and Implementation 'HC4CookieHandler' settings fixed my
problem. The cookies are now being sent correctly.
Shilpa
On Thu, Jun 11, 2015 at 8:45 PM, Pravesh Prajapati <
prajapati.pravesh@gmail.com> wrote:
> Can you please try with the cookie manager and select default and set clear
> cookie in each iteration.
>
> I guess the issue is probably once the cookies are generated dose not get
> cleared.
> it will always work for first time but then it will fail.
> This is because you are not clearing the cache.
> just try once hope so it will work fine.
>
> regards
> Pravesh Prajapati.
>
> On Friday, June 12, 2015, Shilpa Kulkarni <sy...@payasonline.com> wrote:
>
> > Hi
> >
> > I have 2 APIs in my jmeter test plan. Just one thread, one user.
> >
> > 1. Login API
> > - This request succeeds, creates a cookie 'user' with value format
> > '<user email>:<user name>:<field 3>:<field 4> .
> > HTTP Cookie Manager with default settings is added to test plan.
> >
> > 2. Get Collection API
> > Then this API call is made. Correct cookie info is logged on Request
> panel.
> >
> > Cookie Data:
> > user=test@test.com:test@test.com:12345:x0hlveP6ZCQ3m3pHgUgoO1AIj6c=
> >
> > However on the receiving server, only 'test' is read as user cookie
> value.
> > Is it possible that jmeter is truncating cookie value or some encoding is
> > needed?
> >
> > When using browser based client to send the same request, the receving
> > server gets correct value of cookie. It is only when requested from
> jmeter,
> > the value is truncated.
> >
> > Any thoughts on troubleshooting appreciated!
> >
> > Thanks
> > Shilpa
> >
>
>
> --
> Regards,
> Pravesh prajapati.
> Mob:-9702600170
>
Re: Possible cookie value truncation?
Posted by Pravesh Prajapati <pr...@gmail.com>.
Can you please try with the cookie manager and select default and set clear
cookie in each iteration.
I guess the issue is probably once the cookies are generated dose not get
cleared.
it will always work for first time but then it will fail.
This is because you are not clearing the cache.
just try once hope so it will work fine.
regards
Pravesh Prajapati.
On Friday, June 12, 2015, Shilpa Kulkarni <sy...@payasonline.com> wrote:
> Hi
>
> I have 2 APIs in my jmeter test plan. Just one thread, one user.
>
> 1. Login API
> - This request succeeds, creates a cookie 'user' with value format
> '<user email>:<user name>:<field 3>:<field 4> .
> HTTP Cookie Manager with default settings is added to test plan.
>
> 2. Get Collection API
> Then this API call is made. Correct cookie info is logged on Request panel.
>
> Cookie Data:
> user=test@test.com:test@test.com:12345:x0hlveP6ZCQ3m3pHgUgoO1AIj6c=
>
> However on the receiving server, only 'test' is read as user cookie value.
> Is it possible that jmeter is truncating cookie value or some encoding is
> needed?
>
> When using browser based client to send the same request, the receving
> server gets correct value of cookie. It is only when requested from jmeter,
> the value is truncated.
>
> Any thoughts on troubleshooting appreciated!
>
> Thanks
> Shilpa
>
--
Regards,
Pravesh prajapati.
Mob:-9702600170