Software test failure root cause positioning method and device, electronic equipment and storage medium

By acquiring multimodal data and using a root cause localization model combined with a knowledge graph for root cause localization, the problem of low efficiency and poor accuracy in root cause localization of software test failures in existing technologies is solved, achieving more efficient and accurate root cause localization.

CN121996549APending Publication Date: 2026-05-08TRANSN IOL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TRANSN IOL TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing methods for identifying the root causes of software testing failures rely on the experience of professionals, which is cumbersome, inefficient, and inaccurate.

Method used

By acquiring multimodal data, including text-based test log data, image or video-based test scenario data, and numerical system performance index data, preprocessing and feature extraction are performed. Then, the root cause localization model is combined with the test failure root cause knowledge graph to locate the root cause and output the root cause localization results of software test failure events.

Benefits of technology

It improves the efficiency and accuracy of root cause analysis, reduces reliance on the experience of professional personnel, and enhances the automation and precision of software testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996549A_ABST
    Figure CN121996549A_ABST
Patent Text Reader

Abstract

The invention provides a software test failure root cause positioning method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining multi-modal data associated with a software test failure event, the multi-modal data comprising test log data, test scene data and system performance index data; performing preprocessing and feature extraction on the multi-modal data to obtain a test log feature vector, a test scene feature vector and a system performance feature vector; inputting the test log feature vector, the test scene feature vector and the system performance feature vector into a root cause positioning model, performing root cause positioning by combining the root cause positioning model with a pre-constructed test failure root cause knowledge graph, and outputting a root cause positioning result of a software test failure event; the root cause positioning model is obtained by training based on a multi-modal feature vector sample and a root cause positioning result label. According to the invention, root cause positioning is carried out by adopting the root cause positioning model and combining the multi-modal features, so that the efficiency and accuracy of root cause positioning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software testing technology, and in particular to a method, apparatus, electronic device, and storage medium for locating the root cause of software testing failures. Background Technology

[0002] In the field of software engineering, automated testing is a crucial step in ensuring software quality and improving delivery efficiency. However, as software system architectures become increasingly complex, the amount of data generated during automated testing has surged and become more modal. Currently, existing methods for root cause analysis of software test failures rely on the experience of professionals, resulting in cumbersome processes, low efficiency, and poor accuracy in root cause identification. Summary of the Invention

[0003] This invention provides a method, apparatus, electronic device, and storage medium for locating the root causes of software testing failures, in order to overcome the shortcomings of existing methods for locating the root causes of software testing failures, such as low efficiency and poor accuracy.

[0004] This invention provides a method for locating the root cause of software testing failures, comprising: Acquire multimodal data associated with software test failure events, including: text-based test log data, image or video-based test scenario data, and numerical system performance index data; The multimodal data is preprocessed and features are extracted to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. The test log feature vector, test scenario feature vector, and system performance feature vector are input into the root cause localization model. The root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and outputs the root cause localization result of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

[0005] In some embodiments, the root cause localization model includes: The feature fusion layer is used to determine the dynamic weights of the test log feature vector, test scenario feature vector, and system performance feature vector based on an attention mechanism, and to perform weighted fusion of the test log feature vector, test scenario feature vector, and system performance feature vector to obtain a fused feature vector. The root cause localization layer is used to locate the root cause of the software test failure event based on the fused feature vector and the test failure root cause knowledge graph, and obtain the root cause localization result.

[0006] In some embodiments, locating the root cause of the software test failure event based on the fused feature vector and the test failure root cause knowledge graph includes: Traverse the knowledge graph of root causes of test failures, match the fused feature vector with each feature node of the knowledge graph of root causes of test failures, and obtain the target feature node that is successfully matched. Based on the target feature node, multiple candidate root cause nodes are determined from multiple root cause nodes in the test failure root cause knowledge graph; Based on the association weight between each candidate root cause node and the target feature node, the confidence level of each candidate root cause node is calculated. The target root cause node is determined from the plurality of candidate root cause nodes based on the confidence level of each candidate root cause node.

