Stability testing method and device and computer equipment
By obtaining test data of network equipment functional modules in multiple test scenarios, the problem of poor stability test results in the existing technology is solved, and a higher precision and simplified stability test process is achieved.
Patent Information
- Application Number
- CN202411449235.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-17
AI Technical Summary
In the prior art, when conducting stability testing of policy modules in network equipment, the test effect is poor and it is difficult to effectively evaluate the stability of functional modules.
By obtaining the test data of the target function module in multiple different test scenarios, including additional test scenarios and background test scenarios, and conducting stability tests based on these data, the stability test results of the functional module are determined.
It improves the accuracy and effect of stability testing, covers multiple different test scenarios, simplifies the construction and operation of the test environment, and reduces test complexity and errors.
Smart Images

Figure CN119324875A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a stability testing method, device and computer equipment. Background Art
[0002] With the development of communication technology, network equipment is widely used. Among them, the network equipment includes a plurality of different functional modules, so the stability test of each functional module is particularly important for determining the performance of the network equipment.
[0003] Taking the functional module being a policy module as an example, in the related art, the test equipment mainly simulates the background test scenario by sending background test rules to the network equipment, and performs stability test on the policy module in the network equipment under the background test scenario.
[0004] However, in the related art, there is a problem of poor testing effect during the stability test of the policy module. Summary of the invention
[0005] Based on this, it is necessary to provide a stability testing method, device and computer equipment to address the above technical problems, which can improve the stability testing effect during the stability testing of the policy module.
[0006] In a first aspect, an embodiment of the present application provides a stability testing method, the method comprising:
[0007] Acquire functional test data of the target functional module in at least one additional test scenario, and acquire background test data of the target functional module in a background test scenario;
[0008] According to each function test data and background test data, the stability test of the target function module is carried out to determine the stability test result of the target function module.
[0009] The technical solution in the embodiment of the present application obtains functional test data of the target functional module in at least one additional test scenario, and obtains background test data of the target functional module in the background test scenario, and performs a stability test on the target functional module according to each functional test data and the background test data, and determines the stability test result of the target functional module; the above method can obtain test data of the functional module in the network device in multiple different test scenarios. Since different test scenarios better match the actual application scenarios of the functional modules, that is, the test data obtained in different test scenarios are more real, on this basis, the stability test can cover multiple different test scenarios, thereby improving the accuracy of the stability test results, that is, improving the effect of the stability test; at the same time, the above method only requires one test device to realize the stability test of the functional module in the network device, thereby greatly simplifying the difficulty of setting up the test environment and executing the test during the stability test.
[0010] In one of the embodiments, before obtaining background test data of the target functional module in the background test scenario, the method further includes:
[0011] A plurality of background rules and background messages matching the background rules are sent to the network device to which the target functional module belongs, so as to construct a background test scenario.
[0012] The technical solution in the embodiment of the present application can send multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs to construct a background test scenario. This process does not require complicated operations and can simulate the background test scenario only by using the sending operation, thereby reducing the complexity of the background test scenario construction process and further reducing the difficulty of stability testing in diversified test scenarios.
[0013] In one of the embodiments, the at least one additional test scenario includes a first test scenario and a second test scenario; before obtaining functional test data of the target functional module in the at least one additional test scenario, the method further includes:
[0014] Sending multiple additional rules and additional messages matching each additional rule to the network device to which the target functional module belongs to construct a first test scenario;
[0015] The additional rules and the additional messages are adjusted to construct a second test scenario.
[0016] The technical solution in the embodiment of the present application sends multiple additional rules and additional messages matching each additional rule to the network device to which the target functional module belongs to construct a first test scenario, and adjusts each additional rule and each additional message to construct a second test scenario; the above method can dynamically switch different additional test scenarios by adjusting the additional rules and additional messages, thereby diversifying the stability test scenarios and preparing to improve the stability test effect; at the same time, the switching method of different attachment test scenarios in the above method is relatively simple, and does not require the participation of complex algorithms, thereby improving the switching speed of different additional test scenarios.
[0017] In one embodiment, each additional rule and each additional message are adjusted, including:
[0018] The number of each additional rule is increased or decreased, and the number of each additional message is increased or decreased, so as to complete the adjustment of each additional rule and each additional message.
[0019] The technical solution in the embodiment of the present application can increase or decrease the number of each additional rule, and increase or decrease the number of each additional message to complete the adjustment of each additional rule and each additional message. The processing process is relatively simple, so that different additional test scenarios can be quickly constructed to speed up the stability test, and on the basis of a single test scenario (i.e., the background test scenario), a variety of test scenarios are constructed to provide a reliable test environment for subsequent accurate stability testing; at the same time, the above method can simulate the addition and deletion operations of rules and traffic messages in actual scenarios, change the complexity of the test scenario during the stability test, so that the test scenario can be more in line with the actual application scenario of the functional module, improve the consistency of the test environment with the real environment, and prepare for improving the stability test effect.
[0020] In one embodiment, a stability test is performed on a target functional module according to each functional test data and background test data, and a stability test result of the target functional module is determined, including:
[0021] Obtaining functional test results of the target functional module in each additional test scenario according to each functional test data;
[0022] Obtaining background test results of the target functional module in a background test scenario according to the background test data;
[0023] According to the test results of each function and the background test results, the stability test results of the target functional module are determined.
[0024] The technical solution in the embodiment of the present application obtains the functional test results of the target functional module in each additional test scenario according to each functional test data, obtains the background test results of the target functional module in the background test scenario according to the background test data, and determines the stability test results of the target functional module according to each functional test result and the background test result; the above method can obtain the functional test results of the target functional module in each additional test scenario and the background test results of the target functional module in the background test scenario, and jointly determine the stability test results of the target functional module based on each functional test result and the background test result, so that the stability test process is implemented based on a variety of test scenarios, thereby improving the accuracy and reliability of the stability test results. At the same time, the process does not require the participation of complex algorithms, can reduce the amount of data processed by the stability test process, thereby reducing the complexity of the stability test, reducing the errors generated in the stability test process, and greatly improving the correctness of the stability test results.
[0025] In one embodiment, the additional test data in the additional test scenario includes the number of additional message sends, the number of additional hits, and the number of additional message forwards corresponding to each additional rule in the additional test scenario; and the functional test results of the target functional module in each additional test scenario are obtained according to each functional test data, including:
[0026] For any additional test scenario, check whether the number of additional messages sent, the number of additional hits, and the number of additional messages forwarded corresponding to each additional rule in the additional test scenario are all equal;
[0027] If they are equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test pass;
[0028] If they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test failure.
[0029] The technical solution in the embodiment of the present application, for any additional test scenario, detects whether the number of additional message sends, the number of additional hits and the number of additional message forwardings corresponding to each additional rule in the additional test scenario are all equal; if they are equal, it is determined that the functional test result of the target functional module in the additional test scenario is a passed test; if they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is a failed test; the above method can determine the functional test result of the target functional module in the additional test scenario through the relationship between the number of additional message sends, the number of additional hits and the number of additional message forwardings corresponding to each additional rule in the additional test scenario, and the processing process is relatively simple, thereby reducing the complexity of obtaining the functional test results, speeding up the acquisition of the functional test results, and improving the efficiency of obtaining the functional test results.
[0030] In one embodiment, the background test data includes the number of background message delivery, the number of background hits and the number of background message forwarding corresponding to each background rule; and the background test result of the target functional module in the background test scenario is obtained according to the background test data, including:
[0031] Check whether the number of background message delivery, the number of background hits and the number of background message forwarding are all equal;
[0032] If they are equal, the background test result is determined to be a passed test;
[0033] If they are not equal, the background test result is determined to be a test failure.
[0034] The technical solution in the embodiment of the present application detects whether the number of background message sends, the number of background hits and the number of background message forwardings are all equal. If they are equal, the background test result is determined to be a passed test; if they are not equal, the background test result is determined to be a failed test. The above method can determine the background test result of the target functional module in the background test scenario through the relationship between the number of background message sends, the number of background hits and the number of background message forwardings corresponding to each additional rule in the background test scenario. The processing process is relatively simple, thereby reducing the complexity of obtaining the background test results, speeding up the acquisition of the background test results, and improving the efficiency of obtaining the background test results.
[0035] In one embodiment, determining the stability test result of the target functional module according to each functional test result and the background test result includes:
[0036] If all the functional test results and the background test results are passed, the stability test result of the target functional module is determined to be passed;
[0037] Otherwise, it is determined that the stability test result of the target functional module is test failure.
[0038] The technical solution in the embodiment of the present application determines that the stability test result of the target functional module is passed when all functional test results and background test results are passed. This can greatly improve the accuracy and reliability of the stability test result of the target functional module.
[0039] In a second aspect, an embodiment of the present application provides a stability testing device, the device comprising:
[0040] A test data acquisition module, used to acquire functional test data of a target functional module in at least one additional test scenario, and to acquire background test data of a target functional module in a background test scenario;
[0041] The stability test module is used to perform stability test on the target function module according to each function test data and background test data, and determine the stability test result of the target function module.
[0042] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any one of the embodiments of the first aspect when executing the computer program.
[0043] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.
[0044] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.
[0045] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is an application environment diagram of a stability testing method in one embodiment;
[0047] FIG2 is a schematic flow diagram of a stability testing method in one embodiment;
[0048] FIG3 is a schematic flow chart of a stability testing method in another embodiment;
[0049] FIG4 is a schematic flow chart of a stability testing method in another embodiment;
[0050] FIG5 is a schematic flow chart of a stability testing method in another embodiment;
[0051] FIG6 is a schematic flow chart of a stability testing method in another embodiment;
[0052] FIG7 is a schematic flow chart of a stability testing method in another embodiment;
[0053] FIG8 is a structural block diagram of a stability testing device in one embodiment;
[0054] FIG. 9 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] In the field of communication, network equipment is used to interconnect various servers, PCs, application terminals and other nodes to form a dedicated hardware device for information communication networks, and is widely used. Among them, the network equipment includes a plurality of different functional modules, such as CPU, memory, message forwarding module, etc. Taking the functional module as a policy module as an example, the policy module is used to manage rules, and the hit of the rule is the core of the policy module. Once the rule matching has a false hit or a missed hit, the flow message processing may cause irreversible effects, and even cause the problem of network disconnection. Therefore, the stability test of each functional module is particularly important for determining the performance of the network device. In the related art, the test equipment mainly simulates the background test scenario by sending background test rules to the network device, and performs stability test on the policy module in the network device under the background test scenario. However, in the process of performing stability test on the policy module in the related art, there is a problem of poor test effect. Based on this, the embodiment of the present application provides a stability test method, which can improve the stability test effect in the process of performing stability test on the policy module.
[0057] The stability test method provided by the embodiment of the present application can be applied to the application environment diagram shown in Figure 1. The application environment includes a stability test system, and the stability test system can include a test device and a network device to be tested. The test device and the network device are connected by communication, and the communication method can be the Internet, local area network, serial communication or optical fiber connection. Optionally, the above-mentioned test device can be a server, or a computer device, and the specific form of the test device is not limited in this embodiment. Optionally, the computer device can be a personal computer, a desktop computer, a laptop computer and other devices. At the same time, the above-mentioned network device can be a router, a switch, a hub, a bridge, a firewall, a gateway, a network security device, a splitter, etc., and the specific form of the network device is not limited in this embodiment. Among them, Figure 1 is illustrated by taking the test device as a personal computer as an example. The following embodiment introduces the specific process of the stability test method as the execution subject of the stability test method.
[0058] As shown in FIG2 , it is a schematic diagram of a flow chart of a stability testing method provided in an embodiment of the present application, and the method can be implemented by the following steps:
[0059] S100: Acquire functional test data of a target functional module in at least one additional test scenario, and acquire background test data of a target functional module in a background test scenario.
[0060] In practical applications, the above-mentioned target functional module can be any functional module in the network device, and the functional module can be a CPU, a memory or a message forwarding module, etc., but in the embodiment of the present application, the target functional module is taken as an example of a policy module. Among them, each additional test scenario and background test scenario are different, and the target functional module is in an additional test scenario or a background test scenario, which can be understood as placing the network device where the target functional module is located in different network signal strengths, the network device is in a network interruption or network recovery, high concurrent network requests, etc.
[0061] Among them, different additional test scenarios cannot exist at the same time, and at the same time, the background test scenario and any additional test scenario can exist at the same time. In the embodiment of the present application, the test device can control the target functional module to be in different additional test scenarios respectively, so as to obtain the functional test data corresponding to the target functional module in different additional test scenarios respectively.
[0062] In practical applications, another additional test scenario can be obtained by adjusting any additional test scenario. In the embodiment of the present application, the background test scenario is fixed during the test process, and different additional test scenarios are dynamically changed. Therefore, the test data of the target functional module in the additional test scenario can be understood as the test data obtained after the minimum unit functional test (i.e., a single functional test) is performed on the target functional module.
[0063] Optionally, the functional test data may include data such as throughput, response delay, rule hit rate, etc. In the embodiment of the present application, the background test data and the functional test data may be of the same type.
[0064] It should be noted here that in the actual testing process, only after generating functional test data of the target functional module in each additional test scenario can the background test data of the target functional module in the background test scenario be obtained, so as to ensure the accuracy of the obtained background test data.
[0065] Specifically, the testing device can obtain pre-stored functional test data of the target functional module in at least one additional test scenario, as well as background test data of the target functional module in a background test scenario from local, cloud, disk, hard disk and other locations.
[0066] In one embodiment, as shown in FIG. 3 , the step of obtaining functional test data of the target functional module in at least one additional test scenario in S100 above can be implemented in the following manner:
[0067] S110 . When the target functional module is in each additional test scenario, obtain additional test data of the target functional module in each additional test scenario.
[0068] In actual applications, when the target functional module is in the background test scene and in any additional test scene, the additional test data of the target functional module in the current additional test scene can be obtained. Furthermore, the current additional test scene can be switched to the next additional test scene, and correspondingly, the additional test data of the target functional module in the next additional test scene can be obtained, and so on, the additional test data of the target functional module in each additional test scene can be obtained.
[0069] S120: Determine each additional test data as functional test data of a target functional module in at least one additional test scenario.
[0070] Further, the additional test data of the target functional module in the additional test scenario may be determined as the functional test data of the target functional module in the additional test scenario.
[0071] S200: Perform a stability test on a target functional module according to each functional test data and background test data, and determine a stability test result of the target functional module.
[0072] In one implementation, the test device can pre-train an algorithm model, and then input each function test data and background test data into the algorithm model. The algorithm model performs a stability test on the target function module to obtain a stability test result of the target function module.
[0073] In another implementation, the test device may also perform comparison processing, matching processing, analysis processing and / or arithmetic processing on each functional test data and background test data to complete the stability test of the target functional module and obtain the stability test result of the target functional module. Optionally, the arithmetic operation may include at least one of addition operation, multiplication operation, subtraction operation, logarithmic operation, exponential operation, etc.
[0074] The technical solution in the embodiment of the present application obtains functional test data of the target functional module in at least one additional test scenario, and obtains background test data of the target functional module in the background test scenario, and performs a stability test on the target functional module according to each functional test data and the background test data, and determines the stability test result of the target functional module; the above method can obtain test data of the functional module in the network device in multiple different test scenarios. Since different test scenarios better match the actual application scenarios of the functional modules, that is, the test data obtained in different test scenarios are more real, on this basis, the stability test can cover multiple different test scenarios, thereby improving the accuracy of the stability test results, that is, improving the effect of the stability test; at the same time, the above method only requires one test device to realize the stability test of the functional module in the network device, thereby greatly simplifying the difficulty of setting up the test environment and executing the test during the stability test.
[0075] In actual application, before entering the stability test process, a background test scenario must be built first. The process of building the background test scenario is described below. In one embodiment, before executing the step of obtaining background test data of the target functional module in the background test scenario in S100, the method may further include: sending multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs, so as to build a background test scenario.
[0076] In practical applications, the above background rules may be Media Access Control Address (MAC) rules, quintuple rules, Virtual Local Area Network (VLAN) rules, Multi-Protocol Label Switching (MPLS) rules, protocol rules, access control rules, routing rules, quality of service rules, host (HOST) rules, Server Name Indication (SNI) rules, all-inclusive floating rules, etc.
[0077] Optionally, the background message may be a traffic message that matches (or hits) each background rule. The format of the background message may be Virtual Local Area Network (VLAN), Multiprotocol Label Switching (MPLS), Internet Protocol (IP), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), Stream Control Transmission Protocol (SCTP), tunneling protocol, Hypertext Transfer Protocol (HTTP), Hypertext Transfer Protocol Secure (HTTPS), etc. Optionally, the tunneling protocol may be, but is not limited to, IPINIP, GRE, GTP, etc.
[0078] Specifically, the test device can load a pre-built configuration table, select rule types of multiple different test rules from the configuration table to determine the types corresponding to multiple background rules, and then generate multiple background rules according to the types of the multiple background rules and the specific contents of the corresponding parameters of interest in the configuration table, and use a synchronous or asynchronous sending method to send multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs, so as to construct a background test scenario. It should be noted here that the above-mentioned background message can be generated by the test device calling a traffic message generation algorithm library or tool, or it can be obtained by the test device receiving a background message directly sent by an external traffic generator, which is not limited in the embodiments of the present application.
[0079] In an embodiment of the present application, the above configuration table may include a rule type configuration table and a corresponding rule content configuration table. Specifically, the above rule type configuration table may include the names of different rule types and the attention parameters corresponding to each type of rule; correspondingly, the above rule content configuration table may include the specific content of the attention parameters in the rule type configuration table. Exemplarily, the following Table 1 is a rule type configuration table, in which the attention parameter is empty, indicating that the test rule of the corresponding rule type has no relevant parameters.
[0080] Table 1
[0081]
[0082] The background message matching the background rule can be generated by the test device, or obtained by the test device after receiving it from an external traffic generator. In addition, the port through which the test device sends the background rule to the network device and the port through which the background message is sent are both in accordance with the rule action in the background rule, wherein the rule action can include the relevant identifier of the forwarding port of the rule and the traffic message.
[0083] It should be noted here that the number of background rules sent by the test device to the network device can be less than or equal to a preset ratio of the total rule capacity of the network device; the preset ratio can be user-defined or determined based on historical experience, as long as the preset ratio is less than 100% and greater than 0%.
[0084] In an embodiment of the present application, the test device may also store a background operation log corresponding to the background test scenario, and the background operation log may include information such as background rules, the issuance status of background rules, and the type of background rules.
[0085] The technical solution in the embodiment of the present application can send multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs to construct a background test scenario. This process does not require complicated operations and can simulate the background test scenario only by using the sending operation, thereby reducing the complexity of the background test scenario construction process and further reducing the difficulty of stability testing in diversified test scenarios.
[0086] In some scenarios, in order to improve the diversity of test scenarios, increase the complexity of test scenarios, and make the test scenarios more realistic, at least one additional test scenario may be added. The following describes the process of building each additional test scenario. In one embodiment, the at least one additional test scenario includes a first test scenario and a second test scenario; before executing the step of obtaining functional test data of the target functional module in at least one additional test scenario in S100, as shown in FIG4 , the method may further include the following steps:
[0087] S300: Send multiple additional rules and additional messages matching the additional rules to the network device to which the target functional module belongs, so as to construct a first test scenario.
[0088] In practical applications, at least one additional test scenario may include multiple additional test scenarios. This embodiment is described by taking the example that at least one additional test scenario includes two additional test scenarios (ie, a first test scenario and a second test scenario).
[0089] Specifically, the test device can load a pre-built configuration table, select rule types of multiple different test rules from the configuration table to determine them as types corresponding to multiple additional rules, and then generate multiple additional rules based on the types of the multiple additional rules and the specific contents of the corresponding parameters in the configuration table, and use a synchronous or asynchronous sending method to send these multiple additional rules and additional messages matching each additional rule to the network device to construct a first test scenario.
[0090] The number of additional rules sent by the test device to the network device may be less than or equal to the difference between a preset ratio of the total rule capacity of the network device and the number of background rules sent by the test device to the network device.
[0091] It should be noted here that the above-mentioned additional messages can be generated by the test device calling the traffic message generation algorithm library or tool, or can be obtained by the test device receiving the additional message directly sent by the external traffic generator, which is not limited to this embodiment of the present application. Among them, the additional rules can also be MAC rules, quintuple rules, VLAN rules, MPLS rules, protocol rules, HOST rules, access control rules, routing rules, quality of service rules, SNI rules, all-inclusive floating rules, etc., but they are different from the types of background rules. At the same time, the above-mentioned additional messages can be traffic messages that match (or hit) each additional rule. Among them, the format of the additional message can be the same as or different from the format of the background message, which is not limited to this embodiment of the present application.
[0092] The additional messages matching each additional rule may be generated by the test device, or may be obtained by the test device after receiving the message from an external traffic generator. In addition, the port to which the test device sends the additional rule to the network device and the port to which the additional message is sent both comply with the rule action in the additional rule, wherein the rule action may include the relevant identifier of the rule and the forwarding port of the traffic.
[0093] S400: Adjust each additional rule and each additional message to construct a second test scenario.
[0094] In actual applications, an additional test scenario is first constructed, and then, based on the current additional test scenario, the additional rules under the current additional test scenario are switched to other types of test rules, and the corresponding test messages of each test rule are matched to complete the adjustment of each additional rule and each additional message to generate a second test scenario.
[0095] Optionally, the above test rules can also be MAC rules, quintuple rules, VLAN rules, MPLS rules, protocol rules, HOST rules, access control rules, routing rules, quality of service rules, SNI rules, all-inclusive floating rules, etc., but they are different from the types of additional rules and background rules.
[0096] In one implementation, the test device may control the adjustment of each additional rule and each additional message according to a preset adjustment strategy to generate a second test scenario.
[0097] In another implementation, the test device may send an adjustment instruction to the third-party device, instructing the third-party device to adjust each additional rule and each additional message to generate a second test scenario.
[0098] In an embodiment of the present application, the test device may also store an additional operation log corresponding to each additional test scenario, and the additional operation log may include information such as additional rules, the issuance status of additional rules, and the type of additional rules.
[0099] It should be noted here that during the stability test, different additional test scenarios can be switched continuously in a loop within a preset time to obtain additional test data under different additional test scenarios; at the same time, when the preset time is reached, the test device can control to stop sending corresponding traffic packets to the network device, that is, control to stop switching additional test scenarios, and the stability test is about to end. Among them, the preset time can be equal to the loading time of the configuration table, and can also be equal to other customized time.
[0100] In one embodiment, the step of adjusting each additional rule and each additional message in the above S400 may include: increasing or decreasing the number of each additional rule, and increasing or decreasing the number of each additional message, so as to complete the adjustment of each additional rule and each additional message.
[0101] It should be noted here that increasing the number of each additional rule means adding at least one additional test rule on the basis of each additional rule in the first test scenario; naturally, the number of additional messages also increases accordingly.
[0102] Specifically, the implementation method of increasing the number of each additional rule and the number of each additional message can be: after constructing the first test scenario, the test device can load a pre-built configuration table, select a rule type of at least one test rule from the configuration table as the type of the corresponding additional rule, and then generate at least one additional rule according to the type of each additional rule and the specific content of the corresponding focus parameter in the configuration table, and use a synchronous or asynchronous delivery method to send these additional rules and additional messages matching each additional rule to the network device to generate a second test scenario.
[0103] In addition, the reduction in the number of each additional rule and the reduction in the number of each additional message may be achieved by: the test device may send a rule message reduction instruction to the network device, instructing the network device to delete at least one additional rule and the corresponding additional message received in advance.
[0104] This embodiment can increase or decrease the number of each additional rule, and increase or decrease the number of each additional message to complete the adjustment of each additional rule and each additional message. The processing process is relatively simple, so that different additional test scenarios can be quickly constructed to speed up the stability test, and on the basis of a single test scenario (i.e., the background test scenario), a variety of test scenarios are constructed to provide a reliable test environment for subsequent accurate stability testing. At the same time, the above method can simulate the addition and deletion operations of rules and traffic messages in actual scenarios, change the complexity of the test scenario during the stability test, so that the test scenario can be more in line with the actual application scenario of the functional module, improve the consistency of the test environment with the real environment, and prepare for improving the stability test effect.
[0105] The technical solution in the embodiment of the present application sends multiple additional rules and additional messages matching each additional rule to the network device to which the target functional module belongs to construct a first test scenario, and adjusts each additional rule and each additional message to construct a second test scenario; the above method can dynamically switch different additional test scenarios by adjusting the additional rules and additional messages, thereby diversifying the stability test scenarios and preparing to improve the stability test effect; at the same time, the switching method of different attachment test scenarios in the above method is relatively simple, and does not require the participation of complex algorithms, thereby improving the switching speed of different additional test scenarios.
[0106] In one embodiment, as shown in FIG. 5 , the step of performing a stability test on the target functional module according to each functional test data and the background test data in S200 to determine the stability test result of the target functional module can be implemented in the following manner:
[0107] S210 . Obtain functional test results of the target functional module in each additional test scenario according to each functional test data.
[0108] For each additional test scenario, the test device may perform comparison processing, matching processing, analysis processing and / or arithmetic operation processing on the functional test data of the target functional module in the additional test scenario to obtain a functional test result of the target functional module in the additional test scenario. Optionally, the functional test result may indicate that the functional test of the target functional module in the corresponding additional test scenario has passed, or may indicate that the functional test of the target functional module in the corresponding additional test scenario has failed.
[0109] S220. Obtain a background test result of the target functional module in a background test scenario according to the background test data.
[0110] The test device may perform comparison processing, matching processing, analysis processing and / or arithmetic operation processing on the background test data of the target functional module in the background test scenario to obtain a background test result of the target functional module in the background test scenario. Optionally, the background test result may indicate that the background test of the target functional module in the background test scenario has passed, or may indicate that the background test of the target functional module in the background test scenario has failed.
[0111] S230: Determine the stability test result of the target functional module according to the functional test results and the background test results.
[0112] In actual applications, if the test results of the preset proportions of each functional test result and the background test result are passed, it can be determined that the stability test result of the target functional module is passed; otherwise, it can be determined that the stability test result of the target functional module is failed.
[0113] The technical solution in the embodiment of the present application obtains the functional test results of the target functional module in each additional test scenario according to each functional test data, obtains the background test results of the target functional module in the background test scenario according to the background test data, and determines the stability test results of the target functional module according to each functional test result and the background test result; the above method can obtain the functional test results of the target functional module in each additional test scenario and the background test results of the target functional module in the background test scenario, and jointly determine the stability test results of the target functional module based on each functional test result and the background test result, so that the stability test process is implemented based on a variety of test scenarios, thereby improving the accuracy and reliability of the stability test results. At the same time, the process does not require the participation of complex algorithms, can reduce the amount of data processed by the stability test process, thereby reducing the complexity of the stability test, reducing the errors generated in the stability test process, and greatly improving the correctness of the stability test results.
[0114] The following is an explanation of the process of obtaining the functional test results of the target functional module in each additional test scenario according to each functional test data. In one embodiment, the additional test data in the additional test scenario includes the number of additional message sent, the number of additional hits, and the number of additional message forwardings corresponding to each additional rule in the additional test scenario; as shown in FIG6 , the steps in S210 above can be implemented by the following steps:
[0115] S211. For any additional test scenario, detect whether the number of additional message sends, the number of additional hits, and the number of additional message forwards corresponding to each additional rule in the additional test scenario are all equal.
[0116] In actual applications, the test device can respond to the network device login instruction, enter the network device system to output the network device information interface. Furthermore, the user can obtain the additional hit number and additional message forwarding number corresponding to each additional rule in each additional test scenario based on the information displayed on the network device information interface, and input the additional hit number and additional message forwarding number corresponding to each additional rule in each additional test scenario into the test device, instructing the test device to add the additional hit number and additional message forwarding number corresponding to each additional rule in each additional test scenario to the additional operation log for storage.
[0117] Optionally, the number of additional messages sent corresponding to each additional rule in the above-mentioned additional test scenario can be understood as the total number of additional messages sent to the network device in the additional test scenario counted by the test device; the number of additional hits corresponding to each additional rule in the additional test scenario can be understood as the total number of additional rules received by the network device in the additional test scenario; the number of additional message forwardings corresponding to each additional rule in the additional test scenario can be understood as the total number of additional messages forwarded by the network device in the additional test scenario.
[0118] Among them, for any additional test scenario, the test device can obtain the number of additional message sends, the number of additional hits, and the number of additional message forwardings corresponding to each additional rule in the additional test scenario from the additional operation log, and can also respond to the additional test data read instruction corresponding to the additional test scenario to obtain the number of additional message sends, the number of additional hits, and the number of additional message forwardings corresponding to each additional rule in the additional test scenario. Further, the test device can detect whether the number of additional message sends, the number of additional hits, and the number of additional message forwardings corresponding to each additional rule in the additional test scenario are all equal.
[0119] S212: If they are equal, determine that the functional test result of the target functional module in the additional test scenario is a test pass.
[0120] Specifically, if it is detected that the number of additional message sends, the number of additional hits and the number of additional message forwards corresponding to each additional rule in the additional test scenario are all equal, then the functional test result of the target functional module in the additional test scenario is determined to be a passed test.
[0121] S213: If they are not equal, determining that the functional test result of the target functional module in the additional test scenario is a test failure.
[0122] In addition, if it is detected that the number of additional message sent, the number of additional hits and the number of additional message forwarding corresponding to each additional rule in the additional test scenario are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is test failure.
[0123] The technical solution in the embodiment of the present application, for any additional test scenario, detects whether the number of additional message sends, the number of additional hits and the number of additional message forwardings corresponding to each additional rule in the additional test scenario are all equal; if they are equal, it is determined that the functional test result of the target functional module in the additional test scenario is a passed test; if they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is a failed test; the above method can determine the functional test result of the target functional module in the additional test scenario through the relationship between the number of additional message sends, the number of additional hits and the number of additional message forwardings corresponding to each additional rule in the additional test scenario, and the processing process is relatively simple, thereby reducing the complexity of obtaining the functional test results, speeding up the acquisition of the functional test results, and improving the efficiency of obtaining the functional test results.
[0124] The following is an explanation of the process of obtaining the background test result of the target functional module in the background test scenario according to the background test data. In one embodiment, the background test data includes the number of background message issuances, the number of background hits, and the number of background message forwardings corresponding to each background rule; as shown in FIG7 , the steps in S220 above can be implemented in the following manner:
[0125] S221. Check whether the number of background message delivery, the number of background hits and the number of background message forwarding are all equal.
[0126] In actual applications, the test device can respond to the network device login instruction, enter the network device system to output the network device information interface. Furthermore, the user can obtain the background hit number and background message forwarding number corresponding to each background rule in the background test scenario based on the information displayed on the network device information interface, and input the background hit number and background message forwarding number corresponding to each background rule in the background test scenario into the test device, instructing the test device to add the background hit number and background message forwarding number corresponding to each background rule in the background test scenario to the background operation log for storage.
[0127] Optionally, the number of background messages sent corresponding to each background rule in the above-mentioned background test scenario can be understood as the total number of background messages sent to the network device in the background test scenario counted by the test device; the number of background hits corresponding to each background rule in the background test scenario can be understood as the total number of background rules received by the network device in the background test scenario; the number of background message forwardings corresponding to each background rule in the background test scenario can be understood as the total number of background messages transferred out by the network device in the background test scenario.
[0128] In actual application, the test device can obtain the number of background message sent, the number of background hits, and the number of background message forwarding corresponding to each background rule in the background test scenario from the background operation log, and can also respond to the background test data reading instruction corresponding to the background test scenario to obtain the number of background message sent, the number of background hits, and the number of background message forwarding corresponding to each background rule in the background test scenario. Further, the test device can detect whether the number of background message sent, the number of background hits, and the number of background message forwarding are all equal.
[0129] S222: If they are equal, determine that the background test result is a passed test.
[0130] Specifically, if it is detected that the background message sending quantity, background hit quantity and background message forwarding quantity corresponding to each background rule of the target functional module in the background test scenario are all equal, then the background test result of the target functional module in the background test scenario is determined to be passed.
[0131] S223: If they are not equal, determine that the background test result is a test failure.
[0132] In addition, if it is detected that the number of background message sent, the number of background hits and the number of background message forwarding corresponding to each background rule of the target functional module in the background test scenario are not equal, then the background test result of the target functional module in the background test scenario is determined to be test failed.
[0133] The technical solution in the embodiment of the present application detects whether the number of background message sends, the number of background hits and the number of background message forwardings are all equal. If they are equal, the background test result is determined to be a passed test; if they are not equal, the background test result is determined to be a failed test. The above method can determine the background test result of the target functional module in the background test scenario through the relationship between the number of background message sends, the number of background hits and the number of background message forwardings corresponding to each additional rule in the background test scenario. The processing process is relatively simple, thereby reducing the complexity of obtaining the background test results, speeding up the acquisition of the background test results, and improving the efficiency of obtaining the background test results.
[0134] The following is an explanation of the process of determining the stability test result of the target functional module based on the functional test results and the background test results. In one embodiment, the steps in S230 may include:
[0135] If all the functional test results and the background test results are passed, the stability test result of the target functional module is determined to be passed; otherwise, the stability test result of the target functional module is determined to be failed.
[0136] In an embodiment of the present application, the testing device can determine whether each functional test result and background test result are both passed. If they are equal, the stability test result of the target functional module is determined to be passed. Otherwise, the stability test result of the target functional module is determined to be failed.
[0137] The technical solution in the embodiment of the present application determines that the stability test result of the target functional module is passed when all functional test results and background test results are passed. This can greatly improve the accuracy and reliability of the stability test result of the target functional module.
[0138] In one embodiment, the present application also provides a stability testing method, which includes the following process:
[0139] (1) Sending multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs to construct a background test scenario;
[0140] (2) sending a plurality of additional rules and additional messages matching the additional rules to the network device to which the target functional module belongs, so as to construct a first test scenario;
[0141] (3) increasing or decreasing the number of each additional rule and increasing or decreasing the number of each additional message to complete the adjustment of each additional rule and each additional message and construct a second test scenario;
[0142] (4) obtaining functional test data of the target functional module in at least one additional test scenario, and obtaining background test data of the target functional module in a background test scenario;
[0143] (5) For any additional test scenario, check whether the number of additional messages sent, the number of additional hits, and the number of additional messages forwarded corresponding to each additional rule in the additional test scenario are all equal;
[0144] (6) If they are equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test pass; if they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test fail;
[0145] (7) Check whether the number of background message sent, the number of background hits, and the number of background message forwarding corresponding to each background rule in the background test scenario are equal;
[0146] (8) If they are equal, the background test result is determined to be a passed test; if they are not equal, the background test result is determined to be a failed test;
[0147] (9) If all the functional test results and the background test results are passed, the stability test result of the target functional module is determined to be passed; otherwise, the stability test result of the target functional module is determined to be failed.
[0148] The execution process of the above (1) to (9) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0149] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0150] Based on the same inventive concept, the embodiment of the present application also provides a stability testing device for implementing the stability testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more stability testing device embodiments provided below can refer to the limitations on the stability testing method above, and will not be repeated here.
[0151] In one embodiment, FIG8 is a schematic diagram of the structure of a stability testing device in an embodiment of the present application. The stability testing device provided in the embodiment of the present application can be applied to a test device. As shown in FIG8 , the stability testing device in the embodiment of the present application may include: a test data acquisition module 11 and a stability testing module 12, wherein:
[0152] A test data acquisition module 11 is used to acquire functional test data of a target functional module in at least one additional test scenario, and to acquire background test data of a target functional module in a background test scenario;
[0153] The stability testing module 12 is used to perform a stability test on the target functional module according to each functional test data and background test data, and determine the stability test result of the target functional module.
[0154] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0155] In one embodiment, the stability testing device further includes: a first scenario building module, wherein:
[0156] The first scenario construction module is used to send multiple background rules and background messages matching each background rule to the network device to which the target functional module belongs, so as to construct a background test scenario.
[0157] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0158] In one embodiment, the at least one additional test scenario includes a first test scenario and a second test scenario; the stability testing device further includes: a second scenario construction module and a third scenario construction module, wherein:
[0159] A second scenario construction module, used to send a plurality of additional rules and additional messages matching the additional rules to the network device to which the target functional module belongs, so as to construct a first test scenario;
[0160] The third scenario construction module is used to adjust each additional rule and each additional message to construct a second test scenario.
[0161] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0162] In one embodiment, the third scene construction module is specifically used to:
[0163] The number of each additional rule is increased or decreased, and the number of each additional message is increased or decreased, so as to complete the adjustment of each additional rule and each additional message.
[0164] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0165] In one embodiment, the stability testing module 12 includes: a first acquisition unit, a second acquisition unit and a determination unit, wherein:
[0166] A first acquisition unit, configured to obtain, according to each functional test data, a functional test result of a target functional module in each additional test scenario;
[0167] A second acquisition unit, configured to obtain a background test result of a target functional module in a background test scenario according to the background test data;
[0168] The determination unit is used to determine the stability test result of the target functional module according to the test results of each function and the background test result.
[0169] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0170] In one embodiment, the additional test data in the additional test scenario includes the number of additional message delivery, the number of additional hits, and the number of additional message forwarding corresponding to each additional rule in the additional test scenario; the first acquisition unit is specifically used to:
[0171] For any additional test scenario, check whether the number of additional messages sent, the number of additional hits, and the number of additional messages forwarded corresponding to each additional rule in the additional test scenario are all equal;
[0172] If they are equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test pass;
[0173] If they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is a test failure.
[0174] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0175] In one embodiment, the background test data includes the number of background message delivery, the number of background hits and the number of background message forwarding corresponding to each background rule; the second acquisition unit is specifically used for:
[0176] Check whether the number of background message delivery, the number of background hits and the number of background message forwarding are all equal;
[0177] If they are equal, the background test result is determined to be a passed test;
[0178] If they are not equal, the background test result is determined to be a test failure.
[0179] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0180] In one embodiment, the determining unit is specifically configured to:
[0181] If all the functional test results and the background test results are passed, the stability test result of the target functional module is determined to be passed;
[0182] Otherwise, it is determined that the stability test result of the target functional module is test failure.
[0183] The stability testing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned stability testing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0184] For the specific definition of the stability testing device, please refer to the definition of the stability testing method above, which will not be repeated here. Each module in the above stability testing device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0185] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG9 . The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide processing power. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store functional test data of the target functional module in at least one additional test scenario, background test data of the target functional module in the background test scenario, and stability test results of the target functional module. The network interface of the computer device is used to communicate with an external endpoint through a network connection. When the computer program is executed by the processor, a stability testing method is implemented.
[0186] Those skilled in the art will understand that the structure shown in FIG. 9 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0187] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned stability testing method embodiment of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0188] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the stability testing method mentioned above in the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0189] In one embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned stability testing method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0190] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0191] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0192] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A stability testing method, characterized in that: The method comprises: Acquire functional test data of a target functional module in at least one additional test scenario, and acquire background test data of the target functional module in a background test scenario; According to each of the functional test data and the background test data, a stability test is performed on the target functional module to determine a stability test result of the target functional module.
2. The method according to claim 1, characterized in that Before obtaining background test data of the target functional module in a background test scenario, the method further includes: A plurality of background rules and background messages matching the background rules are sent to the network device to which the target functional module belongs, so as to construct the background test scenario.
3. The method according to claim 1 or 2, characterized in that: The at least one additional test scenario includes a first test scenario and a second test scenario; Before obtaining the functional test data of the target functional module in at least one additional test scenario, the method further includes: Sending a plurality of additional rules and additional messages matching each of the additional rules to the network device to which the target functional module belongs, so as to construct the first test scenario; Each of the additional rules and each of the additional messages are adjusted to construct the second test scenario.
4. The method according to claim 3, characterized in that The adjusting of each of the additional rules and each of the additional messages includes: The number of each additional rule is increased or decreased, and the number of each additional message is increased or decreased, so as to complete the adjustment of each additional rule and each additional message.
5. The method according to claim 1 or 2, characterized in that: The step of performing a stability test on the target functional module according to each of the functional test data and the background test data to determine a stability test result of the target functional module includes: Obtaining, according to each of the functional test data, a functional test result of the target functional module in each of the additional test scenarios; Obtaining a background test result of the target functional module in the background test scenario according to the background test data; The stability test result of the target functional module is determined according to each of the functional test results and the background test result.
6. The method according to claim 5, characterized in that The additional test data in the additional test scenario includes the number of additional messages sent, the number of additional hits and the number of additional messages forwarded corresponding to each of the additional rules in the additional test scenario; The obtaining, according to each of the functional test data, a functional test result of the target functional module in each of the additional test scenarios includes: For any additional test scenario, detect whether the number of additional messages sent, the number of additional hits, and the number of additional messages forwarded corresponding to each of the additional rules in the additional test scenario are all equal; If they are equal, determining that the functional test result of the target functional module in the additional test scenario is a test pass; If they are not equal, it is determined that the functional test result of the target functional module in the additional test scenario is test failure.
7. The method according to claim 5, characterized in that The background test data includes the number of background message issuances, the number of background hits, and the number of background message forwardings corresponding to each background rule; the background test result of the target functional module in the background test scenario obtained according to the background test data includes: Detecting whether the number of background message delivery, the number of background hits and the number of background message forwarding are all equal; If they are equal, the background test result is determined to be a passed test; If they are not equal, it is determined that the background test result is a test failure.
8. The method according to claim 5, characterized in that Determining the stability test result of the target functional module according to each of the functional test results and the background test result includes: If the functional test results and the background test results are all test passed, then determining the stability test result of the target functional module is test passed; Otherwise, it is determined that the stability test result of the target functional module is test failure.
9. A stability testing device, characterized in that: The device comprises: A test data acquisition module, used to acquire functional test data of a target functional module in at least one additional test scenario, and to acquire background test data of the target functional module in a background test scenario; The stability testing module is used to perform a stability test on the target functional module according to each of the functional test data and the background test data, and determine a stability test result of the target functional module.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.