Test case sorting model training method, software testing method and device
By training the test case sorting model, optimizing the sorting of test cases, solving the problem of low testing efficiency in the existing technology, and achieving more efficient software testing.
Patent Information
- Application Number
- CN202311167177.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-09-11
AI Technical Summary
In the existing software testing methods, due to the different failure index of different test cases and the performance of different software projects, the test efficiency is low, and all test cases need to be executed before the software testing can be completed.
By obtaining historical test data of multiple software projects of the same software type, determining the execution order and results of test cases, using neural network models such as Seq2Seq model to train the test case sorting model, optimizing the sort of test cases, and prioritizing testing use cases with possible failure or severe failure consequences.
The sorting of test cases is optimized, the software testing time is shortened, the testing efficiency is improved, and the testing can be completed when the cumulative fault index reaches the threshold, and the test warning information is generated.
Smart Images

Figure CN117331813B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a test case sorting model training method, a software testing method, a test case sorting model training device, a software testing device, a computer device, a storage medium, and a computer program product. Background Art
[0002] Software testing is an important part of software development and an important guarantee of software quality; software testing is achieved by running a large number of test cases.
[0003] In related technologies, a fault threshold is usually set for a software project, and then each test case is executed in sequence according to the code sequence of the software project, and the fault index corresponding to each test case is accumulated; when the accumulated fault index is greater than the fault threshold, the software test can be terminated.
[0004] However, different test cases have different failure indices, and the same test case can also have different failure indices across different software projects. This means that in software testing methods that execute test cases sequentially, it may be necessary to complete all test cases before software testing is complete. Therefore, software testing efficiency based on related technologies is low. Summary of the Invention
[0005] Based on this, it is necessary to address the technical problem of low software testing efficiency mentioned above and provide a test case sorting model training method, software testing method, device, computer equipment, computer-readable storage medium and computer program product that can improve software testing efficiency.
[0006] In a first aspect, the present application provides a test case ranking model training method, comprising:
[0007] Obtain historical test data for multiple software projects belonging to the same software type;
[0008] Determining, based on the historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical tests;
[0009] Determine a sample sorting result for each test case based on the execution order and execution result corresponding to each test case;
[0010] Based on the test cases and the sample ranking results of the test cases, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type.
[0011] In one embodiment, the training of the to-be-trained test case ranking model corresponding to the software type based on the test cases and the sample ranking results of the test cases to obtain the test case ranking model corresponding to the software type includes:
[0012] Performing feature extraction processing on each of the test cases to obtain a text feature vector for each test case;
[0013] Based on the text feature vectors of the respective test cases and the corresponding sample ranking results, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type.
[0014] In one embodiment, performing feature extraction on each of the test cases to obtain a text feature vector for each test case includes:
[0015] For each test case, extract multiple character strings from the text corresponding to the test case;
[0016] Arrange each character string to obtain a character string sequence of the test case;
[0017] Vectorization is performed on the character string sequence to obtain a text feature vector of the test case.
[0018] In one embodiment, for each test case, multiple character strings are extracted from the text corresponding to the test case, including:
[0019] In the text corresponding to the test case, delete the comment text to obtain the source code of the test case;
[0020] Extract each character string constituting the source code from the source code.
[0021] In one embodiment, the training of the to-be-trained test case ranking model corresponding to the software type based on the text feature vectors of the respective test cases and the corresponding sample ranking results to obtain the test case ranking model corresponding to the software type includes:
[0022] Encoding the text feature vectors of each test case through the encoding layer in the test case ranking model to be trained to obtain target feature vectors representing information of each test case under multiple preset ranking indicators;
[0023] Inputting the target feature vector into the decoding layer of the test case ranking model to be trained to obtain the predicted ranking results of each test case;
[0024] The test case sorting model to be trained is trained according to the predicted sorting results and sample sorting results corresponding to each test case to obtain a trained test case sorting model.
[0025] In a second aspect, the present application also provides a software testing method, comprising:
[0026] Obtain each test case corresponding to the software project to be tested and the software type to which it belongs;
[0027] Determine, according to the software type, a target test case sorting model corresponding to the software project to be tested;
[0028] Sorting each of the test cases using the target test case sorting model to obtain a sorting result for each of the test cases; the target test case sorting model is the test case sorting model in the test case sorting model training method;
[0029] According to the sorting results of the test cases, software testing is performed on the software project to be tested.
[0030] In one embodiment, performing software testing on the software project to be tested according to the sorting results of the test cases includes:
[0031] According to the sorting results of the test cases, the sorted test cases are executed in sequence, and the fault indices corresponding to the sorted test cases are accumulated to obtain a cumulative fault index of the software project to be tested; the fault index is used to characterize the situation in which the corresponding test case fails;
[0032] When the accumulated fault index is greater than a preset fault index threshold of the software project to be tested, software testing of the software project to be tested is terminated, and test warning information of the software project to be tested is generated.
[0033] In a third aspect, the present application also provides a test case sorting model training device, comprising:
[0034] A historical data acquisition module is used to acquire historical test data of multiple software projects belonging to the same software type;
[0035] An execution information acquisition module is used to determine, based on the historical test data, multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test;
[0036] A sample sorting determination module is used to determine the sample sorting result of each test case based on the execution order and execution result corresponding to each test case;
[0037] The sorting model training module is used to train the test case sorting model to be trained corresponding to the software type based on the test cases and the sample sorting results of the test cases, so as to obtain the test case sorting model corresponding to the software type.
[0038] In a fourth aspect, the present application further provides a software testing device, comprising:
[0039] The test information acquisition module is used to obtain each test case corresponding to the software project to be tested and the software type to which it belongs;
[0040] A target model determination module is used to determine a target test case sorting model corresponding to the software project to be tested according to the software type;
[0041] A sorting result determination module is used to sort the test cases using the target test case sorting model to obtain sorting results for the test cases; the target test case sorting model is the test case sorting model in the test case sorting model training method;
[0042] The software project testing module is used to perform software testing on the software project to be tested according to the sorting results of the test cases.
[0043] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0044] Obtain historical test data for multiple software projects belonging to the same software type;
[0045] Determining, based on the historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical tests;
[0046] Determine a sample sorting result for each test case based on the execution order and execution result corresponding to each test case;
[0047] Based on the test cases and the sample ranking results of the test cases, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type.
[0048] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0049] Obtain historical test data for multiple software projects belonging to the same software type;
[0050] Determining, based on the historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical tests;
[0051] Determine a sample sorting result for each test case based on the execution order and execution result corresponding to each test case;
[0052] Based on the test cases and the sample ranking results of the test cases, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type.
[0053] In a seventh aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0054] Obtain historical test data for multiple software projects belonging to the same software type;
[0055] Determining, based on the historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical tests;
[0056] Determine a sample sorting result for each test case based on the execution order and execution result corresponding to each test case;
[0057] Based on the test cases and the sample ranking results of the test cases, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type.
[0058] The above-mentioned test case ranking model training method, software test, test case ranking model training device, software testing device, computer equipment, storage medium and computer program product first obtain historical test data of multiple software projects belonging to the same software type; then, based on the historical test data, determine multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test; then, based on the execution order and execution result corresponding to each test case, determine the sample ranking result of each test case; finally, based on each test case and the sample ranking result of each test case, train the test case ranking model to be trained corresponding to the software type to obtain the test case ranking model corresponding to the software type. In this way, based on the historical test data of software projects of various software types, the test cases corresponding to each software type, as well as the execution order and execution results of each test case in the historical tests can be obtained, thereby determining the sample sorting results of each test case. Then, based on the sample sorting results of each test case, the test case sorting model corresponding to each software type can be obtained; the test case sorting model obtained based on the above process can optimize the sorting between each test case for different software types, so that when performing software testing on software projects, test cases that may fail or have more serious consequences of failure can be tested first, thereby shortening the time required for software testing and improving software testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 A flowchart of a test case ranking model training method according to an embodiment;
[0061] Figure 2 A flowchart illustrating steps for training a test case ranking model to be trained corresponding to a software type in one embodiment;
[0062] Figure 3 A schematic diagram of a test case ranking model to be trained in one embodiment;
[0063] Figure 4 A schematic diagram of a test case ranking model to be trained in another embodiment;
[0064] Figure 5 1 is a flowchart of a software testing method according to an embodiment;
[0065] Figure 6 is a flowchart of a software testing method in another embodiment;
[0066] Figure 7 1 is a flow chart of a test case sorting method based on a seq2seq model (Sequence to Sequence) in one embodiment;
[0067] Figure 8 A structural block diagram of a test case ranking model training device according to an embodiment;
[0068] Figure 9 is a structural block diagram of a software testing device in one embodiment;
[0069] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0071] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0072] In one embodiment, Figure 1 As shown, a test case ranking model training method is provided. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a server and a terminal, and implemented through the interaction between the server and the terminal; wherein the server can be implemented as an independent server or a server cluster composed of multiple servers, and the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. In this embodiment, the method includes the following steps:
[0073] Step S102: Acquire historical test data of multiple software projects of the same software type.
[0074] Among them, a software project refers to a software engineering project, such as a complete application, a plug-in, etc.
[0075] A test case is a set of independent test steps, input data, and expected output results used to verify the correctness of a software project's functionality. A test case is the basic unit of software testing, used to check whether a software project conforms to expected behavior.
[0076] Among them, the historical test data is the historical test record of the software project in the historical test. The historical test data records the various test cases used in the historical test of the software project, the execution order of each test case, the execution result of each test case, and the test result of the software project; the test result of the software project is determined by the execution result of each test case. Assuming that the qualification standard of the software project is set to 50%, then when the execution results of more than 50% of the test cases are failures, the test result of the software project is unqualified.
[0077] The multiple software projects of the same software type may be multiple software projects under the same or similar application programs, or may be multiple software projects that implement the same or similar functions.
[0078] Specifically, the server determines multiple software projects under different software types, and obtains historical test data of the multiple software projects based on historical test records of the multiple software projects within a preset time period, such as one month.
[0079] Step S104 : determining, based on historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical test.
[0080] The multiple test cases corresponding to the software type are the test cases used in the historical testing of each software project under the software type. In software testing, the execution of the test cases is used to test whether each part of the software project can operate normally.
[0081] Among them, the execution result of the test case is used to characterize whether the test case is executed normally in the software test; when the execution result of the test case is abnormal, it means that the actual result of the test case in the software test does not match the expected result, that is, in the software project, the part corresponding to the test case has failed in the software test.
[0082] Specifically, for each software type, the server determines the test cases used in the historical tests of each software project as multiple test cases corresponding to the software type based on the historical test data of each software project of the software type, and determines the execution order and execution results of each test case in the historical tests of different software projects.
[0083] For example, assuming that there are software projects a1, a2 and a3 under software type A, among which the last historical test data of software project a1 is as follows: test case 1 is executed first, the result is abnormal, then test case 2 is executed, the result is normal, then test case 5 is executed, the result is abnormal, and finally test case 4 is executed, the result is abnormal; the last historical test data of software project a2 is as follows: test case 2 is executed first, the result is abnormal, then test case 3 is executed, the result is abnormal, and finally test case 1 is executed, the result is normal; the last historical test data of software project a3 is as follows: test case 1 is executed first, the result is abnormal, then test case 4 is executed, the result is abnormal, then test case 5 is executed, the result is abnormal, and finally test case 2 is executed, the result is normal.
[0084] Based on the above historical test data, the server can obtain multiple test cases corresponding to software type A, including {test case 1, test case 2, test case 3, test case 4, test case 5}, as well as the execution order and execution results of each test case in the historical tests of each software project.
[0085] Step S106: Determine the sample sorting result of each test case based on the execution order and execution result corresponding to each test case.
[0086] Specifically, for each test case, the server first determines the test case's information under multiple preset ranking metrics based on the test case's corresponding execution order and execution results, as well as the test case's content. The server then fuses the test case's information under multiple ranking metrics based on the degree to which each ranking metric affects software testing efficiency. Finally, based on the execution order of each test case and the information under the fused multiple ranking metrics, the server determines the ranking priority of each test case, thereby obtaining a sample ranking result for each test case. The ranking metrics may include, but are not limited to, failure rate, test coverage, and failure severity.
[0087] Taking failure rate, test scope, and fault severity as sorting indicators as an example, assuming that the priority of test scope is greater than failure rate and greater than fault severity, according to the historical test data of software projects a1, a2, and a3, it can be obtained that the failure rate of test case 1 is 2 / 3, the failure rate of test case 2 is 1 / 3, the failure rate of test case 3 is 1, the failure rate of test case 4 is 1, and the failure rate of test case 5 is 1; in addition, the test scope of test case 1 includes the test scope of test case 4 (that is, if test case 1 is abnormal, test case 4 must be abnormal, and if test case 1 is normal, test case 4 must be normal), and the test scope of test case 1 partially overlaps with the test scope of test case 2; at the same time, the fault severity of test case 5 is the smallest among the five test cases, and its impact on the software project can be ignored.
[0088] Based on the above information, the server can determine the sorting priority of each test case from high to low as {test case 3, test case 1, test case 2, test case 5, test case 4}. Therefore, the sample sorting result of test case 1 is 2, the sample sorting result of test case 2 is 3, the sample sorting result of test case 3 is 1, the sample sorting result of test case 4 is 5, and the sample sorting result of test case 5 is 4.
[0089] Step S108 : Based on each test case and the sample ranking result of each test case, the test case ranking model to be trained corresponding to the software type is trained to obtain a test case ranking model corresponding to the software type.
[0090] Among them, the test case sorting model to be trained is a neural network model, preferably, it can be a neural network model composed of an encoding layer and a decoding layer, which can convert a given sequence into another sequence through a specific method, such as a Seq2Seq model.
[0091] Specifically, the server uses each test case as input information and the sample sorting results of each test case as supervision information to train the test case sorting model to be trained corresponding to the software type until the test case sorting model to be trained meets the sorting accuracy conditions, and obtains the test case sorting model corresponding to the software type.
[0092] In the above test case ranking model training method, the server first obtains historical test data of multiple software projects belonging to the same software type; then, based on the historical test data, determines multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test; then, based on the execution order and execution results corresponding to each test case, determines the sample ranking result of each test case; finally, based on each test case and the sample ranking results of each test case, trains the test case ranking model to be trained corresponding to the software type to obtain the test case ranking model corresponding to the software type. In this way, based on the historical test data of software projects of each software type, the server can obtain each test case corresponding to each software type and the sample ranking result of each test case, wherein the sample ranking result is obtained based on the execution order and execution results in the historical test; then, based on the sample ranking results of each test case, the server can obtain the test case ranking model corresponding to each software type; based on the test case ranking model obtained in the above process, the server can optimize the ranking between each test case for different software types, so that when performing software testing on the software project, it can give priority to testing test cases that are likely to fail or have more serious consequences of failure, thereby shortening the time required for software testing and improving software testing efficiency.
[0093] In an exemplary embodiment, the above-mentioned step S108, based on each test case and the sample sorting results of each test case, trains the test case sorting model to be trained corresponding to the software type to obtain the test case sorting model corresponding to the software type, specifically including the following contents: performing feature extraction processing on each test case to obtain a text feature vector of each test case; based on the text feature vector of each test case and the corresponding sample sorting results, trains the test case sorting model to be trained corresponding to the software type to obtain the test case sorting model corresponding to the software type.
[0094] Among them, the text feature vector is used to represent the text features of the source code corresponding to the test case.
[0095] Among them, source code refers to the text in the test case written in accordance with the programming language specifications, which is a series of human-readable computer language instructions.
[0096] Specifically, for each test case, the server first obtains the source code corresponding to the test case, and based on the source code corresponding to the test case, extracts a vector of text features used to characterize the source code as the text feature vector of the test case; then, using the text feature vector of each test case as input information and the sample sorting results of each test case as supervision information, the test case sorting model to be trained corresponding to the software type is trained to obtain the test case sorting model corresponding to the software type.
[0097] For example, suppose that for test case i, the server uses embedding technology (the process of mapping high-dimensional data to low-dimensional space) to convert each word sequence of the source code, that is, each word in the source code, into multiple sub-vectors with a preset length, thereby obtaining vector Then we get the text feature vector of test case i; Represents vector X i The nth subvector in .
[0098] It should be noted that, due to the different lengths of different word sequences, when converting each word sequence into multiple sub-vectors with a preset length, one sub-vector may correspond to one word sequence, or multiple word sequences, or multiple sub-vectors may correspond to one word sequence. For example, assuming the source code corresponding to the test case is:
[0099] int a=3;
[0100] int b = 2;
[0101] int c = a + b;
[0102] Then the word sequences of the source code are "int" "a" "=" "3" ";" "int" "b" "=" "2" ";" "int" "c" "=" "a" "+" "b" ";". Assuming that the preset length of each sub-vector is 4, then in the text feature vector of the test case, the first sub-vector corresponds to "int" "a", the second sub-vector corresponds to "=" "3" ";" "i", the third sub-vector corresponds to "nt" "b" "="... and so on, the text feature vector of the test case can be obtained.
[0103] It should also be noted that, since different test cases contain different numbers of word sequences, the vector lengths of the text feature vectors of different test cases are different.
[0104] In this embodiment, the server extracts features from the test cases to obtain a text feature vector for each test case. By constraining the text feature vectors with a preset subvector length, the server normalizes the text feature vectors for each test case, thereby reducing the amount of data processing required during subsequent model training. Furthermore, by training the test case ranking model to be trained, the server can obtain a test case ranking model that optimizes the ranking between the various test cases. This allows the server to prioritize test cases that are likely to fail or have more severe consequences when testing software projects, thereby shortening the time required for software testing and improving software testing efficiency.
[0105] In an exemplary embodiment, feature extraction processing is performed on each test case to obtain a text feature vector for each test case, which specifically includes the following: for each test case, multiple character strings are extracted from the text corresponding to the test case; the character strings are arranged to obtain a character string sequence of the test case; and the character string sequence is vectorized to obtain a text feature vector for the test case.
[0106] The multiple character strings are respective character strings constituting source code of the test case.
[0107] Specifically, it can be understood that the text corresponding to the test case includes not only the source code but also other content unrelated to the source code, such as comment text. Therefore, for each test case, the server extracts multiple strings related to the source code from the text corresponding to the test case; then, the server arranges the strings in the order of the source code to obtain the string sequence of the test case and adds a start marker " <sos>", add an end marker at the end of the string sequence" <eos>", so that the subsequent server can identify the starting and ending points of the vectorization processing; finally, the server vectorizes the string sequence to obtain the text feature vector of the test case.
[0108] For example, assume that the text corresponding to the test case is as follows:
[0109] int a=3; / / a is the first parameter;
[0110] int b=2; / / b is the second parameter;
[0111] / According to the first parameter and the second parameter, the target parameter is obtained /
[0112] int c=a+b; / / c is the target parameter;
[0113] According to the code writing rules, in the same line, the text after the comment symbol " / / " is the comment text, and the text between two comment symbols " / " is also the comment text. Therefore, the server can delete these comment texts to obtain multiple strings related to the source code "int" "a" "=" "3""; "int" "b" "=" "2""; "int" "c" "=" "a" "+" "b" ";", and then, the server arranges each string according to the order of the source code to obtain the string sequence of the test case.
[0114] In this embodiment, the server can obtain a string sequence that fully represents the key information of the source code corresponding to the test case by extracting multiple strings from the test case, and then obtain a text feature vector of the test case; the text feature vector retains the key information of the test case as much as possible while ensuring low data dimension and small data volume, which not only reduces the data processing amount of subsequent model training, but also ensures the effect of model training.
[0115] In an exemplary embodiment, for each test case, multiple character strings are extracted from the text corresponding to the test case, specifically including the following: deleting the comment text in the text corresponding to the test case to obtain the source code of the test case; and extracting the various character strings that make up the source code from the source code.
[0116] Specifically, the server first identifies all comment symbols in the text corresponding to the test case and deletes the comment text after each comment symbol; then, the server replaces blank lines and indentation characters in the text with spaces, and converts the source code text into the individual strings that make up the source code.
[0117] In this embodiment, the server can more quickly extract multiple character strings constituting the source code by deleting the comment text in the text corresponding to the test case, and thus can quickly obtain the text feature vector of the test case.
[0118] like Figure 2 As shown, in an exemplary embodiment, based on the text feature vectors of each test case and the corresponding sample ranking results, the test case ranking model to be trained corresponding to the software type is trained to obtain the test case ranking model corresponding to the software type, which specifically includes the following steps:
[0119] Step S202 , encoding the text feature vector of each test case through the encoding layer in the test case ranking model to be trained, and obtaining a target feature vector representing the information of each test case under a plurality of preset ranking indicators.
[0120] Step S204: input the target feature vector into the decoding layer of the test case ranking model to be trained to obtain the predicted ranking results of each test case.
[0121] Step S206 , training the test case ranking model to be trained according to the prediction ranking results and sample ranking results corresponding to each test case, to obtain a trained test case ranking model.
[0122] Among them, the encoding layer in the test case sorting model to be trained is used to compress and fuse the text feature vectors of each test case with different vector lengths into a target feature vector with a fixed vector length that represents the information of each test case under multiple preset sorting indicators.
[0123] Among them, the decoding layer in the test case ranking model to be trained is used to learn the information of each test case under multiple preset ranking indicators based on the target feature vector with a fixed vector length, so as to obtain the ranking results of each test case.
[0124] Specifically, the server first initializes the model parameters of the test case ranking model to be trained, then inputs the text feature vectors of each test case into the encoding layer of the test case ranking model to be trained. Through the encoding processing of the encoding layer, multiple text feature vectors with different vector lengths are compressed and fused into a target feature vector with a fixed vector length that represents the information of each test case under multiple preset ranking indicators. Then, the server inputs the target feature vector into the decoding layer of the test case ranking model to be trained, learns the information of each test case represented by the target feature vector under multiple preset ranking indicators through the decoding layer, and outputs the predicted ranking result of each test case. Finally, the server calculates the loss value between the predicted ranking result and the sample ranking result corresponding to each test case according to the loss function of the test case ranking model to be trained. When the loss value is greater than a preset loss threshold, the server adjusts the model parameters of the test case ranking model to be trained, inputs the text feature vectors of each test case into the encoding layer again, and outputs the predicted ranking result of each test case through the decoding layer until the corresponding loss value is less than or equal to the preset loss threshold, thereby obtaining a test case ranking model that meets the ranking accuracy condition, that is, a trained test case ranking model.
[0125] Take the Seq2Seq model as an example to illustrate the test case sorting model to be trained. Figure 3 The following is a structure of the Seq2Seq model (test case ranking model to be trained), assuming that the text feature vectors are the text feature vectors X of test case 1 1 , text feature vector X of test case 2 2 , text feature vector X of test case 3 3 , text feature vector X of test case 4 4 , text feature vector X of test case 5 5 The server inputs the above text feature vector into the encoding layer of the Seq2Seq model, and encodes the above text feature vector into the intermediate state vector of the Seq2Seq model, that is, the target feature vector S, through the encoding layer. Then, the server inputs the target feature vector into the decoding layer of the Seq2Seq model, and obtains the predicted ranking results of the test cases corresponding to each text feature vector through the decoding layer.
[0126] like Figure 4 Another structure of the Seq2Seq model (test case sorting model to be trained) is shown as follows: Figure 3 As shown, the target feature vector is only used as the initial state of the input decoding layer and only participates in the operation at the first moment. It can also be as shown in Figure 4 As shown, the target feature vector participates in the operation of the decoding layer at all times.
[0127] In this embodiment, first, the server can compress and fuse text feature vectors into target feature vectors that represent the information of each test case under multiple preset ranking indicators through the encoding layer; second, the server can learn the information of each test case under multiple preset ranking indicators through the decoding layer to obtain the predicted ranking results of each test case; third, the server can also repeatedly train the model by comparing the predicted ranking results with the sample ranking results to obtain a test case ranking model that meets the conditions. Based on the test case ranking model that meets the conditions, the ranking between each test case can be optimized, so that when performing software testing on a software project, test cases that are likely to fail or have more serious consequences of failure can be tested first, thereby shortening the time required for software testing and improving software testing efficiency.
[0128] In one embodiment, Figure 5 As shown, a software testing method is also provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server; wherein the server can be implemented as an independent server or a server cluster composed of multiple servers, and the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc.
[0129] In this embodiment, the method includes the following steps:
[0130] Step S502: Acquire each test case corresponding to the software project to be tested and the software type to which it belongs.
[0131] Step S504: Determine the target test case sorting model corresponding to the software project to be tested according to the software type.
[0132] Step S506: sort each test case using the target test case sorting model to obtain a sorting result for each test case.
[0133] Step S508: Perform software testing on the software project to be tested according to the sorting results of each test case.
[0134] It can be understood that the specific limitations in the above software testing method can be found in the above limitations on the test case sorting model training method, which will not be repeated here.
[0135] The target test case ranking model is the test case ranking model in the test case ranking model training method.
[0136] Specifically, the server first obtains each test case required by the software project to be tested and determines the software type to which the software project to be tested belongs; then, the server determines the test case sorting model corresponding to the software type to which the software project to be tested belongs as the target test case sorting model corresponding to the software project to be tested; then, the server performs feature extraction processing on each test case respectively to obtain a text feature vector corresponding to each test case; then, the server inputs the text feature vector corresponding to each test case into the encoding layer of the target test case sorting model, and obtains the target feature vector representing the information of each test case under multiple preset sorting indicators through the encoding processing of the encoding layer; then, the server inputs the target feature vector into the decoding layer of the target test case sorting model, and outputs the sorting results of each test case through the learning of the target feature vector by the decoding layer; finally, the server executes each test case in sequence according to the sorting results of the test case to realize software testing of the software project to be tested.
[0137] For example, the server obtains the text feature vector corresponding to each test case as follows: For each test case, the server first identifies all comment symbols from the text corresponding to the test case and deletes the comment text after each comment symbol; then, the server replaces blank lines and indents in the text with spaces and converts the source code text into the individual strings that make up the source code; then, the server arranges the strings according to the order of the source code to obtain the string sequence of the test case and adds a start marker to the head of the string sequence. <sos>", add an end marker at the end of the string sequence" <eos>", so that the subsequent server can identify the starting and ending points of the vectorization processing; finally, the server vectorizes the string sequence to obtain the text feature vector of the test case.
[0138] To give another example, assuming that the test cases corresponding to the software project to be tested are test case 4, test case 8, test case 9, test case 12 and test case 15, and after the target test case sorting model, the sorting result of test case 4 is 2, the sorting result of test case 8 is 5, the sorting result of test case 9 is 1, the sorting result of test case 12 is 3, and the sorting result of test case 15 is 4; then, the server executes each test case in the order of test case 9, test case 4, test case 12, test case 15, and test case 8 to achieve software testing corresponding to the software project to be tested.
[0139] In the above software testing method, the server first obtains each test case corresponding to the software project to be tested and the software type to which it belongs; then, based on the software type, it determines the target test case sorting model corresponding to the software project to be tested; then, using the target test case sorting model, it sorts each test case to obtain a sorting result for each test case; and finally, it performs software testing on the software project to be tested based on the sorting results for each test case. In this way, the server can optimize the sorting of each test case based on the target test case sorting model corresponding to the software type to which the software project to be tested belongs, and based on the sorting results corresponding to each test case, it can prioritize test cases that are likely to fail or have more serious consequences when performing software testing on the software project to be tested, thereby shortening the time required for software testing and improving software testing efficiency.
[0140] In an exemplary embodiment, the above-mentioned step S508 performs software testing on the software project to be tested according to the sorting results of each test case, and specifically includes the following contents: according to the sorting results of each test case, execute each sorted test case in sequence, and accumulate the fault index corresponding to each sorted test case to obtain the cumulative fault index of the software project to be tested; when the cumulative fault index is greater than the preset fault index threshold of the software project to be tested, end the software test of the software project to be tested, and generate test warning information for the software project to be tested.
[0141] The failure index is used to characterize the failure of the corresponding test case, such as the probability of failure of the test case, the severity of the failure of the test case, etc.
[0142] Specifically, the server first determines a preset fault index threshold value of the software project to be tested; then, according to the sorting results of each test case, it sorts each test case, and then executes each sorted test case in turn, and while executing each test case, accumulates the fault index corresponding to each sorted test case to obtain a cumulative fault index of the software project to be tested; when the cumulative fault index of the software project to be tested is greater than the preset fault index threshold value, it indicates that the test result of the software project to be tested has reached failure and there is no need to continue software testing, so the server ends the software testing of the software project to be tested, and generates test warning information of the software project to be tested based on the test cases that have failed and the faults that have occurred in each test case that has been executed, and sends the test warning information to the testers of the software project to be tested, so that the testers can check for vulnerabilities in the software project to be tested.
[0143] For example, assuming that the preset fault index threshold of the software project to be tested is 30, the server executes each test case in the order of test case 9, test case 4, test case 12, test case 15, and test case 8. Among them, test case 9 is executed normally, test case 4 is executed abnormally, and the corresponding fault index is 19, and test case 12 is executed abnormally, and the corresponding fault index is 15; therefore, as of test case 12, the cumulative preset fault index of the software project to be tested is 34, which is greater than the preset fault index threshold. The server ends the software test of the software project to be tested, and generates test warning information for the software project to be tested based on the faults that occur in test case 4 and test case 12.
[0144] In this embodiment, the server can execute each test case reasonably and orderly according to the sorting results of the test cases; in addition, the server can also end the software test as soon as the test result of the software project to be tested reaches failure based on the cumulative fault index and the preset fault index threshold, thereby reducing unnecessary testing processes, shortening the time used for software testing, and improving software testing efficiency.
[0145] In an exemplary embodiment, Figure 6 As shown, another software testing method is provided, which is described by taking the application of this method to a server as an example, and includes the following steps:
[0146] Step S601: Acquire historical test data of multiple software projects of the same software type.
[0147] Step S602: Determine, based on historical test data, multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test.
[0148] Step S603: Determine the sample sorting result of each test case based on the execution order and execution result corresponding to each test case.
[0149] Step S604: perform feature extraction processing on each test case to obtain a text feature vector for each test case.
[0150] Step S605 , encoding the text feature vector of each test case through the encoding layer in the test case ranking model to be trained, and obtaining a target feature vector representing the information of each test case under a plurality of preset ranking indicators.
[0151] Step S606: input the target feature vector into the decoding layer of the test case ranking model to be trained to obtain the predicted ranking results of each test case.
[0152] Step S607 : training the test case ranking model to be trained according to the prediction ranking results and sample ranking results corresponding to each test case, to obtain a trained test case ranking model.
[0153] Step S608: Acquire each test case corresponding to the software project to be tested and the software type to which it belongs.
[0154] Step S609: Determine the target test case sorting model corresponding to the software project to be tested according to the software type.
[0155] Step S610: sort each test case using the target test case sorting model to obtain a sorting result for each test case.
[0156] Step S611 , according to the sorting results of the test cases, execute the sorted test cases in sequence, and accumulate the fault indexes corresponding to the sorted test cases to obtain the accumulated fault index of the software project to be tested.
[0157] Step S612 , when the accumulated fault index is greater than a preset fault index threshold of the software project to be tested, the software test of the software project to be tested is terminated, and test warning information of the software project to be tested is generated.
[0158] In this embodiment, first, the server extracts features from test cases to obtain a text feature vector for each test case, thereby reducing the amount of data processing required during subsequent model training. Second, through the encoding and decoding layers, the server can obtain a test case ranking model that meets the requirements. Based on this test case ranking model, the server can optimize the ranking of each test case. Third, based on the target test case ranking model corresponding to the software type of the software project to be tested, the server can optimize the ranking of each test case. Based on the ranking results corresponding to each test case, when testing the software project to be tested, test cases that are likely to fail or have serious consequences can be prioritized. Fourth, based on the test case ranking results, the server can execute each test case in a reasonable and orderly manner. Based on the cumulative failure index and a preset failure index threshold, the server can terminate software testing as soon as the test results of the software project to be tested reach failure, thereby reducing unnecessary testing processes. The software testing method based on the above process shortens the time required for software testing and improves software testing efficiency.
[0159] In order to more clearly illustrate the software testing method provided by the embodiment of the present application, the software testing method is specifically described below with a specific embodiment, but it should be understood that the embodiment of the present application is not limited thereto. Figure 7 As shown, in an exemplary embodiment, the present application also provides a test case sorting method based on a seq2seq model, which specifically includes the following steps:
[0160] 1. Training of Test Case Ranking Model
[0161] 1. Test case preprocessing
[0162] The server first removes all comments from the text corresponding to the test case, then replaces blank lines and indents with spaces, and converts the code into multiple strings to obtain the string sequence of the test case. Then, the server adds the following to the beginning and end of the string sequence: <sos>Start mark and <eos>End marker; finally, the server converts the string sequence into a vector sequence through embedding technology to obtain the text feature vector of the test case.
[0163] 2. Training of seq2seq model
[0164] The server uses the text feature vectors of each test case as input and the sample ranking results corresponding to each test case as supervision information to train a seq2seq model to obtain a test case ranking model. The sample ranking results are determined based on the execution order and execution results of the test cases in historical tests.
[0165] 2. Sorting of test cases
[0166] 1. Test case preprocessing
[0167] The server preprocesses each test case of the software project to be tested to obtain a text feature vector of each test case.
[0168] 2. Sorting of test cases
[0169] The server inputs the text feature vector of each test case into the trained test case sorting model, and outputs the sorting result of each test case through the trained test case sorting model.
[0170] 3. Software testing of the software project to be tested
[0171] The server executes each test case in sequence according to the sorting results of each test case of the software project to be tested, and while executing each test case, accumulates the failure index corresponding to each sorted test case to obtain the cumulative failure index of the software project to be tested; when the cumulative failure index of the software project to be tested is greater than the preset failure index threshold, the software test of the software project to be tested is terminated, and test warning information for the software project to be tested is generated based on the test cases that have failed and the failures that have occurred in each test case that has been executed.
[0172] In this embodiment, based on the test cases and their sample sorting results, a test case sorting model can be obtained. Based on the test case sorting model, the sorting between each test case can be optimized, so that when performing software testing on a software project, test cases that may fail or have serious consequences of failure can be tested first, thereby shortening the time required for software testing and improving software testing efficiency.
[0173] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0174] Based on the same inventive concept, the present application also provides a test case ranking model training device for implementing the test case ranking model training method described above. The solution to the problem provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more test case ranking model training device embodiments provided below can be found in the limitations of the test case ranking model training method described above and will not be repeated here.
[0175] In an exemplary embodiment, Figure 8 As shown, a test case sorting model training device is provided, including: a historical data acquisition module 802, an execution information acquisition module 804, a sample sorting determination module 806 and a sorting model training module 808, wherein:
[0176] The historical data acquisition module 802 is used to acquire historical test data of multiple software projects belonging to the same software type.
[0177] The execution information acquisition module 804 is used to determine multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test based on the historical test data.
[0178] The sample order determination module 806 is configured to determine the sample order result of each test case based on the execution order and execution result corresponding to each test case.
[0179] The sorting model training module 808 is used to train the test case sorting model to be trained corresponding to the software type based on each test case and the sample sorting results of each test case, so as to obtain the test case sorting model corresponding to the software type.
[0180] In an exemplary embodiment, the sorting model training module 808 is also used to perform feature extraction processing on each test case separately to obtain a text feature vector for each test case; based on the text feature vector of each test case and the corresponding sample sorting result, the test case sorting model to be trained corresponding to the software type is trained to obtain a test case sorting model corresponding to the software type.
[0181] In an exemplary embodiment, the sorting model training module 808 is also used to extract multiple character strings from the text corresponding to each test case; arrange the individual character strings to obtain a character string sequence of the test case; and vectorize the character string sequence to obtain a text feature vector of the test case.
[0182] In an exemplary embodiment, the sorting model training module 808 is further configured to delete comment text in the text corresponding to the test case to obtain the source code of the test case; and extract the various character strings constituting the source code from the source code.
[0183] In an exemplary embodiment, the sorting model training module 808 is also used to encode the text feature vector of each test case through the encoding layer in the test case sorting model to be trained, and obtain a target feature vector that represents the information of each test case under a plurality of preset sorting indicators; input the target feature vector into the decoding layer in the test case sorting model to be trained, and obtain the predicted sorting result of each test case; train the test case sorting model to be trained according to the predicted sorting result and sample sorting result corresponding to each test case, and obtain a trained test case sorting model.
[0184] Each module in the test case ranking model training device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0185] Based on the same inventive concept, the present application also provides a software testing device for implementing the software testing method described above. The solution to the problem provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more software testing device embodiments provided below can be found in the above-mentioned limitations of the software testing method and will not be repeated here.
[0186] In an exemplary embodiment, Figure 9 As shown, a software testing device is provided, including: a test information acquisition module 902, a target model determination module 904, a ranking result determination module 906 and a software project testing module 908, wherein:
[0187] The test information acquisition module 902 is used to obtain each test case corresponding to the software project to be tested and the software type to which it belongs.
[0188] The target model determination module 904 is used to determine the target test case sorting model corresponding to the software project to be tested according to the software type.
[0189] The sorting result determination module 906 is used to sort each test case using a target test case sorting model to obtain a sorting result for each test case; the target test case sorting model is the test case sorting model in the test case sorting model training method.
[0190] The software project testing module 908 is used to perform software testing on the software project to be tested according to the sorting results of each test case.
[0191] In an exemplary embodiment, the software project testing module 908 is also used to execute each sorted test case in sequence according to the sorting results of each test case, and accumulate the fault index corresponding to each sorted test case to obtain the cumulative fault index of the software project to be tested; the fault index is used to characterize the situation where the corresponding test case fails; when the cumulative fault index is greater than the preset fault index threshold of the software project to be tested, the software test of the software project to be tested is terminated, and test warning information of the software project to be tested is generated.
[0192] Each module in the above-mentioned software testing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0193] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store historical test data of test cases. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a test case sorting model training and a software testing method are implemented.
[0194] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0195] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0196] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0197] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0198] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0199] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0200] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.< / eos> < / sos> < / eos> < / sos> < / eos> < / sos>
Claims
1. A test case ranking model training method, characterized in that: The method comprises: Obtain historical test data for multiple software projects belonging to the same software type; Determining, based on the historical test data, multiple test cases corresponding to the software type, and the execution order and execution results of each test case in the historical tests; Determine a sample sorting result for each test case based on the execution order and execution result corresponding to each test case; Performing feature extraction processing on each of the test cases to obtain a text feature vector for each test case; Encoding the text feature vectors of each test case through the encoding layer in the test case ranking model to be trained corresponding to the software type to obtain target feature vectors representing information of each test case under multiple preset ranking indicators; Inputting the target feature vector into the decoding layer of the test case ranking model to be trained to obtain the predicted ranking results of each test case; The test case sorting model to be trained is trained according to the predicted sorting results and sample sorting results corresponding to each test case to obtain a test case sorting model corresponding to the software type.
2. The method according to claim 1, characterized in that The feature extraction process is performed on each test case to obtain a text feature vector for each test case, including: For each test case, extract multiple character strings from the text corresponding to the test case; Arrange each character string to obtain a character string sequence of the test case; Vectorization is performed on the character string sequence to obtain a text feature vector of the test case.
3. The method according to claim 2, characterized in that For each test case, multiple character strings are extracted from the text corresponding to the test case, including: In the text corresponding to the test case, delete the comment text to obtain the source code of the test case; Extract each character string constituting the source code from the source code.
4. A software testing method, characterized in that: The method comprises: Obtain each test case corresponding to the software project to be tested and the software type to which it belongs; Determine, according to the software type, a target test case sorting model corresponding to the software project to be tested; Sorting each of the test cases using the target test case sorting model to obtain a sorting result for each of the test cases; the target test case sorting model is trained according to the method according to any one of claims 1 to 3; According to the sorting results of the test cases, software testing is performed on the software project to be tested.
5. The method according to claim 4, characterized in that The step of performing software testing on the software project to be tested according to the sorting results of the test cases includes: According to the sorting results of the test cases, the sorted test cases are executed in sequence, and the fault indices corresponding to the sorted test cases are accumulated to obtain a cumulative fault index of the software project to be tested; the fault index is used to characterize the situation in which the corresponding test case fails; When the accumulated fault index is greater than a preset fault index threshold of the software project to be tested, software testing of the software project to be tested is terminated, and test warning information of the software project to be tested is generated.
6. A test case sorting model training device, characterized in that: The device comprises: A historical data acquisition module is used to acquire historical test data of multiple software projects belonging to the same software type; An execution information acquisition module is used to determine, based on the historical test data, multiple test cases corresponding to the software type, as well as the execution order and execution results of each test case in the historical test; A sample sorting determination module is used to determine the sample sorting result of each test case based on the execution order and execution result corresponding to each test case; The sorting model training module is used to perform feature extraction processing on each of the test cases respectively to obtain a text feature vector for each test case; encode the text feature vector of each test case through the encoding layer in the test case sorting model to be trained corresponding to the software type to obtain a target feature vector representing the information of each test case under a plurality of preset sorting indicators; input the target feature vector into the decoding layer in the test case sorting model to be trained to obtain a predicted sorting result of each test case; train the test case sorting model to be trained according to the predicted sorting results and sample sorting results corresponding to each test case to obtain a test case sorting model corresponding to the software type.
7. A software testing device, characterized in that: The device comprises: The test information acquisition module is used to obtain each test case corresponding to the software project to be tested and the software type to which it belongs; A target model determination module is used to determine a target test case sorting model corresponding to the software project to be tested according to the software type; a sorting result determination module, configured to sort the test cases using the target test case sorting model to obtain sorting results for the test cases; the target test case sorting model is trained according to the method according to any one of claims 1 to 3; The software project testing module is used to perform software testing on the software project to be tested according to the sorting results of the test cases.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the test case sorting model training method described in any one of claims 1 to 3, or the steps of the software testing method described in claim 4 or 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the test case ranking model training method described in any one of claims 1 to 3, or the steps of the software testing method described in claim 4 or 5 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the test case ranking model training method described in any one of claims 1 to 3, or the steps of the software testing method described in claim 4 or 5 are implemented.
Citation Information
Patent Citations
Test case sorting model training method and device and test case sorting method and device
CN114461523A
Test case optimization and prioritization
US20210303450A1