An artificial intelligence-based software test automation supervision system and method

By constructing multi-dimensional feature matrix and artificial intelligence analysis, screening high-risk test cases, automatically identifying abnormal scenarios, solving the problems of waste of resources and inefficiency in traditional software testing, and achieving an efficient and reliable testing process.

CN120196552BActive Publication Date: 2025-07-25江苏省软件产品检测中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510676973.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-07-25
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

In traditional software testing automation, test cases are selected relying on manual experience or static rules, resulting in insufficient coverage of key scenarios and low defect detection efficiency. Especially in complex systems, the number of test cases is huge and the functions are overlapping, and the redundancy problem is prominent, resulting in waste of computing resources.

Method used

Build a multi-dimensional feature matrix of test cases, analyze the correlation between features and risk level, filter high-risk use cases through artificial intelligence, automatically identify actual test scenarios and conduct multi-dimensional anomaly evaluation, dynamically filter effective test cases, and monitor the test process in real time.

Benefits of technology

Significantly reduce the execution of redundant test cases, optimize the allocation of test resources, improve the comprehensiveness and reliability of tests, solve the problem of defect detection lag, and improve testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196552B_ABST
    Figure CN120196552B_ABST
Patent Text Reader

Abstract

The present invention discloses an artificial intelligence-based software test automation supervision system and method, which relates to the technical field of test supervision. The supervision method includes the following steps: collecting test cases and test data during each software test process to generate corresponding test records; constructing a multi-dimensional feature matrix for any test case, calculating the risk level of each test case, and analyzing the correlation between each feature and the risk level in each test case; extracting the multi-dimensional feature matrix of each test case in any test record and performing a risk assessment on the expected test situation of each test case; performing an effectiveness screening on each test case based on the risk classification results of each test case; performing a real-time evaluation on the real-time software test process being carried out at the current moment; and identifying abnormal situations in the real-time software test process based on the actual usage of each effective test case.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of test supervision, and specifically to a software test automation supervision system and method based on artificial intelligence. Background Art

[0002] In modern software development, with the increasing complexity of application programs, traditional manual test methods can no longer meet the requirements of efficient and comprehensive testing. The introduction of artificial intelligence technology provides a new solution for software testing. Through a data-driven method, it can automatically generate and select test cases, thereby improving test efficiency and accuracy.

[0003] In the process of traditional software test automation, the selection of test cases often relies on manual experience or static rules, which has significant blindness, resulting in insufficient coverage of key scenarios and low defect detection efficiency. Especially in complex systems, the number of test cases is huge and the functions overlap, and the redundancy problem is prominent. A large number of duplicate test cases consume computing resources and extend the test cycle, causing a waste of a large amount of time and resources. Summary of the Invention

[0004] The purpose of the present invention is to provide a software test automation supervision system and method based on artificial intelligence to solve the problems raised in the prior art.

[0005] To achieve the above purpose, the present invention provides the following technical solution: A software test automation supervision method based on artificial intelligence, and the supervision method includes the following steps:

[0006] Step S100: Collect the test cases and generated test data used in each software test process, and generate corresponding test records; analyze the usage of each test case in any test record, and construct a multi-dimensional feature matrix of any test case.

[0007] Step S200: Analyze the usage of any test case in each test record, and calculate the risk level of each test case; according to the multi-dimensional feature matrix of each test case, analyze the association between each feature and the risk level in each test case.

[0008] Step S300: Extract the multi-dimensional feature matrix of each test case in any test record, and perform a risk assessment on the expected test situation of each test case; based on the risk classification results of each test case, perform an effectiveness screening on each test case.

[0009] Step S400: extract the selected valid test cases, and perform real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; based on the actual usage of each valid test case, identify abnormal situations during the real-time software testing process.

[0010] Furthermore, step S100 includes the following steps:

[0011] Step S101: randomly select a software testing process, and whenever a user selects a test case, respectively extract the time point when the test case is started and the time point when the test case is ended, obtain the use time interval of the selected test case, collect the test data generated in the use time interval, and obtain the test data set of the selected test case;

