Home > Article > Operation and Maintenance > Web performance test example design analysis
First of all, why perform performance testing?
Poorly performing applications often fail to achieve the expected benefits of the enterprise, costing a lot of time and money, but lose credibility among users.
Compared with functional testing and acceptance testing, performance testing is easily overlooked, and the importance is often realized only after performance and scalability issues are encountered after release.
Sharing of performance test cases of a certain website
A certain website provides functions such as downloading, uploading, purchasing, and paying membership templates. It is currently entering the performance testing stage. Through the performance requirements, we can learn that there are mainly the following performance indicators that need to be tested:
● Product page refresh performance
● Product upload performance
● Product download performance
The currently given indicators are:
Delay:
Test item response time jitter notes
Product page refresh <5 seconds<2 Seconds
Product download response time <4 seconds<2 seconds
Throughput:
Numbered item throughput
Perf.T.1 The online status change frequency of all logged-in users is once every 10 minutes
Perf.T.2 Average daily page views 60,000 times
Perf.T.3 Daily downloads 50,000
Perf.T.4 Average daily number of new members 500
Perf.T .5 The peak download volume of the same template is 100 users concurrently downloading
Perf.T.6 The peak download volume of different templates is 150 concurrent users downloading
Capacity:
Numbered item capacity
Perf.C.1 Number of users< ;=1 million
Perf.C.2 Number of active users 10000
Perf.C.3 Total number of template center users<=250,000
Based on the above performance requirements and data, how should we design performance test cases? And what about the scene? (It can be said that the performance requirements given are rubbish and have no value at all, but I have no choice but to do it)
First of all, I don’t care about the performance it requires, I just need to do it in a certain test environment Just perform a stress test on the system and find the critical points of each performance indicator. As for whether the performance indicators are met, just write a test report based on the performance requirements.
Therefore, for these pages that need to be tested for performance, we will do an analysis and how to design the scenario to reflect the performance of the system as accurately as possible:
Let’s talk about the search page first
The search page is based on the target After understanding the project, after searching, all the results that meet the conditions will be traversed and displayed in the front desk. The number displayed on each page is certain, and the excess will be displayed in pages. According to the above description, we can see that the search results are sending all result sets that meet the conditions to the front page. We can ignore the performance consumption of page display. The main pressure comes from data transmission, SQL execution and application. The processing process of the server, so I can design the scenario from two aspects:
a. The virtual users are certain and the search performance is of different database orders of magnitude
How to determine the number of virtual users becomes a key, we can let The customer provides a number of users who visit every day under normal circumstances (if there is no actual data for reference, it can be replaced according to the expected number of users in the product plan). We will use this number of users for testing; let's analyze different database orders of magnitude. If The amount of product data for one year of system operation is 50,000, so we will take 1W, 3W, 5W, 10W, and 20W data according to this value for testing (the specific division method can be determined according to the actual situation. (determined), so for this test goal, we can design 5 scenarios:
Number of virtual users Database order of magnitude Number of concurrent users on the recording page Execution time Thinking time
100 10000 Search page randomly generated for 30 minutes Add thinking time
100 30000 The search page randomly generates 30 minutes to add thinking time
100 50000 The search page randomly generates 30 minutes to add thinking time
100 100000 The search page randomly generates 30 minutes to add thinking time
100 200000 The search page randomly generates 30 minutes minutes to add thinking time
b, a certain database order of magnitude, the search performance under the condition of different numbers of virtual users
We set a regular database data volume, and gradually increase the number of virtual users while the data volume remains unchanged , test the performance of the system under different virtual user pressure
Number of virtual users Database order of magnitude Number of concurrent users on the recording page Execution time Thinking time
50 50000 Search page is randomly generated for 30 minutes Add thinking time
80 50000 Search page is random Generate 30 minutes to add thinking time
100 50000 The search page randomly generates 30 minutes to add thinking time
120 50000 The search page randomly generates 30 minutes to add thinking time
150 50000 The search page randomly generates 30 minutes to add thinking time
ProductUpload
The main factors that affect upload performance are the size of the uploaded file and the number of upload requests, so we design use cases from these two aspects.
a. The number of virtual users is certain, and files of different sizes can be uploaded
Number of virtual users Upload file size Recording page Number of concurrent users Execution time Thinking time
50 100k Upload page randomly generates 30 minutes Cancel thinking time
50 300k The uploaded page randomly generates 30 minutes of canceling thinking time
50 500k The uploaded page randomly generates 30 minutes of canceling thinking time
50 800k The uploaded page randomly generates 30 minutes of canceling thinking time
50 1M The uploaded page randomly generates 30 minutes Minutes cancel thinking time
b. Upload file size is certain, different number of virtual users
Number of virtual users Upload file size Number of concurrent users on recording page Execution time Thinking time
20 300k Upload page randomly generated for 30 minutes Cancel thinking time Time
50 300k upload page randomly generates 30 minutes to cancel thinking time
80 300k upload page randomly generates 30 minutes to cancel thinking time
100 300k The upload page randomly generates a 30-minute cancellation thinking time
Product Download
The main factors that affect download performance are the size of the downloaded file and the number of download requests, so we design use cases from these two aspects
a , the number of virtual users is certain, download files of different sizes
Number of virtual users Download file size Recording page number of concurrent users Execution time Thinking time
50 100k The download page is randomly generated for 30 minutes Cancel thinking time
50 300k download The page randomly generates 30 minutes to cancel thinking time
50 500k The download page randomly generates 30 minutes to cancel thinking time
50 800k The download page randomly generates 30 minutes to cancel thinking time
50 1M The download page randomly generates 30 minutes to cancel thinking time
b. Download file size is certain, different number of virtual users
Number of virtual users Download file size Number of concurrent users on recording page Execution time Thinking time
20 300k download page randomly generates 30 minutes Cancel thinking time
50 The 300k download page randomly generates a 30-minute cancellation time for thinking
80 The 300k download page randomly generates a 30-minute cancellation time for thinking
100 The 300k download page randomly generates a 30-minute cancellation time for thinking
The above is the detailed content of Web performance test example design analysis. For more information, please follow other related articles on the PHP Chinese website!