JMeter Learning -018-jmeter Configuration Components-http Information Header Manager-Implement Cookie Login

Source: Internet
Author: User
Tags http cookie

Previously wrote an article through the "HTTP Cookie Manager" to implement the login state operation, you need to configure each key-value pair (as shown), relatively cumbersome configuration. In fact, we can also use the "HTTP header Manager" to add Cookie information in order to achieve the login state operation.

The procedure is as follows:

1. Obtain a cookie (via browser, as shown in the following Firefox browser), for example, to obtain cookie information via the browser and save to text Cookie.txt

  

2. Read the cookie information in the Cookie.txt via "CSV Data Set Config" (See JMeter Learning -012-jmeter Configuration Component-http Cookie Manager-Implement cookie login), Save as variable Xn_c Ookie50

3. Add the cookie header information as shown in the red box in the HTTP header manager of the corresponding request (if no header manager is available, right-click the HTTP request, select Add/Configure component/HTTP header manager to add)

  

4, run the script to see the results of the script execution, as shown below, successfully logged in the operation of the state

  

This method displays the cookie information in the Request tab of the result tree that is empty (as shown)

  

At the same time, the corresponding Cookie information will not appear in the result number file. You can use this setting if you want to hide cookies in the output XML of the results tree.

At this point, This article successfully concluded, I hope this article can give beginners JMeter you a reference.

Finally, very grateful to the pro-stop, I hope this article can be pro helpful. Warmly welcome the kiss to discuss together and progress together. Thank you so much! ^_^

JMeter Learning -018-jmeter Configuration Components-http Information Header Manager-Implement Cookie Login

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.