Beyond the limits! How to conduct efficient distributed performance testing and let Jmeter reveal the true strength of the system under concurrency

1. Why conduct distributed performance testing?

When conducting high-concurrency performance testing, due to the limitations of the Jmeter tool itself and computer hardware, it cannot meet our requirements for large-concurrency performance testing.

Based on this scenario, we need to use a distributed approach to achieve our high-concurrency performance testing requirements.

2. Principle of distributed performance testing

To conduct distributed performance testing, we first need to have one machine as the master machine (Controller) and other machines as agents (Agent).

During execution, a concurrent test is initiated on the main control machine, and the main control machine distributes the execution script to the agent machine; then the same concurrent test is executed on the agent machine; after the execution is completed, the agent machine sends the test data to the main control machine, and finally the main control machine The control machine summarizes and analyzes the execution results of all agent machines.

For example, if you need to simulate 100 concurrent users, 1 master machine and 4 agent machines, you only need to set the number of threads of the script to 20.

This article uses jmeter on windows as the main control machine and jmeter on linux as the agent machine.

现在我也找了很多测试的朋友,做了一个分享技术的交流群,共享了很多我们收集的技术文档和视频教程。
如果你不想再体验自学时找不到资源,没人解答问题,坚持几天便放弃的感受
可以加入我们一起交流。而且还有很多在自动化,性能,安全,测试开发等等方面有一定建树的技术大牛
分享他们的经验,还会分享很多直播讲座和技术沙龙
可以免费学习!划重点!开源的!!!
qq群号:310357728【暗号:csdn999】

3. Operation steps

Three easy steps: 1. Start the agent configuration service (1) Modify the agent jmeter\bin\jmeter.properties file, close the SSL service, and add:

server.rmi.ssl.disable=true

(2) Start proxy service

The IP here is the local IP address of the agent.

The service of the main control machine also needs to be started. Under Windows, you only need to run the jmeter-server.bat file.

2. Modify jmeter\bin\jmeter.properties in the same way as the main control machine configuration, add the agent IP and port (the default port of jmeter is 1099), and separate multiple agents with English ",".

remote_hosts=127.0.0.1:1099,192.168.37.128:1099

Turn off the SSL service. server.rmi.ssl.disable=true

Start jmeter on the main control machine, and you can find that the main control machine and agent machine we configured can be seen in the "Start"\"Remote Start" menu.

3. Execute the distributed performance test script to open the script, for example, set the number of threads to 10;

Click "Start"\"Remote Start All", do not click the triangle on the toolbar to start (this can only execute the number of threads on the current machine).

Through the summary report, it was found that 20 sample requests were executed, which was a summary calculation of data from two machines.

Finally, I would like to thank everyone who read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software Testing Interview Document

We must study to find a high-paying job. The following interview questions are from the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.
 

Insert image description here

Guess you like

Origin blog.csdn.net/IT_LanTian/article/details/134881961