JMeter--http Property Manager

Source: Internet
Author: User
Tags http cookie

There are some elements in the configuration component of Test plan that are related to HTTP properties: HTTP Cache manager, HTTP Authorization Manager, HTTP Cookie manager,http Header Manager, HTTP Request defaults and so on, what are these?

JMeter is not a browser, so its behavior is not exactly the same as the browser. The HTTP property manager provided by these jmeter is used to simulate the behavior of the browser as much as possible, and to customize the HTTP request sent to the application under test at the HTTP protocol layer.

(1) HTTP Request Defaults

The property manager is used to set the default values for all HTTP within its scope, including the host, port, protocol, and so on, that can be set for HTTP requests. There can be multiple HTTP request Defaults in a test plan, sampler in multiple HTTP request Defaults scopes using HTTP Set the value's overlay value in Request defaults. Such as:

Case: Demo

(2) HTTP Authorization Manager

This property manager is used to set up automatic authentication and logon for some pages that require NTLM authentication. Such as: monitoring Tomcat

(3) HTTP Cache Manager

This property manager is used to emulate the browser's cache behavior. When the property manager is added for test plan, the test plan runs using last-modified, ETag, and expired to determine whether to get the appropriate element from the cache.

Note: If a sampler request element in test plan is the element of the cache, the test plan reads the element directly from the cache during the run, so that the return value sampler will be empty. In this case, if the assertion is set for the sampler to check whether the established content in the response body exists, the assertion will fail.

(4) HTTP Cookie Manager

This property manager is used to manage all cookies when the test plan runs. The HTTP Cookie Manager can automatically store all cookies that the server sends to the client and attach the appropriate cookie when sending the request.

At the same time, users can manually add some cookies in the HTTP cookie manager, which are manually added to the request when the request is sent.

Note: JMeter's HTTP cookie manager sets up a separate session area for each thread in the thread group to manage all cookies for that thread, that is, the session cookie for each thread is completely independent (consistent with browser behavior). However, the cookie that is manually added by the user in the HTTP cookie manager is shared by all threads.

If you select the "Clear cookies each iteration?" "This means that the thread clears all cookies in its own session at each iteration.

(5) HTTP Header Manager

This property manager is used to customize the contents of the request header of an HTTP request issued by the sampler. HTTP requests from different browsers have different agents, and you need the correct refer to access certain pages that have an anti-theft chain ... In these cases, the HTTP Header manager is required to ensure that the HTTP request sent is correct. Such as:

JMeter--http Property Manager

Related Article

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.