Stress testing tool-JMeter

  The stress test examines the maximum load that the system can withstand under the current hardware and software environment and helps to find the bottleneck of the system. The stress test is to maintain the online processing capacity and stability of the system within a standard range, so that it can be
  used in mind . In stress testing, we hope to find many errors that are more difficult to find with other testing methods. There are two types of errors: memory leaks and concurrency and synchronization ; an effective stress test system will apply the following key conditions: repetition , concurrency , magnitude , and random changes.
  Before starting the stress test, you need to understand several performance indicators
.
  1. Response Time (Response Time): The time it takes for the entire process from the moment the client initiates a request to the end of the client receiving the response from the server
  2. HPS (Hits per Second): the number of clicks per second , The unit is times/second
  3. TPS (Transaction per Second): the number of transactions processed by the system per second, the unit is pen/second
  3. QPS (Query per Second): the number of queries processed by the system per second, the unit is times/second
  4. Max Response Time: The maximum time from the user initiating a request to the system responding
  5. Mininum Response Time: The minimum time from the user initiating a request to the system responding
  6. 90% Response Time: Sort the response time of all users. If the response time of 90% of users is within the design requirements, the interface basically meets the design requirements. The
  performance test mainly focuses on the following three indicators:

  1. Throughput: the number of requests and tasks that the system can handle per second
  2. Response time: the time it takes for the service to process a request
  3. Error rate: The percentage of requests with wrong request results.
      
      There are many stress testing tools, such as Apache ab, JMeter, and Gatling. This article mainly uses JMeter testing as an example. JMeter is developed in java and requires an environment above jdk1.8. Please configure the java environment in advance
      1. Download JMeter, download the binary file from the official website to the local, and then unzip it to use, download address: https://jmeter.apache.org/download_jmeter.cgi
    Insert picture description here
      2. Run JMeter, unzip In the bin directory of the file, double-click to run jmeter.bat to start
    Insert picture description here
      3. Change the system language, if you like to watch videos, you can omit this step
    Insert picture description here
      4. Add a thread group to simulate users and set related parameters
    Create thread group
    Set relevant parameters
      5. Add a sampler, select the target to be tested, for example I am testing the project interface, select http, and set the relevant parameters
    Sampler---http request
    Insert picture description here
      6. Add a listener, the user can view the test data,
    Insert picture description here
      7. Start the test
    Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45481406/article/details/113097807