What methods can be used for performance testing? 【for example】

1. Load test

Here, load testing refers to the most common performance testing for verifying general performance requirements. Above we mentioned that the most common performance requirements of users are "both running and eating less grass". Therefore, load testing mainly examines the performance of a software system under a given load. We can understand load testing as follows:

(1) Load testing is to observe the performance of the software system under certain conditions from the perspective of the user.

(2) The expected result of the load test is that the user's performance requirements are met. This indicator is generally reflected in response time, transaction capacity, concurrent capacity, resource usage, etc.

2. Stress test

The stress test is to examine the performance of the system under the highest conditions, which can be overloaded transaction volume and the number of concurrent users. Note that this condition is not necessarily the user's performance requirements, and may be much higher than the user's performance requirements. It can be understood that the difference between stress testing and load testing is that the expected result of stress testing is that there is a problem in the system, and what we want to examine is the way the system handles the problem. For example, we expect a system to remain stable under stressful conditions, the processing speed can slow down, but the system cannot crash. Therefore, stress testing is what allows us to identify the weaknesses of the system and how the program will behave under extreme load.

Example: Load testing is concerned with user rules and requirements, while stress testing is concerned with the software system itself.

3. Concurrency testing

Verify the concurrent processing capability of the system. Generally, a large number of concurrent connections are established with the server, and the response time of the client and the performance monitoring of the server are used to judge whether the system has reached the established concurrent capability index. Load testing often uses concurrency to create load. The reason why concurrency testing is proposed separately is that concurrency testing often involves the concurrency capacity of the server and possible problems caused by multi-process/multi-thread coordination and synchronization. This is something that needs special attention and must be tested.

4. Benchmarking

When a new module is added to the software system, a benchmark test is required to judge the impact of the new module on the performance of the entire software system. According to the method of benchmarking, it is necessary to open/close the new module at least once for each test. The performance indicators of the system before the module is closed are marked as a benchmark (Benchmark), and then compared with the system performance indicators in the state of the open module to judge the impact of the module on system performance.

5. Stability test

"The road knows the horsepower", here we are talking about the stability test related to the performance test, that is, whether the test system will have problems after running under a certain load for a long time. Some problems in the software system cannot be exposed all at once, or it takes time to accumulate before they can be measured. Why is such a test needed? Because some software problems will only be exposed after running for a day or a week or even longer. This kind of problem is generally caused by the program occupying resources but not releasing them in time. For example, the problem of memory leaks will gradually become obvious after a period of accumulation, but it is difficult to detect them in the early stage of operation; after the client and server run under load for a period of time, a large number of connection paths have been established, but they cannot Efficient multiplexing or timely release.

6. Resumable testing

Whether the test system can quickly recover from an error state to a normal state. For example, in a system equipped with load balancing, if the main machine is under pressure and cannot work normally, whether the backup machine can quickly take over the load. Recoverability testing is usually done in conjunction with stress testing.

Guess you like

Origin blog.csdn.net/cz_00001/article/details/132214885