Abnormal testing method, device and electronic equipment

By automatically injecting abnormal events and monitoring the stability status, the problem of long time and high cost of determining the experimental results of chaos engineering in the prior art is solved, automatic execution and result determination are realized, and experimental costs are reduced.

CN112988494BActive Publication Date: 2025-04-04BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110277415.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-15
Publication Date
2025-04-04
Estimated Expiration
2041-04-04

AI Technical Summary

Technical Problem

In the prior art, determining the results of chaos engineering experiments requires manual execution of processes and judgments, resulting in longer time and higher costs.

Method used

By obtaining the service to be verified and its dependent services and injecting exception events into the dependent services, the stability status of the service to be verified is automatically monitored and the test result information is generated.

Benefits of technology

The automatic execution of the chaotic engineering experimental process and the automatic determination of experimental results are realized, reducing the experimental time and cost and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112988494B_ABST
    Figure CN112988494B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide an abnormality testing method, device and electronic device, the method comprising: obtaining a service to be verified and its corresponding dependent service, and obtaining an abnormal event corresponding to the service to be verified; injecting the abnormal event into the dependent service corresponding to the service to be verified to determine the stability state corresponding to the service to be verified; generating test result information according to the stability state corresponding to the service to be verified, realizing automatic execution of a chaos engineering experiment process, and realizing automatic determination of the experimental results, without the need for manual execution of the experimental process, and manual determination of the experimental results, thereby reducing the time required to determine the experimental results and the time required to conduct chaos engineering experiments, and at the same time reducing labor costs, thereby reducing the experimental costs required for chaos engineering experiments and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to an abnormality testing method, device, and electronic device. Background Art

[0002] Chaos Engineering is the discipline of conducting experiments on distributed systems with the goal of building resilience against out-of-control conditions in production.

[0003] In the prior art, when conducting chaos engineering experiments, relevant personnel generally inject faults into the dependent services corresponding to the service to be verified. After injecting the faults into the dependent services, they observe the stability of the service to be verified and use the stability to determine the experimental results.

[0004] However, since the chaos engineering experiment process needs to be manually executed and the experimental results of the chaos engineering experiment need to be manually determined, it takes a long time to determine the experimental results, resulting in a high experimental cost required for the chaos engineering experiment. Summary of the Invention

[0005] The embodiments of the present disclosure provide an anomaly testing method, device, and electronic device to solve the problem that it takes a long time to determine the experimental results of chaos engineering experiments.

[0006] In a first aspect, an embodiment of the present disclosure provides an abnormality testing method, comprising:

[0007] Obtain the service to be verified and its corresponding dependent services, and obtain the abnormal events corresponding to the service to be verified;

[0008] Injecting the abnormal event into a dependent service corresponding to the service to be verified to determine the stability status corresponding to the service to be verified;

[0009] Generate test result information according to the stability status corresponding to the service to be verified.

[0010] In a second aspect, an embodiment of the present disclosure provides an abnormality testing device, comprising:

[0011] An information acquisition module is used to acquire the service to be verified and its corresponding dependent services, and to acquire abnormal events corresponding to the service to be verified;

[0012] A processing module, configured to inject the abnormal event into a dependent service corresponding to the service to be verified, so as to determine a stability status corresponding to the service to be verified;

[0013] The processing module is further configured to generate test result information according to the stability status corresponding to the service to be verified.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor and a memory.

[0015] The memory stores computer-executable instructions.

[0016] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the abnormality testing method described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the abnormality testing method described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the abnormality testing method described in the first aspect and various possible designs of the first aspect.

[0019] The embodiments of the present disclosure provide an abnormality testing method, device, and electronic device, the method comprising obtaining a service to be verified and its corresponding dependent service, and obtaining an abnormal event corresponding to the service to be verified; injecting the abnormal event into the dependent service corresponding to the service to be verified to determine the stability state corresponding to the service to be verified; and generating test result information based on the stability state corresponding to the service to be verified. The embodiments of the present disclosure determine the service to be verified, i.e., the service to be verified, when performing an abnormality test, i.e., when performing a chaos engineering experiment, and obtain the dependent service corresponding to the service to be verified, i.e., obtain a service associated with the service to be verified, so as to use the service to determine the stability of the service to be verified. After obtaining the dependent service corresponding to the service to be verified, the abnormal event is injected into the dependent service, and the stability changes of the service to be verified are monitored to obtain the stability status corresponding to the service to be verified, realize automatic determination of the stability status, and generate corresponding test result information according to the stability status corresponding to the service to be verified, that is, obtain the experimental results of the chaos engineering experiment, realize automatic execution of the chaos engineering experiment process, and realize automatic determination of the experimental results. There is no need to manually execute the experimental process or manually determine the experimental results, which reduces the time required to determine the experimental results and the time required to conduct chaos engineering experiments. At the same time, it can also reduce labor costs, thereby reducing the experimental costs required for chaos engineering experiments and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 A schematic diagram of a scenario of an abnormality testing method provided in an embodiment of the present disclosure;

[0022] Figure 2 Schematic diagram of the process of the abnormality testing method provided in the embodiment of the present disclosure Figure 1 ;

[0023] Figure 3 A schematic diagram of a service to be verified provided in an embodiment of the present disclosure;

[0024] Figure 4 Schematic diagram of the process of the abnormality testing method provided in the embodiment of the present disclosure Figure 2 ;

[0025] Figure 5 A flowchart of an abnormality testing method provided in an embodiment of the present disclosure;

[0026] Figure 6 A structural block diagram of an abnormality testing device provided in an embodiment of the present disclosure;

[0027] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0029] Existing chaos engineering solutions typically include fault injection testing (FIT) platforms and automated chaos engineering experiment platforms. FIT platforms are the initial stage of chaos engineering.

