performance testing process

1. Preparation

1. System basic function verification

At what stage is performance testing suitable for implementation? The entry point is important! Generally speaking, the performance test will be performed only when the basic function test and verification of the system is completed and the system tends to be stable, otherwise the performance test is meaningless.

2. Test team formation

According to the specific situation of the project, set up a performance test team of several people, of which DBA is essential, and then need one to several system developers (corresponding to front-end, back-end, etc.), as well as performance test designers and analysts, scripts develop

and executors; script developers and executors should have some training before they start working, or they should be staffed by those with relevant experience.

3. Selection of tools

Considering the comprehensive system design, tool cost, and test team skills, to choose a suitable test tool, at least the following points should be satisfied:

①Support the performance test of the web (here, the web system is taken as an example) system, and support the http and https protocols;

②The tool runs on the Windows platform;

③Support monitoring of performance counters of webserver, front-end, and database;

4. Preliminary business scenario analysis

In order to establish an intuitive understanding and analysis of the system performance, the more important and commonly used business scenario modules of the system should be analyzed, and the targeted analysis should be carried out to prepare for the next test plan design.

 

2. Test plan

The most important part of the test planning phase is to analyze user scenarios and determine system performance goals.

1. Analysis of performance testing field

According to the understanding of the project background and business, determine the problem points to be solved in this performance test; whether the test system can meet the needs of actual operation, or what aspects of the current system restrict the performance of the system, or what system factors Lead to

The system can't keep up with the business? Determine the test area, and then analyze specific problems.

2. User scenario analysis and business modeling

According to the analysis of system business, user active time, access frequency, scene interaction and other aspects, organize a business scene table. Of course, it is best to describe the user operation scene and steps in detail to provide a basis for test script development.

3. Determine performance goals

The application areas of this performance test have been determined before, and the next step is to determine the performance goals (indicators) for specific areas of concern; it is necessary to communicate and negotiate with other business departments, and combine the current system response time and other data to determine

In the end, we need to achieve goals such as response time and system resource utilization; for example:

①The response time from the login request to the successful login page cannot exceed 2 seconds;

②The response time of the page submitted for report auditing should not exceed 5 seconds;

③ The response time of file upload and download pages should not exceed 8 seconds;

④ The average CPU usage of the server is less than 70%, and the memory usage is less than 75%;

⑤ The response time of each business system and the usage of server resources in different test environments, the changes of each indicator with the load, etc.;

4. Time to implement the test plan

Preset the start and end time, output, participants, etc. of each sub-module of this performance test.

 

3. Test script design and development

In performance testing, test script design and development occupy a large proportion of time.

1. Test environment design

The goal of this performance test is not only to verify the performance of the system in the actual operating environment, but also to consider whether different hardware configurations will be an important factor restricting system performance! Therefore, in the test environment, multiple different test environments need to be deployed,

Check the performance of the application system on different hardware configurations, and analyze the test results of the system under different configurations to obtain the optimal result (the configuration most suitable for the current system).

The configuration mentioned here is probably the following categories:

①Database server

②Application server

③Load Simulator

④ Software operating environment and platform

The test data in the test environment can be determined according to the operating expectations of the system, such as the business scenario to be tested, how often the data is backed up and transferred, which tables are involved in the business scenario, how to write the data for each operation, how many to write, and how much is needed of

Test data to make the data in the test environment consistent, etc.

When the test data is generated for the first time, it can be exported to local storage, and the data can be imported before each test to maintain consistency.

2. Test scene design

Through communication with business departments and previous user operation habits, determine user operation habits, as well as the number of users in different scenarios, the number of operations, determine test indicators, and performance monitoring.

3. Test case design

After confirming the test scenario, based on the existing operation description of the system, further improve it into a test case description that can be mapped to a script. The general content of the use case is as follows:

Use case number: query form _xxx_x1 (named based on business operation scenarios, simple and easy to understand)

Use case conditions: the user is logged in, has corresponding permissions, etc. . .

Steps:

① Enter the corresponding page. . . . . .

② Query related data. . . . . .

③ Check Export data. . . . . .

④Modify the uploaded data. . . . . .

PS: The operation steps here are just an example, which is described in the system business scenario;

4. Development and use of scripts and auxiliary tools

According to the description of the use case, you can use the tool to record, and then modify it in the recorded script; such as parameterization, association, checkpoint, etc., the final result makes the test script available and can meet the test requirements;

PS: Personally, it is recommended to write scripts as much as possible to realize business operation scenarios, which will greatly improve personal skills; in one sentence: if you can write, never record! ! !

 

4. Test execution and management

At this stage, you only need to deploy the environment, execute the test and record the results according to the previously designed business scenarios, environments and test case scripts.

1. Establish a test environment

According to the test environment that has been designed before, the corresponding environment is deployed, and the operation and maintenance or developers will deploy, check, and carefully adjust it, while keeping the test environment clean and stable, free from external factors.

2. Execute the test script

This is relatively simple. In the deployed test environment, the test scripts we have designed are executed in sequence according to the business scenarios and numbers.

3. Test result record

Depending on the tools used in the test, the results are recorded in different forms; most performance testing tools now provide a relatively complete interface and graphical test results. Of course, for server resource usage, you can use some counters or

A third-party monitoring tool is used to record it, and after the test is performed, the results are sorted and analyzed.

 

Five, test analysis

1. System performance analysis of the test environment

According to the test results (charts, curves, etc.) we recorded before, after calculation, compare with the predetermined performance indicators to determine whether the results we need have been achieved; if not, check the specific bottleneck point, and then according to the bottleneck point precise data,

Carry out specific analysis of specific situations (there are many factors affecting performance, which can be judged and analyzed according to experience and data performance).

2. Analysis of the impact of hardware devices on system performance

Since several different test environments have been designed before, it is possible to analyze the hardware resource usage diagrams of different test environments to determine whether the bottleneck is the database server, application server or other aspects, and then perform targeted optimization and other operations.

3. Analysis of other influencing factors

There are many factors that affect the system performance, which can be analyzed from the scene that the user can feel. Where is slow and where the speed is acceptable, we can analyze it according to the 2\5\8 principle;

As for other influencing factors such as network bandwidth, operation actions, storage pool, thread implementation, server processing mechanism, etc., and specific analysis of specific problems, I will not describe them one by one here.

4. Problems found in the test

During the execution of performance tests, some functional deficiencies or defects may be found, as well as areas that need to be optimized, which is also an advantage of executing multiple tests.

 

Six, performance test mind map

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324897721&siteId=291194637