Being a beginner in Jmeter
, met with necessity to run a simple flow:
webdriver
samplerGET/POST
requests within the web-app (e.g. navigate to any inner page)Test runs succeed for http://, but failed on HTTP-request step with 404 for https:// (two different sites)
What has been done to resolve:
1. Cookie Manager was added to Thread Group, placed prior Samplers
2. jmeter.properties changed to:
CookieManager.allow_variable_cookies=true
CookieManager.save.cookies=true
CookieManager.check.cookies=false
Thus, after changing save cookies to true, I expected to see all cookies saved in Debug Sampler > JmeterVariables
, but I don't (either for http:// or for https://)
3. Regexp extractor (placed above HTTP sampler) used as:
Reference Name: COOKIE_EXT
Regular expression: SSESSee2ec8d6b6eedd096cb782a386b4e5c3=(.*)
Template: $1$
Match No.: 1
Use empty default value
Put in GET request as:
name: cookie_ext
value: ${COOKIE_EXT}
As a result:
Response in Debug Sampler: COOKIE_EXT=
Request data: GET ?cookie_ext=
[no cookies]
4. Tried to find any additional Jmeter settings for https (e.g. TSL/SSL protocols). Seems there are no any required except specifying 'https' in HTTP sampler template. Played with Implementaion & Cookie Policy in HTTP Cookie Manager, but without effect.
What could be the reason?
(Jmeter 3.0, Google Chrome 51.0, Drupal 7.43)
The cookie manager stores and sends cookies just like a web browser. If you have an HTTP Request and the response contains a cookie, the Cookie Manager automatically stores that cookie and will use it for all future requests to that particular web site. Each JMeter thread has its own "cookie storage area".
I haven't seen any problems with handling cookies and HTTPS protocol so maybe you have misconfigured something.
Remember a couple of things:
CookieManager.save.cookies=true
you are storing cookies into JMeter Variables already, there is no need to use regular expressions. Moreover, in case your regular expression is wrong (it seems very weird to me) you may overwrite "good" cookie from the HTTP Cookie Manager with "bad" value from the Regular Expression Extractor. See Using the HTTP Cookie Manager in JMeter guide for more information on working with cookies in JMeter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With