[0030] In the prior art, when a fault injection testing platform conducts a chaos engineering experiment and injects a fault into a dependent service corresponding to the service to be verified, relevant personnel judge the stability status of the service to be verified by observing the stability indicators of the service to be verified and determine the corresponding results based on this stability status. However, due to the need for manual execution of the experimental process and manual determination of the experimental results, the experiment takes a long time, and the time required to determine the experimental results is also long. At the same time, because services have their own stability observation indicators and are not universal, when there are multiple services to be verified, relevant personnel need to be familiar with the stability observation indicators corresponding to different services to be verified in order to determine the stability status of each service to be verified based on the corresponding stability observation indicators of different services to be verified, making the stability status judgment complicated.

[0031] Therefore, to address the above issues, the technical concept of the present invention is to provide a transitional solution for chaos engineering, enabling the upgrade from a fault injection testing platform to an automated chaos engineering experiment platform. This solution can automatically execute the chaos engineering experiment process, reducing the time required for experiments, and automatically determine experimental results, thereby reducing the time required to determine experimental results and thus reducing the cost of chaos engineering experiments. It also defines a universal stability indicator that can be used to determine the stability status of different services, enabling rapid and accurate determination of the stability status of services.

[0032] Figure 1 A schematic diagram of a scenario of an abnormality testing method provided by an embodiment of the present invention, such as Figure 1 As shown, when a chaos engineering experiment is conducted on a business system based on an electronic device 101, the service to be verified in the business system and the dependent service corresponding to the service to be verified are obtained, and faults are injected into the dependent service to determine the stability of the service to be verified, thereby generating corresponding experimental results based on the stability and outputting the experimental results.

[0033] The electronic device 101 may be a computer device (eg, a desktop computer, a laptop computer, an all-in-one computer, etc.), a server, etc. Specifically, the electronic device 101 is a device included in the chaos engineering experiment platform.

[0034] refer to Figure 2 , Figure 2 Schematic diagram of the abnormality testing method provided in the embodiment of the present disclosure Figure 1 The method of this embodiment can be applied to electronic devices, specifically, to a chaos engineering experimental platform for electronic devices. The abnormality testing method includes:

[0035] S201: Obtain a service to be verified and its corresponding dependent services, and obtain an abnormal event corresponding to the service to be verified.

[0036] In the disclosed embodiments, in order to improve the reliability and stability of a business system, a chaos engineering experiment is conducted on the business system to test whether the system has defects and to determine the performance of the business system under chaotic conditions, thereby improving the business system to improve its reliability and stability. When conducting a chaos engineering experiment on a business system, the experiment is conducted based on the services provided by the business system, that is, the service identifier to be verified corresponding to the business system is determined, and the service corresponding to the service identifier to be verified is the service to be verified, and the dependent service identifier corresponding to the service identifier to be verified is obtained, and the service corresponding to the dependent service identifier is the dependent service corresponding to the service to be verified.

[0037] The service to be verified is the service in the system that needs to be verified for stability. The dependent service corresponding to the service to be verified is the service provided by the business system that has a dependency relationship with the service to be verified.

[0038] Optionally, the dependent service corresponding to the service to be verified is a downstream dependent service of the service to be verified.

[0039] Optionally, when determining the service identifier to be verified corresponding to the system, it can be directly obtained from the first preset position, or it can be determined based on the application scenario, that is, the experimental scenario selected by the relevant personnel is obtained, and the identifier of the service involved in the scenario is used as the service identifier to be verified. Of course, the service identifier to be verified can also be determined based on other methods, for example, based on information sent by other terminals, and there is no restriction on it here.

[0040] Among them, the experimental scenarios are universal and can meet the needs of building highly available and resilient business systems. They include scenarios of strong and weak dependencies in the service call chain, and scenarios for verifying whether the timeout period of the service call is reasonable.

[0041] Further, optionally, the first preset location includes a storage location such as a hard disk, a data table, a database, etc., but the present disclosure is not limited thereto.

[0042] Optionally, the service identifier to be verified is a unique identifier such as the name and number of the service to be verified. Correspondingly, the dependent service identifier corresponding to the service identifier to be verified may also be a unique identifier such as the name and number of the dependent service.

[0043] Optionally, when obtaining the dependent service identifier corresponding to the service identifier to be verified, for each service identifier to be verified, the dependent service identifier corresponding to the service identifier to be verified is searched from the preset verification dependent service mapping table, so that the dependent service corresponding to the service to be verified can be determined.

[0044] In the embodiment of the present disclosure, when conducting a chaos engineering experiment, fault injection is required. Therefore, it is necessary to determine the fault to be injected, that is, the abnormal event, and then find the abnormal event identifier corresponding to the service identifier to be verified to determine the abnormal event.

[0045] Further, optionally, when searching for the abnormal event identifier corresponding to the service identifier to be verified, for each dependent service identifier corresponding to the service identifier to be verified, the abnormal event identifier corresponding to the dependent service identifier is searched to determine the abnormal event that needs to be injected into the dependent service corresponding to the dependent service identifier.

[0046] Among them, the abnormal events corresponding to each dependent service can be the same or different, and this disclosure does not limit it.

[0047] Among them, the abnormal event type can be selected according to the actual situation, including denial of service failure, packet loss or delay and other types.

[0048] S202: Injecting an abnormal event into a dependent service corresponding to the service to be verified to determine a stability status corresponding to the service to be verified.

[0049] In an embodiment of the present disclosure, after determining the dependent services corresponding to the service to be verified and the abnormal events corresponding to the service to be verified, for each dependent service corresponding to the service to be verified, the abnormal event is injected into the dependent service, and the stability of the service to be verified is judged, thereby obtaining the stability state corresponding to the service to be verified and the dependent service, that is, obtaining a stability state corresponding to the service to be verified.

[0050] In addition, optionally, when each dependent service corresponding to the service to be verified has its corresponding abnormal event, when injecting the abnormal event into the dependent service, the abnormal event corresponding to the dependent service is injected into the dependent service.