[0012] Step S102: Set the i-th test case to a i , test case a i The corresponding test data set is D i , generate a comprehensive dataset Z for the i-th test case i =(a i ,D i ); Summarize the comprehensive data sets of each test case in the selected software testing process to generate a test record corresponding to the selected software testing process;

[0013] Step S103: randomly select a test record, randomly extract a comprehensive data set of a test case from the selected test record, and obtain the test data set in the comprehensive data set; preset evaluation indicators of several dimensions for the test data set, and preset corresponding evaluation rules for each dimension to obtain evaluation values of each dimension, and average the evaluation values of each dimension to obtain the comprehensive evaluation value of the extracted test case; preset an expected evaluation threshold, if the comprehensive evaluation value of the extracted test case exceeds the expected evaluation threshold, the extracted test case is set as the first test case, otherwise it is set as the second test case; the preset evaluation indicators for the test data set include indicators such as function coverage, response time, failure rate and number of vulnerabilities, and for the evaluation rules, for example: the function coverage can calculate the function pass rate by recording the test results of each function, and the response time can calculate the pass rate by measuring the length of the system response time, all of which are evaluated in the form of pass rate;

[0014] Step S104: Arbitrarily select a test case and extract several features from the corresponding test data set. If the selected test case is the first test case, set the several extracted features as the first feature set. If it is the second test case, set the several features as the second feature set, and obtain the multi-dimensional feature matrix of the selected test case from the feature set corresponding to any test case. The first test case indicates that an effective test is generated during the test process, and the second test case indicates that no effective test is generated during the test process. Both can be fed back with set evaluation indicators.

[0015] Further, step S200 includes the following steps:

[0016] Step S201: Arbitrarily select a test case, obtain each test record containing the selected test case and set it as the target test record, and calculate the execution frequency f = m / M of the selected test case. total , where m is the number of target test records, and M total is the total number of test records. Respectively count the number of test records where the selected test case is the first test case as n1 and the number of test records where the selected test case is the second test case as n2 in each target test record, and calculate the effective proportion η = n1 / (n1 + n2) of the selected test case. The execution frequency of the test case reflects the number of times the test case is used. The more times it is used, when referring to other parameters later, it can directly reflect the effective situation of the test case.

[0017] Step S202: Preset a test scenario database, where several test scenarios are stored in the test scenario database. Among them, each test scenario matches several scenario features. Arbitrarily select a target test record, and obtain the multi-dimensional feature matrix of the selected test case in it. Compare each feature in the multi-dimensional feature matrix with the several scenario features of any test scenario. If there is a test scenario whose each scenario feature is the same as each feature of the multi-dimensional feature matrix, obtain the actual test scenario of the selected target test record.

[0018] Step S203: Obtain the actual test scenarios of each target test record, count the types of actual test scenarios included in all target test records as S, and set the types of scenarios included in each target test record where the selected test case is the second test case as s2, and calculate the abnormal scenario coverage rate e = s2 / S of the selected test case. According to the formula:

[0019] ;

[0020] Calculate the risk degree R of the selected test case.

[0021] Step S204: Arbitrarily select a feature from the multi-dimensional feature matrix of the selected test cases. If the selected feature is a scenario feature, count the number of scenario types containing the selected feature as es, set the number of target test records corresponding to the b1-th scenario type among them as m b1 and the number of test records of the b2-th scenario type as M' b2 , and calculate the correlation degree G of the selected feature according to the formula:

[0022] ;

[0023] where b1 and b2 are positive integers and b1 ∈ [1, es], b2 ∈ [1, es]; if the selected feature is not a scenario feature, then G = 0; for any feature in a test case, dividing the number of features that pass the effective test by the total number of test records involved in the feature gives the effective proportion corresponding to the feature, which can directly reflect the correlation degree of the feature;

[0024] Step S205: Set the correlation degree of the c-th feature in the multi-dimensional feature matrix as G c , according to the formula:

