Implementation method for carrying out real test on system test environment based on real production flow
By copying and processing traffic requests in the production environment and forwarding them to the test environment system for real testing, it solves the problem that traditional system testing methods are difficult to reflect various situations in the actual operation of the system, and improves the reliability of the system and the decision-making ability of the operation and maintenance team.
Patent Information
- Application Number
- CN202510305689.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional system testing methods are difficult to fully reflect the various situations that the system may encounter in actual operation, especially in a production environment with high concurrency and large data volume, which is difficult to fully expose performance bottlenecks, resource competition, and exception handling capabilities.
By copying traffic requests in the production environment, filtering and replacing sensitive information of requested traffic, traffic amplification and reduction processing is performed according to the user's configuration requirements, and forwarding it to the test environment system for real testing.
It improves the reliability of the system and provides valuable reference information for the operation and maintenance team, helps them better plan resources, adjust configuration, ensures the smooth operation of the production environment, and can effectively prevent and respond before problems occur.
Smart Images

Figure CN120144470A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of system testing, and specifically relates to a method for implementing real testing on a system test environment based on real production traffic. Background Art
[0002] In today's rapidly developing information technology era, software systems have become the core support for enterprise operations. With the wide application of technologies such as cloud computing, big data, and artificial intelligence, the complexity and scale of software systems have been continuously increasing, and their performance, stability, and security have a more significant impact on business continuity and user experience. Therefore, ensuring that software systems can operate stably and efficiently in the actual production environment has become an important challenge for software development and operation and maintenance teams.
[0003] Traditional system testing methods usually rely on predefined test cases and simulated data. Although these methods can discover system defects and problems to a certain extent, they often have difficulty fully reflecting various situations that the system may encounter during actual operation. Especially in a production environment with high concurrency and large amounts of data, problems such as system performance bottlenecks, resource competition, and exception handling capabilities are usually difficult to fully expose through traditional testing methods.
[0004] Existing technical solutions include:
[0005] Simulation stress testing strategy: Software system simulation stress testing (stress testing) is an important means to evaluate the performance and stability of a system under high-load conditions. It observes system response time, throughput, resource utilization, and other indicators by simulating a large number of users accessing the system simultaneously, so as to discover potential performance bottlenecks or failure points.
[0006] According to business requirements and system characteristics, it is crucial to design representative test scenarios. These scenarios should cover the main functions and performance indicators of the system and consider different user behaviors and load conditions. To implement these scenarios, automated testing tools (such as JMeter, LoadRunner, etc.) are needed to write test scripts. The scripts should include operations such as login, query, and submission, and set appropriate concurrent user numbers and request frequencies. When writing the scripts, attention should be paid to the logic and maintainability of the scripts to facilitate adjustment and optimization in subsequent tests.
[0007] Performing stress testing in a prepared test environment is the core part of stress testing. By monitoring various performance indicators of the system, the load can be gradually increased and the performance of the system under different loads can be observed. This process helps to identify performance bottlenecks or failure points. Analyzing the collected data is a key step in evaluating the performance and stability of the system. By focusing on key indicators such as response time, throughput, and error rate, potential problems and improvement directions can be identified. Based on the test results, optimizing and adjusting the system is a necessary measure to improve the performance and stability of the system.
[0008] Disadvantages of the simulated stress testing strategy:
[0009] Since there may be differences between the test environment and the actual production environment, the test results may not fully reflect the performance of the system during actual operation. This means that a system that performs well in the test environment may encounter various problems and challenges in the production environment.
[0010] The design of the test scenario may not cover all user behaviors and load conditions, resulting in incomplete test results. In actual use, user behaviors are diverse and difficult to predict, while test scenarios often only cover a part of them. For example, some users may perform some atypical operations, or use the system under certain specific circumstances, which may not be fully considered during the test phase. In addition, the load conditions may change due to changes in the number of users and usage frequency, and these factors may all lead to limitations in the test results.
[0011] In actual use, user behaviors are diverse and difficult to predict. Different users may have different usage habits and requirements, and they may perform various operations, which may not be fully considered during the test phase. For example, some users may perform certain operations frequently, while others may perform these operations occasionally. This uncertainty makes it difficult for the test results to fully reflect the performance of the system during actual use.
[0012] The load conditions may also change due to changes in the number of users and usage frequency. During the test phase, the load of the system is usually designed based on a certain number of users and usage frequency. However, in actual use, the number of users and usage frequency may change, which may lead to an increase or decrease in the system load. If the system has not been fully tested under high load conditions, performance bottlenecks or other problems may occur during actual use.
[0013] Due to the differences between the test environment and the actual production environment, the limitations of the test scenario, and the uncertainty of user behaviors and load conditions, the test results may not fully reflect the performance of the system during actual operation. Summary of the Invention
[0014] In view of the above problems, the present invention is proposed to provide an implementation method for real testing of a system test environment based on real production traffic, which overcomes the above problems or at least partially solves the above problems.
[0015] To achieve the above object, the present invention adopts the following technical solutions:
[0016] An implementation method for real testing of a system test environment based on real production traffic, the method comprising:
[0017] S1. Copy the traffic requests in the production environment;
[0018] S2. Filter and replace the sensitive information in the request traffic, and at the same time perform amplification and reduction processing on the traffic according to the configuration requirements of the users, and forward it to the test environment system;
[0019] S3. After receiving the forwarded traffic, the test environment system observes the operation of the test environment system based on different test scenarios and gives early warnings for the production environment.
[0020] Optionally, in step S1, the mirror copy technology is adopted to copy the traffic requests in the production environment.
[0021] Optionally, step S1 includes:
[0022] S101. Plan and configure the mirror copy rules;
[0023] S102. Start the mirror copy and forward the transfer machine.
[0024] Optionally, step S2 includes:
[0025] S201. Identify and mask the sensitive information, and replace the sensitive information with the preset test desensitization information to avoid leaking privacy data in the subsequent test process;
[0026] S202. In the case of high load in the test system, increase the number and frequency of requests to simulate the situation of a large number of users accessing simultaneously, and the reduction processing is used to accurately control and reduce the request volume;
[0027] S203. The processed traffic will be forwarded to the test environment system for further testing and verification.
[0028] Optionally, the sensitive information includes user accounts, passwords, and personal information.
[0029] Optionally, step S3 includes:
[0030] S301. Understand the performance and stability of the test environment system under high load by simulating daily transactions and increasing the traffic load;
[0031] S302. When potential problems are detected, take measures in advance for optimization to avoid system crashes or performance degradation caused by excessive traffic.
[0032] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are as follows:
[0033] 1. The present invention greatly improves the reliability of the system and can also provide valuable reference information for the operation and maintenance team, enabling them to better plan resources and adjust configurations to ensure the stable operation of the production environment. Through careful observation and analysis of the test environment, effective prevention and response can be carried out before problems occur, thus guaranteeing the user experience and business continuity.
[0034] 2. The present invention ensures the authenticity and effectiveness of test data by real-time monitoring and replicating the network traffic of the production environment. The present invention can simulate user behaviors and system loads in the real world, helping the development and operation and maintenance teams to more accurately understand the problems that the system may encounter during actual operation.
[0035] 3. The present invention performs desensitization processing on the captured traffic data, effectively protecting user privacy and sensitive information. At the same time, it provides a function to adjust the traffic size to meet different test requirements, thereby more comprehensively evaluating the performance and stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a schematic flowchart of an implementation method for performing real tests on a system test environment based on real production traffic provided by an embodiment of the present application;
[0037] Figure 2 It is a schematic flowchart of the traffic request replication;
[0038] Figure 3 It is a schematic flowchart of the traffic processing;
[0039] Figure 4 It is a schematic flowchart of the system monitoring. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0041] Please refer to Figures 1-4, this embodiment provides an implementation method for performing real tests on a system test environment based on real production traffic. The method includes:
[0042] S1. Copy the traffic requests in the production environment.
[0043] The core goal of this step is to achieve efficient replication of traffic requests in the production environment. During this process, it is necessary to ensure that the normal business processes and forwarding processing in the production environment are not disturbed, which is the key to ensuring business continuity and stability.
[0044] In step S1, mirror replication technology is adopted to copy the traffic requests in the production environment. These copied requests will then be forwarded to a dedicated transit machine. Such a transit machine usually has powerful processing capabilities and storage capacities for receiving, processing, or analyzing these copied requests. In this way, operations such as monitoring, analyzing, and testing the traffic can be carried out without affecting the production environment, thus providing strong data support for subsequent optimization and improvement.
[0045] Step S1 includes:
[0046] S101. Plan and configure mirror replication rules. Ensure that only the required request information is copied and any unnecessary impact on the production environment is avoided.
[0047] S102. Start mirror replication and forward to the transit machine. It is also necessary to ensure the stability and reliability of the transit machine to prevent data loss or errors caused by transit machine failures. Therefore, this step is a crucial part of the entire process and requires high attention and careful operation.
[0048] S2. Filter and replace sensitive information in the request traffic, and at the same time perform traffic amplification and reduction processing according to the configuration requirements of the users, and then forward it to the test environment system.
[0049] When deploying the transit machine, its core function is to process traffic. This processing application will first filter and replace sensitive information in the request traffic to ensure data security and privacy.
[0050] Step S2 includes:
[0051] S201. Identify and mask sensitive information, and replace the sensitive information with preset test desensitization information to avoid leakage of private data during subsequent testing. The sensitive information includes user accounts, passwords, and personal information.
[0052] S202. When the test system is under high load, increase the number and frequency of requests to simulate the situation of a large number of users accessing simultaneously. The throttling is used to precisely control and reduce the request volume. It is usually used for detailed performance analysis and debugging of the system. Whether it is amplification or throttling, this flexible traffic regulation mechanism enables the test environment to be closer to the actual application scenario, thus obtaining more accurate test results.
[0053] S203. The processed traffic will be forwarded to the test environment system for further testing and verification.
[0054] This step ensures that various situations that may occur in the real environment can be fully rehearsed and response plans can be designed. For example, the anti-attack ability of the system can be tested by simulating malicious attack traffic, or the scalability and stability of the system can be tested by simulating peak traffic. In this way, it can ensure that the traffic can be flexibly processed and scheduled without affecting the stability of the existing system.
[0055] S3. After receiving the forwarded traffic, the test environment system observes the operation of the test environment system based on different test scenarios and gives early warnings for the production environment.
[0056] After receiving the forwarded test traffic, the test environment can observe the operation of the system based on different test scenarios. For example, in the daily transaction scenario, the way of amplifying the traffic by 150% can be adopted to observe the pressure-bearing capacity of the test environment in advance, and then give early warnings for the production environment.
[0057] Step S3 includes:
[0058] S301. By simulating daily transactions and increasing the traffic load, it is used to understand the performance and stability of the test environment system under high load. This helps to discover potential problems and ensure that the system can operate stably when encountering large traffic in the real production environment.
[0059] S302. When potential problems are found, take measures in advance to optimize and avoid system crashes or performance degradation caused by excessive traffic.
[0060] This test method not only helps to improve the reliability of the system, but also provides valuable reference information for the operation and maintenance team, enabling them to better plan resources and adjust configurations to ensure the smooth operation of the production environment. Through careful observation and analysis of the test environment, effective prevention and response can be carried out before problems occur, thus guaranteeing the user experience and business continuity.
[0061] This embodiment greatly improves the reliability of the system and can also provide valuable reference information for the operation and maintenance team, enabling them to better plan resources and adjust configurations to ensure the stable operation of the production environment. Through careful observation and analysis of the test environment, effective prevention and response can be carried out before problems occur, thus guaranteeing the user experience and business continuity.
[0062] This embodiment ensures the authenticity and effectiveness of test data by real-time monitoring and replicating the network traffic of the production environment. This embodiment can simulate user behaviors and system loads in the real world, helping the development and operation and maintenance teams to more accurately understand the problems that the system may encounter during actual operation.
[0063] This embodiment performs desensitization processing on the captured traffic data, effectively protecting user privacy and sensitive information. At the same time, it provides a function to adjust the traffic size to meet different test requirements, so as to more comprehensively evaluate the performance and stability of the system.
[0064] The above content is a further detailed description of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for implementing a real test on a system test environment based on real production traffic, characterized in that: The method comprises: S1. Duplicate the traffic requests of the production environment; S2: Filter and replace sensitive information in the request traffic, amplify and reduce the traffic according to the configuration requirements of the user, and forward it to the test environment system; S3. After receiving the forwarded traffic, the test environment system observes the operation of the test environment system based on different test scenarios and provides early warning for the production environment.
2. A method for implementing a real test on a system test environment based on real production traffic as claimed in claim 1, characterized in that: In step S1, the traffic request of the production environment is replicated using the mirror replication technology.
3. A method for implementing a real test on a system test environment based on real production traffic as claimed in claim 1, characterized in that: Step S1 includes: S101, planning and configuring mirror replication rules; S102, start mirror copy and forward the transit machine.
4. A method for implementing a real test on a system test environment based on real production traffic as claimed in claim 1, characterized in that: Step S2 includes: S201, identifying and shielding sensitive information, and replacing the sensitive information with preset test desensitized information to avoid leakage of private data in subsequent testing processes; S202, when the test system is under high load, the number and frequency of requests are increased to simulate a situation where a large number of users access the system simultaneously, and the reduction process is used to accurately control and reduce the number of requests; S203. The processed traffic will be forwarded to the test environment system for further testing and verification.
5. A method for implementing real testing of a system test environment based on real production traffic as claimed in claim 4, characterized in that: The sensitive information includes user account, password and personal information.
6. A method for implementing real testing of a system test environment based on real production traffic as claimed in claim 1, characterized in that: Step S3 includes: S301. By simulating daily transactions and increasing traffic load, the performance and stability of the test environment system under high load conditions can be understood; S302: When a potential problem is discovered, take measures to optimize the system in advance to avoid system crash or performance degradation due to excessive traffic.