[0051] Optionally, the stability state includes a stable state and an unstable state.

[0052] Specifically, when the stability state corresponding to the service to be verified is stable, it means that after the abnormal event is injected into the dependent service, that is, when the dependent service has an abnormality, the service to be verified is still stable, that is, it can still run.

[0053] Specifically, when the stability state corresponding to the service to be verified is an unstable state, it means that after the abnormal event is injected into the dependent service, that is, when the dependent service has an abnormality, the service to be verified is unstable, that is, it cannot operate normally.

[0054] S203: Generate test result information according to the stability status corresponding to the service to be verified.

[0055] In the embodiment of the present disclosure, after obtaining all stability states corresponding to the services to be verified, corresponding test result information is generated according to each stability state corresponding to the services to be verified, and the test result information is output so that relevant personnel can determine whether there is a problem with the system based on the test result information, and thus determine whether the system needs to be improved to ensure the reliability and stability of the system.

[0056] Optionally, the test result information includes a verification result corresponding to the service to be verified. When the experimental scenario is different, the verification result corresponding to the service to be verified, determined based on the stability state corresponding to the service to be verified, is different. For example, when the experimental scenario is a strong and weak dependency scenario of a service call chain, indicating that it is necessary to determine the strong and weak dependency between the service to be verified and its corresponding dependent service, the verification result corresponding to the service to be verified is the dependency relationship between the service to be verified and its corresponding dependent service, where the dependency relationship includes strong dependency and weak dependency.

[0057] For example, if Figure 3 As shown, Service 1 is the service to be verified, and Service A and Service B are downstream dependent services of Service 1. When an exception event is injected into Service A, the stability state of Service 1 is stable, and the dependency between Service 1 and Service A is determined to be weak. This means that the verification result for the service to be verified is that Service 1 and Service A are weakly dependent. When an exception event is injected into Service B, the stability state of Service 1 is unstable, and the dependency between Service 1 and Service B is determined to be strong. This means that the verification result for the service to be verified is that Service 1 and Service B are strongly dependent.

[0058] As can be seen from the above description, when conducting anomaly testing, that is, when conducting a chaos engineering experiment, the service to be verified is determined, that is, the service to be verified is determined, and the dependent service corresponding to the service to be verified is obtained, that is, the service associated with the service to be verified is obtained, so that the stability of the service to be verified can be determined by using the service. After obtaining the dependent service corresponding to the service to be verified, the abnormal event is injected into the dependent service, and the stability changes of the service to be verified are monitored to obtain the stability state corresponding to the service to be verified, thereby automatically determining the stability state. According to the stability state corresponding to the service to be verified, the corresponding test result information is generated, that is, the experimental result of the chaos engineering experiment is obtained, and the chaos engineering experiment process is automatically executed, and the experimental results are automatically determined. There is no need to manually execute the experimental process or manually determine the experimental results, which reduces the time required to determine the experimental results and the time required to conduct the chaos engineering experiment. At the same time, it can also reduce labor costs, thereby reducing the experimental costs required for the chaos engineering experiment and improving the user experience.

[0059] refer to Figure 4 , Figure 4Schematic diagram of the abnormality testing method provided in the embodiment of the present disclosure Figure 2 This embodiment describes in detail the process of determining the stability status of the service to be verified by using the change in the stability indicator after injecting an abnormal event into the dependent service corresponding to the service to be verified. The bandwidth measurement method includes:

[0060] S401: Obtain the service to be verified and its corresponding dependent services, and obtain the abnormal event corresponding to the service to be verified.

[0061] In the disclosed embodiments, when performing anomaly testing, i.e., a chaos engineering experiment, it is necessary to construct the network traffic required for the experiment. The test environment information is obtained, and a traffic construction scheme corresponding to the test environment information is obtained. Based on the traffic construction scheme, a network traffic construction operation is performed to obtain the test environment traffic, thereby constructing the experimental traffic.

[0062] When conducting a chaos engineering experiment, the experiment can be conducted in an online environment or an offline environment. Accordingly, the test environment information includes an online environment identifier and / or an offline environment identifier.

[0063] Specifically, when the test environment information is an offline environment identifier, it indicates that the chaos engineering experiment is conducted in an offline environment, which will not affect the stability of the online system or the user experience. Then, the traffic construction plan corresponding to the offline environment is obtained, and the traffic required for the experiment is constructed based on the traffic construction plan corresponding to the offline environment. For example, based on the traffic construction plan, an automated testing platform is used to execute test cases to generate test traffic, thereby realizing the construction of network traffic.

[0064] Specifically, when the test environment information indicates an online environment, it indicates that the chaos engineering experiment is being conducted in an online environment. Since the online environment is the environment actually used by users, the impact of the experiment, or the blast radius, needs to be controlled. Therefore, traffic filtering is required. A traffic configuration scheme corresponding to the online environment is obtained to construct the required traffic for the experiment to implement traffic filtering. For example, based on this traffic configuration scheme, traffic is divided according to the front-end platform to implement experimental traffic filtering. Another example is deploying a cluster (e.g., a canary release cluster) based on this traffic configuration scheme to filter traffic within the cluster.

[0065] It can be understood that when constructing traffic based on the traffic construction scheme, the operation steps included in the traffic construction scheme are actually executed to achieve traffic construction screening.

[0066] In the embodiment of the present disclosure, after the experimental flow, that is, the test environment flow, is constructed, the actual size of the constructed test environment flow may not be the flow size required to be constructed, that is, the target flow size. Therefore, it is necessary to judge whether the actual size of the test environment flow is the target flow size to determine whether the size of the test environment flow needs to be adjusted. If the size of the test environment flow is not equal to the target flow size, indicating that the actual size of the obtained test environment flow is not the target flow size, the test environment flow is adjusted to adjust the size of the test environment flow to the target flow size, that is, the size of the adjusted test environment flow is the target flow size.