[0025] ;

[0026] where c1 is a positive integer and c1 ∈ [1, h], h is the number of features in the multi-dimensional feature matrix, and G c1 is the correlation degree of the c1-th feature; calculate the risk impact value Y of the c-th feature in the selected test case on the test case where it is located c .

[0027] Further, step S300 includes the following steps:

[0028] Step S301: Arbitrarily select a test record, and arbitrarily select a test case from the selected test record to obtain the risk impact values of each feature in the multi-dimensional feature matrix of the selected test case; compare each feature between each test case. If there are two identical features, arbitrarily select one feature and set it as the target feature. If there are no two identical features, set both features as the target features to obtain the target feature set of the selected test record;

[0029] Step S302: Set the risk impact value of the j-th target feature in the target feature set of the selected test record as Y j , and accumulate to obtain the risk assessment value RA of the selected test record; accumulate the risk impact values of each feature in the multi-dimensional feature matrix of the selected test case to calculate the risk degree R of the selected test case. If R > RA, remove the selected test case. If R ≤ RA, set the selected test case as an effective test case;

[0030] Step S303: Obtain all valid test cases and generate a real-time test case set. Obtain whether each valid test case is the first test case in each test record. If there is a valid test case that is the first test case, obtain the comprehensive evaluation value of the valid test case, and select the smallest comprehensive evaluation value as an abnormal evaluation threshold.

[0031] Further, step S400 includes the following steps:

[0032] Step S401: Obtain all valid test cases and generate a real-time test case set. During the software testing process at the current moment, randomly select a valid test case from the real-time test case set, and collect the test data of the selected valid test case to obtain a real-time test data set;

[0033] Step S402: Extract several features from the real-time test data set, obtain the risk impact value of each feature, and accumulate the risk impact values of each feature to obtain a real-time risk assessment value RA now , set the abnormal evaluation threshold as RA th , if RA now < RA th , then mark the selected valid test case as abnormal;

[0034] Step S403: Count the number of valid test cases with abnormal marks in the real-time test data set, and calculate the proportion of abnormal cases τ; preset a τ th , if τ ≥ τ th , then give an abnormal reminder for the software testing process at the current moment.

[0035] To better implement the above method, a software testing automation supervision system is also proposed. The supervision system includes a historical test analysis module, a use case feature association module, a use case evaluation and screening module, and a real-time test identification module;

[0036] The historical test analysis module is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records; analyze the usage of each test case in any test record, and construct a multi-dimensional feature matrix of any test case;

[0037] The use case feature association module is used to analyze the usage of any test case in each test record, and calculate the risk degree of each test case; according to the multi-dimensional feature matrix of each test case, analyze the association between each feature and the risk degree in each test case;

[0038] A use case evaluation and screening module, which is used to extract the multi-dimensional feature matrix of each test case in any test record, perform risk assessment on the expected test situations of each test case; based on the risk classification results of each test case, perform effectiveness screening on each test case.

[0039] A real-time test identification module, which is used to extract each valid test case after screening, perform real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; based on the actual usage of each valid test case, identify abnormal situations during the real-time software testing process.

[0040] Furthermore, the historical test analysis module includes a test record collection unit and a use case feature extraction unit;

[0041] The test record collection unit is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records; the use case feature extraction unit is used to analyze the usage of each test case in any test record and construct the multi-dimensional feature matrix of any test case.

[0042] Furthermore, the use case feature association module includes a risk use case classification unit and a use case association analysis unit;

[0043] The risk use case classification unit is used to analyze the usage of any test case in each test record and calculate the risk level of each test case; the use case association analysis unit is used to analyze the association between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case.

[0044] Furthermore, the use case evaluation and screening module includes a use case risk assessment unit and a valid use case screening unit;

[0045] The use case risk assessment unit is used to extract the multi-dimensional feature matrix of each test case in any test record and perform risk assessment on the expected test situations of each test case; the valid use case screening unit is used to perform effectiveness screening on each test case based on the risk classification results of each test case.

