The most complete network, software testing - performance testing interview questions summary (with answers)


foreword

Interview question: What are the performance test indicators? What do they mean?

tps: transaction volume per second, representing the processing capacity of the system, the higher the tps, the better the performance
Response time: the time it takes from sending a request to receiving the system response data, the shorter the response time, the better the performance
Throughput: network The sum of uplink and downlink traffic, throughput is an important indicator for network bottleneck positioning
Error rate: the proportion of system errors during stress testing

Interview question: What is a rendezvous point, and in what scenarios do you need to use a rendezvous point?

The rendezvous point is a mark in the test script. When each virtual user executes to the mark, it will stay at the mark and wait for other virtual users. When the expected concurrency number is reached, all users at the mark will start executing the follow-up at the same time request

The rendezvous will generate instantaneous high concurrency, but it will also reduce the average pressure. Therefore, in the process of stress testing, if there is a business that requires instantaneous high concurrency, you need to use a rendezvous point, such as snap-up, seckill and other businesses

Interview question: Describe your company's performance testing process?

Analyze performance requirements (test the most frequently used scenarios by users) and determine performance indicators (for example: transaction pass rate is 100%, top99% is 5 seconds, maximum concurrency is 2000, CPU and memory are both below 70%);

Make a performance test plan, clarify the test time, test environment and test tools;
write test cases;
build the test environment, prepare test data, write test scripts;
test script optimization: set checkpoints, parameterization, association, rendezvous, transactions, adjustments Thinking time, etc.;
designing test scenarios, running test scripts and monitoring servers;
analyzing test results, collecting relevant log bills for development;
regression testing;
writing test reports.

Interview question: How to determine the maximum load of the system?

Through the load test, the number of users is continuously increased. With the increase of the number of users, various performance indicators will change accordingly. When there is an inflection point, such as: when the number of users reaches a certain order of magnitude, the response time suddenly increases, then this inflection point It is the maximum number of users in the system.

Interview question: In what environment is the performance test performed?

We generally build an independent performance testing environment for testing

Interview question: When is the performance test performed?

After functional testing, perform performance testing when the system is relatively stable

Interview question: How is the number of concurrency determined?

Go online for a period of time first, and make estimates based on collected user access data;
determine according to needs (peak usage, number of logged-in users, response time).

Interview question: How to realize the concurrency of 500 users?

Absolute concurrency: add a rendezvous point after the request corresponding to the script;
relative concurrency: set the thread group to 500 threads.

Interview question: How to judge the bottleneck of the system?

From the analysis of TPS indicators, TPS is the number of transactions processed in a system unit, and observe whether the number of transactions that the system can process per second will also increase as the number of users increases.

Interview question: Under what circumstances should association be made, and how is association done?

When the context of the script is related, the association is used; such as: login token association, adding, deleting, modifying and checking the primary key ID.

Interview question: With the function of verification code, how to do performance testing?

Temporarily block the verification code, and restore it after completing the performance test;
use the universal verification code.

Interview question: How to analyze performance test results?

First look at the transaction pass rate, and then analyze whether the response time, CPU, memory and other indicators meet the requirements. If the result is not credible, analyze the cause of the exception and retest

After confirming that the performance results are credible, if the following problems are found, locate the problems according to the following ideas:

1. Response time is not up to standard: First, check whether the time consumed by the business is mainly in network transmission or server. If it is network, it is necessary to combine the network throughput graph to calculate whether there is a bottleneck in broadband. If there is, consider increasing broadband;

If it does not exist, it may be caused by network instability. If it is a server, it is necessary to check whether the CPU and memory usage of the web server and database server are too high, because too high CPU and memory will definitely cause the response time to be too long;

2. The server CPU indicator is abnormal: remove the corresponding user operation log from the web server and send it to the development location;

3. The database CPU index is abnormal: remove the corresponding date from the database server and send it to the development location;

4. Memory leak: remove the heap data of the memory, analyze which object consumes the most memory, and then send it to the development location;

5. The program runs successfully in a single-user scenario, but fails to run with multiple users, prompting that it cannot connect to the server: the program may be a single-threaded processing mechanism.

Interview question: What are the possible reasons why the tps cannot be suppressed?

Performance bottleneck of the press itself;
network IO bottleneck;
middleware (tomcat/nginx/mysql) connection limit;
Java thread blocking and waiting;
system resource bottleneck (cpu, memory, disk, network, etc.).

Interview question: What performance problems did you encounter in performance testing?

Long response time, low tps, memory overflow, high CPU usage

Interview question: How to design performance scenarios? What are the general performance scenarios?

Basic scenarios include: benchmark test, single transaction test, mixed test, stability test, high availability test, exception test, etc.

Interview question: What is the relationship between the CPU usage of the server and the load?

Usually, the cpu usage rate and the load value are directly proportional, that is, the higher the cpu usage rate, the higher the load value. However, in some special cases, the cpu usage rate is not high, but the load value is high. For example, a system can only use a single core of the CPU to run, and it can occupy 100% of the single core cpu, but from the overall cpu usage Judging by the rate, only a small part is used. With the increase of concurrency, the task queue of the single-core CPU will become longer and longer, resulting in a higher load value.

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)

As long as you have a dream, you must persist. No matter how difficult the road is, you must strengthen your determination and move forward bravely. Time flies, if you give up, you will regret it, but if you keep fighting, you will definitely see the day when you succeed.

life is long so add oil. As long as you are willing to work hard, you can achieve your dreams. Even if the road is bumpy, you must go forward bravely and believe that you will be able to overcome difficulties and go to glory. Do not forget the original intention, forge ahead, every step is a step towards success.

Every effort is the best investment in the future, don't let setbacks defeat your determination, persist and you will see the dawn of success. No matter what difficulties you encounter, you must believe in your own ability and value, and one day your efforts will be directly proportional to your gains.

Guess you like

Origin blog.csdn.net/m0_70102063/article/details/131247116