1. Load Testing
Here, load testing refers to the most common performance testing that verifies general performance requirements. As we mentioned above, the most common performance requirements of users are, you have to eat less grass ". Therefore, the load test mainly tests the performance of the software system under the specified 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 user's perspective.
(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, concurrency capacity, resource usage, and so on.
2. Stress Testing
Stress testing is used to evaluate the performance of the system under extreme conditions. Extreme conditions can be overload of transaction volume and number of concurrent users. Note that this extreme condition is not necessarily the performance requirement of the user, and may be far higher than the performance requirement of the user. As you can understand, what is different between stress testing and load testing is that the expected results of stress testing are system problems, and what we want to examine is the way the system handles the problems. For example, we expect a system to remain stable under pressure, and the processing speed can be slowed down, but the system cannot crash. Therefore, stress testing allows us to identify system vulnerabilities and how programs run under extreme loads.
For example, load testing is concerned with user rules and requirements, while stress testing is concerned with the software system itself. For their differences, we can use the example of Huashan to describe them more vividly. If you think of Guo Jing as the object to be tested, stress testing is like Guo Jing and Ouyang Feng, who are already in the dark, have no way to beat each other. Guo Jing must be able to cope with the problem and cannot lose his life. The conventional performance test is like the three agreed by Guo Jing and Huang pharmacists and Hong qigong. As long as Guo Jing can pick up two master one hundred strokes respectively, Guo Jing will win. As for the three hundred strokes, it is no longer necessary even if Guo Jing will lose. He only needs to pass the next one hundred moves.
Thoughts
When we conduct software stress testing, we often need to add more concurrent users and transactions than load testing. Why?
3. Concurrent Testing
Verify the system's concurrent processing capability. Generally, a large number of concurrent connections are established with the server. The response time of the client and the performance monitoring of the server are used to determine whether the system has reached the established concurrency capacity indicator. In load testing, concurrency is often used to create loads. The reason why concurrent tests are proposed separately is that concurrent tests often involve the server's concurrent capacity, and problems that may arise from multi-process/multi-thread coordination and synchronization. This must be tested.
4. Benchmark Test
When a new module is added to the software system, a benchmark test is required to determine the performance impact of the new module on the entire software system. According to the benchmark test method, you need to enable or disable the new modules for at least one test. The system performance before the module is disabled is marked as a benchmark (benchmark), and then compared with the system performance indicators when the module is enabled to determine the impact of the module on the system performance.
5. Stability Test
"Lu Yao Zhi Ma", here we want to talk about the stability test related to the performance test, that is, whether the system will encounter problems after running for a long time under a certain load. Some Problems of the software system cannot be exposed at once, or it takes time to accumulate to reach a measurable level. Why is such a test required? Some software problems are exposed only when one day or one week or longer. This problem is generally caused by the inability to release programs in a timely manner because they occupy resources. For example, the memory leakage problem occurs only after a period of accumulation, but is difficult to detect in the initial stage. After the client and server run for a period of time, A large number of connection channels have been established, but they cannot be effectively reused or released in a timely manner.
6. Recoverable Test
Test whether the system can quickly restore from the error status to normal. For example, in a system with Server Load balancer, can the backup machine quickly take over the load after the host is under pressure and cannot work properly. A recoverable test is usually performed in conjunction with a stress test.
Each test has its own space and purpose. When we take over a software project and select which test to perform with limited resources, we should make the selection based on the current software process stage and the characteristics of the project. For example, benchmark testing is required during the integration test, and performance testing is required at each release point of the software product.