[0067] Optionally, if the size of the test environment traffic is equal to the target traffic size, it indicates that the actual size of the obtained test environment traffic is already the target traffic size and no adjustment is required.

[0068] For example, in a specific application scenario, the experimental environment is the online environment. A canary release cluster is deployed using the traffic structure plan for the online environment. The traffic in the canary release cluster corresponds to the test environment traffic, i.e., the experimental traffic. This achieves the construction, or screening, of the experimental traffic. The target traffic size for the test environment is 100 kbps, while the traffic scale in the constructed canary release cluster, i.e., the test environment traffic size, is 90 kbps. Therefore, the test environment traffic size needs to be adjusted from 90 kbps to 100 kbps.

[0069] Optionally, after adjusting the test environment traffic size, you may need to restore it after determining the verification result for the service to be verified. Specifically, the test environment traffic size before adjustment is used as the initial traffic size. After determining the verification result for the service to be verified, the current test environment traffic size is adjusted back to the initial traffic size.

[0070] Following the above application scenario, after determining the verification result corresponding to the service to be verified, the traffic scale in the canary release cluster is restored to 90kbs.

[0071] S402: After injecting the abnormal event into the dependent service corresponding to the service to be verified, obtaining stability index information corresponding to the service to be verified.

[0072] In an embodiment of the present disclosure, for each dependent service corresponding to the service to be verified, after the abnormal event is injected into the dependent service, the changes in the stability index are monitored to obtain multiple stability index values, that is, stability index information corresponding to the service to be verified and the dependent service is obtained, so that the stability status of the service to be verified can be determined by analyzing the stability index information, and then the dependency relationship between the service to be verified and the dependent service can be determined.

[0073] Among them, the stability index is a general indicator describing the stable state of a service. Different types of services can use it as their own stability observation indicator. For example, the stability indicators include service response time and consumed traffic.

[0074] The stability index information corresponding to the service to be verified includes multiple stability index values. Optionally, the stability index information may also include the time corresponding to the stability index value, that is, the time when the stability index value is generated.

[0075] S403: Determine the stability status of the service to be verified according to the stability indicator information corresponding to the service to be verified.

[0076] In an embodiment of the present disclosure, for each dependent service corresponding to the service to be verified, after obtaining stability index information corresponding to the dependent service and the service to be verified, the stability index information is analyzed to determine the stability status of the service to be verified when the dependent service fails, that is, to obtain the stability status corresponding to the service to be verified.

[0077] In the embodiment of the present disclosure, optionally, the implementation of S403 includes:

[0078] Determine whether there are abnormal indicator values ​​among the multiple stability indicator values.

[0079] If there is an abnormal indicator value, the stability state corresponding to the service to be verified is determined to be an unstable state.

[0080] If there is no abnormal indicator value, it is determined that the stability state corresponding to the service to be verified is a stable state.

[0081] Specifically, when analyzing the stability index information, it is determined whether any abnormal index value exists among all the stability index values ​​included in the stability index information. If any abnormal index value exists, it indicates that after the abnormal time is injected into the dependent service corresponding to the service to be verified, that is, after the dependent service has an abnormality, the service to be verified has also experienced an abnormality, that is, the service to be verified is unstable, and the stability state corresponding to the service to be verified is determined to be unstable. If no abnormal index value exists among all the stability index values, it indicates that after the abnormal time is injected into the dependent service corresponding to the service to be verified, that is, after the dependent service has an abnormality, the service to be verified has not experienced an abnormality and is still operating normally, and the stability state corresponding to the service to be verified is determined to be stable.

[0082] Further, optionally, when determining whether there is an abnormal index value among multiple stability index values, the determination can be made in the following two ways.

[0083] One method is to generate a stability curve based on multiple stability index values. If the stability curve does not contain an abnormal curve segment, it is determined that no abnormal index value exists in the multiple stability index values. If the stability curve does contain an abnormal curve segment, it is determined that an abnormal index value exists in the multiple stability index values.

[0084] In an embodiment of the present disclosure, a corresponding curve is generated based on multiple stability index values ​​included in the stability index information to obtain a stability curve, and it is determined whether there are abnormal curve segments in the stability curve. When there are abnormal curve segments, it indicates that the stability curve does not change smoothly, and there are curve segments in an abnormal rising state or an abnormal falling state, that is, there are stability index values ​​that increase or decrease suddenly, then it is determined that there are abnormal index values ​​among the multiple stability index values.

[0085] When there is no abnormal curve segment in the stability curve, it indicates that the stability curve changes smoothly and there is no curve segment in an abnormal rising or falling state, that is, the stability index value changes slightly, and it is determined that there is no abnormal index value among the multiple stability index values.

[0086] An abnormal curve segment is a curve segment whose absolute value of slope is greater than a preset value. Since the curve becomes steeper as the absolute value of the slope of a curve increases, when the absolute value of the slope of a curve segment is greater than a preset value, the curve segment is considered steep, i.e., the curve segment exhibits a sudden rise, i.e., an abnormal rise, or a sudden fall, i.e., an abnormal fall.

[0087] Among them, the preset value can be set according to actual conditions, and this disclosure does not limit it.

[0088] In addition, optionally, when generating the stability curve, each stability index value is assigned a coordinate point, which is marked in a preset coordinate system, and curve fitting is performed on the coordinate points in the preset coordinate system to obtain the corresponding stability curve.

[0089] Among them, the vertical coordinate of the preset coordinate system is the stability index, and the horizontal coordinate can be set according to actual conditions. For example, time, that is, the time corresponding to the stability index value, is used as the horizontal coordinate.

[0090] In addition, the slope of the curve segment may be the slope of a certain coordinate point on the stability curve, or may be a slope determined based on two adjacent coordinate points on the stability curve.

