JMeter's HTTP Cookie Manager

Source: Internet
Author: User
Tags http cookie send cookies

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.