[0007] In some embodiments, the test failure root cause knowledge graph is constructed based on the following steps: Acquire historical multimodal data associated with historical software test failure events. The historical multimodal data includes: historical test log data in text type, historical test scene data in image or video type, and historical system performance index data in numerical type. The historical multimodal data is preprocessed and features are extracted to obtain historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors. Determine the root causes of historical software testing failures; Using the historical root causes as root cause nodes, the historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors as feature nodes, and the associations between the root cause nodes and the feature nodes as edges, the test failure root cause knowledge graph is constructed.

[0008] In some embodiments, the preprocessing and feature extraction of the multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors includes: The multimodal data is preprocessed to obtain preprocessed multimodal data; The preprocessed multimodal data is spatiotemporally aligned to obtain aligned multimodal data; Feature extraction is performed on the aligned multimodal data to obtain test log feature vector, test scenario feature vector, and system performance feature vector.

[0009] In some embodiments, the root cause localization model is trained based on the following steps: Acquire multimodal data samples associated with software test failure event samples. The multimodal data samples include: text-type test log data samples, image or video-type test scenario data samples, and numerical-type system performance index data samples. The multimodal data samples are preprocessed and feature extracted to obtain test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples. Determine the root cause localization result labels for the software test failure event samples; Using the test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples as training samples, and the root cause localization result labels as sample labels, an initial root cause localization model is trained. After training, the root cause localization model is obtained.

[0010] The present invention also provides a software testing failure root cause localization device, comprising: The acquisition unit is used to acquire multimodal data associated with software test failure events. The multimodal data includes: text-type test log data, image or video-type test scenario data, and numerical-type system performance index data. The data processing unit is used to preprocess and extract features from the multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. The root cause localization unit is used to input the test log feature vector, test scenario feature vector and system performance feature vector into the root cause localization model, and the root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and output the root cause localization result of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the software test failure root cause localization method as described above.

[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the software test failure root cause localization method as described above.

[0013] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the software test failure root cause localization method as described above.

[0014] This invention provides a method, apparatus, electronic device, and storage medium for root cause localization of software test failures. It acquires multimodal data associated with software test failure events, preprocesses and extracts features from the multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. These feature vectors are then input into a root cause localization model, which, combined with a pre-constructed root cause knowledge graph of test failures, performs root cause localization and outputs the root cause localization result for the software test failure event, thus improving the efficiency and accuracy of root cause localization. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating the root cause localization method for software testing failures provided in this embodiment of the invention.

[0017] Figure 2 This is a flowchart illustrating the training process of the root cause localization model provided in this embodiment of the invention.

[0018] Figure 3 This is a schematic diagram of the structure of the software testing failure root cause localization device provided in an embodiment of the present invention.

[0019] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0021] Figure 1 This is a flowchart illustrating the root cause localization method for software testing failures provided in an embodiment of the present invention, as shown below. Figure 1 As shown, a method for locating the root cause of software test failures is provided, the method comprising: Step 110: Obtain multimodal data associated with software test failure events. Multimodal data includes: text-based test log data, image or video-based test scenario data, and numerical system performance index data.

[0022] It should be noted that if one or more automated test cases fail to pass as expected, their execution results are marked as failed or error-prone. When the testing framework detects an assertion failure, program exception, timeout, or functional malfunction, it is considered a software test failure event.

[0023] Optionally, the test log data shall include at least: test framework logs, application logs, and server / system logs; the test scenario data shall include at least: failure screenshots and operation screen recordings; and the system performance index data shall include at least: resource utilization and application performance index data.

[0024] Step 120: Preprocess and extract features from the multimodal data to obtain test log feature vector, test scenario feature vector, and system performance feature vector.

[0025] Optionally, test log data can be preprocessed and feature extracted to obtain test log feature vectors; test scenario data can be preprocessed and feature extracted to obtain test scenario feature vectors; and system performance index data can be preprocessed and feature extracted to obtain system performance feature vectors.

