jmeter - HC[34]CookieManager does not append my login cookies -


environment: jdk8, jmeter: 3.2

i using hc4cookiemanager (the option available).

snapshot of test plan

i issue request basic auth , auth cookies back. unfortunately server not set domain (domain=;).

as result (i think) hc4cookiemanager entirely ignores cookies result cannot perform operations on server.

i see error in logs:

 2017-09-12 13:06:41,190 error o.a.j.p.h.c.hc4cookiehandler: unable add cookie org.apache.http.cookie.malformedcookieexception: blank value domain attribute         @ org.apache.http.impl.cookie.rfc2109domainhandler.parse(rfc2109domainhandler.java:61) ~[httpclient-4.5.3.jar:4.5.3]         @ org.apache.http.impl.cookie.publicsuffixdomainfilter.parse(publicsuffixdomainfilter.java:113) ~[httpclient-4.5.3.jar:4.5.3]         @ org.apache.http.impl.cookie.cookiespecbase.parse(cookiespecbase.java:113) ~[httpclient-4.5.3.jar:4.5.3]         @ org.apache.http.impl.cookie.defaultcookiespec.parse(defaultcookiespec.java:145) ~[httpclient-4.5.3.jar:4.5.3]         @ org.apache.jmeter.protocol.http.control.hc4cookiehandler.addcookiefromheader(hc4cookiehandler.java:125) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.control.cookiemanager.addcookiefromheader(cookiemanager.java:373) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.sampler.httphc4impl.saveconnectioncookies(httphc4impl.java:1519) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.sampler.httphc4impl.sample(httphc4impl.java:485) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.sampler.httpsamplerproxy.sample(httpsamplerproxy.java:74) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.sampler.httpsamplerbase.sample(httpsamplerbase.java:1189) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.protocol.http.sampler.httpsamplerbase.sample(httpsamplerbase.java:1178) [apachejmeter_http.jar:3.2 r1790748]         @ org.apache.jmeter.threads.jmeterthread.executesamplepackage(jmeterthread.java:491) [apachejmeter_core.jar:3.2 r1790748]         @ org.apache.jmeter.threads.jmeterthread.processsampler(jmeterthread.java:425) [apachejmeter_core.jar:3.2 r1790748]         @ org.apache.jmeter.threads.jmeterthread.run(jmeterthread.java:254) [apachejmeter_core.jar:3.2 r1790748]         @ java.lang.thread.run(thread.java:745) [?:1.8.0_102] 2017-09-12 13:06:41,327 error o.a.j.p.h.c.hc4cookiehandler: unable add cookie 

is there workaround this? have tried jdk7 same result.

you can add following line user.properties file:

cookiemanager.check.cookies=false 

and restart jmeter pick property up.

as per http cookie manager documentation:

jmeter checks received cookies valid url. means cross-domain cookies not stored. if have bugged behaviour or want cross-domain cookies used, define jmeter property "cookiemanager.check.cookies=false".

so jmeter should storing invalid cookies given aforementioned property set false

more comprehensive explanation examples: http cookie manager advanced usage - guide


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -