Summary of test veterans, common test defects in performance testing, roll out advanced breakthrough test circle...


foreword

Performance testing is the process of analyzing and testing software response time, processing speed, fault tolerance, etc. in combination with the application architecture, business scenarios, implementation details, and logic of the system under test, finding the performance bottleneck of the system, and confirming that the problem has been solved.

Classification of performance testing defects:

Hardware: disk space; CPU; IO read/write rate; memory
Network: bandwidth; network fluctuation; CDN; delay; packet loss
Application: JVM; code logic
Configuration: JDK version; underlying configuration; parameter configuration
Database: index; lock; table Space; slow SQL; data volume
Middleware: timeout; thread pool; caching strategy; maximum number of connections; communication implementation; load balancing

Let's analyze it in detail next

1. Hardware

Disk space: Insufficient disk space causes the system to run slowly, and files, logs, etc. cannot be generated and stored, resulting in performance bottlenecks;

CPU: The core function of the CPU is to interpret computer instructions and process data, and its performance is mainly reflected in the speed at which it runs programs. The performance indicators that affect the running speed include parameters such as operating frequency, Cache capacity, instruction system and logical structure;

IO read and write rate: input and output, input and output, mainly considering the read and write speed during data processing, page exchange, etc.;

Memory: All programs run in memory, which is used to temporarily store computing data in the CPU and exchange data with external memory. Insufficient memory will limit the data processing speed of the program, so this is also very important a performance concern;

2. Network

Bandwidth: In the case of high concurrency, if the bandwidth is insufficient, it may cause network resource competition, timeout, etc.;
network fluctuation: This is described from the stability of the network, that is, the performance test environment requires a stable network environment;

CDN: content distribution service, sometimes different CDN strategies will also affect the system performance perceived by "users";

Delay: The greater the delay value, the greater the impact on system performance (such as fighting PVP games), and the results of performance tests also have greater deviations;

Packet loss: data is transmitted on the network in the form of data packets, if the packet is lost, it may cause an error or abnormal situation;

3. Application

JVM:
Heap memory allocation: perform reasonable heap memory allocation according to the system hardware conditions. Generally speaking, the heap memory allocation of JVM should not exceed 25% of the system memory;

Garbage collection algorithm: JAVA's dynamic garbage collection mechanism is based on several different collection algorithms. According to the specific situation, choose the appropriate garbage collection strategy;

OOM: memory overflow (out of memory), this is a very common problem in performance testing, usually caused by memory leaks caused by code problems, GC is not thorough enough, memory is exhausted;

Code logic:
Common situations include unreasonable thread references and memory allocation;

4. Configuration

Version: In the process of performance testing, it is necessary to ensure that the version of the system under test is consistent with the actual production, otherwise some differences due to different versions may cause great deviation and impact on performance testing;

Low-level configuration: some unreasonable configuration methods involving operating systems, servers and other hardware, resulting in performance bottlenecks;

Parameter configuration: In system architecture design, performance bottlenecks caused by different parameter configurations;

5. Database

Index: The existence of the index is like a label directory, which provides faster execution efficiency when performing database operations, and reduces disk IO operations and database system time for execution;

Lock: In order to ensure the atomicity and isolation of transactions, there are locks, but sometimes table locks caused by some reasons are also a manifestation of performance bottlenecks;

Table space: database performance problems caused by unreasonable table space design;

Slow SQL: Slow SQL will lead to longer database operation time, increase IO read and write, and cause resource competition in some columns. The common reasons for slow SQL are as follows (take MySQL as an example):

Please add a picture description

Data volume: For the same table, 1W pieces of data and 1000W pieces of data have different performance when operating on it. Therefore, the correctness and availability of data and the amount of data also need to be focused on during performance testing. ;

6. Middleware

Timeout: It is necessary to set a reasonable request or response timeout period. This should be considered according to the specific business scenario and system architecture. For the specific timeout period, it is recommended to set the configuration test;

Thread pool: The previous blog introduced the relevant information of the thread pool. If the thread pool configuration is too small, it is easy to be used up. If it is too large, it will waste resources. A reasonable thread pool is recommended to be determined by configuration testing;

Caching strategy: The advantage of caching is to reduce the transmission time during the request response process, but sometimes in high concurrency situations, the cache is easily invalidated and causes cache penetration, which instantly puts a lot of pressure on the server;

Maximum number of connections: Regarding the number of connections, the previous blog also introduced that a reasonable configuration of the number of connections is very important, otherwise too few connections will easily lead to queue waiting and timeout, and too many connections will waste system resources;

Communication implementation methods: synchronous (sync) and asynchronous (Async);

Load balancing strategy: Many systems now have service clusters, followed by the realization of load balancing strategies. If the load balancing is not "balanced", under the impact of a large number, it is easy to cause some services to be abnormal or hang up. rise;

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)

On the road of life, there is no shortcut, only down-to-earth, one step at a time. Persevere and forge ahead, and you will find that the process of struggle is the best harvest.

Everything will pass, only your fighting spirit will last forever. Abandon impetuousness, persevere in tempering, face up to difficulties, climb the peak bravely, and move forward unyieldingly towards the dream. Believe in yourself, you can do it!

Life is like a marathon, it's not who runs the fastest, but who can last till the end. Every step requires endurance and perseverance, keep moving forward, keep surpassing yourself, and go forward bravely, in order to reap your own glory.

Guess you like

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