[0026] In some embodiments, preprocessing and feature extraction are performed on the multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors, including: The multimodal data is preprocessed to obtain preprocessed multimodal data; Spatiotemporal alignment is performed on the preprocessed multimodal data to obtain aligned multimodal data; Feature extraction is performed on the aligned multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors.

[0027] Optionally, the multimodal data can be preprocessed, such as by data cleaning, standardization, and data transformation, to obtain preprocessed multimodal data.

[0028] Optionally, the test log feature vector includes at least the semantic features of the test log data; the test scenario feature vector includes at least the visual features of the test scenario data; and the system performance feature vector includes at least the temporal features of the system performance index data.

[0029] Step 130: Input the test log feature vector, test scenario feature vector, and system performance feature vector into the root cause localization model. The root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and output the root cause localization results of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

[0030] Optionally, based on the root cause localization model, the test log feature vector, test scenario feature vector, and system performance feature vector are fused to obtain a fused feature vector. Based on the fused feature vector and the test failure root cause knowledge graph, the root cause of the software test failure event is inferred to obtain the root cause localization result.

[0031] In some embodiments, the root cause localization model includes: The feature fusion layer is used to determine the dynamic weights of the test log feature vector, test scenario feature vector, and system performance feature vector based on the attention mechanism, and to perform weighted fusion of the test log feature vector, test scenario feature vector, and system performance feature vector to obtain the fused feature vector. The root cause localization layer is used to locate the root cause of software test failure events based on the fused feature vector and the test failure root cause knowledge graph, and obtain the root cause localization result.

[0032] Optionally, the feature fusion layer is used for: Based on the attention mechanism, the dynamic weights of the test log feature vector, the test scenario feature vector, and the system performance feature vector are determined. Determine the correlation between test log feature vectors, test scenario feature vectors, and system performance feature vectors; Based on the dynamic weights of the test log feature vector, the test scenario feature vector, and the system performance feature vector, as well as the correlation between the test log feature vector, the test scenario feature vector, and the system performance feature vector, the fused feature vector is obtained by fusing the test log feature vector, the test scenario feature vector, and the system performance feature vector.

[0033] In some embodiments, the root cause of software test failure events is located based on a fused feature vector and a test failure root cause knowledge graph, including: Traverse the knowledge graph of root causes of test failures, match the fused feature vector with each feature node of the knowledge graph of root causes of test failures, and obtain the target feature node that is successfully matched. Based on the target feature nodes, multiple candidate root cause nodes are identified from multiple root cause nodes in the test failure root cause knowledge graph. The confidence level of each candidate root cause node is calculated based on the association weight between each candidate root cause node and the target feature node. The target root cause node is determined from multiple candidate root cause nodes based on the confidence level of each candidate root cause node.

[0034] Optionally, the root cause knowledge graph of test failures can be updated.

[0035] Optionally, the root cause knowledge graph of test failure uses root cause information and feature information as nodes, and the relationship between root cause nodes and feature nodes as edges.

[0036] In this embodiment of the invention, multimodal data associated with software test failure events is acquired. This multimodal data includes test log data, test scenario data, and system performance index data. The multimodal data is preprocessed and features are extracted to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. These feature vectors are then input into a root cause localization model, which, in conjunction with a pre-constructed root cause knowledge graph of test failures, performs root cause localization and outputs the root cause localization result of the software test failure event. This improves the efficiency and accuracy of root cause localization.

[0037] In some embodiments, the test failure root cause knowledge graph is constructed based on the following steps: Acquire historical multimodal data associated with historical software test failure events. Historical multimodal data includes: historical test log data in text type, historical test scenario data in image or video type, and historical system performance index data in numerical type. Historical multimodal data is preprocessed and features are extracted to obtain historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors. Determine the root causes of historical software testing failures; A knowledge graph of test failure root causes is constructed using historical root causes as root cause nodes, historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors as feature nodes, and the relationships between root cause nodes and feature nodes as edges.

