System interface voltage measurement method and device, electronic equipment and storage medium
The pressure test task is generated and issued by the side car service control center, and the pressure test of the dependent system interface is used to perform pressure test, which solves the problem of manual processing of downstream interface requests and deep code intrusion of the system interface, and realizes efficient pressure test of the system interface without affecting downstream services.
Patent Information
- Application Number
- CN202510165924.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
AI Technical Summary
Manually handling downstream interface requests has a deep intrusion of code and is likely to affect downstream services.
Through the side car service control center, pressure testing tasks are generated and issued, and simulation data is used to perform pressure testing on the dependent system interface to avoid the actual impact on downstream services.
It implements pressure testing of the system interface without affecting downstream services, simplifies code intrusion and improves testing efficiency.
Smart Images

Figure CN119988173A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network testing technology, and in particular to a system interface stress testing method, device, electronic device and storage medium. Background Art
[0002] Stress testing is a test method to determine the stability of a system. In the traditional sense, it is a test that continuously applies "stress" to the system interface to obtain the maximum service level that the system can provide by determining the bottleneck or unacceptable performance point of a system. It mainly tests the system's tolerance, such as traffic tolerance. When existing stress testing solutions involve multiple systems, in order to prevent the test traffic from affecting the downstream system, the downstream interface requests are generally processed manually.
[0003] However, this method of manually processing downstream interface requests has a deep code invasion and is likely to affect downstream services. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a system interface stress testing method, device, electronic device and storage medium to solve the problem that the manual processing of downstream interface requests has a deep code invasion and is easy to affect downstream services. The specific technical solution is as follows:
[0005] In a first aspect, the present application provides a system interface stress testing method, comprising:
[0006] Determine a stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface;
[0007] Obtaining stress testing data corresponding to the stress testing system interface;
[0008] For each dependent system interface, construct simulation data corresponding to the dependent system interface;
[0009] Generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each of the dependent system interfaces;
[0010] The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the corresponding interface to implement stress testing of the stress testing system interface.
[0011] In a possible implementation, constructing simulation data corresponding to the dependent system interface includes:
[0012] Obtaining the real return data returned by the dependent system interface for the stress testing system interface in historical time;
[0013] Initial data corresponding to the dependent system interface is constructed according to the real returned data, and the initial data is used as the simulation data.
[0014] In a possible implementation, the method further includes:
[0015] Acquire data modification information input by the user for the initial data;
[0016] The initial data is modified using the data modification information to obtain modified data, and the modified data is used as the simulation data.
[0017] In a possible implementation, the method further includes:
[0018] The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the stress testing system interface to implement stress testing on the stress testing system interface.
[0019] In a possible implementation, the method further includes:
[0020] Obtaining a system stress test result of the stress test system interface;
[0021] Determine a corresponding system optimization strategy according to the system stress test result;
[0022] The system where the stress testing system interface is located is optimized according to the system optimization strategy.
[0023] In a possible implementation, determining the stress testing system interface includes:
[0024] Get the system interface collection;
[0025] For each system interface in the system interface set, determining an interface type of the system interface;
[0026] The system interface whose corresponding interface type is the target type is determined as the stress testing system interface.
[0027] In a possible implementation, the method further includes:
[0028] Acquire selection information input by a user for the system interface set;
[0029] The system interface corresponding to the selection information is determined as the stress testing system interface.
[0030] In a second aspect, the present application provides a system interface stress testing device, including:
[0031] A determination module, used to determine a stress testing system interface and a number of dependent system interfaces corresponding to the stress testing system interface;
[0032] An acquisition module, used to acquire stress testing data corresponding to the stress testing system interface;
[0033] A construction module, used for constructing simulation data corresponding to each dependent system interface;
[0034] A generation module, used to generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each of the dependent system interfaces;
[0035] The sending module is used to send the stress testing task to the side car service corresponding to the stress testing service through the side car service control center, and to send the stress testing data and the simulation data corresponding to each of the dependent system interfaces to the side car service of the corresponding interface to realize stress testing of the stress testing system interface.
[0036] In a possible implementation manner, the construction module is specifically used to:
[0037] Obtaining the real return data returned by the dependent system interface for the stress testing system interface in historical time;
[0038] Initial data corresponding to the dependent system interface is constructed according to the real returned data, and the initial data is used as the simulation data.
[0039] In a possible implementation manner, the construction module is further used to:
[0040] Acquire data modification information input by the user for the initial data;
[0041] The initial data is modified using the data modification information to obtain modified data, and the modified data is used as the simulation data.
[0042] In a possible implementation manner, the configuration and delivery module is further used to:
[0043] The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the stress testing system interface to implement stress testing on the stress testing system interface.
[0044] In a possible implementation manner, the device further includes an optimization module, configured to:
[0045] Obtaining a system stress test result of the stress test system interface;
[0046] Determine a corresponding system optimization strategy according to the system stress test result;
[0047] The system where the stress testing system interface is located is optimized according to the system optimization strategy.
[0048] In a possible implementation manner, the determining module is specifically configured to:
[0049] Get the system interface collection;
[0050] For each system interface in the system interface set, determining an interface type of the system interface;
[0051] The system interface whose corresponding interface type is the target type is determined as the stress testing system interface.
[0052] In a possible implementation manner, the determining module is further configured to:
[0053] Acquire selection information input by a user for the system interface set;
[0054] The system interface corresponding to the selection information is determined as the stress testing system interface.
[0055] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0056] Memory, used to store computer programs;
[0057] The processor is used to implement any method step described in the first aspect when executing a program stored in the memory.
[0058] In a fourth aspect, a computer-readable storage medium is provided, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0059] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned system interface stress testing methods.
[0060] Beneficial effects of the embodiments of the present application:
[0061] The embodiment of the present application provides a system interface stress testing method, device, electronic device and storage medium. In the embodiment of the present application, first, determine the stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface, then obtain the stress testing data corresponding to the stress testing system interface, and, for each dependent system interface, construct the simulation data corresponding to the dependent system interface, and then, according to the stress testing system interface, the stress testing data, several dependent system interfaces and the simulation data corresponding to each dependent system interface, generate a stress testing task, and finally, send the stress testing task to the side car service corresponding to the stress testing service through the side car service control center, and send the stress testing data and the simulation data corresponding to each dependent system interface to the side car service of the corresponding interface to realize the stress testing of the stress testing system interface. In this solution, the outflow and inflow of all traffic can be controlled by sideCar (side car service), and simulation data can be added to the dependent system interface, so as to prevent unnecessary impact on the downstream dependent system interface when the stress testing system interface is stressed.
[0062] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0065] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0066] Figure 1 A flowchart of a system interface stress testing method provided in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of a scenario for constructing simulation data according to data modification information input by a user provided in an embodiment of the present application;
[0068] Figure 3A schematic diagram of a scenario in which a sideCar control center sends data to each sideCar provided in an embodiment of the present application;
[0069] Figure 4 The following is a schematic diagram of a scenario in which a stress testing task contains multiple stress testing subtasks.
[0070] Figure 5 A flowchart of another system interface stress testing method provided in an embodiment of the present application;
[0071] Figure 6 A schematic diagram of the structure of a system interface stress testing device provided in an embodiment of the present application;
[0072] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0074] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0075] Figure 1 A flow chart of a system interface stress testing method provided for an embodiment of the present application. This method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or as a single software or software module. It is not specifically limited here.
[0076] like Figure 1 As shown, the method specifically includes:
[0077] Step 101: Determine a stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface.
[0078] A system interface stress testing method provided in an embodiment of the present application can be applied to a sidecar management platform, which includes a sidecar control center and several sidecar services.
[0079] Stress testing system interface refers to the system interface that needs to be stress tested.
[0080] Dependent system interface refers to the downstream service interface corresponding to the stress testing system interface.
[0081] In one embodiment, determining the specific implementation of the stress testing system interface may include the following steps:
[0082] Obtain a system interface set; determine the interface type of each system interface in the system interface set; and determine the system interface whose corresponding interface type is the target type as the stress testing system interface.
[0083] The above system interface set may include system interfaces of all systems managed by the sidecar management platform.
[0084] The above interface types are used to characterize the types of system interfaces, for example, a read interface (an interface for reading data from an external device or data source), a write interface (an interface for writing data to an external device or data target), etc.
[0085] In this solution, the system interface whose interface type is a read interface (ie, a target type) in the platform can be determined as a stress testing system interface. In this way, the stress testing system interface can be intelligently determined according to the interface type.
[0086] Furthermore, in another embodiment, determining the specific implementation of the stress testing system interface may further include the following steps: obtaining selection information input by a user for the system interface set; and determining the system interface corresponding to the selection information as the stress testing system interface.
[0087] In this solution, the system interface specified by the user through the selection information can be determined as the stress testing system interface. In this way, the user can flexibly specify the stress testing system interface according to actual needs.
[0088] Step 102: Obtain stress testing data corresponding to the stress testing system interface.
[0089] The above stress test data refers to the data used to stress test the stress test system interface. In the application, the tester can upload the stress test data of each system interface that needs to be stress tested to the platform in advance, and associate the stress test data with the system interface and store it in the corresponding storage location.
[0090] Based on this, in an embodiment of the present application, after the stress testing system interface is determined, the stress testing data corresponding to the stress testing system interface can be obtained from the corresponding storage location.
[0091] Step 103: For each dependent system interface, construct simulation data corresponding to the dependent system interface.
[0092] The dependent system interface refers to the downstream service interface of the stress testing system interface.
[0093] Simulated data refers to Mock data, which is used to simulate the data of the real data source, that is, to simulate the real data returned by the corresponding dependent system interface to the stress testing system interface, with similar data structure and fields. Constructing Mock data means achieving the purpose of testing by simulating fake data. Mock data can solve problems such as complex business scenarios and unstable dependent modules encountered in the actual testing process.
[0094] In one embodiment, the specific implementation of constructing the simulation data corresponding to the dependent system interface may include the following steps: obtaining the real return data returned by the dependent system interface for the stress testing system interface in historical time; constructing the initial data corresponding to the dependent system interface based on the real return data, and using the initial data as the simulation data.
[0095] Through this solution, simulation data can be constructed based on the real return data returned by the historical system interface, so that the application effect of the simulation data in the stress testing process can be guaranteed.
[0096] In another embodiment, the specific implementation of constructing the simulation data corresponding to the dependent system interface may also include the following steps: obtaining data modification information input by the user for the initial data; using the data modification information to modify the initial data to obtain modified data, and using the modified data as the simulation data.
[0097] Figure 2 The following is a schematic diagram of a scenario in which simulation data is constructed based on the data modification information input by the user. Figure 2 As shown in the figure, serviceA is the stress testing system interface, serviceB is one of the dependent system interfaces, and serviceC is another dependent system interface. Users can modify the initial data constructed based on the real return data to obtain the final simulation data, and send it to the stress testing system interface for stress testing operations.
[0098] Through this solution, users can flexibly set simulation data according to actual needs.
[0099] Step 104: Generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces, and simulation data corresponding to each of the dependent system interfaces.
[0100] Step 105: Send the stress testing task to the side car service corresponding to the stress testing service through the side car service control center, and send the stress testing data and the simulation data corresponding to each of the dependent system interfaces to the side car service of the corresponding interface to implement stress testing on the stress testing system interface.
[0101] For ease of understanding, step 104 and step 105 are described uniformly below:
[0102] In the embodiment of the present application, first, a stress testing task is generated according to the stress testing system interface, stress testing data, several dependent system interfaces and the simulation data corresponding to each dependent system interface, so that the stress testing task contains all the information required in the stress testing process. Then, the sideCar control center sends the stress testing task to the sidecar service corresponding to the stress testing service, sends the stress testing data to the sidecar service corresponding to the stress testing system interface, and, for each dependent system interface, sends the simulation data corresponding to the dependent system interface to its corresponding sidecar service.
[0103] Based on this, the stress testing service can perform stress testing operations on the stress testing system interface according to the stress testing task. The specific process is as follows: the stress testing service instructs the stress testing system interface to process stress testing data, and instructs each dependent system interface to return its corresponding simulation data to the stress testing system interface. In this way, the data processing of the stress testing system interface and the overall process of interface calling are tested.
[0104] In addition, in another embodiment of the present application, the method may further include the following steps: sending the stress testing task to the sidecar service corresponding to the stress testing service through the sidecar service control center, and sending the stress testing data and the simulation data corresponding to each of the dependent system interfaces to the sidecar service of the stress testing system interface to implement stress testing on the stress testing system interface.
[0105] In this embodiment, the sideCar control center sends the stress test data and the simulation data corresponding to each dependent system interface to the sidecar service corresponding to the stress test system interface. In this way, the specific process of the stress test service performing the stress test operation is as follows: the stress test service instructs the stress test system interface to process the stress test data. When the stress test system interface needs to call the dependent system interface to obtain the return data, it directly obtains the simulation data from the data sent by the sideCar control center without actually calling the dependent system interface. In this way, the data sending process and the interface calling process can be simplified.
[0106] Figure 3 The following is a schematic diagram of the scenario in which the sideCar control center sends data to each sideCar. Figure 3 As shown, when the sideCar control center sends the stress testing task to the sideCar corresponding to the stress testing service, it can send the stress testing data to the sideCar corresponding to serviceA (stress testing system interface), send the simulation data corresponding to serviceB (one of the dependent system interfaces) to its corresponding sideCar, and send the simulation data corresponding to serviceC (another dependent system interface) to its corresponding sideCar; it can also send both the stress testing data and the simulation data to the sideCar corresponding to serviceA.
[0107] This application is designed based on the sidecar mode of the existing cloud platform. Since the sidecar naturally forwards the traffic of the application pod, all inbound and outbound requests are controlled by the sidecar. The original cloud platform mainly uses forwarding rules. This application constructs the request results and input parameters of the interface based on the sidecar, obtains the dependent system interface through the control center, and sends the simulated data to the corresponding sidecar service to achieve service stress testing and result mocking.
[0108] In addition, in another embodiment of the present application, a stress testing task may include multiple stress testing sub-tasks, each stress testing sub-task includes a stress testing system interface and a dependent system interface corresponding to the stress testing system interface and corresponding simulation data. Based on this, the stress testing service can process stress testing operations of multiple stress testing system interfaces in parallel.
[0109] Figure 4 The following is a schematic diagram of a scenario in which a stress testing task contains multiple stress testing subtasks. Figure 4 As shown, the stress testing task includes a stress testing subtask for stress testing interface a of stress testing system A and a stress testing subtask for stress testing interface b of stress testing system B.
[0110] Through this solution, the stress testing service can process multiple stress testing subtasks in parallel, thereby improving stress testing efficiency.
[0111] In an embodiment of the present application, first, determine the stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface, then obtain the stress testing data corresponding to the stress testing system interface, and, for each dependent system interface, construct the simulation data corresponding to the dependent system interface, and then, generate a stress testing task based on the stress testing system interface, the stress testing data, several dependent system interfaces and the simulation data corresponding to each dependent system interface, and finally, send the stress testing task to the sidecar service corresponding to the stress testing service through the sidecar service control center, and send the stress testing data and the simulation data corresponding to each dependent system interface to the sidecar service of the corresponding interface to achieve stress testing of the stress testing system interface. In this solution, the outflow and inflow of all traffic can be controlled by sideCar (sidecar service), and simulation data can be added to the dependent system interface, so as to prevent unnecessary impact on the downstream dependent system interface when stress testing the stress testing system interface.
[0112] See also Figure 5 , is a flow chart of another embodiment of a system interface stress testing method provided in an embodiment of the present application. Figure 5 As shown, the process may include the following steps:
[0113] Step 501: Obtain a system stress test result of the stress test system interface;
[0114] Step 502: Determine a corresponding system optimization strategy according to the system stress test result;
[0115] Step 503: Optimize the system where the stress testing system interface is located according to the system optimization strategy.
[0116] For ease of understanding, steps 501 to 503 are described in a unified manner as follows:
[0117] The above system stress test results may include system CPU usage, system interface normal response rate, system interface response time, how much traffic the system can withstand, whether garbage collection is frequently triggered, etc.
[0118] System optimization strategies may include code optimization or optimization of related configurations.
[0119] In a specific example, suppose the system stress test result shows that the system interface response time is too long. At this time, the corresponding system optimization strategy can be: use cache or thread pool to improve the interface response speed. For example, the interface takes a normal time for low-frequency access, but takes a long time for high-frequency access. At this time, code optimization can be based on business logic to see whether there is a dependency relationship between multiple steps in the actual business. If there is no relationship, parallel processing can be used to improve CPU utilization and give full play to the advantages of multi-core CPUs on the server.
[0120] In another specific example, suppose the system stress test result is that garbage collection is frequently triggered. At this time, the corresponding system optimization strategy can be: modify the jvm (Java virtual machine) configuration, reduce the number of garbage collections, and improve system performance. For example, during stress testing, the system frequently triggers jvm GC (Garbage Collection). GC is divided into two types, one is Young GC and the other is Full GC. Young GC refers to garbage collection of the memory area of the new generation (Young Generation). This area mainly stores short-lived objects. The frequency of Young GC is high, but the time is short, and the impact on system performance is small; Full GC refers to garbage collection of the entire heap memory, including the new generation and the old generation (Old Generation). This area mainly stores long-lived objects. The frequency of Full GC is low, but the time is long, and the impact on system performance is large. At this time, the size of the young generation or old generation in the jvm can be adjusted to avoid frequent GC affecting system performance.
[0121] pass Figure 5 The process shown can optimize the system where the stress testing system interface is located according to the system stress testing results, thereby improving service stability and reliability.
[0122] Based on the same technical concept, the embodiment of the present application also provides a system interface stress testing device, such as Figure 6 As shown, the device comprises:
[0123] A determination module 61 is used to determine a stress testing system interface and a number of dependent system interfaces corresponding to the stress testing system interface;
[0124] An acquisition module 62 is used to acquire stress testing data corresponding to the stress testing system interface;
[0125] A construction module 63, for constructing simulation data corresponding to each dependent system interface;
[0126] A generating module 64, configured to generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each dependent system interface;
[0127] The sending module 65 is used to send the stress testing task to the side car service corresponding to the stress testing service through the side car service control center, and send the stress testing data and the simulation data corresponding to each of the dependent system interfaces to the side car service of the corresponding interface to realize stress testing of the stress testing system interface.
[0128] In a possible implementation manner, the construction module is specifically used to:
[0129] Obtaining the real return data returned by the dependent system interface for the stress testing system interface in historical time;
[0130] Initial data corresponding to the dependent system interface is constructed according to the real returned data, and the initial data is used as the simulation data.
[0131] In a possible implementation manner, the construction module is further used to:
[0132] Acquire data modification information input by the user for the initial data;
[0133] The initial data is modified using the data modification information to obtain modified data, and the modified data is used as the simulation data.
[0134] In a possible implementation manner, the configuration and delivery module is further used to:
[0135] The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the stress testing system interface to implement stress testing on the stress testing system interface.
[0136] In a possible implementation manner, the device further includes an optimization module, configured to:
[0137] Obtaining a system stress test result of the stress test system interface;
[0138] Determine a corresponding system optimization strategy according to the system stress test result;
[0139] The system where the stress testing system interface is located is optimized according to the system optimization strategy.
[0140] In a possible implementation manner, the determining module is specifically configured to:
[0141] Get the system interface collection;
[0142] For each system interface in the system interface set, determining an interface type of the system interface;
[0143] The system interface whose corresponding interface type is the target type is determined as the stress testing system interface.
[0144] In a possible implementation manner, the determining module is further configured to:
[0145] Acquire selection information input by a user for the system interface set;
[0146] The system interface corresponding to the selection information is determined as the stress testing system interface.
[0147] Based on the same technical concept, the embodiment of the present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0148] Memory 113, used for storing computer programs;
[0149] The processor 111 is used to execute the program stored in the memory 113 to implement the following steps:
[0150] Determine a stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface;
[0151] Obtaining stress testing data corresponding to the stress testing system interface;
[0152] For each dependent system interface, construct simulation data corresponding to the dependent system interface;
[0153] Generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each of the dependent system interfaces;
[0154] The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the corresponding interface to implement stress testing of the stress testing system interface.
[0155] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0156] The communication interface is used for communication between the above electronic device and other devices.
[0157] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0158] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0159] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned system interface stress testing methods are implemented.
[0160] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any system interface stress testing method in the above embodiments.
[0161] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0163] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0164] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A system interface stress testing method, characterized in that: Applied to the sidecar management platform, the method includes: Determine a stress testing system interface and several dependent system interfaces corresponding to the stress testing system interface; Obtaining stress testing data corresponding to the stress testing system interface; For each dependent system interface, construct simulation data corresponding to the dependent system interface; Generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each of the dependent system interfaces; The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the corresponding interface to implement stress testing of the stress testing system interface.
2. The method according to claim 1, characterized in that The constructing the simulation data corresponding to the dependent system interface includes: Obtaining the real return data returned by the dependent system interface for the stress testing system interface in historical time; Initial data corresponding to the dependent system interface is constructed according to the real returned data, and the initial data is used as the simulation data.
3. The method according to claim 2, characterized in that The method further comprises: Acquire data modification information input by the user for the initial data; The initial data is modified using the data modification information to obtain modified data, and the modified data is used as the simulation data.
4. The method according to claim 1, characterized in that: The method further comprises: The stress testing task is sent to the sidecar service corresponding to the stress testing service through the sidecar service control center, and the stress testing data and the simulation data corresponding to each of the dependent system interfaces are sent to the sidecar service of the stress testing system interface to implement stress testing on the stress testing system interface.
5. The method according to claim 1, characterized in that: The method further comprises: Obtaining a system stress test result of the stress test system interface; Determine a corresponding system optimization strategy according to the system stress test result; The system where the stress testing system interface is located is optimized according to the system optimization strategy.
6. The method according to claim 1, characterized in that The step of determining the pressure measurement system interface includes: Get the system interface collection; For each system interface in the system interface set, determining an interface type of the system interface; The system interface whose corresponding interface type is the target type is determined as the stress testing system interface.
7. The method according to claim 6, characterized in that The method further comprises: Acquire selection information input by a user for the system interface set; The system interface corresponding to the selection information is determined as the stress testing system interface.
8. A system interface stress testing device, characterized in that: The device comprises: A determination module, used to determine a stress testing system interface and a number of dependent system interfaces corresponding to the stress testing system interface; An acquisition module, used to acquire stress testing data corresponding to the stress testing system interface; A construction module, used for constructing simulation data corresponding to each dependent system interface; A generation module, used to generate a stress testing task according to the stress testing system interface, the stress testing data, a plurality of dependent system interfaces and simulation data corresponding to each of the dependent system interfaces; The sending module is used to send the stress testing task to the side car service corresponding to the stress testing service through the side car service control center, and to send the stress testing data and the simulation data corresponding to each of the dependent system interfaces to the side car service of the corresponding interface to realize stress testing of the stress testing system interface.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the system interface stress testing method according to any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the system interface stress testing method according to any one of claims 1 to 7 is implemented.