[0091] Another method is to obtain the difference between adjacent stability index values ​​from the plurality of stability index values. If the difference between all adjacent stability index values ​​is within a preset difference range, it is determined that no abnormal index value exists in the plurality of stability index values. If the difference between any adjacent stability index values ​​is not within the preset difference range, it is determined that an abnormal index value exists in the plurality of stability index values.

[0092] Specifically, the difference between any two adjacent stability index values ​​in the stability index information is calculated. If all the differences are within a preset difference range, indicating that the stability index value changes slightly, that is, the stability index value changes smoothly, it is determined that there are no abnormal index values ​​among the multiple stability index values ​​included in the stability index information. If there is a difference that is not within the preset difference range, indicating that there is a sudden increase or decrease in the stability index value, that is, there is a significant change in the stability index value, and it is determined that there is an abnormal index value among the multiple stability index values.

[0093] S404: Generate test result information according to the stability status corresponding to the service to be verified.

[0094] In an embodiment of the present disclosure, for each dependent service corresponding to the service to be verified, after injecting an abnormal event into the dependent service, that is, after injecting a fault into the dependent service, the stability of the service to be verified is determined based on the stability index value, that is, the stability state corresponding to the service to be verified is obtained. If the stability state corresponding to the service to be verified is a stable state, indicating that even if an abnormality occurs in the dependent service, the service to be verified can still run stably, then the verification result corresponding to the service to be verified is determined to be a weak dependency result, that is, if the service to be verified depends on the dependent service. If the stability state corresponding to the service to be verified is an unstable state, indicating that when an abnormality occurs in the dependent service, the service to be verified cannot run stably, then the verification result corresponding to the service to be verified is determined to be a strong dependency result, that is, the service to be verified is strongly dependent on the dependent service.

[0095] In any disclosed embodiment, the test result information may optionally include result-related data, where the result-related data represents data associated with the verification result corresponding to the service to be verified, i.e., contextual data from which the verification result can be inferred. For example, if the verification result indicates that the dependency between service 1 and service a is a strong dependency, the result-related data may include an anomaly indicator value.

[0096] Furthermore, optionally, after obtaining the verification result corresponding to the service to be verified, it is also possible to determine whether the verification result meets expectations. The specific process is as follows: determining whether the verification result corresponding to the service to be verified meets the standard result. If not, a modification prompt message is output. If it meets the standard result, a test completion prompt message is output.

[0097] Specifically, a standard result is obtained, which is a pre-set result. The verification result corresponding to the service to be verified is compared with the standard result corresponding to the service to be verified. If the two are the same, indicating that the verification result meets expectations, a test completion prompt message is output to inform relevant personnel that the results of the chaos engineering experiment they conducted meet expectations and can be concluded. If the two are different, indicating that the verification result does not meet expectations, a modification prompt message is output to inform relevant personnel that the results of the chaos engineering experiment they conducted do not meet expectations and require modification. In other words, the experimental plan and / or system need to be modified so that the chaos engineering experiment can be conducted again after the modification until the final verification result meets expectations.

[0098] For example, a verification result is obtained that there is a weak dependency between service 1 and service a, but the standard result is that there is a strong dependency between service 1 and service a. Then, it is determined that the verification result does not meet the standard result, and accordingly, a modification prompt message is output.

[0099] It can be understood that the test completion prompt information is output only when it is determined that all verification results are standard results. If there is a verification result that is not a standard result, a modification prompt information is output.

[0100] In addition, optionally, since unpredictable situations may occur when conducting chaos engineering experiments, the verification results obtained may also be unpredictable, that is, there are no corresponding standard results. Therefore, after obtaining the test result information, relevant personnel can also evaluate whether the verification results in the test result information meet expectations.

[0101] In addition, optionally, the transformation information input by relevant personnel may also be stored, wherein the transformation information includes transformation progress information, transformation plan, cause of problem, etc.

[0102] Among them, the transformation progress information includes different transformation times and the transformation items corresponding to the transformation times, and the transformation items that need to be completed within the transformation time, so that the electronic equipment can prompt relevant personnel to complete the corresponding transformation items within the transformation time based on the transformation progress, avoid the situation where the transformation is not completed for a long time, and ensure the time limit and efficiency of the transformation.

[0103] The following describes the process of chaos engineering experiments through a specific application example. Figure 5 As shown, it includes:

[0104] 1) Select the experimental target, that is, the chaos engineering experiment determines the experimental scenario to identify the services whose stability needs to be verified and their corresponding services that need to be fault-injected, such as dependent services.

[0105] 2) Experimental traffic adjustment: After constructing the experimental traffic required for chaos engineering, adjust it to the required traffic size.

[0106] 3) Fault injection and stability detection, that is, injecting abnormal events into the service that needs to be injected with faults, and using the stability index value to determine the stability status of the service that needs to be verified at this time.

[0107] 4) Restore the flow rate, i.e. restore the experimental flow rate to the size before adjustment.

[0108] 5) Generate an experimental report, that is, after determining the stability status of the service, generate a verification result based on the stability status, obtain associated data related to generating the verification result, and generate an experimental report including the verification result and the associated data.

[0109] 6) The experimental report is confirmed, that is, the experimental report is output so that relevant responsible personnel can confirm it to determine whether there is a problem with the system.

[0110] 7) System problem repair, that is, when it is determined that there is a problem with the system, the relevant responsible personnel will repair the system problem to ensure the stability and availability of the system. Of course, the system can also automatically repair the abnormality.

[0111] In addition, chaos engineering experiments can also automatically execute the above chaos engineering experiment process at a scheduled time.

[0112] In the disclosed embodiment, the stability index is a general indicator that can describe the stable state of a service. It is independent of the system architecture, framework, and development language used. When the service has no availability issues, the stability index is stable. When the service or system has availability issues, that is, an anomaly, the stability index increases or decreases sharply, thereby quickly reflecting the anomaly and satisfying the observability of the chaos engineering experiment.

