How to use jmeter tool for performance testing

foreword

Today we will talk about how jmeter performs performance testing. We all know that jmeter tools can perform performance testing in addition to interface function testing. When the project tends to be stable, you can start preparing for performance testing according to performance requirements. Today, I will talk about how jmeter performs performance testing. The premise of jmeter performing performance testing is that the functional logic of the interface is open and there are no blocking bugs.

​Step 1: Set the number of threads

Step 2: Add Transaction Controller

Set the transaction according to the business scenario, drag the interface that needs to be tested concurrently to the transaction controller node, and output the performance test report to view the performance test result of the transaction

​Step 3: Set the synchronization timer. The synchronization timer mainly sets two parameters.
Number of Simulated User to Group by: the number of simulated users per group, which is used to control the maximum number of concurrent requests from the parent node. If it is set to 50 , indicating that a maximum of 50 threads are executed concurrently;

Timeout in milliseconds: timeout (milliseconds), if set to 3000, it means that if 50 threads arrive at the parent node within 3 seconds, they will run concurrently immediately. If 50 threads are not reached within 30, how many threads are executed concurrently.

​Step 4: Add a listener

Graph Results: Graphical results, view running trends

View Results in Table: View the results in a table and view the details of the operation

Summary Report: Aggregate report, statistical response information and provide number of requests, average, maximum, minimum, error rate, approximate throughput (in requests/sec) and throughput in kb/sec

Transactions per Second: the number of transactions per second, the number of transactions or transactions that the system can handle per second, it is an important indicator to measure the processing capacity of the system.

Hits per Second: hits per second, symbolizing the pressure

​Step 5: Run the script in non-GUI mode, analyze the performance test report, and output the test results

 

Performance test evaluation: When the 1000UV concurrency test is performed on the added manuscript transaction, the average transaction response time is 1.67 seconds, and the maximum is 2.99 seconds, both of which meet the requirements (<3 seconds), but the CPU usage is greater than 80%, and there is a bottleneck; Failed (Non HTTP response code: java.net.ConnectException/Non HTTP response message: Connection refused: connect), causing the error rate to reach 31.2%, far exceeding 5%, and there is a bottleneck.

Stress testing is a step-by-step process, such as setting 100, 300, 500, 800, 1000, 1500, 2000, ... threads before each stress, analyzing the results of each stress test, and setting the number of cycles to view The performance results in the case of long-term concurrency, due to time constraints, I only pressed it once. Finally, the performance indicators need to meet four criteria: many, fast, good, and economical, time characteristics (fast response time), high processing efficiency (TSP), long-term running stability, and resource characteristics (low system resource usage). It is also very important to set up a good business scenario, otherwise the test results will not meet the business requirements.

 

Finally, I would like to thank everyone who has read my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, you can take it away if you need it:

These materials should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey, and I hope it can help you! Partners can click the small card below to receive 

 

Guess you like

Origin blog.csdn.net/okcross0/article/details/131584668