Automatic test failure repairing method and device
By obtaining and preprocessing the failed data of the automated test task, using the structural causal model for reasoning and repairing, the complex problem of the root cause location of test failure is solved, and rapid and accurate automated test repair is achieved, which reduces the false alarm rate and missed alarm rate and improves the testing efficiency.
Patent Information
- Application Number
- CN202510465221.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-18
AI Technical Summary
In the prior art, the root causes of test failure of software systems are complex, time-consuming and labor-intensive, and the diagnosis cost is increased. Manual analysis is prone to false alarms and missed alarms, and lacks dynamic perception capabilities.
By obtaining failed test data of automated test tasks, preprocessing is performed to extract test features, and using pre-trained structural causal model for inference, determining the root cause probability and repair strategy of test failure, and combining continuous integration/continuous delivery pipelines for automated test process repair.
Quickly and accurately locate the root cause of test failure, automatically generate repair solutions, reduce manual intervention, shorten test cycle, improve test efficiency, reduce the risks of false alarms and underreport, and support test optimization in complex scenarios.
Smart Images

Figure CN120336181A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of computer error diagnosis, and particularly to a method and device for repairing automated test failures. Background Art
[0002] In related technologies, abnormal diagnosis can be performed on computer system anomalies, and abnormal information of the computer system can be received, and then evaluated and optimized in real time, so as to generate corresponding abnormal handling strategies and intuitive test reports; or, by responding to the release instruction of the target application, corresponding automated test scripts and test cases can be triggered to execute, and then the test result information can be output using the log file.
[0003] However, in related technologies, as the scale and complexity of software systems increase and the number of test cases continues to grow, it has become extremely complex to locate the root cause of test failures, which is not only time-consuming and laborious, but also indirectly increases the diagnostic cost. To a certain extent, manual analysis using log files is also prone to false positives and false negatives, failing to detect real errors, and lacking dynamic perception ability, so it urgently needs to be improved. Summary of the Invention
[0004] This application provides a method and device for repairing automated test failures, so as to at least solve the problems in related technologies that the root cause of test failures is complex due to changes in software systems and test cases, which is not only time-consuming and laborious, but also indirectly increases the diagnostic cost. To a certain extent, there are situations such as false positives and false negatives in manual analysis, and there is a lack of dynamic perception ability.
[0005] This application provides a method for repairing automated test failures, including the following steps: obtaining failure test data when an automated test task fails; preprocessing the failure test data to extract at least one test feature; inputting the at least one test feature into a pre-trained structural causal model to output the inference result of the automated test task, and based on the inference result, repairing the test process of the automated test task to perform automated testing.
[0006] Optionally, in an embodiment of this application, before inputting the at least one test feature into the pre-trained structural causal model, it further includes: determining the causal graph structure of the dynamic causal graph in the structural causal model based on the training test features; determining the causal graph parameters of the dynamic causal graph based on the training test features and the causal graph structure; constructing a structural causal model based on the causal graph structure and the causal graph parameters; training and validating the structural causal model until the structural causal model meets a preset condition to obtain a trained structural causal model.
[0007] Optionally, in an embodiment of the present application, the inputting the at least one test feature into a pre-trained structural causal model to output an inference result of the automated test task includes: based on the test feature, using the dynamic causal graph in the pre-trained structural causal model to perform inference and analysis to determine the root cause probability of different root causes when the automated test task fails and the causal inference confidence threshold corresponding to the root cause probability; determining a corresponding repair strategy based on the root cause probability and the corresponding causal inference confidence threshold; dynamically calculating a dynamic threshold when the automated test task fails based on statistical process control and the system load information when the automated test task fails; calculating a false alarm rate when the automated test task fails based on the dynamic threshold; re-determining the inference result based on at least one of the root cause probability, the corresponding causal inference confidence threshold, the repair strategy, and the false alarm rate.
[0008] Optionally, in an embodiment of the present application, the obtaining of the failed test data when the automated test task fails includes: obtaining at least one of the environment information, code information, and log information when the automated test task fails; obtaining the failed test data based on at least one of the environment information, code information, and log information.
[0009] Optionally, in an embodiment of the present application, the preprocessing of the failed test data to extract at least one test feature includes: based on the failed test data, obtaining at least one of the environment snapshot information, changed code information, and test timing data when the automated test task fails; extracting at least one of the corresponding environment feature, code feature, and log feature based on at least one of the environment snapshot information, changed code information, and test timing data; obtaining the test feature based on at least one of the environment feature, code feature, and log feature.
[0010] Optionally, in an embodiment of the present application, the repairing the test process of the automated test task based on the inference result to perform automated testing includes: using a continuous integration / continuous delivery pipeline to determine an initial repair result when the automated test task fails; optimizing the pre-trained structural causal model based on the initial repair result to obtain an optimized structural causal model; re-determining the inference result based on the optimized structural causal model; repairing the test process of the automated test task based on the inference result to perform automated testing.
[0011] Optionally, in an embodiment of the present application, determining the initial repair result when the automated test task fails in the continuous integration / continuous delivery pipeline includes: using the continuous integration / continuous delivery pipeline to repair the deployment environment of the automated test task to obtain an environment repair result; using the continuous integration / continuous delivery pipeline to repair the deployment code of the automated test task to obtain a code repair result; and determining the initial repair result based on the environment repair result and the code repair result.
[0012] The present application also provides a repair device for automated test failures, including: an acquisition module for acquiring failure test data when an automated test task fails; an extraction module for preprocessing the failure test data to extract at least one test feature; and a repair module for inputting the at least one test feature into a pre-trained structural causal model to output an inference result of the automated test task, and based on the inference result, repairing the test process of the automated test task to perform automated testing.
[0013] Optionally, in an embodiment of the present application, it further includes: a first determination module for determining the causal graph structure of the dynamic causal graph in the structural causal model based on the training test features before inputting at least one test feature into the pre-trained structural causal model; a second determination module for determining the causal graph parameters of the dynamic causal graph based on the training test features and the causal graph structure; a construction module for constructing a structural causal model based on the causal graph structure and the causal graph parameters; and a training and verification module for training and verifying the structural causal model until the structural causal model meets a preset condition to obtain a trained structural causal model.
[0014] Optionally, in an embodiment of the present application, the repair module includes: a first determination unit for performing inference and analysis using the dynamic causal graph in the pre-trained structural causal model based on the test features to determine the root cause probabilities of different failure root causes and the causal inference confidence thresholds corresponding to the root cause probabilities when the automated test task fails; a second determination unit for determining the corresponding repair strategy based on the root cause probabilities and the corresponding causal inference confidence thresholds; a first calculation unit for dynamically calculating a dynamic threshold when the automated test task fails based on statistical process control and the system load information when the automated test task fails; a second calculation unit for calculating the false alarm rate when the automated test task fails based on the dynamic threshold; and a third determination unit for re-determining the inference result based on at least one of the root cause probabilities, the corresponding causal inference confidence thresholds, the repair strategy, and the false alarm rate.
[0015] Optionally, in an embodiment of the present application, the acquisition module includes: a first acquisition unit configured to acquire at least one of environment information, code information, and log information when an automated test task fails; a first generation unit configured to obtain failed test data based on at least one of the environment information, code information, and log information.
[0016] Optionally, in an embodiment of the present application, the extraction module includes: a second acquisition unit configured to acquire at least one of environment snapshot information, changed code information, and test timing data when an automated test task fails based on the failed test data; a second generation unit configured to extract at least one of corresponding environment features, code features, and log features based on at least one of the environment snapshot information, changed code information, and test timing data; a third generation unit configured to obtain test features based on at least one of the environment features, code features, and log features.
[0017] Optionally, in an embodiment of the present application, the repair module includes: a fourth determination unit configured to determine an initial repair result when an automated test task fails by using a continuous integration / continuous delivery pipeline; an optimization unit configured to optimize a pre-trained structural causal model based on the initial repair result to obtain an optimized structural causal model; an adjustment unit configured to re-determine an inference result based on the optimized structural causal model; a repair unit configured to repair the test process of the automated test task based on the inference result for automated testing.
[0018] Optionally, in an embodiment of the present application, a first repair subunit is configured to repair the deployment environment of an automated test task by using a continuous integration / continuous delivery pipeline to obtain an environment repair result; a second repair subunit is configured to repair the deployment code of the automated test task by using the continuous integration / continuous delivery pipeline to obtain a code repair result; a determination subunit is configured to determine the initial repair result based on the environment repair result and the code repair result.
[0019] The present application further provides an electronic device, including: a memory configured to store a computer program; a processor configured to implement the steps of any of the above methods for repairing automated test failures when executing the computer program.
[0020] The present application further provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps of any of the above methods for repairing automated test failures.
[0021] The present application further provides a computer program product including a computer program, where the computer program, when executed by a processor, implements the steps of any of the above methods for repairing automated test failures.
[0022] Through the present application, the failed test data when an automated test task fails can be preprocessed, and then at least one test feature can be extracted, so as to use a pre-trained structural causal model to output the inference result of the automated test task, so as to repair the test process of the automated test task and complete the automated test. Therefore, it can solve the technical problems that the complexity of locating the root cause of test failure caused by changes in software systems and test cases is not only time-consuming and laborious, but also indirectly increases the diagnostic cost. To a certain extent, there are situations such as false alarms and missed alarms in manual analysis, and the lack of dynamic perception ability. It achieves the technical effect of quickly and accurately locating the root cause of test failure through feature extraction and causal modeling, automatically generating a repair plan based on the inference result, reducing manual intervention, shortening the test cycle, improving the test efficiency, reducing the risk of false alarms and missed alarms by explicitly modeling the causal relationship between variables, and supporting test optimization in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a flowchart of a method for repairing automated test failures provided according to an embodiment of the present application;
[0025] Figure 2 It is a flowchart of the operation of a data collector provided according to an embodiment of the present application;
[0026] Figure 3 It is a flowchart of the operation of a feature warehouse provided according to an embodiment of the present application;
[0027] Figure 4 It is a flowchart of the operation of a model trainer provided according to an embodiment of the present application;
[0028] Figure 5 It is a flowchart of the operation of a causal inference engine provided according to an embodiment of the present application;
[0029] Figure 6 It is a flowchart of the operation of a feedback analyzer provided according to an embodiment of the present application;
[0030] Figure 7 It is a flowchart of the working principle of a method for repairing automated test failures provided according to an embodiment of the present application;
[0031] Figure 8 It is a block diagram of a device for repairing automated test failures provided according to an embodiment of the present application.
[0032] Reference Signs:
[0033] Among them, 80 - Fixing device for automated test failure; 100 - Acquisition module, 200 - Extraction module, 300 - Fixing module. Detailed implementation manners
[0034] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0035] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non - exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0036] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0037] The embodiment of the present application provides a method for fixing automated test failures. The method will be described in detail in combination with the execution process of the method for fixing automated test failures.
[0038] Specifically, Figure 1 is a flowchart of a method for fixing automated test failures according to an embodiment of the present application.
[0039] As Figure 1 shown, the method for fixing automated test failures includes the following steps:
[0040] In step S101, obtain the failed test data when the automated test task fails.
[0041] It can be understood that in the embodiment of the present application, the automated test task may include, but is not limited to, test scripts, automated test systems, etc., and the present application does not make specific limitations.
[0042] Furthermore, in the embodiments of the present application, the reasons for the failure of the automated test task may include, but are not limited to, test case design problems, environment problems, code change problems, test script problems, data problems, UI (User Interface) automation problems, etc. The present application does not make specific limitations.
[0043] As a possible implementation, the embodiments of the present application can obtain the test data of the automated test task in real time and determine the corresponding failed test data when the automated test task fails.
[0044] The embodiments of the present application can clarify the context environment at the time of test failure by obtaining the failed test data when the automated test task fails, quickly locate the specific location of the problem, reduce the debugging time, help reduce the manual analysis cost, avoid manual one-by-one investigation, and improve the test efficiency.
[0045] Optionally, in an embodiment of the present application, obtaining the failed test data when the automated test task fails includes: obtaining at least one of the environment information, code information, and log information when the automated test task fails; and obtaining the failed test data based on at least one of the environment information, code information, and log information.
[0046] It can be understood that in the embodiments of the present application, a data collector can be used to distributively collect and cache the test data of the automated test task and output the failed test data in a unified format to the feature repository.
[0047] Furthermore, in the embodiments of the present application, the data collector may include, but is not limited to, an environment monitoring agent, a log parser, and a version control interface, etc. The present application does not make specific limitations.
[0048] Among them, the environment monitoring agent can be used to collect server resources, such as information about the CPU (Central Processing Unit), memory, etc. The present application does not make specific limitations; the container status, such as the number of times the container group is restarted, etc. The present application does not make specific limitations; network metrics, such as latency, packet loss rate, etc. The present application does not make specific limitations.
[0049] The log parser can be used to parse the application log in real time and extract key information such as error stacks and transaction IDs (Identifiers). The present application does not make specific limitations.
[0050] The version control interface can be used to monitor changes in the feature repository and obtain commit records, code differences, etc. The present application does not make specific limitations.
[0051] In some embodiments, the embodiments of the present application can obtain failure test data by acquiring environmental information, code information, and log information when an automated test task fails.
[0052] Exemplarily, the embodiments of the present application can combine Figure 2 As shown, use a data collector to distributively collect and cache the test data of an automated test task. The main content is as follows:
[0053] Step S201: The data collector starts to work.
[0054] Step S202: Environmental monitoring agent.
[0055] Among them, in the embodiments of the present application, the environmental monitoring agent can be used to obtain environmental information.
[0056] Step S203: Log parser.
[0057] Among them, in the embodiments of the present application, the log parser can be used to obtain log information.
[0058] Step S204: Version control interface.
[0059] Among them, in the embodiments of the present application, the version control interface can be used to obtain code information.
[0060] Step S205: Distributively collect and cache test data.
[0061] Among them, the embodiments of the present application can distributively collect and cache environmental information, log information, and code information, and then obtain the corresponding test data.
[0062] Step S206: Data processing.
[0063] Among them, in the embodiments of the present application, data processing can include but is not limited to data classification, data cleaning, data storage, etc. The present application does not make specific limitations. For example, in the embodiments of the present application, after classifying the data, data cleaning and storage can be performed, and the present application does not make specific limitations.
[0064] Step S207: Output failure test data in a unified format.
[0065] Step S208: Submit to the feature repository.
[0066] Among them, the embodiments of the present application can use the feature repository for further analysis and processing.
[0067] In summary, when the data collector in the embodiment of the present application starts to work, it continuously and distributively collects and caches the environmental information in the environmental monitoring agent, the log information in the log parser, and the code information in the version control interface, and through preliminary data processing, it outputs failure test data in a unified format and submits it to the feature repository for further analysis and processing.
[0068] The embodiment of the present application can determine the failure test data by obtaining the environmental information, code information, and log information when the automated test task fails. Through multi-dimensional data integration, the context environment at the time of test failure can be restored more comprehensively, the accuracy of problem location can be improved, the troubleshooting time can be reduced, and after determining the failure test data, relevant personnel can quickly reproduce the problem, so as to more efficiently repair defects, improve the automation level of the test process, promote cooperation and knowledge sharing among the development team, operation and maintenance team, and test team, and avoid making the same mistakes repeatedly.
[0069] In step S102, the failure test data is preprocessed to extract at least one test feature.
[0070] It can be understood that in the embodiment of the present application, the preprocessing may include but is not limited to feature ingestion, feature processing, feature storage, feature service, etc., and the present application does not make specific limitations.
[0071] In some embodiments, the embodiment of the present application can extract at least one test feature from the failure test data through preprocessing in the feature repository.
[0072] The embodiment of the present application can remove redundant information through preprocessing, improve data quality, reduce noise interference, and convert the failure test data into more representative test features, thereby reducing the number of dimensions, avoiding model overfitting, accelerating problem location, and realizing automated analysis and repair.
[0073] Optionally, in an embodiment of the present application, preprocessing the failure test data to extract at least one test feature includes: based on the failure test data, obtaining at least one of the environmental snapshot information, changed code information, and test timing data when the automated test task fails; based on at least one of the environmental snapshot information, changed code information, and test timing data, extracting at least one of the corresponding environmental features, code features, and log features; and obtaining test features based on at least one of the environmental features, code features, and log features.
[0074] It can be understood that in the embodiments of the present application, the environmental snapshot information can record the system environmental status (such as the operating system version, the version of the dependent library, etc.) when the test fails, so as to quickly troubleshoot problems caused by environmental differences; the changed code information can clarify the code changes involved when the test fails, so as to quickly locate the scope of the problem code and reduce the troubleshooting time; the test timing data can record the order and time of test execution, so as to help analyze whether the test failure is related to a specific operation or time point.
[0075] In some embodiments, the embodiments of the present application can obtain the environmental snapshot information, the changed code information, and the test timing data when the automated test task fails based on the failed test data, and then obtain the environmental characteristics, the code characteristics, and the log characteristics, so as to obtain the test characteristics, and store and index the preprocessed test characteristics using the feature warehouse.
[0076] Exemplarily, the embodiments of the present application can combine Figure 3 As shown, use the feature warehouse to store and index the test characteristics, and its main content is:
[0077] Step S301: The feature warehouse starts to work.
[0078] Step S302: Receive the failed test data.
[0079] Among them, the feature warehouse of the embodiments of the present application can accept the failed test data processed by the data collector.
[0080] Step S303: Feature ingestion.
[0081] Among them, the embodiments of the present application can perform format standardization, data quality inspection, distributed processing, and exception handling on the failed test data, etc.
[0082] Step S304: Feature processing.
[0083] Among them, the embodiments of the present application can clean, transform, aggregate, and encode the data after feature ingestion, and output the test characteristics.
[0084] Step S305: Feature storage.
[0085] Among them, the embodiments of the present application can divide the real-time metrics, the test characteristics in the past seven days (which can also be the test characteristics in the past month, and the present application does not make specific limitations), and the historical test characteristics (such as half a year, one year, and the present application does not make specific limitations) into a hot storage layer, a warm storage layer, and a cold storage layer.
[0086] Step S306: Feature service.
[0087] Among them, the embodiments of the present application can provide real-time features externally through a gRPC (gRPC Remote Procedure Call) data interface.
[0088] In summary, the embodiments of the present application can clean, merge, transform, and integrate the collected data, submit the integrated data to the Redis database, and the AI (Artificial Intelligence) engine can read the information in the Redis database in real time. The processed data facilitates the AI engine to better analyze and learn the data characteristics.
[0089] The embodiments of the present application can accurately locate the root cause of problems by using environmental snapshot information, change code information, and test timing data, improve the test efficiency, reduce the workload of manual analysis by extracting corresponding environmental features, code features, and log features, quickly reproduce problems, achieve intelligent analysis and decision-making, and enhance the user experience.
[0090] Optionally, in an embodiment of the present application, before inputting at least one test feature into a pre-trained structural causal model, it further includes: determining the causal graph structure of the dynamic causal graph in the structural causal model based on the training test features; determining the causal graph parameters of the dynamic causal graph based on the training test features and the causal graph structure; constructing a structural causal model based on the causal graph structure and the causal graph parameters; training and validating the structural causal model until the structural causal model meets the preset conditions to obtain the trained structural causal model.
[0091] It can be understood that in the embodiments of the present application, the construction of the dynamic causal graph in the structural causal model may include, but is not limited to, causal graph structure learning and causal graph parameter learning.
[0092] Among them, in the causal graph structure learning of the embodiments of the present application, multi-dimensional data in the feature warehouse (such as code features, environmental features, log features, etc., which are not specifically limited in the present application) can be used. Based on the GES (Greedy Equivalent Search) algorithm, by searching for the optimal graph structure and maximizing the BIC (Bayesian Information Criterion) score of the model for learning. The calculation formula of BIC may include, but is not limited to:
[0093] BIC(G) = logP(D|G) - d / 2logn,
[0094] Among them, BIC(G) represents the BIC value, which is used to evaluate the goodness of fit of model G to data D, and at the same time penalizes the model complexity. The smaller the BIC value, the better the balance achieved by the model between fitting the data and complexity, and the better the model; logP(D|G) represents the logarithm of the marginal likelihood (or evidence) of model G for data D; P(D|G) represents the probability of observing data D given model G; d represents the number of free parameters of model G (i.e., the model complexity), the larger d is, the more complex the model is and the easier it is to overfit; n represents the number of samples in data D, the larger n is, the more reliable the evaluation of the goodness of fit of the data to the model; logn is used to adjust the intensity of the complexity penalty term, so that when the sample size is large, the complexity penalty is more significant.
[0095] In addition, in the causal graph parameter learning of the embodiments of the present application, the implementation goal is to calculate the conditional probability complement for each node in the dynamic causal graph, and the implementation method can be but is not limited to: (1) Bayesian network parameter estimation: using maximum likelihood estimation or Bayesian estimation to learn the dependence strength between nodes based on historical data. (2) Dynamic node modeling: adopting a state space model for nodes that change over time (such as resource utilization), and updating parameters in real time through Kalman filtering. Other methods can also be used, and specifically, those skilled in the art can set according to the actual situation, and the present application does not make specific limitations.
[0096] Furthermore, after learning the causal graph structure and causal graph parameters in the embodiments of the present application, the dynamic causal graph can be constructed using the causal graph structure and causal parameters, and then the structural causal model can be obtained, and the structural causal model is continuously trained and verified until the structural causal model meets certain conditions, and then the trained structural causal model is obtained. Among them, the certain conditions can be set by those skilled in the art according to the actual situation, and the present application does not make specific limitations.
[0097] Exemplarily, the embodiments of the present application can be combined with Figure 4 As shown, the structural causal model is trained by a model trainer to obtain the trained structural causal model, and its main content is:
[0098] Step S401: The model trainer starts to work.
[0099] Step S402: Input test features.
[0100] Among them, the input of the structural causal model in the embodiments of the present application can be test features transmitted from a feature warehouse, such as code features, AST (Abstract Syntax Tree) vectors, etc., which are not specifically limited in the present application; environmental features, such as CPU (Central Processing Unit), memory timing data, etc., which are not specifically limited in the present application; log features, such as error code distribution, etc., which are not specifically limited in the present application; manually labeled correction information or repair effect feedback information, etc., which are not specifically limited in the present application. It can be historical test features or real-time test features, and can be specifically set by those skilled in the art according to the actual situation, and the present application does not make specific limitations.
[0101] Step S403: Data preprocessing.
[0102] Among them, the present application can perform sampling, normalization, enhancement, time series alignment, etc. on the training test features, and then obtain the training test features.
[0103] Furthermore, in the embodiments of the present application, for class imbalance data (such as few sporadic error samples, etc., which are not specifically limited in the present application), the SMOTE (Synthetic Minority Over-sampling Technique) algorithm can be used for sampling; normalization can be understood as performing standardization processing on numerical features (such as CPU utilization rate, etc., which are not specifically limited in the present application); time series alignment can be understood as unifying data with different frequencies into the same time window.
[0104] Step S404: Construct a structural causal model.
[0105] Among them, the embodiments of the present application can learn the causal graph structure and causal graph parameters in the dynamic causal graph, and then construct a structural causal model.
[0106] Step S405: Model verification.
[0107] Among them, the embodiments of the present application can verify whether the structural causal model meets certain conditions through cross-validation, AB testing, etc., and obtain the trained structural causal model when the structural causal model meets certain conditions.
[0108] Step S406: Model deployment.
[0109] Among them, the embodiments of the present application can deploy the trained structural causal model according to version management, API (Application Programming Interface) release, etc.
[0110] Step S407: Online monitoring and feedback.
[0111] Among them, in the embodiments of the present application, the structural causal model can be re - judged whether it meets certain conditions through performance tracking, drift detection, etc., and when the structural causal model does not meet certain conditions, incremental learning and optimization are carried out.
[0112] Step S408: Incremental learning and optimization.
[0113] Among them, in the embodiments of the present application, the structural causal model can be continuously learned and optimized through online update, feedback correction, etc., and then the trained structural causal model is obtained.
[0114] Furthermore, in the embodiments of the present application, as one of the core components, the model trainer can be responsible for constructing and optimizing the structural causal model to ensure that the structural causal model can accurately identify the root cause of test failure, covering dynamic causal graph construction, parameter learning, model update, and performance optimization, etc.
[0115] The embodiments of the present application construct a dynamic causal graph to clarify the causal relationship between input features, make the model inference process transparent, and ensure a certain reliability and practicality of the model through training and verification, improving the generalization ability and robustness of the model.
[0116] In step S103, at least one test feature is input into the pre - trained structural causal model to output the inference result of the automated test task, and based on the inference result, the test process of the automated test task is repaired to perform automated testing.
[0117] Those skilled in the art can understand that the embodiments of the present application can use the dynamic causal graph in the pre - trained structural causal model for root cause analysis, such as code defects, environmental problems, or sporadic errors, etc., which are not specifically limited in the present application, and then obtain the inference result when the automated test task fails, such as root cause probability and repair strategy, etc., which are not specifically limited in the present application, and then repair the test process of the automated test task, so as to perform automated testing.
[0118] The embodiments of the present application can use the structural causal model to analyze the causal relationship between features, accurately locate the root cause leading to test failure, improve the accuracy and reliability of testing, reduce false positives and false negatives, accelerate the test repair and iteration efficiency, and reduce the maintenance cost.
[0119] Optionally, in an embodiment of the present application, at least one test feature is input into a pre-trained structural causal model to output an inference result of an automated test task, including: based on the test feature, using the dynamic causal graph in the pre-trained structural causal model for reasoning and analysis to determine the root cause probability of different failure root causes and the causal reasoning confidence threshold corresponding to the root cause probability when the automated test task fails; determining a corresponding repair strategy based on the root cause probability and the corresponding causal reasoning confidence threshold; dynamically calculating a dynamic threshold when the automated test task fails based on statistical process control and the system load information when the automated test task fails; calculating the false alarm rate when the automated test task fails based on the dynamic threshold; and re-determining the inference result based on at least one of the root cause probability, the corresponding causal reasoning confidence threshold, the repair strategy, and the false alarm rate.
[0120] It can be understood that in the embodiment of the present application, the inference result can be, but is not limited to, the root cause probability, the causal reasoning confidence threshold, the repair strategy, the false alarm rate, etc., and the present application does not make specific limitations.
[0121] In some embodiments, the embodiment of the present application can perform reasoning and analysis using the dynamic causal graph in the pre-trained structural causal model based on the test feature, thereby determining the root cause probability of different failure root causes and the causal reasoning confidence threshold corresponding to the root cause probability when the automated test task fails, and determining a corresponding repair strategy based on the root cause probability and the corresponding causal reasoning confidence threshold, and then dynamically calculating a dynamic threshold when the automated test task fails based on statistical process control and the system load information when the automated test task fails, and then calculating the false alarm rate when the automated test task fails, so as to re-determine the inference result.
[0122] Among them, the dynamic threshold adjustment can be based on the dynamic threshold calculation of statistical process control and real-time system load to achieve adaptive optimization of the false alarm rate, and adaptively correct the alarm trigger condition according to the historical false alarm rate (such as relaxing the threshold when the CPU>85%, the present application does not make specific limitations) to achieve intelligent filtering of occasional errors; and combining the causal reasoning confidence threshold (such as P≥0.7, the present application does not make specific limitations) can trigger a hierarchical repair strategy (such as code rollback / environment reconstruction / marking observation, the present application does not make specific limitations).
[0123] Exemplarily, the embodiment of the present application can combine Figure 5 As shown, use a causal reasoning engine to determine the inference result of an automated test task, and its main content is:
[0124] Step S501: The causal reasoning engine starts to work.
[0125] Step S502: Load the dynamic causal graph in the pre-trained structural causal model.
[0126] Step S503: Evidence injection and reasoning.
[0127] Among them, the embodiments of the present application can use the dynamic causal graph in the pre-trained structural causal model for root cause probability calculation and counterfactual analysis.
[0128] Step S504: Root cause analysis and confidence evaluation.
[0129] Among them, the embodiments of the present application can determine the root cause probability of different failure root causes and the causal reasoning confidence threshold corresponding to the root cause probability when the automated test task fails according to hypothesis testing, confidence interval, etc.
[0130] Step S505: Output the reasoning result.
[0131] Among them, the embodiments of the present application can output the root cause probability and the corresponding repair strategy. The repair strategy can include, but is not limited to, code defect correction, environment problem deployment, occasional error marking and monitoring, manual judgment problem reporting, etc. The present application does not make specific restrictions.
[0132] In summary, the embodiments of the present application can start the causal reasoning engine based on the test features, complete the loading and evidence injection of the dynamic causal graph in the pre-trained structural causal model, and perform probability calculation and counterfactual analysis in combination with the dynamic causal graph. The reasoning algorithm can include, but is not limited to, the junction tree algorithm and approximate reasoning. The present application does not make specific restrictions. The probability calculation and counterfactual analysis (that is, if this condition is met, whether the test is successful) are used to calculate the root cause probability of different failure root causes when the automated test task fails and the causal reasoning confidence threshold corresponding to the root cause probability, and generate the corresponding repair strategy.
[0133] In addition, in the embodiments of the present application, the causal reasoning engine performs probability calculation and counterfactual analysis based on the dynamic causal graph, is responsible for obtaining test features from the feature warehouse, and then performs real-time reasoning, accurately locates the root cause of the test failure, and generates the corresponding repair strategy. Its core capabilities can include, but are not limited to: causal discovery, probability inference, dynamic adaptation, interpretable output, etc. The present application does not make specific restrictions.
[0134] The embodiments of the present application can calculate the probabilities of different root causes through the dynamic causal graph, associate the causal reasoning confidence threshold, avoid the misguidance of a single high-probability root cause, accurately locate the root cause, reduce the risk of misjudgment, and dynamically adjust the dynamic threshold by combining statistical process control and system load to avoid misjudgment caused by environmental fluctuations. Determine the corresponding repair strategy based on different root cause probabilities, realize automated repair and decision-making, reduce the manual troubleshooting time, accelerate problem solving, and use the visual causal reasoning path to improve the interpretability and maintainability of the test.
[0135] Optionally, in an embodiment of the present application, based on the inference result, the test process of the automated test task is repaired to perform automated testing, including: using the continuous integration / continuous delivery pipeline to determine the initial repair result when the automated test task fails; optimizing the pre-trained structural causal model based on the initial repair result to obtain an optimized structural causal model; re-determining the inference result based on the optimized structural causal model; and repairing the test process of the automated test task based on the inference result to perform automated testing.
[0136] It can be understood that the embodiments of the present application can execute corresponding repair strategies according to the inference results given by the causal inference engine, including code defect correction, environment problem allocation, occasional error marking and monitoring, manual judgment problem reporting, etc. The present application does not make specific limitations, and then optimizes the pre-trained structural causal model by executing code compilation, version deployment, solution verification, and manual feedback information through the continuous integration / continuous delivery pipeline.
[0137] As a possible implementation manner, the embodiments of the present application can use the continuous integration / continuous delivery pipeline to determine the initial repair result when the automated test task fails, then optimize the pre-trained structural causal model, and use the optimized structural causal model to re-determine the inference result, and then repair the test process of the automated test task to perform automated testing.
[0138] Exemplarily, the embodiments of the present application can combine Figure 6 As shown, use the feedback analyzer to optimize the pre-trained structural causal model, and then repair the test process of the automated test task to complete the automated testing. The main content is as follows:
[0139] Step S601: The feedback analyzer starts to work.
[0140] Step S602: Input the initial repair result.
[0141] Among them, the embodiments of the present application can use the decision executor and the continuous integration / continuous delivery pipeline to determine the corresponding initial repair result, such as code compilation result, version deployment result, solution verification result, manual feedback result, etc. The present application does not make specific limitations.
[0142] Step S603: Collect other feedback information.
[0143] Among them, the other feedback information in the embodiments of the present application can but is not limited to include manual feedback information, labeled error classification, repair result statistics, etc. The present application does not make specific limitations.
[0144] Step S604: Optimize the pre-trained structural causal model.
[0145] Among them, the embodiments of the present application can optimize the pre-trained structural causal model based on the initial repair result and other feedback information, and then obtain the optimized structural causal model.
[0146] Step S605: Re-determine the inference result and repair the test process of the automated test task.
[0147] Among them, the embodiments of the present application can re-determine the inference result based on the optimized structural causal model, and then repair the test process of the automated test task to complete the automated test.
[0148] It can be understood that in the embodiments of the present application, the feedback analyzer can optimize the pre-trained structural causal model based on the initial repair result and other feedback information, and then diagnose the marker accuracy, confirm the effectiveness of the execution repair, and combine the initial repair result and the manual feedback information to formulate an optimization mechanism for re-training and parameter adjustment of the pre-trained structural causal model to complete the automated test.
[0149] The embodiments of the present application can use the continuous integration / continuous delivery pipeline to immediately trigger the repair process when the test fails, without manual intervention, reduce the waiting time, quickly locate the root cause of the problem, and optimize the structural causal model through the initial repair result to more accurately identify the root cause of the test failure, make it more suitable for the actual test scenario, reduce misjudgment, avoid ineffective repairs caused by model errors, and enhance the adaptive ability of the test process through continuous learning and improvement, cope with complex test scenarios, improve the comprehensiveness of test cases, and enhance the scientificity and accuracy of decision-making.
[0150] Optionally, in an embodiment of the present application, using the continuous integration / continuous delivery pipeline to determine the initial repair result when the automated test task fails includes: using the continuous integration / continuous delivery pipeline to repair the deployment environment of the automated test task to obtain the environment repair result; using the continuous integration / continuous delivery pipeline to repair the deployment code of the automated test task to obtain the code repair result; and determining the initial repair result based on the environment repair result and the code repair result.
[0151] It can be understood that in the embodiments of the present application, the continuous integration / continuous delivery pipeline includes continuous integration and continuous delivery. Among them, continuous integration is that developers frequently (multiple times a day) merge code changes into the shared repository, and quickly discover integration errors through automated building and testing. Its core functions are: quick feedback, reducing the risk of conflicts, and quality assurance; continuous delivery means that on the basis of continuous integration, it ensures that the code is always in a deployable state, prepares the release package through an automated process, and on the basis of continuous delivery, automatically deploys the verified code to the production environment.
[0152] In some embodiments, the embodiments of the present application can utilize a continuous integration / continuous delivery pipeline to repair the deployment environment and deployment code of an automated test task, thereby obtaining corresponding environment repair results and code repair results, and thus determining the initial repair results.
[0153] Exemplarily, the embodiments of the present application can use a decision executor to trigger corresponding repair actions according to the inference results, collect the verification execution result information of the decision executor and the continuous integration / continuous delivery pipeline, collect manual feedback information and the initial repair results, mark error classification and repair effectiveness statistics, continuously loop and optimize the pre-trained structural causal model, adopt a Q-learning (Quality learning) reinforcement learning algorithm, continuously optimize decision paths such as "rollback / hotfix / environment reconstruction", and feedback the optimization information to the model trainer.
[0154] The embodiments of the present application can quickly determine the root cause of problems through separate repair of the environment and code, avoid the low repair efficiency caused by the confusion between environment problems and code problems, improve the repair efficiency, and use the parallel execution of environment repair and code repair to shorten the overall repair time, improve the comprehensiveness and reliability of the repair, and thus enhance the stability of automated testing.
[0155] The working principle of the repair method for automated test failures proposed by the embodiments of the present application will be introduced below with a specific embodiment.
[0156] Among them, Figure 7 FIG. is a flowchart of the working principle of the repair method for automated test failures according to an embodiment of the present application.
[0157] Step S701: Execute the corresponding automated test task.
[0158] Step S702: Use a data collector to obtain test data.
[0159] Among them, the embodiments of the present application can combine Figure 2 as shown, and use a data collector to obtain test data.
[0160] Step S703: Use a feature repository to store and index test features.
[0161] Among them, the embodiments of the present application can combine Figure 3 as shown, and use a feature repository to store and index test features.
[0162] Step S704: Use a model trainer to train a structural causal model.
[0163] Among them, the embodiments of the present application can combine Figure 4As shown, a structural causal model is trained using a model trainer, and then the trained structural causal model is obtained.
[0164] Step S705: Use a causal inference engine to determine the corresponding inference result.
[0165] Among them, in the embodiments of the present application, a causal inference engine can be used to determine the inference result of the automated test task, such as the root cause probability and the corresponding repair strategy.
[0166] Step S706: Use a decision executor to trigger corresponding repair actions according to the inference result.
[0167] Step S707: Use a continuous integration / continuous delivery pipeline to determine the initial repair result.
[0168] Among them, in the embodiments of the present application, the initial repair result can include, but is not limited to, code compilation results, version deployment results, solution verification results, manual feedback results, etc., and the present application does not make specific limitations.
[0169] Step S708: Use a feedback analyzer to optimize the pre-trained structural causal model.
[0170] Among them, in the embodiments of the present application, it can be combined with Figure 6 As shown, use a feedback analyzer to optimize the pre-trained structural causal model, and then use the optimized structural causal model to re-determine the inference result, and then repair the test process of the automated test task to perform automated testing.
[0171] According to the method for repairing automated test failures proposed in the embodiments of the present application, the failed test data when the automated test task fails can be preprocessed, and then at least one test feature can be extracted, so as to use the pre-trained structural causal model to output the inference result of the automated test task, so as to repair the test process of the automated test task, complete the automated test, quickly and accurately locate the root cause of the test failure through feature extraction and causal modeling, automatically generate a repair plan based on the inference result, reduce manual intervention, shorten the test cycle, improve the test efficiency, reduce the risk of false positives and false negatives by explicitly modeling the causal relationship between variables, and support test optimization in complex scenarios. Thus, it solves the problems in the related technologies that the complexity of locating the root cause of test failures due to changes in software systems and test cases is high, which not only takes time and effort but also indirectly increases the diagnostic cost, and to a certain extent, there are situations such as false positives and false negatives in manual analysis, and the lack of dynamic perception ability.
[0172] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0173] An embodiment of the present application further provides a repair device for automated test failures.
[0174] Figure 8 It is a block diagram of a repair device for automated test failures provided according to an embodiment of the present application.
[0175] As Figure 8 shown, the repair device 80 for automated test failures includes: an acquisition module 100, an extraction module 200, and a repair module 300.
[0176] Among them, the acquisition module 100 is used to acquire failure test data when an automated test task fails.
[0177] The extraction module 200 is used to preprocess the failure test data to extract at least one test feature.
[0178] The repair module 300 is used to input at least one test feature into a pre-trained structural causal model to output an inference result of the automated test task, and based on the inference result, repair the test process of the automated test task to perform automated testing.
[0179] Optionally, in an embodiment of the present application, it further includes: a first determination module, a second determination module, a construction module, and a training and verification module.
[0180] Among them, the first determination module is used to determine the causal graph structure of the dynamic causal graph in the structural causal model based on the training test features before inputting at least one test feature into the pre-trained structural causal model.
[0181] The second determination module is used to determine the causal graph parameters of the dynamic causal graph based on the training test features and the causal graph structure.
[0182] The construction module is used to construct a structural causal model based on the causal graph structure and the causal graph parameters.
[0183] The training and verification module is used to train and verify the structural causal model until the structural causal model meets the preset conditions to obtain a trained structural causal model.
[0184] Optionally, in an embodiment of the present application, the repair module 300 includes: a first determination unit, a second determination unit, a first calculation unit, a second calculation unit, and a third determination unit.
[0185] Among them, the first determination unit is used to perform inference and analysis using the dynamic causal graph in the pre-trained structural causal model based on the test features to determine the root cause probability of different root causes when the automated test task fails and the causal inference confidence threshold corresponding to the root cause probability.
[0186] A second determination unit, configured to determine a corresponding repair strategy based on the root cause probability and the corresponding causal reasoning confidence threshold.
[0187] A first calculation unit, configured to dynamically calculate a dynamic threshold when an automated test task fails based on statistical process control and system load information when the automated test task fails.
[0188] A second calculation unit, configured to calculate a false alarm rate when an automated test task fails based on the dynamic threshold.
[0189] A third determination unit, configured to re-determine an inference result based on at least one of the root cause probability, the corresponding causal reasoning confidence threshold, the repair strategy, and the false alarm rate.
[0190] Optionally, in an embodiment of the present application, the obtaining module 100 includes: a first obtaining unit and a first generating unit.
[0191] Wherein, the first obtaining unit is configured to obtain at least one of environment information, code information, and log information when an automated test task fails.
[0192] The first generating unit is configured to obtain failed test data based on at least one of the environment information, the code information, and the log information.
[0193] Optionally, in an embodiment of the present application, the extraction module 200 includes: a second obtaining unit, a second generating unit, and a third generating unit.
[0194] Wherein, the second obtaining unit is configured to obtain at least one of environment snapshot information, changed code information, and test timing data when an automated test task fails based on the failed test data.
[0195] The second generating unit is configured to extract at least one of corresponding environment features, code features, and log features based on at least one of the environment snapshot information, the changed code information, and the test timing data.
[0196] The third generating unit is configured to obtain test features based on at least one of the environment features, the code features, and the log features.
[0197] Optionally, in an embodiment of the present application, the repair module 300 includes: a fourth determination unit, an optimization unit, an adjustment unit, and a repair unit.
[0198] Wherein, the fourth determination unit is configured to determine an initial repair result when an automated test task fails by using a continuous integration / continuous delivery pipeline.
[0199] An optimization unit, configured to optimize a pre-trained structural causal model based on an initial repair result to obtain an optimized structural causal model.
[0200] An adjustment unit, configured to re-determine an inference result based on the optimized structural causal model.
[0201] A repair unit, configured to repair the test process of an automated test task based on the inference result for automated testing.
[0202] Optionally, in an embodiment of the present application, a fourth determination unit includes: a first repair subunit, a second repair subunit, and a determination subunit.
[0203] Among them, the first repair subunit is configured to repair the deployment environment of an automated test task by using a continuous integration / continuous delivery pipeline to obtain an environment repair result.
[0204] The second repair subunit is configured to repair the deployment code of an automated test task by using a continuous integration / continuous delivery pipeline to obtain a code repair result.
[0205] The determination subunit is configured to determine an initial repair result based on the environment repair result and the code repair result.
[0206] It should be noted that the foregoing explanation of the embodiment of the method for repairing automated test failures also applies to the device for repairing automated test failures in this embodiment, and will not be elaborated here.
[0207] The device for repairing automated test failures proposed according to the embodiment of the present application can preprocess the failed test data when the automated test task fails, and then extract at least one test feature, so as to use a pre-trained structural causal model to output an inference result of the automated test task, repair the test process of the automated test task, complete the automated test, quickly and accurately locate the root cause of the test failure through feature extraction and causal modeling, automatically generate a repair plan based on the inference result, reduce manual intervention, shorten the test cycle, improve the test efficiency, reduce the risk of false positives and false negatives by explicitly modeling the causal relationship between variables, and support test optimization in complex scenarios. Thus, it solves the problems in the related art that the change of the software system and test cases makes it complex to locate the root cause of the test failure, which is not only time-consuming and laborious, but also indirectly increases the diagnostic cost, and to a certain extent, there are situations such as false positives and false negatives in manual analysis, and the lack of dynamic perception ability.
[0208] For the description of the features in the corresponding embodiment of the device for repairing automated test failures, reference can be made to the relevant description of the corresponding embodiment of the method for repairing automated test failures, which will not be elaborated here one by one.
[0209] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the repair method for failed automated testing.
[0210] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the repair method for failed automated testing when running.
[0211] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs.
[0212] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the repair method for failed automated testing.
[0213] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the repair method for failed automated testing.
[0214] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.
[0215] The above has introduced in detail a repair method for failed automated testing provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A method for fixing automated test failures, characterized in that, Including the following steps: Obtain failed test data when the automated test task fails; Preprocess the failed test data to extract at least one test feature; Input the at least one test feature into a pre-trained structural causal model to output the inference result of the automated test task, and based on the inference result, repair the test process of the automated test task to perform automated testing.
2. The method according to claim 1, characterized in that, Before inputting the at least one test feature into the pre-trained structural causal model, it further includes: Determine the causal graph structure of the dynamic causal graph in the structural causal model based on the training test features; Determine the causal graph parameters of the dynamic causal graph based on the training test features and the causal graph structure; Construct a structural causal model based on the causal graph structure and the causal graph parameters; Train and validate the structural causal model until the structural causal model meets the preset conditions to obtain the trained structural causal model.
3. The method according to claim 2, wherein The step of inputting the at least one test feature into the pre-trained structural causal model to output the inference result of the automated test task includes: Based on the test features, use the dynamic causal graph in the pre-trained structural causal model for reasoning and analysis to determine the root cause probability of different failure root causes when the automated test task fails and the causal reasoning confidence threshold corresponding to the root cause probability; Determine the corresponding repair strategy based on the root cause probability and the corresponding causal reasoning confidence threshold; Dynamically calculate the dynamic threshold when the automated test task fails based on statistical process control and the system load information when the automated test task fails; Calculate the false alarm rate when the automated test task fails based on the dynamic threshold; Redetermine the inference result based on at least one of the root cause probability, the corresponding causal reasoning confidence threshold, the repair strategy, and the false alarm rate.
4. The method according to claim 1, wherein The step of obtaining the failed test data when the automated test task fails includes: Obtain at least one of the environmental information, code information, and log information when the automated test task fails; Based on at least one of the environmental information, code information, and log information, obtain the failed test data.
5. The method according to claim 1, wherein The step of preprocessing the failed test data to extract at least one test feature includes: Based on the failed test data, obtain at least one of the environmental snapshot information, changed code information, and test timing data when the automated test task fails; Based on at least one of the environmental snapshot information, changed code information, and test timing data, extract at least one of the corresponding environmental feature, code feature, and log feature; Based on at least one of the environmental feature, code feature, and log feature, obtain the test feature.
6. The method according to claim 1, wherein The step of repairing the test process of the automated test task based on the inference result to perform automated testing includes: Use the continuous integration / continuous delivery pipeline to determine the initial repair result when the automated test task fails; Optimize the pre-trained structural causal model based on the initial repair result to obtain an optimized structural causal model; Redetermine the inference result based on the optimized structural causal model; Repair the test process of the automated test task based on the inference result for automated testing.
7. The method according to claim 6, wherein The determining of the initial repair result when the automated test task fails using the continuous integration / continuous delivery pipeline includes: Repair the deployment environment of the automated test task using the continuous integration / continuous delivery pipeline to obtain an environment repair result; Repair the deployment code of the automated test task using the continuous integration / continuous delivery pipeline to obtain a code repair result; Determine the initial repair result based on the environment repair result and the code repair result.
8. A repair device for automated test failures, characterized in that, Comprising: An acquisition module for acquiring failed test data when the automated test task fails; An extraction module for preprocessing the failed test data to extract at least one test feature; A repair module for inputting the at least one test feature into a pre-trained structural causal model to output an inference result of the automated test task, and repairing the test process of the automated test task based on the inference result for automated testing.
9. An electronic device, characterized in that, Comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the method for repairing automated test failures according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor for implementing the method for repairing automated test failures according to any one of claims 1-7.
Citation Information
Cited By
Test failure root cause diagnosis method
CN120994451A