[0113] In the disclosed embodiments, when conducting chaos engineering experiments in an online environment, it is necessary to control the explosion radius of the experiment. Therefore, relevant personnel can filter traffic according to actual latency requirements, that is, determine the steps for traffic filtering to obtain a corresponding traffic construction scheme. In this way, when electronic devices filter schemes based on the traffic construction scheme, they can filter out the required traffic, and when using the traffic to conduct chaos engineering experiments, they can ensure the impact range of the experiment to avoid accidents, asset losses, or impact on user experience.

[0114] In the embodiment of the present disclosure, when an abnormal event is injected into the dependent service corresponding to the service to be verified so that the dependent service becomes abnormal, it indicates that it is necessary to use the relevant monitoring data of the service to be verified to determine the stability of the service to be verified. Therefore, stability index information is obtained and the stability index information is analyzed to determine the stability of the service to be verified, that is, the stability status corresponding to the service to be verified is obtained, so as to realize automatic and accurate determination of the service to be verified and improve the efficiency and accuracy of determining the stability status of the service.

[0115] Corresponding to the abnormality testing method described in the above embodiment, Figure 6 This is a structural block diagram of an abnormality test device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 6 The abnormality testing device 60 includes: an information acquisition module 601 and a processing module 602 .

[0116] The information acquisition module 601 is used to acquire the service to be verified and its corresponding dependent services, and acquire the abnormal events corresponding to the service to be verified.

[0117] The processing module 602 is configured to inject the abnormal event into a dependent service corresponding to the service to be verified, so as to determine the stability status corresponding to the service to be verified.

[0118] The processing module 602 is further configured to generate test result information according to the stability status corresponding to the service to be verified.

[0119] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0120] After injecting the abnormal event into the dependent service corresponding to the service to be verified, the stability index information corresponding to the service to be verified is obtained.

[0121] Determine the stability status of the service to be verified based on the stability indicator information of the service to be verified.

[0122] In one embodiment of the present disclosure, if the stability index information corresponding to the service to be verified includes multiple stability index values, the processing module 602 is further configured to:

[0123] Determine whether there are abnormal indicator values ​​among the multiple stability indicator values.

[0124] If there is an abnormal indicator value, the stability state corresponding to the service to be verified is determined to be an unstable state.

[0125] If there is no abnormal indicator value, it is determined that the stability state corresponding to the service to be verified is a stable state.

[0126] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0127] A stability curve is generated based on multiple stability indicator values.

[0128] If the stability curve does not have an abnormal curve segment, it is determined that there is no abnormal index value among the multiple stability index values.

[0129] If the stability curve has an abnormal curve segment, it is determined that there is an abnormal index value among the multiple stability index values.

[0130] In one embodiment of the present disclosure, the abnormal curve segment is a curve segment whose absolute value of the slope is greater than a preset value.

[0131] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0132] Gets differences between adjacent stability index values ​​in a plurality of stability index values.

[0133] If the differences between all adjacent stability index values ​​are within the preset difference range, it is determined that there is no abnormal index value among the multiple stability index values.

[0134] If the difference between adjacent stability index values ​​is not within the preset difference range, it is determined that there is an abnormal index value among the multiple stability index values.

[0135] In one embodiment of the present disclosure, the test result information includes a verification result corresponding to the service to be verified, and the processing module 602 is further configured to:

[0136] If the stability state corresponding to the service to be verified is a stable state, it is determined that the verification result corresponding to the service to be verified is a weak dependency result.

[0137] If the stability state corresponding to the service to be verified is an unstable state, it is determined that the verification result corresponding to the service to be verified is a strong dependency result.

[0138] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0139] Determine whether the verification result corresponding to the service to be verified is a standard result.

[0140] If the result is not a standard one, a modification prompt message will be output.

[0141] If the result is standard, the test completion prompt message will be output.

[0142] In one embodiment of the present disclosure, the test result information includes a verification result corresponding to the service to be verified and result-related data, wherein the result-related data represents data associated with generating the verification result corresponding to the service to be verified.

[0143] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0144] Obtain test environment information and obtain the traffic construction plan corresponding to the test environment information.

[0145] Perform network traffic construction operations based on the traffic construction plan to obtain the test environment traffic.

[0146] In one embodiment of the present disclosure, the processing module 602 is further configured to:

[0147] If the size of the test environment traffic is not equal to the target traffic size, the test environment traffic is adjusted to adjust the size of the test environment traffic to the target traffic size.

[0148] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0149] refer to Figure 7 , which shows a schematic structural diagram of an electronic device 700 suitable for implementing the embodiments of the present disclosure. The electronic device 700 may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0150] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 709 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0151] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 709 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0152] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 709, or installed from the storage device 709, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0153] An embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned abnormality testing method when executed by a processor.

[0154] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0155] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0156] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0157] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0158] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0159] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0160] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0161] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0162] In a first aspect, according to one or more embodiments of the present disclosure, a method for abnormality testing is provided, comprising:

[0163] Obtain the service to be verified and its corresponding dependent services, and obtain the abnormal events corresponding to the service to be verified;

[0164] Injecting the abnormal event into a dependent service corresponding to the service to be verified to determine the stability status corresponding to the service to be verified;

[0165] Generate test result information according to the stability status corresponding to the service to be verified.

[0166] According to one or more embodiments of the present disclosure, injecting the abnormal event into a dependent service corresponding to the service to be verified to determine the stability status corresponding to the service to be verified includes:

[0167] After injecting the abnormal event into the dependent service corresponding to the service to be verified, obtaining stability indicator information corresponding to the service to be verified;

[0168] The stability status corresponding to the service to be verified is determined according to the stability indicator information corresponding to the service to be verified.