[0038] Optionally, historical test log data should include at least: historical test framework logs, historical application logs, and historical server / system logs; historical test scenario data should include at least: historical failure screenshots and historical operation screen recordings; and historical system performance index data should include at least: historical resource utilization and historical application performance index data.

[0039] Figure 2 This is a flowchart illustrating the training process of the root cause localization model provided in an embodiment of the present invention. Figure 2 As shown, in some embodiments, the root cause localization model is trained based on the following steps: Step 210: Obtain multimodal data samples associated with software test failure event samples. Multimodal data samples include: text-type test log data samples, image or video-type test scenario data samples, and numerical-type system performance index data samples.

[0040] Optionally, the test log data samples shall include at least: test framework log samples, application log samples, and server / system log samples; the test scenario data samples shall include at least: failure screenshot samples and operation screen recording samples; and the system performance indicator data samples shall include at least: resource utilization samples and application performance indicator data samples.

[0041] Step 220: Preprocess and extract features from the multimodal data samples to obtain test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples; Optionally, test log data samples are preprocessed and feature extracted to obtain test log feature vector samples; test scenario data samples are preprocessed and feature extracted to obtain test scenario feature vector samples; and system performance index data samples are preprocessed and feature extracted to obtain system performance feature vector samples.

[0042] Step 230: Determine the root cause localization result labels for software test failure event samples; Step 240: Using test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples as training samples, and root cause localization result labels as sample labels, train the initial root cause localization model. After training, the root cause localization model is obtained.

[0043] Optionally, the initial root cause localization model includes: The initial feature fusion layer is used to determine the dynamic weights of the test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples based on the attention mechanism, and to perform weighted fusion of the test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples to obtain fused feature vector samples. The root cause localization layer is used to locate the root cause of software test failure event samples based on the fused feature vector samples and the test failure root cause knowledge graph, and obtain the predicted root cause localization result.

[0044] Optionally, based on the predicted root cause localization results and the root cause localization result labels, a loss function value is calculated, and based on the loss function value, the parameters of the initial root cause localization model are iteratively updated to obtain the root cause localization model.

[0045] The following describes the software test failure root cause localization device provided by the present invention. The software test failure root cause localization device described below and the software test failure root cause localization method described above can be referred to in correspondence.

[0046] Figure 3 This is a schematic diagram of the structure of the software testing failure root cause localization device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the software test failure root cause localization device 300 includes the following: The acquisition unit 310 is used to acquire multimodal data associated with software test failure events. The multimodal data includes: text-type test log data, image or video-type test scenario data, and numerical-type system performance index data. The data processing unit 320 is used to preprocess and extract features from multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. The root cause localization unit 330 is used to input the test log feature vector, test scenario feature vector and system performance feature vector into the root cause localization model. The root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and output the root cause localization result of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

[0047] Optionally, the root cause localization model includes: The feature fusion layer is used to determine the dynamic weights of the test log feature vector, test scenario feature vector, and system performance feature vector based on the attention mechanism, and to perform weighted fusion of the test log feature vector, test scenario feature vector, and system performance feature vector to obtain the fused feature vector. The root cause localization layer is used to locate the root cause of software test failure events based on the fused feature vector and the test failure root cause knowledge graph, and obtain the root cause localization result.

[0048] Optionally, based on the fused feature vectors and the test failure root cause knowledge graph, the root cause of software test failure events is located, including: Traverse the knowledge graph of root causes of test failures, match the fused feature vector with each feature node of the knowledge graph of root causes of test failures, and obtain the target feature node that is successfully matched. Based on the target feature nodes, multiple candidate root cause nodes are identified from multiple root cause nodes in the test failure root cause knowledge graph. The confidence level of each candidate root cause node is calculated based on the association weight between each candidate root cause node and the target feature node. The target root cause node is determined from multiple candidate root cause nodes based on the confidence level of each candidate root cause node.