[0046] Furthermore, the real-time test identification module includes a real-time selection test unit and an abnormal test identification unit;

[0047] The real-time selection test unit is used to extract each valid test case after screening, perform real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; the abnormal test identification unit is used to identify abnormal situations during the real-time software testing process based on the actual usage of each valid test case.

[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0049] 1. By constructing a multi-dimensional feature matrix for each test case and analyzing the correlation between each feature and the risk level, the present invention can intelligently screen and identify high-risk test cases; compared with traditional manual testing or static rule methods, the present invention significantly reduces the execution of redundant test cases and optimizes the allocation of test resources.

[0050] 2. The present invention can automatically identify the actual test scenario, evaluate anomalies through multiple dimensions, immediately mark and remind anomalies during the actual test process, effectively solve the problem of lagging defect detection, and significantly improve the comprehensiveness and reliability of testing.

[0051] 3. By analyzing the risk assessment results of historical test records, the present invention dynamically screens effective test cases, continuously monitors them during real-time testing, and continuously updates each effective test case, avoiding waste of resources caused by a large number of duplicate test cases and greatly improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the steps of a software test automation supervision method based on artificial intelligence;

[0053] Figure 2 It is a schematic diagram of the structure of a software test automation supervision system based on artificial intelligence. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0055] Embodiment: As Figures 1 to 2 shown, the present invention provides a software test automation supervision method based on artificial intelligence, and the supervision method includes the following steps:

[0056] Step S100: Collect the test cases and generated test data used in each software test process to generate corresponding test records; analyze the usage of each test case in any test record to construct a multi-dimensional feature matrix for any test case.

[0057] Among them, step S100 includes the following steps:

[0058] Step S101: randomly select a software testing process, and whenever a user selects a test case, respectively extract the time point when the test case is started and the time point when the test case is ended, obtain the use time interval of the selected test case, collect the test data generated in the use time interval, and obtain the test data set of the selected test case;

[0059] Step S102: Set the i-th test case to a i , test case a i The corresponding test data set is D i , generate a comprehensive dataset Z for the i-th test case i =(a i ,D i ); Summarize the comprehensive data sets of each test case in the selected software testing process to generate a test record corresponding to the selected software testing process;

[0060] Step S103: randomly select a test record, randomly extract a comprehensive data set of a test case from the selected test record, and obtain the test data set in the comprehensive data set; preset evaluation indicators of several dimensions for the test data set, and preset corresponding evaluation rules for each dimension to obtain evaluation values of each dimension, and average the evaluation values of each dimension to obtain the comprehensive evaluation value of the extracted test case; preset an expected evaluation threshold value, if the comprehensive evaluation value of the extracted test case exceeds the expected evaluation threshold value, then set the extracted test case as the first test case, otherwise set it as the second test case;

[0061] Step S104: arbitrarily select a test case and extract several features from the corresponding test data set. If the selected test case is the first test case, the extracted several features are set as the first feature set. If it is the second test case, the several features are set as the second feature set. The feature set corresponding to any test case is used to obtain a multi-dimensional feature matrix of the selected test case.

[0062] Step S200: Analyze the usage of any test case in each test record and calculate the risk level of each test case; analyze the correlation between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case;

[0063] Wherein, step S200 includes the following steps:

[0064] Step S201: randomly select a test case, obtain each test record containing the selected test case and set it as the target test record, and calculate the execution frequency f=m / M of the selected test case total , where m is the number of target test records, M totalLet \(N\) be the total number of test records. For each target test record, count the number of test records where the selected test case is the first test case as \(n_1\) and the number of test records where the selected test case is the second test case as \(n_2\). Calculate the effective proportion \(\eta = \frac{n_1}{n_1 + n_2}\).

[0065] Step S202: Preset a test scenario database that stores several test scenarios. For any one test scenario, there are several scenario features matched. Arbitrarily select a target test record and obtain the multi-dimensional feature matrix of the selected test case. Compare each feature in the multi-dimensional feature matrix with the several scenario features of any test scenario. If there is a test scenario where all scenario features are the same as the features in the multi-dimensional feature matrix, then obtain the actual test scenario of the selected target test record.

