In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to develop performance tests". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to develop performance tests.
Test purpose
Starting from the goal, performance testing can be divided into several categories:
1. Test performance parameters to help designers make decisions.
two。 Detect performance weaknesses and enhance hardware configuration pertinently.
3. Conduct tests, monitor product processes or method functions that affect performance, and optimize software performance.
4. Conduct a high-voltage test to see if there is a problem with the product under a high concurrent load and a single high-capacity load.
5. Develop performance indicators and run continuously for a certain period of time to verify the stability and reliability of the system in the preset production scene.
6. Ensure that the performance of the product can meet the predetermined production scene
The most basic performance testing generally aims at the last point, that is, to ensure that the performance of the product can meet the predetermined production scenario. Take this as an example to develop a performance test plan.
Test background
The test background refers to the business background of the product, analyze the business background, and get the business that needs to be tested, so as to determine the test scope.
There is only one goal for testing background analysis-to find out the scenarios where the request is most stressful.
The request pressure in a scenario is affected by three metrics: the number of requests, the length of operation, and the number of requests per capita. The value of the test metrics depends on the test background.
For example: test indicators of marketing activities
Estimate the number of customers of the activity, calculate the number of interface requests required by the customer from carrying out the activity to confirming the results of the activity, and simulate the operation time of the customer.
Number of customers * number of activity requests / duration of operation = average QPS
Average QPS * 2 = QPS peak
Note: * 2 as an example, the actual QPS peak is not necessarily twice the average QPS.
Test range
The data dimensions checked during the test, including response time, server CPU, memory usage, etc.
The estimated scenario index may not be correct, and the performance test needs more data to refer to. During the performance test, the CPU and memory utilization of the service should be monitored and monitored.
The method is also simple, such as the top-b command to monitor the performance of the linux system and output logs, and Perfmon can monitor the Windows system.
Disrelish troublesome, randomly set a performance index of the personnel will begin to test the personnel, more need to pay attention to the performance of the server, understand the load of the server in this case.
Testing strategy
Testing strategy, that is, how to conduct performance testing, you need to determine the performance testing tools used and test the scenarios simulated by the script.
The introduction of performance testing tools on the Internet is very detailed, no longer explain, the strategy of test scripts say several more common strategies
1. Concurrent testing: a certain number of requests are concurrent at the same time, which is used when there is a clear concurrency target. It is recommended that the number of concurrency is the target number of concurrency * 1.5.
two。 Load testing: increasing requests to see the performance status of different loads, the need to correlate the load and server performance, there is a certain amount of data processing.
3. Stability testing: continuous testing for a period of time under a certain load, and stability testing is recommended for products that deal with business continuously for a long time.
Different testing strategies focus on different directions, collect different types of data, and choose the strategy according to the purpose of the test.
Test resources
The performance test results are closely related to the hardware configuration, so it is necessary to confirm the resources for testing before testing.
1. Server hardware resources
two。 Server network resources
3. Hardware resources of testing machine
4. Tester network resources
Test entry condition
In order to improve the efficiency of performance testing and avoid invalid testing, there should be reasonable test entry conditions.
Functional test completed
There is not much significance in the case that the function is not complete enough, the improvement of the function will have an impact on the performance of the system, and entering the performance test too early will lead to inaccurate test results, waste of test resources and so on.
Prepare test data
The test results will be different under different amounts of data, and you need to prepare the data needed for the test.
Test exit condition
To avoid indefinite postponement and testing, there should be exact exit conditions.
Exit successfully
After the acquisition of the target data, exit the performance test.
Fail to exit
The system has a large number of errors or the test is not as expected, exit the performance test.
Test timing
If the server is a CVM or the test environment is a production environment, you need to set the test time.
If the server is a CVM, the host usage of other users will affect the server, and the performance test needs to be carried out at a predetermined time.
Since the test environment is a production environment, we need to be careful not to let performance testing affect the conduct of online business.
At this point, I believe you have a deeper understanding of "how to develop performance testing". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.