Many friends start performance testing with tools, such as popular JMeter, Loadrunner, etc. Familiar with a testing tool helps to have an intuitive understanding of the process, methods and mechanism of performance testing.
We know that no matter what type of test it is, its goals are nothing more than two, one is to prove that the system meets the original definition (Requirement); the other is to find potential problems (Defect) as early as possible and as many as possible. Tools serve to solve specific problems, and their use is relatively simple and controllable. In performance testing, program design is more critical.
Usually, when designing a performance test plan, we will think from the following perspectives. What needs to know is that they are not separated, there will be intersections, and the boundaries are not so obvious.
serial number | name | describe |
---|---|---|
1 | Performance | Under the normal workload of the system, performance indicators meet the originally defined requirements. For example, the response time cannot be exceeded. |
2 | Data capacity | In the foreseeable future, data volume may cause performance bottlenecks. |
3 | Capability Assessment | Unit resources, business time, the system can handle visits . The software and hardware resources that can be used from the test (simulation) environment to the production (real) environment are estimated in proportion. |
4 | pressure test | Verify the performance of the system under over normal load and , and find out where problems are most likely to occur. Based on this, the system performance shortcomings and the ratio of different types of software and hardware resources can be evaluated. |
5 | Fatigue test | imposes a certain amount of load for a long time to verify whether the system will have long-term problems such as memory leaks and network congestion. |
6 | Strength test | The verification system high-intensity and extremely resource-deficient , no crashes, restarts, sharp decline in processing capacity, and data inconsistency and other serious problems. |
When it comes to the design of test scenarios, it is inseparable from business analysis. You can try to answer the following questions:
- How big is the user scale of the system?
- In the foreseeable future, how much data will it reach?
- How much traffic does each business subsystem and functional module need to bear?
- Are there peaks in certain businesses on a specific date or time?
- According to the existing architecture design and resource ratio, where is the possible bottleneck?
In the process of performance test design, it is necessary to gradually clarify and implement the following aspects:
- Determine the number of registered users and simultaneous online users in the test system;
- Derive the number of concurrent virtual users through registration and the number of simultaneous online users;
- If it is uncertain, the number of three users can be calculated at a ratio of one-tenth;
- Select the test interface and determine the amount of access per second that each needs to support;
- Design more than 3 comprehensive business scenarios, including the proportion of each interface request;
- Focus on testing for resource-intensive services, such as file reading and writing, network transmission, AI training, etc.;
- Based on experience to predict where problems are likely to occur, individually design test scenarios;
- Determine the configuration of test parameters such as thinking time, running time, and pressure strategy in each scenario;
- Comprehensive consideration of service environment factors, such as hardware, network, number of (micro)service instances, whether there is load balancing, etc.;
- Determine the test tools and environment, such as the number of pressurized machines, test tool configuration, etc.
Finally, determine the performance indicators that need to be measured in the test, which can include:
- Throughput
- Queries per second (QPS)
- Response time (RT), including average, maximum, minimum, and normally distributed values.
- Request failure rate, timeout rate, business processing error rate
- System indicators, such as CPU, memory, network, etc.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。