From http://se.csai.cn/testtech/201204061634041045.htm
With the rapid development of the online world, the performance of websites becomes increasingly important. websites with poor performance will be discarded by users. Therefore, performance is an important aspect of users' satisfaction with the software system. This article will discuss what is performance and how to test performance.
So what is the performance? performance is the time and resources occupied by specific functions. It can be the overhead of the function or the number of features that run synchronously. Web performance testing is to simulate a large number of user operations to put pressure on the website, and evaluate whether the web system can meet the defined standards under different loads and different configurations. Performance Tests focus more on analyzing and eliminating performance bottlenecks associated with software structures.
Performance is an indicator that every software system must consider. In performance testing, we usually pay attention to the following four aspects of data: 1. load data; 2. Data Traffic; 3. Resource Consumption of the software itself; iv. system usage. Due to the special nature of performance testing, special testing tools (such as LoadRunner, testmanager, and Act) are generally used to simulate multi-user operations, which puts pressure on the systems to be evaluated. Identify system bottlenecks and submit them to developers for correction. Therefore, the purpose of performance testing is to identify system performance bottlenecks and correct problems that need to be corrected.
Developing Web performance testing policies can follow the most important modules and frequently used modules in the system, where the system overhead is the largest (the most complex part of the Code ), perform a test on the most important part for the user. From the overall perspective, we can analyze the potential performance problems, as a web program, whether it is a two-layer or multi-layer system architecture program. The system uses the HTTP protocol (hypertemxtransferprotocol, HTTP) as a "request-response" application protocol, which supports a set of fixed methods such as get, post, put, delete) to transmit data and send commands. In the middle of the process, the client (browser) sends a data operation request to the server, the server receives the command request and processes it, then returns the result to the client, and the client processes the response. In this process, the process of sending requests to process data is generally not a bottleneck of the system performance. In this case, a large number of users operate simultaneously, and sending data requests is the bottleneck of the system. The hardware resources of the system's servers are most likely the bottleneck of the software system. We need to adjust the software and Environment (optimal response time and resources) and confirm the high load and pressure conditions that applications and systems can handle. At this time, the most likely bottleneck of the system hardware is the CPU. For bottlenecks caused by other hardware resources in the system, we can replace and adjust the corresponding hardware resources. Another bottleneck in the system may be that the server sends the processing data to the client. In this process, hardware resources are not likely to be performance limiting factors, most likely because of bandwidth.
In fact, most of the performance problems are caused by unreasonable software architecture or design, rather than coding. If you find that the CPU usage remains high during the performance test and the memory usage is abnormal, when errors are frequently reported, you should promptly submit the analysis results to the developers, let developers check whether there are logical errors such as endless loops in the error links in the code, and check whether the data connection driver used after application Department deployment is incorrect or the code is not updated in time, check whether the database query or other statements are abnormal and interrupt the test. Run the page with the longest response time and verify the result. Analyze possible performance bottlenecks of the system.