JMeter Learning -004-web script Getting Started combat

Source: Internet
Author: User

This article is a practical example of JMeter getting started. I am JMeter beginner rookie One, thus this article suitable for JMeter beginners to see. at the same time, because I have limited knowledge, if there are deficiencies in the text, please the great god, thank you very much!

gossip is less, and words go to the chase. This article will be from the Chrome browser agent configuration, JMeter HTTP proxy server configuration, JMeter HTTP proxy server to get HTTP requests,JMeter script creation, JMeter script run five aspects, divided into three chunks to JMeter Primary combat applications with graphics and text, detailed steps to describe, really do step by step, from scratch.

One, WEB browser configuration (for example, Chrome browser)

Go to the Chrome browser settings screen and, as shown in the blue arrows, go to the Chrome Local area network (LAN) settings screen and set the corresponding settings against the configuration. When you set up the proxy port, you need to confirm that the port you set is not occupied and turned on (how to confirm that the Windows port is available for follow-up updates), and remember the port configuration here, which is used when setting up the JMeter HTTP proxy server, for example, where the port setting is: 8888

Second, JMeter configuration

    1. Start JMeter: Start JMeter after the command line executes JMeter carriage return. The JMeter boot interface looks like this:

2. Add the thread group (required) in the test plan. The procedure is as follows:

and rename the test plan and thread group to: JMeter learn -004-pc Browser script recording configuration. The interface looks like this:

3. Thread groups (JMeter learning -004-pc Browser Script recording configuration) add listeners (Assert results and view result trees) in turn. The procedure is as follows:

After you add the assertion results and view the result tree, the structure looks like this:

4. Add the HTTP proxy server and view the result tree in the workbench. The procedure is as follows:

The interface after the addition is as follows:

5. Configure the HTTP proxy server (the listener port is set to the first big step configuration of Chrome's proxy port). The procedure is as follows:

Three, simple example demonstration

1. Start the HTTP proxy server. The interface looks like this:

2. Open the Chrome browser, enter "Aaronfan Blog Park" to search for JMeter HTTP proxy Server request information. As shown (to keep the interface neat, some image request information has been removed):

Enter the corresponding result tree interface to view Baidu search "Aaronfan Blog Park" Response results information. As shown in the following:

3. Stop the HTTP proxy server, copy the HTTP request (open Baidu, Baidu Search) to the thread group (JMeter learning -004-pc Browser Script recording configuration), and save the JMeter script as:< JMeter learn -004-pc Browser script recording configuration .jmx>. As shown in the following:

9. Click JMeter script <jmeter Learn -004-pc browser script recording configuration .jmx> the {Clear all} button (corresponding to clear HTTP request Response Results information) cleanup run results, click the {boot} button (corresponding to the Executes an HTTP request) to view the execution results after the HTTP request is sent. As shown in the following:

At this point, JMeter uses the basic demonstration sample has been completed, hoping to give the Novice's pro some reference, a little inspiration. Thank you so much!

JMeter Learning -004-web script Getting Started combat

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.