[0169] According to one or more embodiments of the present disclosure, the stability indicator information corresponding to the service to be verified includes multiple stability indicator values. Determining the stability state of the service to be verified based on the stability indicator information corresponding to the service to be verified includes:

[0170] determining whether there is an abnormal indicator value among the plurality of stability indicator values;

[0171] If there is an abnormal indicator value, determining that the stability state corresponding to the service to be verified is an unstable state;

[0172] If there is no abnormal indicator value, it is determined that the stability state corresponding to the service to be verified is a stable state.

[0173] According to one or more embodiments of the present disclosure, determining whether there is an abnormal indicator value among the multiple stability indicator values ​​includes:

[0174] generating a stability curve according to the plurality of stability index values;

[0175] If the stability curve does not have an abnormal curve segment, determining that there is no abnormal index value among the multiple stability index values;

[0176] If the stability curve has an abnormal curve segment, it is determined that there is an abnormal index value among the multiple stability index values.

[0177] According to one or more embodiments of the present disclosure, the abnormal curve segment is a curve segment whose absolute value of the slope is greater than a preset value.

[0178] According to one or more embodiments of the present disclosure, determining whether there is an abnormal indicator value among the multiple stability indicator values ​​includes:

[0179] Obtaining differences between adjacent stability index values ​​among the plurality of stability index values;

[0180] If the differences between all adjacent stability index values ​​are within the preset difference range, it is determined that there is no abnormal index value in the multiple stability index values;

[0181] If the difference between adjacent stability index values ​​is not within the preset difference range, it is determined that there is an abnormal index value among the multiple stability index values.

[0182] According to one or more embodiments of the present disclosure, if the test result information includes a verification result corresponding to the service to be verified, then generating the test result information according to the stability status corresponding to the service to be verified includes:

[0183] If the stability state corresponding to the service to be verified is a stable state, determining that the verification result corresponding to the service to be verified is a weak dependency result;

[0184] If the stability state corresponding to the service to be verified is an unstable state, it is determined that the verification result corresponding to the service to be verified is a strong dependency result.

[0185] According to one or more embodiments of the present disclosure, the method further includes:

[0186] Determine whether the verification result corresponding to the service to be verified is a standard result;

[0187] If the result is not the standard, then output the modification prompt information;

[0188] If the result is the standard, a test completion prompt message is output.

[0189] According to one or more embodiments of the present disclosure, the test result information includes a verification result corresponding to the service to be verified and result-related data, wherein the result-related data represents data associated with generating the verification result corresponding to the service to be verified.

[0190] According to one or more embodiments of the present disclosure, the method further includes:

[0191] Obtaining test environment information and a flow configuration scheme corresponding to the test environment information;

[0192] A network traffic construction operation is performed based on the traffic construction scheme to obtain test environment traffic.

[0193] According to one or more embodiments of the present disclosure, the method further includes:

[0194] If the size of the test environment flow is not equal to the target flow size, the test environment flow is adjusted to adjust the size of the test environment flow to the target flow size.

[0195] In a second aspect, according to one or more embodiments of the present disclosure, there is provided an abnormality testing device, comprising:

[0196] An information acquisition module is used to acquire the service to be verified and its corresponding dependent services, and to acquire abnormal events corresponding to the service to be verified;

[0197] A processing module, configured to inject the abnormal event into a dependent service corresponding to the service to be verified, so as to determine a stability status corresponding to the service to be verified;

[0198] The processing module is further configured to generate test result information according to the stability status corresponding to the service to be verified.

[0199] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0200] After injecting the abnormal event into the dependent service corresponding to the service to be verified, obtaining stability indicator information corresponding to the service to be verified;

[0201] The stability status corresponding to the service to be verified is determined according to the stability indicator information corresponding to the service to be verified.

[0202] According to one or more embodiments of the present disclosure, if the stability index information corresponding to the service to be verified includes multiple stability index values, the processing module is further configured to:

[0203] determining whether there is an abnormal indicator value among the plurality of stability indicator values;

[0204] If there is an abnormal indicator value, determining that the stability state corresponding to the service to be verified is an unstable state;

[0205] If there is no abnormal indicator value, it is determined that the stability state corresponding to the service to be verified is a stable state.

[0206] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0207] generating a stability curve according to the plurality of stability index values;

[0208] If the stability curve does not have an abnormal curve segment, determining that there is no abnormal index value among the multiple stability index values;

[0209] If the stability curve has an abnormal curve segment, it is determined that there is an abnormal index value among the multiple stability index values.

[0210] According to one or more embodiments of the present disclosure, the abnormal curve segment is a curve segment whose absolute value of the slope is greater than a preset value.

[0211] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0212] Obtaining differences between adjacent stability index values ​​among the plurality of stability index values;

[0213] If the differences between all adjacent stability index values ​​are within the preset difference range, it is determined that there is no abnormal index value in the multiple stability index values;

[0214] If the difference between adjacent stability index values ​​is not within the preset difference range, it is determined that there is an abnormal index value among the multiple stability index values.

[0215] According to one or more embodiments of the present disclosure, the test result information includes a verification result corresponding to the service to be verified, and the processing module is further configured to:

[0216] If the stability state corresponding to the service to be verified is a stable state, determining that the verification result corresponding to the service to be verified is a weak dependency result;

[0217] If the stability state corresponding to the service to be verified is an unstable state, it is determined that the verification result corresponding to the service to be verified is a strong dependency result.

[0218] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0219] Determine whether the verification result corresponding to the service to be verified is a standard result;

[0220] If the result is not the standard, then output the modification prompt information;

[0221] If the result is the standard, a test completion prompt message is output.

[0222] According to one or more embodiments of the present disclosure, the test result information includes a verification result corresponding to the service to be verified and result-related data, wherein the result-related data represents data associated with generating the verification result corresponding to the service to be verified.

