First, the role of the Http Cookie Manager:
1. Automatically manage cookies: Store and send cookies like a browser, if an HTTP request is sent with a cookie in his response, the cookie The manager automatically saves these cookies and uses the values of these cookies in all subsequent requests to the site. Each thread stores its own area of cookies. We can see the cookie Data that was sent in the request screen of the view Results tree without the AutoSave cookie in the cookie manager.
The value of the accepted cookie can be stored in the jmeter thread variable (JMeter does not do this automatically after the 2.3.2 version). To save the cookie to a thread variable, define the attribute "Cookiemanager.save.cookies=true". The thread variable is named Cookie_ + cookie name. The Cookiemanager.name.prefix= property can be used to modify the value of the default Cookie_.
2, manually Manage cookies: Manually add cookies to the cookie Manager, the values of these cookies are shared by the club thread.
It's a simple practice to use Firefox's firebug to export cookies.
Then, import the file into the JMeter
Second, special attention:
JMeter official website has such a passage:
It means to say:
If there is more than one cookie Manager within a test plan, JMeter currently cannot specify which is used. Therefore, it is best to have only one cookie manager in a test plan. Also, a cookie in a manager cannot be referenced by another manager. So be cautious when using multiple cookies Managers.
Similarly, the above rule applies to the other manager under config element:
JMeter's HTTP Cookie Manager