Basically I have a structured script where all of the actual samplers are used by an include controller.
I need to "sometimes" re-login the thread and for that I use a throughput controller which include the login module, which clear all cookies like I've described with a pre processor and execute a new login request. I also need to achieve the same cookies drop for anonymous users "sometimes", but I don't want to send an http request to my application in order to run this preprocessor, as in real life such requests do not take place. I hope it make sense. www.beatsoo.org - free application performance monitoring from world wide locations. On Apr 29, 2014 6:45 PM, "sebb" <[email protected]> wrote: > On 28 April 2014 14:40, Shmuel Krakower <[email protected]> wrote: > > Hi, > > I need to clear all cookies on certain cases. > > For that I use a BSF pre processor with the following code: > > > > while(sampler.getCookieManager().getCookieCount() > 0) > > { > > sampler.getCookieManager().remove(0); > > } > > > > This works just fine. > > > > The thing is that I want to be able to execute this code in other places > / > > cases where I don't trigger an HTTP Request (the > sampler.getCookieManager() > > will only work if the BSF is located as a child of an HTTP request). > > > > Anyone can suggest how can I clear all cookies in another way? > > Surely the cookies are only relevant to the HTTP Sampler, so clearing > them before the sample should be sufficient? > > Why is there a need to clear the cookies any where else? > > > Best, > > > > Shmuel Krakower. > > www.Beatsoo.org - re-use your jmeter scripts for application performance > > monitoring from worldwide locations for free. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
