JMeter learn one of the -034-jmeter Debugging tools---HTTP Mirror Server

Source: Internet
Author: User
Tags http cookie what debugging writing test scripts

In general, the programming tools IDE provides the appropriate debugging modules for developers to use in order to locate the problem more quickly. So what debugging tools does JMeter provide for us to use while jmeter writing test scripts?

JMeter commonly used debuggers have the following five kinds:

1. View tree: See the result trees. Including request information, response information, etc., the cookie information in the request header is usually not displayed by default, and can be displayed by modifying the JMeter configuration parameters. Everyday people use a lot of, here no longer repeat.

2, HTTP Mirror server:http mirror server. Used to view request information.

3. Debug pre/postprocessor: Used to view information such as variables exist in the system.

4, Debug Sampler: Sample debugging tool, including input and output information.

5, BeanShell + Jmeter.log: Combination debugging, more flexible.

This article mainly describes the second, the remaining 3, 4, 5 methods follow-up blog post will be updated, thank you! ^_^

Most often, when debugging a JMeter test script, most people send the interface test request data to the test server frequently. In the initial debug script, the debug script's request information (incoming, request header, cookie information, etc.) is usually prioritized correctly. So, how do we not send data to the test service in this case? It is common practice to turn on fiddler, proxy our sample requests to Fiddler to intercept, and see if the appropriate sample request information is correct.

In fact, JMeter has provided us with such a mirror service, which is the HTTP Mirror server, adding the path: Console/Add/non-test component/http Mirror server. The panel looks like this:


      • Port: The port that is monitored by the HTTP Mirror server mirror server, which defaults to 8081, is required.
      • Max number of Threads: Maximum thread count. If this limit is exceeded, the wait queue is entered.
      • Max Queue Size: The maximum number of request task queues when the thread pool executes a sample. When the thread pool is executing, the newly received request is stored in the task queue. This entry is valid only if the maximum number of threads is greater than 0 o'clock.

"HTTP Mirror server" function: similar to the local temporary set up an HTTP server, the received request information is returned as is, can be viewed in the response results panel of the sample request. This allows you to verify that the sample request information sent is correct for debugging test scripts.

To set the HTTP cookie manager for the request sample, add the cookie information as follows:

Set the request parameters and request header information for the request sample as follows:

Configure the Request sample proxy to HTTP Mirror Server as follows:

Execute the script, and the result is as follows:

Website Link:http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Mirror_Server

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! ^_^

Save

JMeter learn one of the -034-jmeter Debugging tools---HTTP Mirror Server

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.