[0049] Optionally, the test failure root cause knowledge graph is constructed based on the following steps: Acquire historical multimodal data associated with historical software test failure events. Historical multimodal data includes: historical test log data in text type, historical test scenario data in image or video type, and historical system performance index data in numerical type. Historical multimodal data is preprocessed and features are extracted to obtain historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors. Determine the root causes of historical software testing failures; A knowledge graph of test failure root causes is constructed using historical root causes as root cause nodes, historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors as feature nodes, and the relationships between root cause nodes and feature nodes as edges.

[0050] Optionally, the multimodal data is preprocessed and feature extracted to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors, including: The multimodal data is preprocessed to obtain preprocessed multimodal data; Spatiotemporal alignment is performed on the preprocessed multimodal data to obtain aligned multimodal data; Feature extraction is performed on the aligned multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors.

[0051] Optionally, the root cause localization model is trained based on the following steps: Obtain multimodal data samples associated with software test failure event samples. The multimodal data samples include: text-type test log data samples, image or video-type test scenario data samples, and numerical-type system performance indicator data samples. Preprocessing and feature extraction are performed on the multimodal data samples to obtain test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples; Determine the root cause localization results labels for software test failure event samples; The initial root cause localization model is trained using test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples as training samples, and root cause localization result labels as sample labels. After training, the root cause localization model is obtained.

[0052] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other through the communications bus 440. The processor 410 can call logical instructions in the memory 430 to execute a software test failure root cause localization method. This method includes: acquiring multimodal data associated with software test failure events, including: text-type test log data, image or video-type test scene data, and numerical system performance index data; preprocessing and extracting features from the multimodal data to obtain test log feature vectors, test scene feature vectors, and system performance feature vectors; inputting the test log feature vectors, test scene feature vectors, and system performance feature vectors into a root cause localization model, which then performs root cause localization by combining a pre-constructed test failure root cause knowledge graph, and outputs the root cause localization result of the software test failure event; wherein the root cause localization model is trained based on test log feature vector samples, test scene feature vector samples, and system performance feature vector samples corresponding to the multimodal data samples, as well as the corresponding root cause localization result labels.

[0053] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0054] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the software test failure root cause localization method provided by the above methods. The method includes: acquiring multimodal data associated with software test failure events, the multimodal data including: text-type test log data, image or video-type test scene data, and numerical-type system performance index data; preprocessing and feature extraction of the multimodal data to obtain test log feature vectors, test scene feature vectors, and system performance feature vectors; inputting the test log feature vectors, test scene feature vectors, and system performance feature vectors into a root cause localization model, which combines the root cause localization model with a pre-constructed test failure root cause knowledge graph to perform root cause localization and output the root cause localization result of the software test failure event; wherein, the root cause localization model is trained based on the test log feature vector samples, test scene feature vector samples, and system performance feature vector samples corresponding to the multimodal data samples, as well as the corresponding root cause localization result labels.

[0055] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the software test failure root cause localization method provided by the above methods. The method includes: acquiring multimodal data associated with software test failure events, the multimodal data including: text-type test log data, image or video-type test scene data, and numerical-type system performance index data; preprocessing and extracting features from the multimodal data to obtain test log feature vectors, test scene feature vectors, and system performance feature vectors; inputting the test log feature vectors, test scene feature vectors, and system performance feature vectors into a root cause localization model, which then performs root cause localization by combining the root cause localization model with a pre-constructed test failure root cause knowledge graph, and outputs the root cause localization result of the software test failure event; wherein the root cause localization model is trained based on test log feature vector samples, test scene feature vector samples, and system performance feature vector samples corresponding to the multimodal data samples, as well as the corresponding root cause localization result labels.

[0056] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for locating the root cause of software test failures, characterized in that, include: Acquire multimodal data associated with software test failure events, including: text-based test log data, image or video-based test scenario data, and numerical system performance index data; The multimodal data is preprocessed and features are extracted to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. The test log feature vector, test scenario feature vector, and system performance feature vector are input into the root cause localization model. The root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and outputs the root cause localization result of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