[0066] Step S203: Obtain the actual test scenarios of each target test record. Count the number of types of actual test scenarios included in all target test records as \(S\), and set the number of types of scenarios included in each target test record where the selected test case is the second test case as \(s_2\). Calculate the abnormal scenario coverage rate \(e=\frac{s_2}{S}\) of the selected test case. According to the formula:

[0067] ;

[0068] Calculate the risk degree \(R\) of the selected test case.

[0069] Example 1: Arbitrarily select a test case. The number of target test records where the test case is located is 10, and the total number of test records is set to 20. Calculate the execution frequency \(f=\frac{10}{20}=50\%\) of the selected test case. Set the number of test records where the test case is the first test case as \(n_1 = 5\) and the number of test records where the test case is the second test case as \(n_2 = 3\). Calculate the effective proportion \(\eta=\frac{5}{8}=62.5\%\) of the selected test case. Set the abnormal scenario coverage rate \(e = 30\%\) of the test case. Calculate the risk degree \(R = 50\%\times(1 - 62.5\%)\times30\%=5.625\%\).

[0070] Step S204: Arbitrarily select a feature from the multi-dimensional feature matrix of the selected test case. If the selected feature is a scenario feature, count the number of types of scenarios containing the selected feature as \(e_s\). Set the number of target test records corresponding to the \(b_1\)th type of scenario as \(m\) b1 and the number of test records of the \(b_2\)th type of scenario as \(M'\) b2 , and calculate the correlation degree \(G\) of the selected feature according to the formula:

[0071] ;

[0072] wherein, b1 and b2 are positive integers and b1 ∈ [1, es], b2 ∈ [1, es]; if the selected feature is not a scenario feature, then G = 0;

[0073] Step S205: Set the correlation degree of the c-th feature in the multi-dimensional feature matrix as G c , according to the formula:

[0074] ;

[0075] wherein, c1 is a positive integer and c1 ∈ [1, h], h is the number of features in the multi-dimensional feature matrix, and G c1 is the correlation degree of the c1-th feature; calculate the risk impact value Y of the c-th feature in the selected test case on the test case where it is located c ;

[0076] Embodiment 2: Set the risk degree R of the selected test case as 6%, set the correlation degree of one of the features as 30%, and the correlation degrees of the other two features as 30% and 40% respectively. Calculate the risk impact value of one of the features as 6% × 30% = 1.8%.

[0077] Step S300: Extract the multi-dimensional feature matrices of each test case in any test record, and conduct risk assessment on the expected test situations of each test case; based on the risk division results of each test case, conduct effectiveness screening on each test case;

[0078] Among them, Step S300 includes the following steps:

[0079] Step S301: Arbitrarily select a test record, and arbitrarily select a test case from the selected test record to obtain the risk impact values of each feature in the multi-dimensional feature matrix of the selected test case; compare each feature between each test case. If there are two identical features, arbitrarily select one feature and set it as the target feature. If there are no two identical features, set both features as the target feature to obtain the target feature set of the selected test record;

[0080] Step S302: Set the risk impact value of the j-th target feature in the target feature set of the selected test record as Y j , and accumulate to obtain the risk assessment value RA of the selected test record; accumulate the risk impact values of each feature in the multi-dimensional feature matrix of the selected test case to calculate the risk degree R of the selected test case. If R > RA, remove the selected test case. If R ≤ RA, set the selected test case as an effective test case;

[0081] Step S303: Obtain all valid test cases and generate a real-time test case set. Determine whether each valid test case is the first test case in each test record. If there is a valid test case that is the first test case, obtain the comprehensive evaluation value of the valid test case, and select the smallest comprehensive evaluation value as an abnormal evaluation threshold.

[0082] Step S400: Extract each selected valid test case, and perform real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; identify abnormal situations during the real-time software testing process based on the actual usage of each valid test case.

[0083] Among them, step S400 includes the following steps:

[0084] Step S401: Obtain all valid test cases and generate a real-time test case set. During the software testing process at the current moment, arbitrarily select a valid test case from the real-time test case set, and collect the test data of the selected valid test case to obtain a real-time test data set.

[0085] Step S402: Extract several features from the real-time test data set, obtain the risk impact value of each feature, and accumulate the risk impact values of each feature to obtain a real-time risk assessment value RA now , set the abnormal evaluation threshold as RA th , if RA now <RA th , then mark the selected valid test case as abnormal.

[0086] Step S403: Count the number of valid test cases with abnormal marks in the real-time test data set, and calculate the proportion of abnormal cases τ; preset a τ th , if τ≥τ th , then give an abnormal reminder for the software testing process at the current moment.

[0087] A software testing automation supervision system, the supervision system includes a historical test analysis module, a use case feature association module, a use case evaluation and screening module, and a real-time test identification module;

[0088] The historical test analysis module is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records; analyze the usage of each test case in any test record, and construct a multi-dimensional feature matrix of any test case.

[0089] The use case feature correlation module is used to analyze the usage of any test case in each test record, calculate the risk level of each test case, and analyze the correlation between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case.

[0090] The use case evaluation and screening module is used to extract the multi-dimensional feature matrix of each test case in any test record, perform risk assessment on the expected test situation of each test case, and perform effectiveness screening on each test case based on the risk classification results of each test case.

[0091] The real-time test identification module is used to extract each effective test case after screening, perform real-time evaluation on the test data generated by each effective test case during the real-time software testing process at the current moment, and identify abnormal situations during the real-time software testing process based on the actual usage of each effective test case.

[0092] Among them, the historical test analysis module includes a test record collection unit and a use case feature extraction unit.

[0093] The test record collection unit is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records. The use case feature extraction unit is used to analyze the usage of each test case in any test record and construct the multi-dimensional feature matrix of any test case.

[0094] Among them, the use case feature correlation module includes a risk use case classification unit and a use case correlation analysis unit.

[0095] The risk use case classification unit is used to analyze the usage of any test case in each test record and calculate the risk level of each test case. The use case correlation analysis unit is used to analyze the correlation between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case.

[0096] Among them, the use case evaluation and screening module includes a use case risk assessment unit and an effective use case screening unit.

[0097] The use case risk assessment unit is used to extract the multi-dimensional feature matrix of each test case in any test record and perform risk assessment on the expected test situation of each test case. The effective use case screening unit is used to perform effectiveness screening on each test case based on the risk classification results of each test case.

[0098] Among them, the real-time test identification module includes a real-time selection test unit and an abnormal test identification unit.

[0099] A real-time selection test unit is used to extract each valid test case for screening and perform real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; an abnormal test identification unit is used to identify abnormal situations during the real-time software testing process based on the actual usage of each valid test case.

[0100] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.

Claims

1. A software test automation supervision method based on artificial intelligence, characterized in that: The described supervision method includes the following steps: Step S100: Collect the test cases and generated test data used in each software testing process, and generate corresponding test records; analyze the usage of each test case in any test record, and construct a multi-dimensional feature matrix for any test case; Step S200: Analyze the usage of any test case in each test record, and calculate the risk level for each test case; based on the multi-dimensional feature matrix of each test case, analyze the correlation between each feature and the risk level in each test case; Step S300: Extract the multi-dimensional feature matrix of each test case in any test record, and conduct a risk assessment on the expected test situation of each test case; based on the risk classification results of each test case, conduct an effectiveness screening on each test case; Step S400: Extract each selected effective test case, and conduct a real-time evaluation on the test data generated by each effective test case during the real-time software testing process at the current moment; based on the actual usage of each effective test case, identify abnormal situations during the real-time software testing process; The said step S200 includes the following steps: Step S201: Arbitrarily select a test case, obtain each test record containing the selected test case and set it as the target test record, and calculate the execution frequency f = m / M of the selected test case total , where m is the number of target test records, and M total is the total number of test records; respectively count the number of test records n1 where the selected test case is the first test case and the number of test records n2 where the selected test case is the second test case in each target test record, and calculate the effective proportion η = n1 / (n1 + n2) of the selected test case; Step S202: Preset a test scenario database, which stores several test scenarios. Among them, each test scenario is matched with several scenario features; randomly select a target test record, and obtain the multi-dimensional feature matrix of the selected test case. Compare each feature in the multi-dimensional feature matrix with the several scenario features of any test scenario. If there is a test scenario whose scenario features are all the same as the features of the multi-dimensional feature matrix, obtain the actual test scenario of the selected target test record; Step S203: Obtain the actual test scenarios of each target test record, count the types of actual test scenarios included in all target test records as S, set the types of scenarios included in each target test record where the selected test case is the second test case as s2, and calculate the abnormal scenario coverage rate e = s2 / S of the selected test case; According to the formula: ; Calculate the risk level R of the selected test case; Step S204: Arbitrarily select a feature from the multi-dimensional feature matrix of the selected test cases. If the selected feature is a scenario feature, count the number of scenario types containing the selected feature as es, and set the number of target test records corresponding to the b1-th scenario type among them as m b1 and the number of test records of the b2-th scenario type as M' b2 , calculate the correlation degree G of the selected feature according to the formula: ; Among them, b1 and b2 are positive integers and b1 ∈ [1, es], b2 ∈ [1, es]; if the selected feature is not a scenario feature, then G = 0; Step S205: Set the correlation degree of the c-th feature in the multi-dimensional feature matrix to G c , according to the formula: ; Among them, c1 is a positive integer and c1 ∈ [1, h], where h is the number of features in the multi-dimensional feature matrix, and G c1 is the degree of association of the c1-th feature; the risk impact value Y of the c-th feature in the selected test case on the test case where it is located is calculated c .

2. The automated supervision method for software testing based on artificial intelligence according to claim 1, wherein: The said step S100 includes the following steps: Step S101: Randomly select a software testing process. Whenever a user selects a test case, respectively extract the time point when the test case starts to be used and the time point when the test case ends to be used, obtain the usage time interval of the selected test case, and collect the test data generated during the usage time interval to obtain the test data set of the selected test case; Step S102: Set the i-th test case to a i , test case a i The corresponding test data set is D i , generate a comprehensive dataset Z for the i-th test case i =(a i ,D i ); Summarize the comprehensive data sets of each test case in the selected software testing process to generate a test record corresponding to the selected software testing process; Step S103: Arbitrarily select a test record, arbitrarily extract a comprehensive data set of a test case from the selected test record, and obtain the test data set in the comprehensive data set; preset evaluation indicators for several dimensions of the test data set, and preset corresponding evaluation rules for each dimension to obtain the evaluation values of each dimension, and take the average of the evaluation values of each dimension to obtain the comprehensive evaluation value of the extracted test case; preset an expected evaluation threshold. If the comprehensive evaluation value of the extracted test case exceeds the expected evaluation threshold, set the extracted test case as the first test case, otherwise set it as the second test case; Step S104: Arbitrarily select a test case and extract several features from the corresponding test data set. If the selected test case is the first test case, set the extracted several features as the first feature set. If it is the second test case, set the several features as the second feature set, and obtain the multi-dimensional feature matrix of the selected test case from the feature set corresponding to any test case.

3. The method for automatically supervising software testing based on artificial intelligence according to claim 2, characterized in that: The said step S300 includes the following steps: Step S301: Arbitrarily select a test record, and arbitrarily select a test case from the selected test record to obtain the risk impact values of each feature in the multi-dimensional feature matrix of the selected test case; compare each feature between each test case. If there are two identical features, arbitrarily select one feature as the target feature. If there are no two identical features, set both features as the target feature to obtain the target feature set of the selected test record; Step S302: Set the risk impact value of the j-th target feature in the target feature set for selecting test records as Y j , and perform accumulation to obtain the risk assessment value RA of the selected test records; accumulate the risk impact values of each feature in the multi-dimensional feature matrix of the selected test cases, and calculate the risk level R of the selected test cases. If R > RA, remove the selected test cases. If R ≤ RA, set the selected test cases as valid test cases; Step S303: Obtain all valid test cases and generate a real-time test case set, and obtain whether each valid test case is the first test case in each test record. If there is a valid test case that is the first test case, obtain the comprehensive evaluation value of the valid test case, and select the smallest comprehensive evaluation value as an abnormal evaluation threshold.

4. An artificial intelligence-based automated software testing supervision method according to claim 3, characterized in that: The said step S400 includes the following steps: Step S401: Obtain all valid test cases and generate a real-time test case set. During the software testing process at the current moment, arbitrarily select a valid test case from the real-time test case set, and collect the test data of the selected valid test case to obtain a real-time test data set; Step S402: Extract a number of features from the real-time test data set, obtain the risk impact values of each feature, accumulate the risk impact values of each feature, and obtain a real-time risk assessment value RA now , set the abnormal evaluation threshold to RA th , if RA now < RA th , then mark the selected valid test cases as abnormal; Step S403: Count the number of valid test cases with anomaly markers in the real-time test data set, and calculate the anomaly case ratio τ; preset a τ th , if τ ≥ τ th , then an anomaly reminder is given for the software testing process at the current moment.

5. A software test automation supervision system for implementing a software test automation supervision method based on artificial intelligence according to any one of claims 1-4, characterized in that: The supervision system includes a historical test analysis module, a use case feature association module, a use case evaluation and screening module, and a real-time test identification module; The historical test analysis module is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records; analyze the usage of each test case in any test record, and construct the multi-dimensional feature matrix of any test case; The use case feature association module is used to analyze the usage of any test case in each test record, and calculate the risk level of each test case; analyze the association between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case; The use case evaluation and screening module is used to extract the multi-dimensional feature matrix of each test case in any test record and conduct risk assessment on the expected test situations of each test case; Based on the risk classification results of each test case, conduct effectiveness screening on each test case; The real-time test identification module is used to extract each valid test case after screening, conduct real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; identify abnormal situations during the real-time software testing process based on the actual usage of each valid test case.

6. The software test automation supervision system according to claim 5, characterized in that: The historical test analysis module includes a test record collection unit and a use case feature extraction unit; The test record collection unit is used to collect the test cases and generated test data used in each software testing process, and generate corresponding test records; the use case feature extraction unit is used to analyze the usage of each test case in any test record and construct the multi-dimensional feature matrix of any test case.

7. The software test automation supervision system according to claim 5, characterized in that: The use case feature association module includes a risk use case classification unit and a use case association analysis unit; The risk use case classification unit is used to analyze the usage of any test case in each test record and calculate the risk level of each test case; The use case association analysis unit is used to analyze the association between each feature and the risk level in each test case according to the multi-dimensional feature matrix of each test case.

8. An automated software testing supervision system according to claim 5, characterized in that: The use case evaluation and screening module includes a use case risk assessment unit and a valid use case screening unit; The use case risk assessment unit is used to extract the multi-dimensional feature matrix of each test case in any test record and conduct risk assessment on the expected test situations of each test case; the valid use case screening unit is used to conduct effectiveness screening on each test case based on the risk classification results of each test case.

9. An automated software testing supervision system according to claim 5, characterized in that: The real-time test identification module includes a real-time selected test unit and an abnormal test identification unit; The real-time selected test unit is used to extract each valid test case after screening, conduct real-time evaluation on the test data generated by each valid test case during the real-time software testing process at the current moment; the abnormal test identification unit is used to identify abnormal situations during the real-time software testing process based on the actual usage of each valid test case.

Citation Information

Patent Citations

  • Method and device for improving coverage rate of test cases, equipment and medium

    CN117707951A

  • Software testing method, system and device based on AIGC model

    CN119003375A