JMeter Stress Test (simple HTTP request)-instance

Source: Internet
Author: User

The example of an interface provided by a service-side system is:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/63/wKiom1T8NRzyOcpZAAJEOmL8aNs226.jpg "title=" 1.png " alt= "Wkiom1t8nrzyocpzaajeoml8ans226.jpg"/>


The steps to use JMeter for stress testing after evaluation are:

    1. Start JMeter: Click Jmeter.bat under Bin, run JMeter

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/63/wKiom1T8LRigzXFZAAKjcc2Lrpw117.jpg "title=" 1.png " alt= "Wkiom1t8lrigzxfzaakjcc2lrpw117.jpg"/>


2. Create a test plan:

A test technology template is loaded by default when JMeter is started

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/5F/wKioL1T8LhOhIhDwAAEaaEq8X6Q972.jpg "title=" 1.png " alt= "Wkiol1t8lhohihdwaaeaaeq8x6q972.jpg"/>

3. Save the Test plan: Modify the name to Http_demo, click Save, select Save Path

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/63/wKiom1T8MHexkH9OAAGy8NZAjZc080.jpg "title=" 1.png " alt= "Wkiom1t8mhexkh9oaagy8nzajzc080.jpg"/>

4. Add a thread group

Right-click on the test plan "Http_demo" node in the left tree," add"--->"thread Group", adding a "thread group"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/63/wKiom1T8MOiz7zFLAAG6cK0mxzM004.jpg "title=" 1.png " alt= "Wkiom1t8moiz7zflaag6ck0mxzm004.jpg"/>

after the add succeeds, the "Http_demo" node has more "thread group" node

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/5F/wKioL1T8MnWisqN9AAGzTDU2hV4061.jpg "title=" 1.png " alt= "Wkiol1t8mnwisqn9aagztdu2hv4061.jpg"/>

5. Add HTTP Default request:(used to configure public parameters , not http requests)


Right-click the thread group, select "Add"-〉 "Configure symbol"-〉 "HTTP request Default", and after clicking "http request default value"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/63/wKiom1T8MfSR4XkXAAKA8e8xa_k858.jpg "title=" 1.png " alt= "Wkiom1t8mfsr4xkxaaka8e8xa_k858.jpg"/>

After the add succeeds, the Thread group node is more than the HTTP request Defaults node

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/5F/wKioL1T8M3SAGf_qAAF2WxtwRww553.jpg "title=" 1.png " alt= "Wkiol1t8m3sagf_qaaf2wxtwrww553.jpg"/>

6. set the HTTP request default value:

For this project fill in the following, the service side of the Department of the description

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/5F/wKioL1T8NUeBVGExAACbOHV11NA997.jpg "title=" 1.png " alt= "Wkiol1t8nuebvgexaacbohv11na997.jpg"/>

Fill in the default request name, server, default request path, save test plan

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/60/wKioL1T8NfeRNLbaAAN8WuhqJe4459.jpg "title=" 1.png " alt= "Wkiol1t8nfernlbaaan8wuhqje4459.jpg"/>

7. Add an HTTP request

Right-click "Http_demo" and select "Add"-〉 " sampler " -〉 "HTTP request "

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/60/wKioL1T8NuegkhuBAAF7RnjrTvw087.jpg "title=" 1.png " alt= "Wkiol1t8nuegkhubaaf7rnjrtvw087.jpg"/>

After the add succeeds, theHTTP Request default value "XX Reading Platform" node issued "HTTP request"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/63/wKiom1T8NjTTDsT0AAGGuRtw63g095.jpg "title=" 1.png " alt= "Wkiom1t8njttdst0aaggurtw63g095.jpg"/>

8. Setting up HTTP Requests

Complete the reference service end-of-line:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/60/wKioL1T8OGvQ3Rj3AACxIXhQdPo362.jpg "title=" 1.png " alt= "Wkiol1t8ogvq3rj3aacxixhqdpo362.jpg"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/63/wKiom1T8NvuTcT6mAAPhUWwBlOc191.jpg "title=" 1.png " alt= "Wkiom1t8nvutct6maaphuwwbloc191.jpg"/>

Complete, save the test plan

9. Add a listener:

Right-click the thread group, select "Add"-〉 "Listener"-〉 "View result tree"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/60/wKioL1T8OYWSb7idAAR_A6nB-WY296.jpg "title=" 1.png " alt= "Wkiol1t8oywsb7idaar_a6nb-wy296.jpg"/>

After the add succeeds, the view results tree node is added under "Thread Group"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/60/wKioL1T8OhWQNQtCAAEGJ3SR5r0477.jpg "title=" 1.png " alt= "Wkiol1t8ohwqnqtcaaegj3sr5r0477.jpg"/>

10. Trial run

Click Execute

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/60/wKioL1T8OmfTdbDQAAH80VEdD5k540.jpg "title=" 1.png " alt= "Wkiol1t8omftdbdqaah80vedd5k540.jpg"/>

See Request and response execution: Execution succeeds as follows, checking the correctness of the response data return

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/64/wKiom1T8Od6SRbWZAANabtHPbYY986.jpg "title=" 1.png " alt= "Wkiom1t8od6srbwzaanabthpbyy986.jpg"/>

11. Add a chart Analysis listener

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/64/wKiom1T8Op6hMV25AARejWUVcXA291.jpg "title=" 1.png " alt= "Wkiom1t8op6hmv25aarejwuvcxa291.jpg"/>

12. Modify the thread number of thread group and other parameters for stress testing

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/64/wKiom1T8PGWjAALrAAJfqQ3hBMA005.jpg "title=" 1.png " alt= "Wkiom1t8pgwjaalraajfqq3hbma005.jpg"/>13. Perform stress tests, see data

After clicking Execute, select Graphical results to observe the data content of the stress test

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/60/wKioL1T8PaugxJiyAARpSsEkn28266.jpg "title=" 3.png " alt= "Wkiol1t8paugxjiyaarpssekn28266.jpg"/>

14. If you need to view the results in a table

Select "Add"-〉 "Listener"-〉 "View results with a table"

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/60/wKioL1T8PlLhcWO3AALk8o1HkUQ811.jpg "title=" 1.png " alt= "Wkiol1t8pllhcwo3aalk8o1hkuq811.jpg"/>


15. Set the main parameters for "View results with table":

Configure: Click "Configure" button to select "save Response data" in thepop-up windowto save the response data.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/64/wKiom1T8PZeQYjwSAAMauAMLy7Y942.jpg "title=" 1.png " alt= "Wkiom1t8pzeqyjwsaamauamly7y942.jpg"/>650) this.width=650; src= http://s3.51cto.com/wyfs02/M01/5A/64/ Wkiom1t8pfjzgccmaaa82kxegkm122.jpg "title=" 1.png "alt=" Wkiom1t8pfjzgccmaaa82kxegkm122.jpg "/>





This article is from the "Yekoven" blog, make sure to keep this source http://leafwf.blog.51cto.com/872759/1618409

JMeter Stress Test (simple HTTP request)-instance

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.