2. The method for locating the root cause of software test failures according to claim 1, characterized in that, The root cause localization model includes: The feature fusion layer is used to determine the dynamic weights of the test log feature vector, test scenario feature vector, and system performance feature vector based on an attention mechanism, and to perform weighted fusion of the test log feature vector, test scenario feature vector, and system performance feature vector to obtain a fused feature vector. The root cause localization layer is used to locate the root cause of the software test failure event based on the fused feature vector and the test failure root cause knowledge graph, and obtain the root cause localization result.

3. The method for locating the root cause of software test failures according to claim 2, characterized in that, The step of locating the root cause of the software test failure event based on the fused feature vector and the test failure root cause knowledge graph includes: Traverse the knowledge graph of root causes of test failures, match the fused feature vector with each feature node of the knowledge graph of root causes of test failures, and obtain the target feature node that is successfully matched. Based on the target feature node, multiple candidate root cause nodes are determined from multiple root cause nodes in the test failure root cause knowledge graph; Based on the association weight between each candidate root cause node and the target feature node, the confidence level of each candidate root cause node is calculated. The target root cause node is determined from the plurality of candidate root cause nodes based on the confidence level of each candidate root cause node.

4. The method for locating the root cause of software test failures according to claim 1, characterized in that, The test failure root cause knowledge graph is constructed based on the following steps: Acquire historical multimodal data associated with historical software test failure events. The historical multimodal data includes: historical test log data in text type, historical test scene data in image or video type, and historical system performance index data in numerical type. The historical multimodal data is preprocessed and features are extracted to obtain historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors. Determine the root causes of historical software testing failures; Using the historical root causes as root cause nodes, the historical test log feature vectors, historical test scenario feature vectors, and historical system performance feature vectors as feature nodes, and the associations between the root cause nodes and the feature nodes as edges, a test failure root cause knowledge graph is constructed.

5. The method for locating the root cause of software test failures according to claim 1, characterized in that, The preprocessing and feature extraction of the multimodal data yields test log feature vectors, test scenario feature vectors, and system performance feature vectors, including: The multimodal data is preprocessed to obtain preprocessed multimodal data; The preprocessed multimodal data is spatiotemporally aligned to obtain aligned multimodal data; Feature extraction is performed on the aligned multimodal data to obtain test log feature vector, test scenario feature vector, and system performance feature vector.

6. The method for locating the root cause of software test failures according to claim 1, characterized in that, The root cause localization model is trained based on the following steps: Acquire multimodal data samples associated with software test failure event samples. The multimodal data samples include: text-type test log data samples, image or video-type test scenario data samples, and numerical-type system performance index data samples. The multimodal data samples are preprocessed and feature extracted to obtain test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples. Determine the root cause localization result labels for the software test failure event samples; Using the test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples as training samples, and the root cause localization result labels as sample labels, an initial root cause localization model is trained. After training, the root cause localization model is obtained.

7. A root cause localization device for software testing failures, characterized in that, include: The acquisition unit is used to acquire multimodal data associated with software test failure events. The multimodal data includes: text-type test log data, image or video-type test scenario data, and numerical-type system performance index data. The data processing unit is used to preprocess and extract features from the multimodal data to obtain test log feature vectors, test scenario feature vectors, and system performance feature vectors. The root cause localization unit is used to input the test log feature vector, test scenario feature vector and system performance feature vector into the root cause localization model, and the root cause localization model combines the pre-built test failure root cause knowledge graph to perform root cause localization and output the root cause localization result of the software test failure event. The root cause localization model is trained based on test log feature vector samples, test scenario feature vector samples, and system performance feature vector samples corresponding to multimodal data samples, as well as the corresponding root cause localization result labels.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the software test failure root cause localization method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the software test failure root cause localization method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the software test failure root cause localization method as described in any one of claims 1 to 6.