Hi, 

I am trying to extend JMeter with a custom login procedure that I have created 
using Http Client in a JavaSamplerClient. The custom login code creates 6 
cookies on various domains and I want to add them to the JMeter's HTTP Cookie 
Manager that I have added to the Thread Group in my test plan in JMeter, so 
that subsequent HTTP REQUEST samplers will use them. 

My problem is that I can't access the instance of the HTTP Cookie Manager that 
JMeter is using and can't find any documentation about what to do. 

The provided JavaSamplerContext does not have anything of interest and nor does 
the JMeterContextService. I have also tried to cast the value of 
JMeterContextService.getContext().meterContext.getCurrentSampler().getProperty("HTTPSampler.cookie_manager")
 used by a source file I saw for the HTTP request but unfortunately this also 
did not work (returns null).

Any help will be much appreciated ? Alternatively, if it is impossible to 
create a simple JavaSamplerClient for custom cookie login, what is the 
recommended way? 

-- 
Morten Christensen (appinux)
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Reply via email to