You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Felix Schumacher <fe...@internetallee.de> on 2020/02/15 13:14:11 UTC

Re: Weird behaviour of CookieManager.clear()

Should we open a bug for this?

I have briefly looked into it and one thing that hit my eye, was that

clear() clears all values from the manager

testIterationStart(null) resets the values to start values (if the user
has given values to pre-fill)

Felix

Am 28.01.20 um 21:04 schrieb Philippe Mouawad:
> Hello,
> I was looking into clearing cookies at some step of my scenario.
>
> So under an HTTP Request I added a JSR PostProcessor , I called:
>
>    - sampler.getCookieManager().clear()
>
> But although it clears cookie it seems it breaks further iterations,
> Cookies are not added
> The workaround is to do this:
>
>    - sampler.getCookieManager().testIterationStart(null);
>
>
> Don't have time to investigate more deeply for now, just reporting not to
> forget it.
>
> Regards
> Philippe
> <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
>

Re: Weird behaviour of CookieManager.clear()

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello Felix,
Note that in my case it seems it was not clearing things.
So I entered a new login with existing cookies.

On Sat, Feb 15, 2020 at 2:14 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Should we open a bug for this?
>
> I have briefly looked into it and one thing that hit my eye, was that
>
> clear() clears all values from the manager
>
> testIterationStart(null) resets the values to start values (if the user
> has given values to pre-fill)
>
> Felix
>
> Am 28.01.20 um 21:04 schrieb Philippe Mouawad:
> > Hello,
> > I was looking into clearing cookies at some step of my scenario.
> >
> > So under an HTTP Request I added a JSR PostProcessor , I called:
> >
> >    - sampler.getCookieManager().clear()
> >
> > But although it clears cookie it seems it breaks further iterations,
> > Cookies are not added
> > The workaround is to do this:
> >
> >    - sampler.getCookieManager().testIterationStart(null);
> >
> >
> > Don't have time to investigate more deeply for now, just reporting not to
> > forget it.
> >
> > Regards
> > Philippe
> > <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
> >
>


-- 
Cordialement.
Philippe Mouawad.

Re: Weird behaviour of CookieManager.clear()

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 15.02.20 um 14:15 schrieb Philippe Mouawad:
> Yes I think so
Done
>
> On Sat, Feb 15, 2020 at 2:14 PM Felix Schumacher <
> felix.schumacher@internetallee.de> wrote:
>
>> Should we open a bug for this?
>>
>> I have briefly looked into it and one thing that hit my eye, was that
>>
>> clear() clears all values from the manager
>>
>> testIterationStart(null) resets the values to start values (if the user
>> has given values to pre-fill)
>>
>> Felix
>>
>> Am 28.01.20 um 21:04 schrieb Philippe Mouawad:
>>> Hello,
>>> I was looking into clearing cookies at some step of my scenario.
>>>
>>> So under an HTTP Request I added a JSR PostProcessor , I called:
>>>
>>>    - sampler.getCookieManager().clear()
>>>
>>> But although it clears cookie it seems it breaks further iterations,
>>> Cookies are not added
>>> The workaround is to do this:
>>>
>>>    - sampler.getCookieManager().testIterationStart(null);
>>>
>>>
>>> Don't have time to investigate more deeply for now, just reporting not to
>>> forget it.
>>>
>>> Regards
>>> Philippe
>>> <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
>>>
>

Re: Weird behaviour of CookieManager.clear()

Posted by Philippe Mouawad <ph...@gmail.com>.
Yes I think so

On Sat, Feb 15, 2020 at 2:14 PM Felix Schumacher <
felix.schumacher@internetallee.de> wrote:

> Should we open a bug for this?
>
> I have briefly looked into it and one thing that hit my eye, was that
>
> clear() clears all values from the manager
>
> testIterationStart(null) resets the values to start values (if the user
> has given values to pre-fill)
>
> Felix
>
> Am 28.01.20 um 21:04 schrieb Philippe Mouawad:
> > Hello,
> > I was looking into clearing cookies at some step of my scenario.
> >
> > So under an HTTP Request I added a JSR PostProcessor , I called:
> >
> >    - sampler.getCookieManager().clear()
> >
> > But although it clears cookie it seems it breaks further iterations,
> > Cookies are not added
> > The workaround is to do this:
> >
> >    - sampler.getCookieManager().testIterationStart(null);
> >
> >
> > Don't have time to investigate more deeply for now, just reporting not to
> > forget it.
> >
> > Regards
> > Philippe
> > <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
> >
>


-- 
Cordialement.
Philippe Mouawad.