How to do performance testing? Ultra-detailed performance test-summarization of test strategy, the way for newcomers to advance...


foreword

The original intention of performance testing?

Let's think about a question first: Where does our original intention or demand for performance testing come from?

It may be that online users report that the APP response is too slow, it may be that the financial or cost department reflects that the cost of IT hardware is too high, or it may be that the system cannot handle a certain business operation in a timely and correct manner, resulting in failure to achieve business goals (Q: Double 11 What is the experience when the online system hangs up at zero point).

In terms of classification, these problems all originate from the pain points or demands of users and businesses:

APP response is too slow: find ways to increase processing speed;
hardware costs are too high: find ways to reduce hardware costs;
business goals are not achieved: find ways to improve system stability;

What is the purpose of performance testing?

Before talking about testing strategies, it is necessary to talk about the purpose of performance testing, or what the essence of performance testing is to do and what problems to solve. Only by understanding this point can the following requirements analysis, tool selection, and test strategy formulation be carried out better.

In the actual software development and test delivery process, for test students, in addition to verifying the correctness of functions, the performance of the system is also a very important work content.

A simple understanding is that when users use the services provided by the system, in addition to ensuring that the functions do not go wrong, they must support as many people as possible with the services provided by the system. Functional correctness is the basic disk, and better performance has greater added value.

The software system runs on the server, and the bottom layer of the server is the hardware resources and the network. Looking at Moore's Law from another perspective, the higher the hardware configuration, the better, and in principle it can provide better performance.

Of course, the performance of software also has a lot to do with how it was originally designed and built.

So what is the nature of performance testing?
Find the resource bottleneck of the underlying hardware in the software operating environment;
find the points that affect performance during the software design and construction process;

What does a novice need?

Many online articles or technical columns or technical books tell us many test strategy terms, such as concurrency test/load test/limit test/configuration test/capacity test/surge test/high availability test/fault tolerance recovery test.

These theoretical knowledge are easy to confuse novices, and they don't know what strategy to use in what situation.
Of course, these theories are all right, but there is a huge gap between theory and practice, that is, how to make theory your own theory, which requires a lot of practical thinking and summarization.

Common testing strategies at work

Let’s talk about commonly used testing strategies in actual work scenarios, the most critical of which are two points: how to set script concurrency and test data.

Below are some common examples of work, first introducing the case, and then illustrating the testing strategy.

case name Script Concurrency Strategy/Test Data Strategy Service Configuration/Concurrency Recommended Values
New service launched Gradient increasing pressure/parameterization 4C8G/20-100
Performance optimization verification Gradient increasing pressure/parameterization 4C8G/10-40
Load Balance Verification Gradient increasing pressure/parameterization 4C8G/10-60
Parameter configuration adjustment verification constant concurrency pressure/parameterization 4C8G/fixed value
Business/technical logic adjustment verification constant concurrency pressure/parameterization 4C8G/fixed value

Summary:
In most scenarios, the first pressure test recommends the gradient-increasing method, which makes it easy to find the performance inflection point;
fixed concurrency pressure is only applicable when other conditions remain unchanged and only one influencing factor changes;

Generally, it is recommended to use the gradient first, find the performance inflection point to locate the problem, and then use the fixed concurrency method to verify whether the optimization takes effect;

A separate performance testing environment is very important. If the environment cannot be independent, it is recommended to listen to the request of the leader to test a wave of statistical data and produce a report;

The test data must be parameterized, and the same or the same batch of data must not be used for repeated stress testing (the functional test updates the data, not to mention the performance);

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)

Every effort is an accumulation, and every persistence is a harvest. Only by constantly challenging yourself can you make your life glow with a charming light. Therefore, please fight bravely and believe that you will create a better tomorrow!

As long as you have a dream in your heart, don’t stop moving forward; as long as you don’t give up easily, success will belong to you; you only need to work hard to achieve a brilliant life; as long as you go forward bravely, every day will be more exciting!

Every effort is a milestone to become a better self. Behind every success there are countless attempts and failures, not because of talent. As long as you have dreams and firm beliefs, you can go further and further on the road ahead and make the future more brilliant.

Guess you like

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