0
votes

I successfully recorded a site that uses SAML Authentication Request and Single Sign On to Login. This site is using a proxy. So, I recorded it using a proxy.

When I played back the record, it successfully login but when I played back for the second times (I run after waiting for 5 seconds), it failed to login. If I checked, the difference is in the Cookie, however I already used HTTP Cookie Manager:

enter image description here

successfully login

enter image description here

failed login

enter image description here

If we can see the pictures above that the difference is the cookie.

So how to keep the session cookie?

1

1 Answers

0
votes

JMeter automatically checks cookies integrity, as per HTTP Cookie Manager documentation:

JMeter checks that received cookies are valid for the URL. This means that cross-domain cookies are not stored. If you have bugged behaviour or want Cross-Domain cookies to be used, define the JMeter property "CookieManager.check.cookies=false".

There are 2 ways of "defining" the aforementioned property:

  1. Add the next line to user.properties file (located in "bin" folder of your JMeter installation)

    CookieManager.check.cookies=false
    

    JMeter restart will be required to pick the property up

  2. Override the property via -J command-line argument

    jmeter -JCookieManager.check.cookies=false -n -t test.jmx -l result.jtl
    

More information: HTTP Cookie Manager Advanced Usage - A Guide