Test data analysis method and device, electronic equipment, medium and product
By constructing a project-specific knowledge graph and using AI-powered intelligent matching, the root causes of failures in automotive controller software testing can be quickly identified. This solves the problems of low efficiency and time-consuming analysis caused by relying on human experience in existing technologies, and achieves efficient and accurate test result analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-07
AI Technical Summary
In the current technology for automotive controller software development and testing, the analysis of test results relies on human experience, which is inefficient and makes it difficult to accurately identify the root causes of failures. This results in a highly subjective and time-consuming analysis process, making it difficult to balance the contradiction between test quality and efficiency.
Build a project-specific knowledge graph, use AI to intelligently match new test results, generate test result analysis reports, quickly identify the root cause probability distribution of problematic test items, and reduce reliance on human experience.
AI-assisted analysis significantly shortens test result analysis time, improves regression testing efficiency, balances test quality and efficiency, reduces costs, avoids the risk of technology leakage, and supports knowledge bases that can be deployed locally or online.
Smart Images

Figure CN121807705A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a test data analysis method, apparatus, electronic device, readable storage medium, and computer program product. Background Technology
[0002] In the development and testing phase of automotive controller software, each round of testing generates complex test results containing numerous failures or errors. To ensure the quality of the final product, test engineers must conduct time-consuming and experience-dependent root cause analysis on each failure to distinguish whether it is due to inherent software defects or inappropriate testing conditions or evaluation criteria. This process is not only inefficient but also difficult to balance between test quality and verification efficiency under the pressure of tight project schedules and multiple concurrent projects. Existing technologies mainly rely on test engineers manually reviewing historical records and making judgments based on personal memory, lacking systematic experience accumulation and intelligent analysis capabilities. This results in a highly subjective and time-consuming analysis process, making it difficult to formulate accurate and efficient regression testing strategies. Summary of the Invention
[0003] In view of the above problems, this application provides a test data analysis method, apparatus, electronic device, readable storage medium, and computer program product, which can solve the problems of low efficiency in result analysis and difficulty in distinguishing the root causes of failures due to reliance on human experience.
[0004] Firstly, this application provides a test data analysis method, including: Pre-build knowledge graphs for querying test anomalies corresponding to multiple test projects; Obtain the target test results from the new test of the test item to be analyzed; Obtain the target knowledge graph corresponding to the test item to be analyzed; Based on the target test results and the target knowledge graph, pattern matching is performed to obtain the root cause probability value matching result for each problem test item in the target test results that is in a state of failure or error; A test result analysis report is generated based on the problem test items with a status of failure or error in the target test results, the problem test results of the problem test items, and the root cause probability value matching results.
[0005] In the above technical solution, the method can intelligently match the project-specific knowledge graph with the new test results, quickly obtain the probability distribution of the root cause of the problem test item, thereby reducing the reliance on human experience and effectively improving the efficiency and objectivity of test result analysis.
[0006] In some implementations, the pre-construction of a knowledge graph for querying test anomalies corresponding to multiple test items includes: Obtain test data for each test item; Construct a test result dataset for each of the test items based on the test data; The test result dataset is labeled to obtain training data for each test item; The knowledge graph for querying test anomalies is obtained by training the training database and the pre-built artificial model.
[0007] In the above technical solution, the method can build a dedicated labeled training dataset for each test project and generate a test anomaly knowledge graph that matches the project through targeted training, thereby effectively avoiding the problem of cross-project data confusion and ensuring the accuracy of the knowledge graph in matching project test anomalies.
[0008] In some implementations, acquiring test data for each test item includes: When the testing tool supports API interfaces, it calls preset interface functions to obtain test data for multiple test items from the testing tool; When the testing tool does not support the API interface, the test reports of multiple test projects generated by the testing tool are obtained, and the test data of the corresponding test project is obtained according to the test report corresponding to each test project.
[0009] In the above technical solution, the method is compatible with different types of testing tools and can flexibly obtain test data through API calls or test report parsing, ensuring that the data generated by various testing tools can be effectively collected, providing a comprehensive data source for building training datasets and knowledge graphs.
[0010] In some implementations, constructing a test result dataset for each test item based on the test data includes: The test data is parsed to extract key test information for each test item; wherein, the key test information includes at least test condition identifier, evaluation function identifier, test condition result, and evaluation function result; Based on the key test information, construct a test result dataset for each test item.
[0011] In the above technical solution, the method can construct a test result dataset by extracting standardized key test information, ensuring that the data has traceability and structured characteristics.
[0012] In some implementations, the step of labeling the test result dataset to obtain training data for each test item includes: Based on the key test information, identify the problematic test items whose status is failed or incorrect from the test result dataset; The test items are labeled with problem types to obtain a labeled dataset for each test item; wherein, the problem type is one of the following: software error under test, test condition inapplicable, evaluation function inapplicable, and evaluation function error; Based on the labeled dataset, construct a training dataset for each of the test items.
[0013] In the above technical solution, the method can standardize and classify the problematic test items in the test result dataset, clearly distinguish the different root causes of problems such as software errors under test and inapplicable test conditions, thereby forming a structured and high-quality training dataset.
[0014] In some implementations, the step of training based on the training database and a pre-built artificial model to obtain a knowledge graph for querying test anomalies for each test item includes: The training dataset is converted according to a preset file format to obtain the target dataset for each test item. The target dataset is imported into a preset knowledge base to obtain the training knowledge base for each test item; The pre-built artificial intelligence model is trained using the training knowledge base to obtain a knowledge graph for querying test anomalies for each test item.
[0015] In the above technical solution, the method can build an independent training knowledge base for each test project through a standardized format conversion and knowledge base import process; at the same time, it can complete targeted training by combining a preset artificial intelligence model to generate a test anomaly knowledge graph that is highly adapted to the project, ensuring that the knowledge graph accurately matches the test questions and avoiding cross-project data interference.
[0016] In some embodiments, the method further includes: Identify the key test items whose predicted root cause probability values exceed a preset threshold in the test result analysis report; When outputting the test result analysis report, the key test items in the test result analysis report are highlighted or prioritized.
[0017] In the above technical solution, this method can quickly locate high-probability core problem test items, highlight key content by highlighting or prioritizing, help test engineers skip low-probability interference items, focus on the most likely software defects or key anomalies, significantly shorten the time for manual investigation, and improve the accuracy and efficiency of test result analysis.
[0018] In some embodiments, the method further includes: Receive correction instructions from the user regarding the test result analysis report; The test result analysis report is corrected and updated according to the correction instructions to obtain the final analysis report.
[0019] In the above technical solution, the method can support manual review and correction of the test result analysis report generated by AI, correct any possible misjudgments, and thus improve the accuracy and reliability of the test result analysis report.
[0020] In some embodiments, the method further includes: Based on the final analysis report and the target test results, new training data is constructed. The target knowledge graph is trained and optimized based on the newly added training data.
[0021] In the above technical solution, the method can transform the final analysis data after manual review and correction into new training data, which is used to iteratively optimize the target knowledge graph of the corresponding project, so that the knowledge graph can continuously accumulate test experience and fit the actual test scenario, thereby continuously improving the accuracy of subsequent intelligent analysis.
[0022] Secondly, this application provides a test data analysis device, comprising: The building unit is used to pre-build knowledge graphs for querying test anomalies for multiple test projects; The first acquisition unit is used to acquire the target test results obtained from the new test of the test item to be analyzed; The second acquisition unit is used to acquire the target knowledge graph corresponding to the test item to be analyzed; The matching unit is used to perform pattern matching based on the target test results and the target knowledge graph to obtain the root cause probability value matching result for each problem test item in the target test results that is in a state of failure or error. The generation unit is used to generate a test result analysis report based on the problem test items in the target test results that are in a state of failure or error, the problem test results of the problem test items, and the root cause probability value matching results.
[0023] In the above technical solution, the device can intelligently match the project-specific knowledge graph with new test results to quickly obtain the probability distribution of the root cause of the problem test item, thereby reducing the reliance on human experience and effectively improving the efficiency and objectivity of test result analysis.
[0024] Thirdly, this application provides an electronic device, the electronic device including a memory and a processor, the memory for storing a computer program, the processor running the computer program to cause the electronic device to perform the test data analysis method described in any one of the first aspects.
[0025] Fourthly, this application provides a readable storage medium storing a computer program, which, when executed by a processor, performs the test data analysis method described in any one of the first aspects.
[0026] Fifthly, this application provides a computer program product, which includes a computer program that, when executed by a processor, performs the test data analysis method described in any one of the first aspects.
[0027] The beneficial effects of this application are as follows: AI-assisted analysis can significantly shorten the test result analysis time and improve regression testing efficiency, thereby significantly shortening the software testing cycle in project development; at the same time, with the help of accurate problem localization and targeted regression testing, the contradiction between test quality and test efficiency can be effectively balanced; in addition, through the optimization of AI algorithms and the accumulation of knowledge base, a large amount of hardware and manpower investment can be avoided, thereby reducing costs and avoiding over-reliance on personal experience; finally, the knowledge base that supports local or online deployment can both utilize the latest AI large model capabilities and avoid the risk of technology leakage, thereby flexibly balancing security and functionality. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart illustrating the test data analysis method in some embodiments of this application; Figure 2 This is a flowchart illustrating the test data analysis method in some embodiments of this application; Figure 3This is a schematic diagram of the test data analysis device in some embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. Detailed Implementation
[0030] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0032] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more (including two), similarly, "multiple sets" refers to two or more sets (including two sets), and "multiple pieces" refers to two or more pieces (including two pieces) unless otherwise explicitly defined.
[0033] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0034] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0035] Currently, the standard testing process includes: writing corresponding test cases and evaluation functions based on development requirements, executing tests, analyzing test results, and performing regression testing. While the time overhead for writing test cases and evaluation functions, as well as test execution, is relatively fixed, there is considerable flexibility in the analysis of test results and the regression testing phase.
[0036] However, in practice, meticulous analysis of test results and regression testing can lead to significant time costs; conversely, sloppy execution can compromise test quality. Furthermore, this type of testing relies heavily on engineer experience, making it difficult to ensure objectivity and hindering its transfer.
[0037] To address the aforementioned technical issues, this application provides a test data analysis method. Based on the consideration that "failures in test results are not necessarily problems with the software under test, but may also be due to interference factors such as inapplicable test conditions or unsuitable evaluation functions," this method proposes a technique that combines AI and knowledge base to deeply mine hidden patterns and rules in historical test results, thereby identifying the most likely causes of problems in different items.
[0038] As can be seen, this method can automatically predict the most likely cause of a problem when a new test fails, based on analysis of historical data. This eliminates the need for test engineers to rely on personal memory or manual recording to judge the applicability of hundreds of test cases and evaluation functions. Therefore, this method allows analysis to focus on the real software problems, thereby improving the quality and efficiency of testing.
[0039] like Figure 1 As shown, some embodiments of this application provide a test data analysis method, which includes: S101. Pre-build knowledge graphs for querying test anomalies for multiple test projects; S102. Obtain the target test results obtained from the new test of the test item to be analyzed; S103. Obtain the target knowledge graph corresponding to the test item to be analyzed; S104. Perform pattern matching based on the target test results and the target knowledge graph to obtain the root cause probability value matching result for each test item in the target test results where the state is failure or error. S105. Based on the problem test items with a status of failure or error in the target test results, the problem test results of the problem test items, and the root cause probability value matching results, generate a test result analysis report.
[0040] In some embodiments, a knowledge graph refers to a structured knowledge network constructed based on historical test data of each test item, after annotation and model training, used to depict the correlation between test anomalies and their corresponding root causes.
[0041] In some embodiments, the test item to be analyzed refers to a specific automotive controller software test item that has completed a new round of testing and whose test results require anomaly analysis.
[0042] In some embodiments, the target test result refers to the set of test data generated after the test item to be analyzed completes a new round of testing, which includes key information such as test condition identifier, evaluation function identifier, and test status.
[0043] In some embodiments, the target knowledge graph refers to a knowledge graph that corresponds one-to-one with the test item to be analyzed and is specifically used to analyze test anomalies of that item.
[0044] In some embodiments, a problem test item refers to a test entry in the target test result that has a test status of failure or error.
[0045] In some embodiments, the root cause probability value matching result refers to the probability distribution data of various root causes (such as software errors under test, inapplicable test conditions, etc.) corresponding to the problem test item obtained through pattern matching.
[0046] In some embodiments, a test result analysis report refers to a standardized analysis document generated by integrating problematic test items, problematic test results, and root cause probability value matching results to assist test engineers in troubleshooting. This standardized analysis document facilitates subsequent automated processing.
[0047] For example, this method can build a dedicated AI agent. After a new test is completed, the test results Excel table is input into this AI agent, so that the AI agent can combine historical data and patterns in the knowledge base to provide the most likely cause analysis for the Fail or Error items in the test results, and output a new test result table containing probability distribution.
[0048] In the above embodiments, the method can intelligently match the project-specific knowledge graph with the new test results to quickly obtain the probability distribution of the root cause of the problem test item, thereby reducing the reliance on human experience and effectively improving the efficiency and objectivity of test result analysis.
[0049] In some embodiments, a knowledge graph for querying test anomalies corresponding to multiple test items is pre-constructed, including: Obtain test data for each test item; Construct a test result dataset for each test item based on the test data; The test result dataset is labeled to obtain training data for each test item; The system is trained using a training database and a pre-built artificial model to obtain a knowledge graph for querying test anomalies for each test item.
[0050] In the above embodiments, the method can build a dedicated labeled training dataset for each test project and generate a test anomaly knowledge graph that matches the project through targeted training, thereby effectively avoiding the problem of cross-project data confusion and ensuring the accuracy of the knowledge graph in matching project test anomalies.
[0051] In some embodiments, acquiring test data for each test item includes: When the testing tool supports API interfaces, it calls preset interface functions to obtain test data from multiple test items from the testing tool; When the testing tool does not support the API interface, obtain the test reports of multiple test projects generated by the testing tool, and obtain the test data of the corresponding test project based on the test report of each test project.
[0052] In some embodiments, this method can automatically parse the test result report file through the testing tool's API interface. For testing tools without API support, this method can parse the report using HTML format.
[0053] In the above embodiments, the method is compatible with different types of testing tools and can flexibly obtain test data through API calls or test report parsing, ensuring that data generated by various testing tools can be effectively collected, providing a comprehensive data source for building training datasets and knowledge graphs.
[0054] In some embodiments, a test result dataset for each test item is constructed based on the test data, including: The test data is parsed to extract key test information for each test item; the key test information includes at least the test condition identifier, evaluation function identifier, test condition result, and evaluation function result. The test result dataset for each test item is constructed based on the key test information.
[0055] In some embodiments, the method can extract key information such as test condition ID, evaluation function ID, test condition result, and evaluation function result, and summarize them into a standardized Excel spreadsheet to establish a structured test result database.
[0056] In some embodiments, the test condition ID and evaluation function ID are unique to ensure data traceability.
[0057] In the above embodiments, the method can construct a test result dataset by extracting standardized key test information, ensuring that the data has traceability and structured characteristics.
[0058] In some embodiments, the test result dataset is labeled to obtain training data for each test item, including: Based on the key test information, identify the problematic test items whose status is failure or error from the test result dataset; Problem test items are labeled with problem types to obtain a labeled dataset for each test item; the problem type is one of the following: software under test error, test condition inapplicable, evaluation function inapplicable, or evaluation function error; Based on the labeled dataset, construct the training dataset for each test item.
[0059] In some embodiments, the method may be used by test engineers to perform root cause analysis on failed or error items and label the problem type.
[0060] In the above embodiments, the method can standardize and classify the problematic test items in the test result dataset, clearly distinguish the different root causes of problems such as software errors under test and inapplicable test conditions, thereby forming a structured, high-quality training dataset.
[0061] In some embodiments, a knowledge graph for querying test anomalies is obtained by training a training database and a pre-built artificial model, including: The training dataset is converted according to the preset file format to obtain the target dataset for each test item. Import the target dataset into the preset knowledge base to obtain the training knowledge base for each test item; By training a pre-built artificial intelligence model using a training knowledge base, a knowledge graph for querying test anomalies is obtained for each test item.
[0062] In some embodiments, the method can convert the test result tables of each stage of the project into CSV format files using a script, and then import them into a local or online knowledge base system (AnythingLLM can be used locally, and GetNotes or Tencent IMA can be used online).
[0063] In some embodiments, one knowledge base corresponds to the test results of one project, which can avoid data confusion between different projects.
[0064] In some embodiments, the method may select a corresponding large AI model (such as the BERT-BiLSTM-CRF model) to train and continuously update the knowledge base, thereby establishing a knowledge graph of abnormal test results.
[0065] In some embodiments, the selection of large AI models needs to take into account the specific characteristics of the project and the scale of the data.
[0066] In the above embodiments, the method can build an independent training knowledge base for each test project through a standardized format conversion and knowledge base import process; at the same time, it can complete targeted training by combining a preset artificial intelligence model to generate a test anomaly knowledge graph that is highly adapted to the project, ensuring that the knowledge graph accurately matches the test questions and avoiding cross-project data interference.
[0067] In some embodiments, the method further includes: Identify the key test items whose predicted root cause probability values exceed preset thresholds in the test results analysis report; When outputting the test result analysis report, highlight or prioritize the key test items in the report.
[0068] In some embodiments, the method may focus on failing items that are deemed to be highly likely to be software bugs.
[0069] In the above embodiments, the method can quickly locate high-probability core problem test items, highlight key content by highlighting or prioritizing, help test engineers skip low-probability interference items, focus on the most likely software defects or critical anomalies, significantly shorten the time for manual investigation, and improve the accuracy and efficiency of test result analysis.
[0070] In some embodiments, the method further includes: Receive correction instructions from users regarding the test result analysis report; The test result analysis report is revised and updated according to the correction instructions to obtain the final analysis report.
[0071] In some embodiments, the method can update the reason classification for the failed item based on the specific circumstances when the human judgment result and the AI judgment result are inconsistent.
[0072] In the above embodiments, the method can support manual review and correction of AI-generated test result analysis reports, correcting possible misjudgments, thereby improving the accuracy and reliability of test result analysis reports.
[0073] In some embodiments, the method further includes: Based on the final analysis report and target test results, construct new training data; The target knowledge graph is trained and optimized based on the newly added training data.
[0074] In some embodiments, the method can re-enter the test results after manual verification into the knowledge base to achieve continuous learning and optimization of the knowledge base, ensuring the accuracy and timeliness of the knowledge base, and realizing a virtuous cycle.
[0075] In some embodiments, the method may also establish a regular knowledge base maintenance and cleanup mechanism.
[0076] In the above embodiments, the method can transform the final analysis data after manual review and correction into new training data, which is used to iteratively optimize the target knowledge graph of the corresponding project, so that the knowledge graph can continuously accumulate test experience and fit the actual test scenario, thereby continuously improving the accuracy of subsequent intelligent analysis.
[0077] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below. In some embodiments, such as Figure 2 As shown, the test data analysis method includes: S201. Obtain test data for each test item; S202. Analyze the test data and extract the key test information for each test item; S203. Construct a test result dataset for each test item based on key test information; S204. Based on the key test information, identify the problem test items with a status of failure or error from the test result dataset; S205. Label the problem test items with problem types to obtain the labeled dataset for each test item; S206. Based on the labeled dataset, construct the training dataset for each test item; S207. Convert the training dataset according to the preset file format to obtain the target dataset for each test item; S208. Import the target dataset into the preset knowledge base to obtain the training knowledge base for each test item; S209. Train the pre-built artificial intelligence model using the training knowledge base to obtain the knowledge graph corresponding to each test item for querying test anomalies; S210. Obtain the target test results obtained from the new test of the test item to be analyzed; S211. Obtain the target knowledge graph corresponding to the test item to be analyzed; S212. Perform pattern matching based on the target test results and the target knowledge graph to obtain the root cause probability value matching result for each test item in the target test results where the state is failure or error. S213. Generate a test result analysis report based on the test items with a status of failure or error in the target test results, the test results of the test items, and the root cause probability value matching results. S214. Identify the key test items whose predicted root cause probability values in the test result analysis report exceed the preset threshold. S215. When outputting the test result analysis report, highlight or prioritize the key test items in the report.
[0078] Figure 3 A schematic diagram of a test data analysis device is shown. It should be understood that this device is related to... Figure 1 The method executed in the middle corresponds to the steps involved in the aforementioned method. The specific functions and effects of the device can be found in the description above. To avoid repetition, detailed descriptions are omitted here.
[0079] The test data analysis device includes: Construction unit 310 is used to pre-build knowledge graphs for querying test anomalies for multiple test projects; The first acquisition unit 320 is used to acquire the target test results obtained from the new test of the test item to be analyzed; The second acquisition unit 330 is used to acquire the target knowledge graph corresponding to the test item to be analyzed; Matching unit 340 is used to perform pattern matching based on the target test results and the target knowledge graph to obtain the root cause probability value matching result for each problem test item in the target test results where the state is failure or error; The generation unit 350 is used to generate a test result analysis report based on the problem test items with a status of failure or error in the target test results, the problem test results of the problem test items, and the root cause probability value matching results.
[0080] In some embodiments, the building unit 310 includes: Get subunit 311, used to obtain test data for each test item; Sub-unit 312 is constructed to build the test result dataset for each test item based on the test data. The annotation subunit 313 is used to annotate the test result dataset to obtain training data for each test item. Training subunit 314 is used to train based on the training database and a pre-built artificial model to obtain a knowledge graph for querying test anomalies for each test item.
[0081] In some embodiments, the acquisition subunit 311 is specifically used to call a preset interface function to obtain test data of multiple test items from the test tool when the test tool supports API interfaces; The sub-unit 311 is specifically used to obtain test reports for multiple test items generated by the test tool when the test tool does not support the API interface, and to obtain the test data of the corresponding test item based on the test report corresponding to each test item.
[0082] In some embodiments, a subunit 312 is constructed, specifically for parsing test data and extracting key test information for each test item; wherein, the key test information includes at least a test condition identifier, an evaluation function identifier, a test condition result, and an evaluation function result; Sub-unit 312 is specifically used to construct the test result dataset for each test item based on key test information.
[0083] In some embodiments, the annotation subunit 313 is specifically used to determine the problem test items with a status of failure or error from the test result dataset based on the test key information; The annotation subunit 313 is specifically used to annotate the problem test items with problem types to obtain an annotated dataset for each test item; wherein, the problem type is one of the following: software under test error, test condition inapplicable, evaluation function inapplicable, or evaluation function error; The annotation subunit 313 is specifically used to construct the training dataset for each test item based on the annotation dataset.
[0084] In some embodiments, the training subunit 314 is specifically used to convert the training dataset according to a preset file format to obtain the target dataset for each test item. Training subunit 314 is also used to import the target dataset into a preset knowledge base to obtain the training knowledge base for each test item; The training subunit 314 is specifically used to train a pre-built artificial intelligence model through a training knowledge base to obtain a knowledge graph for querying test anomalies for each test item.
[0085] In some embodiments, the test data analysis apparatus further includes: Unit 360 is used to identify key test items whose predicted root cause probability values in the test result analysis report exceed a preset threshold. Display unit 370 is used to highlight or prioritize key test items in the test result analysis report when outputting the test result analysis report.
[0086] In some embodiments, the test data analysis apparatus further includes: The receiving unit 380 is used to receive correction instructions input by the user in response to the test result analysis report; The update unit 390 is used to correct and update the test result analysis report according to the correction instructions to obtain the final analysis report.
[0087] In some embodiments, the construction unit 310 is further configured to construct new training data based on the final analysis report and the target test results; The building unit 310 is also used to train and optimize the target knowledge graph based on the newly added training data.
[0088] like Figure 4 As shown, this application provides an electronic device 400, which includes a processor 401 and a memory 402. The processor 401 and the memory 402 are interconnected and communicate with each other through a communication bus 403 and / or other forms of connection mechanism (not shown). The memory 402 stores a computer program that can be executed by the processor 401. When the computing device is running, the processor 401 executes the computer program to perform the method in any of the aforementioned optional implementations.
[0089] This application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method in any of the aforementioned optional implementations.
[0090] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0091] This application provides a computer program product, which includes a computer program that, when run by a processor, executes the method in any of the aforementioned optional implementations.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application 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 or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A test data analysis method, characterized in that, include: Pre-build knowledge graphs for querying test anomalies corresponding to multiple test projects; Obtain the target test results from the new test of the test item to be analyzed; Obtain the target knowledge graph corresponding to the test item to be analyzed; Based on the target test results and the target knowledge graph, pattern matching is performed to obtain the root cause probability value matching result for each problem test item in the target test results that is in a state of failure or error; A test result analysis report is generated based on the problem test items with a status of failure or error in the target test results, the problem test results of the problem test items, and the root cause probability value matching results.
2. The test data analysis method according to claim 1, characterized in that, The pre-constructed knowledge graph for querying test anomalies, corresponding to multiple test projects, includes: Obtain test data for each test item; Construct a test result dataset for each of the test items based on the test data; The test result dataset is labeled to obtain training data for each test item; The knowledge graph for querying test anomalies is obtained by training the training database and the pre-built artificial model.
3. The test data analysis method according to claim 2, characterized in that, The acquisition of test data for each test item includes: When the testing tool supports API interfaces, it calls preset interface functions to obtain test data for multiple test items from the testing tool; When the testing tool does not support the API interface, the test reports of multiple test projects generated by the testing tool are obtained, and the test data of the corresponding test project is obtained according to the test report corresponding to each test project.
4. The test data analysis method according to claim 2, characterized in that, The step of constructing a test result dataset for each test item based on the test data includes: The test data is parsed to extract key test information for each test item; wherein, the key test information includes at least test condition identifier, evaluation function identifier, test condition result, and evaluation function result; Based on the key test information, construct a test result dataset for each test item.
5. The test data analysis method according to claim 4, characterized in that, The step of labeling the test result dataset to obtain training data for each test item includes: Based on the key test information, identify the problematic test items whose status is failed or incorrect from the test result dataset; The test items are labeled with problem types to obtain a labeled dataset for each test item; wherein, the problem type is one of the following: software error under test, test condition inapplicable, evaluation function inapplicable, and evaluation function error; Based on the labeled dataset, construct a training dataset for each of the test items.
6. The test data analysis method according to claim 2, characterized in that, The step of training based on the training database and a pre-built artificial model to obtain a knowledge graph for querying test anomalies for each test item includes: The training dataset is converted according to a preset file format to obtain the target dataset for each test item. The target dataset is imported into a preset knowledge base to obtain the training knowledge base for each test item; The pre-built artificial intelligence model is trained using the training knowledge base to obtain a knowledge graph for querying test anomalies for each test item.
7. The test data analysis method according to claim 1, characterized in that, The method further includes: Identify the key test items whose predicted root cause probability values exceed a preset threshold in the test result analysis report; When outputting the test result analysis report, the key test items in the test result analysis report are highlighted or prioritized.
8. The test data analysis method according to claim 1, characterized in that, The method further includes: Receive correction instructions from the user regarding the test result analysis report; The test result analysis report is corrected and updated according to the correction instructions to obtain the final analysis report.
9. The test data analysis method according to claim 8, characterized in that, The method further includes: Based on the final analysis report and the target test results, new training data is constructed. The target knowledge graph is trained and optimized based on the newly added training data.
10. A test data analysis device, characterized in that, The test data analysis device includes: The building unit is used to pre-build knowledge graphs for querying test anomalies for multiple test projects; The first acquisition unit is used to acquire the target test results obtained from the new test of the test item to be analyzed; The second acquisition unit is used to acquire the target knowledge graph corresponding to the test item to be analyzed; The matching unit is used to perform pattern matching based on the target test results and the target knowledge graph to obtain the root cause probability value matching result for each problem test item in the target test results that is in a state of failure or error. The generation unit is used to generate a test result analysis report based on the problem test items in the target test results that are in a state of failure or error, the problem test results of the problem test items, and the root cause probability value matching results.
11. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the test data analysis method according to any one of claims 1 to 9.
12. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, performs the test data analysis method according to any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs the test data analysis method according to any one of claims 1 to 9.