[0223] In one embodiment of the present disclosure, the processing module is further configured to:

[0224] Obtaining test environment information and a flow configuration scheme corresponding to the test environment information;

[0225] A network traffic construction operation is performed based on the traffic construction scheme to obtain test environment traffic.

[0226] According to one or more embodiments of the present disclosure, the processing module is further configured to:

[0227] If the size of the test environment flow is not equal to the target flow size, the test environment flow is adjusted to adjust the size of the test environment flow to the target flow size.

[0228] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0229] The memory stores computer-executable instructions;

[0230] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the abnormality testing method described in the first aspect and various possible designs of the first aspect.

[0231] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When the processor executes the computer execution instructions, the abnormality testing method described in the first aspect and various possible designs of the first aspect is implemented.

[0232] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the exception testing method as described in the first aspect and various possible designs of the first aspect.

[0233] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0234] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0235] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. An abnormality testing method, characterized in that: include: Obtain the network service to be verified and its corresponding dependent network service in the canary release cluster in the online environment, and obtain the abnormal event corresponding to the network service to be verified; The abnormal event is an abnormal event corresponding to the network service identifier to be verified found by the chaos engineering experiment platform, and the abnormal event type includes denial of service failure, packet loss or delay; Injecting the abnormal event into a dependent network service corresponding to the network service to be verified to determine a stability state corresponding to the network service to be verified; Generate test result information according to the stability status corresponding to the network service to be verified; The step of injecting the abnormal event into a dependent network service corresponding to the network service to be verified to determine the stability state corresponding to the network service to be verified includes: After injecting the abnormal event into the dependent network service corresponding to the network service to be verified, obtaining stability index information corresponding to the network service to be verified; the stability index includes service response time and / or consumed traffic; Determining the stability status corresponding to the network service to be verified according to the stability indicator information corresponding to the network service to be verified; If the stability index information corresponding to the network service to be verified includes multiple stability index values, determining the stability state corresponding to the network service to be verified according to the stability index information corresponding to the network service to be verified includes: Determining whether there is an abnormal index value among the multiple stability index values; If there is an abnormal indicator value, determining that the stability state corresponding to the network service to be verified is an unstable state; If there is no abnormal indicator value, it is determined that the stability state corresponding to the network service to be verified is a stable state.

2. The method according to claim 1, characterized in that Determining whether there is an abnormal index value among the multiple stability index values ​​includes: generating a stability curve according to the plurality of stability index values; If the stability curve does not have an abnormal curve segment, determining that there is no abnormal index value among the multiple stability index values; If the stability curve has an abnormal curve segment, it is determined that there is an abnormal index value among the multiple stability index values.

3. The method according to claim 2, characterized in that The abnormal curve segment is a curve segment whose absolute value of slope is greater than a preset value.

4. The method according to claim 1, characterized in that Determining whether there is an abnormal index value among the multiple stability index values ​​includes: Obtaining differences between adjacent stability index values ​​among the plurality of stability index values; If the differences between all adjacent stability index values ​​are within the preset difference range, it is determined that there is no abnormal index value in the multiple stability index values; If the difference between adjacent stability index values ​​is not within the preset difference range, it is determined that there is an abnormal index value among the multiple stability index values.

5. The method according to claim 1, characterized in that The test result information includes the verification result corresponding to the network service to be verified, and the generating of the test result information according to the stability state corresponding to the network service to be verified includes: If the stability state corresponding to the network service to be verified is a stable state, determining that the verification result corresponding to the network service to be verified is a weakly dependent result; If the stability state corresponding to the network service to be verified is an unstable state, it is determined that the verification result corresponding to the network service to be verified is a strong dependency result.

6. The method according to claim 5, characterized in that The method further comprises: Determine whether the verification result corresponding to the network service to be verified is a standard result; If it is not the standard result, output modification prompt information; If it is the standard result, a test completion prompt message is output.

7. The method according to claim 1, characterized in that The test result information includes a verification result corresponding to the network service to be verified and result-related data, wherein the result-related data represents data associated with generating the verification result corresponding to the network service to be verified.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Obtaining test environment information and obtaining a flow construction scheme corresponding to the test environment information; A network traffic construction operation is performed based on the traffic construction scheme to obtain the test environment traffic.

9. The method according to claim 8, characterized in that The method further comprises: If the size of the test environment flow is not equal to the target flow size, the test environment flow is adjusted to adjust the size of the test environment flow to the target flow size.

10. An abnormality testing device, characterized in that: include: An information acquisition module is used to obtain the network service to be verified and its corresponding dependent network service in the canary release cluster in the online environment, and obtain the abnormal event corresponding to the network service to be verified; wherein the abnormal event is the abnormal event corresponding to the network service identifier to be verified found by the chaos engineering experiment platform, and the abnormal event type includes denial of service failure, packet loss or delay; A processing module, used for injecting the abnormal event into a dependent network service corresponding to the network service to be verified, so as to determine a stability state corresponding to the network service to be verified; The processing module is further used to generate test result information according to the stability status corresponding to the network service to be verified; The processing module is also used for: After injecting the abnormal event into the dependent network service corresponding to the network service to be verified, obtaining stability index information corresponding to the network service to be verified; the stability index includes service response time and / or consumed traffic; Determining the stability status corresponding to the network service to be verified according to the stability indicator information corresponding to the network service to be verified; If the stability index information corresponding to the network service to be verified includes multiple stability index values, the processing module is further used to: Determining whether there is an abnormal index value among the multiple stability index values; If there is an abnormal indicator value, determining that the stability state corresponding to the network service to be verified is an unstable state; If there is no abnormal indicator value, it is determined that the stability state corresponding to the network service to be verified is a stable state.

11. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the abnormality testing method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the abnormality testing method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormality testing method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Service test method and device, computer equipment and storage medium

    CN110457197A