The whole network is hot, the performance test is from 0 to 1 to analyze the requirements to the detailed explanation of the actual combat, rushing out of the advanced test post...


foreword

1. Formulate the purpose of testing
Performance testing is a rigorous work that requires the cooperation of various teams, including roles such as product, development, operation and maintenance, network, DBA, and testing. Implement performance testing from scratch, and the performance testing process is the most important step.

The purpose of formulating the performance testing process guide is to formulate key technical specifications in the implementation process of performance testing from a technical point of view, to better perform performance testing on the system, and to help performance testers better technically avoid risks after the system goes online.

Evaluate the real capability of the online system, find out the online capability according to the business model to deal with it in advance, and minimize the loss caused by the performance risk after the system goes online.

2. Scope of application
Analyze the very important and key related technologies in the implementation of performance testing, mainly including:

System environment, test indicators, business model, data magnitude, test model, test strategy, test script, tested scenario, service monitoring, bottleneck analysis, optimization verification.

3. Performance testing process
According to the current best practice in the industry, the performance testing process is very detailed and divided into many steps.
As shown below:

Please add a picture description

Considering the difficulty of implementation from scratch, the stage the company is in, the technical construction of the R&D department, and the problems mentioned above, at the very beginning, it is recommended to simplify it to a certain extent for the following reasons:

Acceptance: The more streamlined the process, the faster the acceptance of each team member;
Difficulty of promotion: The streamlined process is easier to promote and adjust faster;
Rapid output: Feedback is generated faster, and performance test output is more timely;
Psychological gap: The lower the expected value, the easier it is to accept the landing result;

Please add a picture description

4. Four stages of the process
Generally speaking, the process of performance testing can be divided into the above four stages, which are the requirement stage, preparation stage, implementation stage and end.

1) Requirements stage
① Putting forward requirements
The performance test must first have a requirement before deciding whether to proceed. The proposer of performance requirements can be development (feeling that a certain interface is slow), or operation and maintenance (capacity evaluation of the service capability of a certain system);

It can also be a tester (analyzed from the requirements review that a certain requirement needs to be tested for performance to avoid risks), or it can be a product (direct performance of online problems & user feedback).

The role of the project leader in the above picture does not necessarily have to be the role of PM in the sense of job title, but such a role is needed to do a good job of middle communication and resource coordination.

②Requirements review
Requirements that have not been reviewed often have many pitfalls! ! !
Only when multiple relevant personnel participate in the review, give opinions from their own perspectives, and reach a consensus through communication, can they decide whether to do it in the future? How to do it? And who will do what!

③Demand research
The demand research stage is mainly to communicate and confirm some necessary information for the implementation of subsequent performance tests in more detail, and to seek an acceptable point of balance in terms of responsibilities, working hours, scheduling, and delivery time.

2) Preparation stage
①Environmental preparation
Whether it is functional testing, automation or performance testing, a suitable environment is always needed for it.

For performance testing, whether it is environment selection (production or performance testing environment) or application for corresponding resources (virtual machine & cloud server & docker), operation and maintenance engineers are generally required to build and configure.

②The
application under test for the application deployment performance test must be stable, without P2 and above defects or a version package that has passed the regression test. Depending on the responsibilities of each company, the application deployment is generally developed and deployed, or the development provides the corresponding code Path, operation and maintenance to pull and deploy.

③ Data preparation
Performance testing has high requirements for data, whether it is data magnitude, accuracy or data diversity.

It is generally divided into the following types of data:
Basic data: the most common preparation method is to use the latest and most complete basic data from the production warehouse as a performance test;

Test data: For example, performance test scenarios need to read and write a large amount of data, and in order to ensure the accuracy of the test results, desensitized data of the same magnitude or at least the growth magnitude of the next year is generally pulled from production;

Parameterized data: When different types of data processing logic are different, it is necessary to improve the coverage of performance test code through the diversification of test data, and parameterization is the most common way;

④Script development
The performance test script needs to be developed, debugged and tested according to the test model after business model transformation and the test strategy adopted.

3)
After completing the preparatory work in the implementation stage, the performance stress test will be carried out (sometimes pressure test warm-up is required). cerebral high concurrent).

①Pressure test execution
In the performance test execution stage, many rounds need to be executed, and the test scripts also need to be constantly adjusted and modified, and continuously improved according to the test results, so as to obtain more accurate test results.

②Service monitoring
It is more appropriate to call this stage APM (Application Performance Management: monitoring and management of application performance and availability).

In a narrow sense, APM refers to the monitoring of application programs, such as application interface performance and error monitoring, distributed call link tracking, and other monitoring information for diagnosis (memory, threads, etc.).

In a broad sense, APM, in addition to monitoring at the application layer, also includes monitoring at the app side, page side, container, server, and other platform components such as middleware containers, databases, and other levels.

③Bottleneck positioning
The purpose of performance testing is to detect whether the system has performance bottlenecks that affect the provision of normal services and to provide capacity evaluation for the launch.

If the system performance does not meet the expected target, it is necessary to analyze the log and monitoring data, locate its performance bottleneck and optimize it accordingly.

④Optimization verification
After discovering the performance bottleneck and modifying the optimization, it is necessary to perform stress testing again to verify whether the problem has been solved and the ability to improve performance. The measurement standard is the business performance index determined in the requirements review and research phase.

4. End stage
The sign of the end of the performance test generally includes the following points:
the test scenarios involved have been tested, all problems found during the test have been repaired and verified, the test results have reached the expected performance indicators, and the online requirements have been met.

①Test report
After meeting the above 4 conditions, it is best to issue a concise but clear test report, explaining the purpose, scope, environmental information, test results, problems of this performance test, and giving the test conclusion.

The way of the test report can be a document, an email, an HTML page, etc., but this link must not be omitted! ! !

②Report review
It is best to let all the roles involved in the work of this performance test participate in the review. If everyone has no objection to the result, the performance test can be regarded as the end.

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

There is no so-called end in life, only the process of constant pursuit. No matter how rough the road ahead is, we must stick to our original aspirations and forge ahead to realize our dreams. Believe in yourself, go forward bravely, and create your own wonderful life!

Life is often full of setbacks and difficulties, but as long as we maintain the motivation and faith to move forward, we will be able to overcome every obstacle. Go forward bravely, continue to struggle, and achieve a more brilliant future!

The road to success is full of bitterness and sweat, but as long as you strengthen your beliefs and persevere in hard work, your dreams will eventually come true. Don't be afraid of failure, believe in yourself, go forward bravely, and meet a better tomorrow!

Guess you like

Origin blog.csdn.net/shuang_waiwai/article/details/130708390