Test case recommendation method and device, equipment, medium and program product
By calculating the case matching value, the most suitable test case is recommended, which solves the problem of low recommendation accuracy in the existing technology and improves the testing efficiency and accuracy.
Patent Information
- Application Number
- CN202410652337.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-10
Smart Images

Figure CN118626366A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software testing, specifically to the field of test case recommendation and the financial field, and more specifically to a test case recommendation method, device, equipment, medium and program product. Background Art
[0002] A test case is a detailed description used to verify whether the functionality of a software or system meets its design requirements. It is the basic unit in the software testing process and includes enough information to perform a specific test. Testers need to test the test cases to ensure that the software or system can function properly.
[0003] In the related art, relevant test cases are recommended to testers for testing based on the keywords contained in the test cases. However, the method of recommending test cases by keywords will result in a large number of test cases being recommended to testers simply because they contain corresponding keywords, while the actual conditions of these test cases and the testing capabilities of the testers are not taken into consideration. The accuracy of the recommendations is not high, resulting in excessive time cost for testers to perform tests. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a test case recommendation method, apparatus, device, medium and program product.
[0005] According to the first aspect of the present disclosure, a test case recommendation method is provided, comprising: in response to receiving a request for obtaining test cases, obtaining a set of cases to be recommended, wherein the set of cases to be recommended includes multiple cases to be recommended; performing structural analysis on the codes of the cases to be recommended to determine the code complexity of the cases to be recommended; determining the risk reference value of the cases to be recommended based on the application information of the cases to be recommended; determining the test capability value of the test object based on the object information of the test object; determining the matching weights corresponding to the code complexity, the risk reference value and the test capability value to obtain a matching weight set; determining the case matching value between the cases to be tested and the test object according to a logistic regression algorithm based on the code complexity, the risk reference value, the test capability value and the matching weight set; and determining, when the case matching value satisfies a preset matching condition, the cases to be tested are determined to be target cases, and the target cases are recommended to the test object.
[0006] According to an embodiment of the present disclosure, the above-mentioned structural analysis of the code of the above-mentioned case to be recommended to determine the code complexity of the above-mentioned case to be recommended includes: performing lexical analysis on the above-mentioned code to determine the lexical complexity parameters of the above-mentioned code, wherein the above-mentioned lexical complexity parameters include the number of files, the number of methods and the number of lines of the above-mentioned code; performing syntax analysis on the above-mentioned code to determine the structural complexity parameters of the above-mentioned code, wherein the above-mentioned structural complexity parameters include the number of nodes and the number of edges of the above-mentioned code, and the above-mentioned number of edges includes the number of the above-mentioned loop statements and the number of the above-mentioned judgment statements; based on the coupling index of each module in the above-mentioned code, determining the call depth parameter of each of the above-mentioned modules; and obtaining the above-mentioned code complexity based on the above-mentioned lexical complexity parameters, the above-mentioned structural complexity parameters and the above-mentioned call depth parameters.
[0007] According to an embodiment of the present disclosure, the above-mentioned method of determining the call depth parameter of each module based on the coupling index of each module in the above-mentioned code includes: obtaining a first number of input data parameters of the above-mentioned module, a second number of input control parameters, a third number of output control parameters, a fourth number of output data parameters, a fifth number of global variables in the above-mentioned module, a sixth number of methods for calling the above-mentioned global variables, a seventh number of the first module and an eighth number of the second module, wherein the above-mentioned first module includes a module called by the above-mentioned module, and the above-mentioned second module includes a module for calling the above-mentioned module; determining the coupling index of the above-mentioned module based on the above-mentioned first number, second number, third number, fourth number, fifth number, sixth number, seventh number and eighth number; determining the above-mentioned call depth parameter based on the coupling index of each of the above-mentioned modules.
[0008] According to an embodiment of the present disclosure, the case matching value between the case to be tested and the test object is determined according to a logistic regression algorithm based on the code complexity, the risk reference value, the test capability value and the matching weight set, including: based on the matching weight set, performing weighted summation of the code complexity, the risk reference value and the test capability value to determine a target intermediate value; and determining the case matching value between the case to be tested and the test object based on the logistic regression algorithm and the target intermediate value.
[0009] According to an embodiment of the present disclosure, the test capability value of the test object based on the personnel file of the test object includes: determining the first test capability value of the test object based on the working years of the test object; determining the second test capability value of the test object based on the testing years of the test object; determining the third test capability value of the test object based on the number of test problems found by the test object; and determining the fourth test capability value of the test object based on the test defect resolution rate of the test object.
[0010] According to an embodiment of the present disclosure, the above-mentioned application information includes application categories and historical application problems; the above-mentioned determination of the risk reference value of the above-mentioned case to be recommended based on the application information of the above-mentioned case to be recommended includes: determining the first risk parameter value of the above-mentioned case to be recommended based on the application category involved in the above-mentioned case to be recommended; determining the second risk reference value of the above-mentioned case to be recommended based on whether the above-mentioned case to be recommended has historical application problems; determining the above-mentioned risk reference value based on the above-mentioned first risk reference value and the above-mentioned second risk reference value.
[0011] According to an embodiment of the present disclosure, the above-mentioned determination of matching weights corresponding to the above-mentioned code complexity, the above-mentioned risk reference value and the above-mentioned test capability value respectively to obtain a matching weight set includes: determining the risk level corresponding to the above-mentioned code complexity, the above-mentioned risk reference value and the above-mentioned test capability respectively to obtain a risk level set; based on the above-mentioned risk level set and a predetermined mapping relationship, determining the above-mentioned matching weight set, wherein the above-mentioned predetermined mapping relationship represents the correspondence between the risk level and the matching weight.
[0012] A second aspect of the present disclosure provides a test case recommendation device, including: an acquisition module, for acquiring a set of cases to be recommended in response to receiving a request for acquiring test cases, wherein the set of cases to be recommended includes multiple cases to be recommended; a structural analysis module, for performing structural analysis on the code of the case to be recommended and determining the code complexity of the case to be recommended; a risk reference value determination module, for determining the risk reference value of the case to be recommended based on application information of the case to be recommended; a test capability value determination module, for determining the test capability value of the test object based on object information of the test object; a matching weight determination module, for determining the matching weights corresponding to the code complexity, the risk reference value and the test capability value, respectively, to obtain a matching weight set; a case matching value determination module, for determining the case matching value between the case to be tested and the test object according to a logistic regression algorithm based on the code complexity, the risk reference value, the test capability value and the matching weight set; and a target case recommendation module, for determining the case to be tested as a target case when the case matching value meets a preset matching condition, and recommending the target case to the test object.
[0013] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0014] The fourth aspect of the present disclosure further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.
[0015] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0016] According to the test case recommendation method provided by the present invention, after receiving a request for obtaining a test case, the code complexity, risk reference value and test capability value of the case to be tested are respectively obtained, and then a matching weight set consisting of the corresponding matching weights is determined based on the code complexity, risk reference value and test capability value, and finally the code complexity, risk reference value, test capability value and matching weight set are calculated through a logistic regression algorithm to obtain the case matching value of the case to be tested, and the target case is determined based on the case matching value and recommended to the test object. Since the code and application information of the test case itself and the object information of the test object are integrated, the test case can be recommended to the test object more accurately, which improves the accuracy of the test case recommendation and reduces the time cost of the test object for testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 A diagram schematically illustrates an application scenario of a test case recommendation method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0019] Figure 2 A flowchart of a test case recommendation method according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 3 A flowchart for performing structural analysis on the code of the recommended case and determining the code complexity of the recommended case is schematically shown;
[0021] Figure 4 A flowchart schematically illustrates a method for determining a test capability value of a test subject based on the personnel profile of the test subject;
[0022] Figure 5 A structural block diagram of a test case recommendation device according to an embodiment of the present disclosure is schematically shown; and
[0023] Figure 6 A block diagram of an electronic device suitable for implementing a test case recommendation method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0028] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0030] In the related art, since the test cases recommended for the test object are recommended based on keywords, this method cannot accurately match the test object and the test case that most needs to be tested, and the matching of the test case and the test object is not accurate enough.
[0031] An embodiment of the present disclosure provides a test case recommendation method, comprising: in response to receiving a request for obtaining a test case, obtaining a set of cases to be recommended, wherein the set of cases to be recommended includes multiple cases to be recommended. Performing a structural analysis on the code of the case to be recommended to determine the code complexity of the case to be recommended. Determining a risk reference value of the case to be recommended based on the application information of the case to be recommended. Determining a test capability value of the test object based on the object information of the test object. Determining the matching weights corresponding to the code complexity, risk reference value, and test capability value, respectively, to obtain a matching weight set. Based on the code complexity, risk reference value, test capability value, and matching weight set, determining the case matching value between the case to be tested and the test object according to a logistic regression algorithm; when the case matching value meets a preset matching condition, determining the case to be tested as a target case, and recommending the target case to the test object.
[0032] Figure 1 The application scenario diagram of the test case recommendation method according to an embodiment of the present disclosure is schematically shown.
[0033] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a test case recommendation application scenario. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0034] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0035] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0036] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0037] It should be noted that the test case recommendation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the test case recommendation device provided in the embodiment of the present disclosure can generally be set in the server 105. The test case recommendation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the test case recommendation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0038] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0039] The following will be based on Figure 1 The scene described by Figure 2 to Figure 4 The test case recommendation method of the disclosed embodiment is described in detail.
[0040] Figure 2 The flowchart of the test case recommendation method according to the embodiment of the present disclosure is schematically shown.
[0041] like Figure 2 As shown, the test case recommendation method of this embodiment includes operations S210 to S230, and the test case recommendation can be executed by a server or other computing devices.
[0042] In operation S210 , in response to receiving a request for obtaining a test case, a set of cases to be recommended is obtained, wherein the set of cases to be recommended includes a plurality of cases to be recommended.
[0043] In the embodiments of the present disclosure, a test case is a set of test inputs, execution conditions, and expected results designed for a specific purpose in order to test whether the software can meet a specific requirement. The set of recommended cases is a set of test cases that have not yet been finalized or approved for actual testing. These cases can be automatically generated based on historical data, test requirements of similar functions, or through machine learning algorithms.
[0044] In operation S220 , a structural analysis is performed on the code of the case to be recommended to determine the code complexity of the case to be recommended.
[0045] In the embodiments of the present disclosure, code complexity is an indicator that measures the complexity of the software code structure. The higher the code complexity, the more difficult it is to develop the code, the more likely it is to have errors, and therefore the more necessary it is to test the case.
[0046] In operation S230 , a risk reference value of the case to be recommended is determined based on the application information of the case to be recommended.
[0047] In an embodiment of the present disclosure, the application information of the case to be recommended may include the business involved in the case, historical test results, relevant defect reports and the corresponding code module change history. The importance of the test case and the changes or defects that have occurred in the past are determined based on the application information of the case to be recommended. The more important the business involved in the case to be recommended and the more changes or errors there have been in history, the higher the risk of problems with the test case. Therefore, a higher risk reference value needs to be determined in order to recommend it to the test object for testing.
[0048] In operation S240, a test capability value of the test object is determined based on the object information of the test object.
[0049] In an embodiment of the present disclosure, the object information of the test object may include the number of years the test object has been engaged in related work, as well as the conditions of past test cases, etc. If the test was able to detect defects existing in more test cases in the past, the test object is considered to have a higher test capability, and the corresponding test capability value is determined.
[0050] In operation S250, matching weights corresponding to the code complexity, the risk reference value, and the test capability value are determined to obtain a matching weight set.
[0051] In the embodiments of the present disclosure, since it is necessary to conduct a comprehensive evaluation of the code complexity, risk reference value and test capability value, it is necessary to determine the matching weights corresponding to the code complexity, risk reference value and test capability value respectively. The matching weights can be determined by experts or obtained by analyzing historical data.
[0052] It should be pointed out that code complexity, risk reference value and test capability value should not be understood as just one numerical value, but also as a collection of multiple numerical values.
[0053] In operation S260 , based on the code complexity, the risk reference value, the test capability value, and the matching weight set, a case matching value between the case to be tested and the test object is determined according to a logistic regression algorithm.
[0054] In the embodiments of the present disclosure, a process of logistic regression may be performed based on a logistic function such as a Sigmoid function, a Softmax function, or a hyperbolic tangent function, so as to obtain a case matching value between the case to be tested and the test object.
[0055] In operation S270 , when the case matching value satisfies a preset matching condition, the case to be tested is determined to be a target case, and the target case is recommended to the test subject.
[0056] In an embodiment of the present disclosure, a preset threshold can be set to determine whether the case matching value meets the preset matching condition. After the case matching value is determined in operation S260, the case matching value can be compared with the preset threshold to determine whether the case matching value meets the matching condition, thereby determining whether the case to be recommended is the target case.
[0057] Through the test case recommendation method provided by the present invention, the code complexity, risk reference value and test capability value of the case to be recommended and the matching weight set composed of the corresponding matching weights are determined respectively, and the code complexity, risk reference value, test capability value and matching weight are applied to the logistic regression algorithm to obtain the case matching value, and the corresponding target case is recommended to the test object according to the case matching value. Since the target case is determined by combining the code and application information of the test case itself and the object information of the test object, the test case can be recommended to the test object more accurately, which improves the accuracy of the test case recommendation and reduces the time cost of the test object for testing.
[0058] Figure 3 The flowchart schematically shows a structure analysis of the code of the case to be recommended and determining the code complexity of the case to be recommended.
[0059] like Figure 3As shown, the flowchart of performing structural analysis on the code of the case to be recommended and determining the code complexity of the case to be recommended includes operations S310 to S340.
[0060] In operation S310, lexical analysis is performed on the code to determine lexical complexity parameters of the code, wherein the lexical complexity parameters include the number of files, the number of methods, and the number of lines of the code.
[0061] In an embodiment of the present disclosure, a lexical analyzer can be used to read the original text of the code in the test case and convert it into multiple tokens, which include keywords, variable names, operators, etc. of the code, thereby obtaining the number of files, methods, and lines of the code.
[0062] In operation S320, the code is parsed to determine the structural complexity parameters of the code, wherein the structural complexity parameters include the number of nodes and the number of edges of the code, and the number of edges includes the number of loop statements and the number of judgment statements.
[0063] In an embodiment of the present disclosure, the tags generated in operation S310 may be constructed into a syntax tree or a control flow graph, thereby obtaining the number of nodes and the number of edges. The number of nodes includes statements and expressions of the code, etc., which may reflect the size and complexity of the structure of the code. The number of edges represents the jump path in the code flow, including sequential execution, conditional branches, loops, etc. These parameters may affect the control flow complexity of the code.
[0064] In an embodiment of the present disclosure, the structural complexity parameter can be calculated by equation (1):
[0065] VF=e-n+2 (1)
[0066] Among them, VF is the structural complexity parameter, e is the number of edges, and n is the number of nodes.
[0067] In the embodiment of the present disclosure, the sum of the number of loop statements and the number of judgment statements may also be directly used as the structural complexity parameter.
[0068] In operation S330 , based on the coupling index of each module in the code, a call depth parameter of each module is determined.
[0069] In the embodiments of the present disclosure, the coupling index can represent the mutual calls between different modules and the number of input and output parameters in the module. The higher the coupling index of a module, the more it will rely on other modules to realize its functions. The call depth parameter refers to the depth of a module's position in the call stack, reflecting the length of the call chain from a certain node to the current module. The greater the call depth, the deeper the module is nested, which may imply more complex dependencies and more difficult to track errors.
[0070] In operation S340 , code complexity is obtained based on the lexical complexity parameter, the structural complexity parameter, and the call depth parameter.
[0071] In an embodiment of the present disclosure, the lexical complexity parameters, structural complexity parameters and call depth complexity parameters may be added or weighted together to obtain the code complexity, or the lexical complexity parameters, structural complexity parameters and call depth complexity parameters may be respectively assigned corresponding matching weights to participate in a logistic regression operation.
[0072] Through the test case recommendation method provided by the present invention, lexical complexity parameters and structural complexity parameters are obtained by performing lexical analysis and syntactic analysis on the code, and the call depth parameters of each module are also taken into account. The dependencies and call relationships between modules can be used to more accurately evaluate the complexity of the code, thereby analyzing the complexity of the code more comprehensively, and then more accurately determining the recommended cases with risks.
[0073] In an illustrative embodiment, based on the coupling index of each module in the code, determining the call depth parameter of each module includes: obtaining a first number of input data parameters of the module, a second number of input control parameters, a third number of output control parameters, a fourth number of output data parameters, a fifth number of global variables in the module, a sixth number of methods for calling global variables, a seventh number of the first module, and an eighth number of the second module, wherein the first module includes a module called by the module, and the second module includes a module for calling the module. The coupling index of the module is determined based on the first number, the second number, the third number, the fourth number, the fifth number, the sixth number, the seventh number, and the eighth number. The call depth parameter is determined based on the coupling index of each module.
[0074] In an embodiment of the present disclosure, the code coupling index may be determined by equation (2):
[0075]
[0076] Among them, Coupling (C) is the coupling index of the module, d i is the first quantity, c i is the second quantity, d o is the third quantity, c o is the fourth quantity, g d is the fifth quantity, g c is the sixth number, r is the seventh number, and w is the eighth number. The code coupling index of each module in the same test case can be added together to obtain the call depth parameter, or the code coupling indexes of multiple modules can be combined and assigned corresponding matching weights to participate in the logistic regression operation.
[0077] In an illustrative embodiment, based on the code complexity, risk reference value, test capability value and matching weight set, a case matching value between the case to be tested and the test object is determined according to a logistic regression algorithm, including: based on the matching weight set, weighted summing the code complexity, risk reference value and test capability value to determine a target intermediate value. Based on the logistic regression algorithm and the target intermediate value, a case matching value between the case to be tested and the test object is determined.
[0078] In an embodiment of the present disclosure, the case matching value may be determined by equation (3):
[0079]
[0080] Among them, h θ (x) is the case matching value, θ=[θ 0 ,θ 1 ,θ 2 ] T ,θ 0 ,θ 1 and θ 3 They are code complexity, risk reference value and test capability value, x=[x 0 ,x 1 ,x 3 ] T are the matching weights corresponding to code complexity, risk reference value and test capability value, g(θ T x) is the Sigmoid function with the dot product of the theta vector and the x vector as its parameter.
[0081] Figure 4 The flowchart for determining the test ability value of a test subject based on the personnel profile of the test subject is schematically shown.
[0082] like Figure 4 As shown, the process of determining the test capability value of the test subject based on the personnel profile of the test subject includes operations S410 to S440.
[0083] In operation S410, a first test capability value of the test subject is determined based on the working years of the test subject.
[0084] In the embodiments of the present disclosure, the working years of the test subject may be the time the test subject has been engaged in software development and testing, etc., and is an intuitive indicator for measuring the experience of the test subject.
[0085] In operation S420, a second test capability value of the test object is determined based on the test years of the test object;
[0086] In the embodiments of the present disclosure, the testing years of a test subject refer to the years the test subject has spent in full-time testing work. Generally, longer testing years are usually considered to be associated with higher testing skills and problem-solving abilities.
[0087] In operation S430 , a third test capability value of the test object is determined based on the number of test problem discoveries of the test object.
[0088] In an embodiment of the present disclosure, the third test capability value may be determined according to a ranking of the number of test problems found for the test object among the numbers of test problems found for all test objects.
[0089] In operation S440 , a fourth test capability value of the test object is determined based on a test defect resolution rate of the test object.
[0090] In an embodiment of the present disclosure, the fourth test capability value may be determined according to a ranking of a test defect resolution rate of the test object among all test objects.
[0091] In the embodiments of the present disclosure, the first test capability value, the second test capability value, the third test capability value and the fourth test capability value may be respectively assigned corresponding matching weights and participate in the process of logistic regression operation.
[0092] Through the test case recommendation method provided by the present invention, the testing ability of the test subject can be relatively objectively evaluated based on the test subject's years of work, testing experience, and ability to discover and solve problems, which can help determine which test cases to recommend to the test subject. Test cases can be recommended to the test subject based on the test subject's ability, thereby improving the accuracy of test case recommendations and being beneficial to the cultivation of the test subject's testing ability.
[0093] In an illustrative embodiment, the application information includes application categories and historical application problems. Determining a risk reference value of a case to be recommended based on the application information of the case to be recommended includes: determining a first risk parameter value of the case to be recommended based on the application category involved in the case to be recommended. Determining a second risk reference value of the case to be recommended based on whether the case to be recommended has historical application problems. Determining a risk reference value based on the first risk reference value and the second risk reference value.
[0094] In the embodiment of the present disclosure, the application category involved in the case to be recommended may be the core business or non-core business of the unit, or may be the business related to the account or the business unrelated to the account.
[0095] In the embodiments of the present disclosure, the historical application problem may be that at least a part of the code in the case to be recommended has had a problem in a historical online version, or at least a part of the code in the case to be recommended has been tested.
[0096] Through the test case recommendation method provided by the embodiment of the present disclosure, the possibility of risks in the case to be recommended and the location where the risks may exist can be comprehensively determined based on the application category of the case to be recommended and historical application problems. This can improve the accuracy of the recommendation and is also conducive to improving the efficiency and quality of the testing process.
[0097] In an illustrative embodiment, determining the matching weights corresponding to the code complexity, the risk reference value, and the test capability value to obtain a matching weight set includes: determining the risk level corresponding to the code complexity, the risk reference value, and the test capability value to obtain a risk level set. Based on the risk level set and a predetermined mapping relationship, the matching weight set is determined, wherein the predetermined mapping relationship represents the corresponding relationship between the risk level and the matching weight.
[0098] In the embodiments of the present disclosure, the corresponding risk level can be determined according to the obtained code complexity, risk reference value and test capability value. For example, the risk level can be divided into high risk, medium risk and low risk levels according to the respective values of code complexity, risk reference value and test capability value, and then the matching weight can be determined according to the risk level. For the case of high risk level, a higher matching weight can be assigned, and for the case of low risk level, a lower matching weight can be assigned.
[0099] Through the test case recommendation method provided by the embodiment of the present disclosure, the code complexity, risk reference value and test capability value are used to determine the corresponding risk level and the corresponding matching weight, thereby ensuring that high-risk or complex recommended cases are assigned to corresponding high-capability test objects, thereby improving the accuracy of recommendations, improving test efficiency and reducing potential risks.
[0100] In an illustrative embodiment, Table 1 schematically shows the risk levels and matching weights corresponding to the lexical complexity parameters when the lexical complexity parameters are the number of files, the number of methods, and the number of lines of code, respectively.
[0101] Table 1 Comparison table of risk levels and matching weights of lexical complexity parameters
[0102] Number of code files Risk Level Matching weight 1<=A1<=2 Low -0.2 3<=A1<=5 middle 0.08 6<=A1<=10 high 0.15 A1>10 Very high 0.85 Number of code methods Risk Level Matching weight 1<=A2<=2 Low -0.2 3<=A2<=5 middle 0.08 6<=A2<=10 high 0.15 A2>10 Very high 0.85 Lines of code Risk Level Matching weight 0<=A3<=50 Low -0.2 50<=A3<=100 middle 0.08 100<=A3<=1000 high 0.15 A3>1000 Very high 0.85
[0103] In an illustrative embodiment, Table 2 schematically shows the risk level and matching weight corresponding to the structural complexity parameter when the structural complexity parameter is the number of nodes and the number of edges.
[0104] Table 2 Comparison table of risk levels and matching weights of structural complexity parameters of an exemplary embodiment
[0105] Structural complexity parameters Risk Level Matching weight 1<=B1<=10 Low -0.12 11<=B1<=20 middle 0.08 21<=B1<=50 high 0.15 B1>50 Very high 0.85
[0106] In another exemplary embodiment, Table 2 schematically shows the risk level and matching weight corresponding to the structural complexity parameter when the structural complexity is the number of loop statements and the number of judgment statements.
[0107] Table 3 Comparison table of risk levels and matching weights of structural complexity parameters of another exemplary embodiment
[0108]
[0109] In an illustrative embodiment, Table 4 schematically shows the risk level and matching weight corresponding to the call depth parameter of each module.
[0110] Table 4 Comparison table of risk levels and matching weights of calling depth parameters
[0111] Calling depth parameters Risk Level Matching weight C<=0.67 Low -0.2 0.68<=C<=1 high 0.56
[0112] In an illustrative embodiment, Table 5 schematically shows the corresponding risk level and matching weight when the first test capability value is the working years of the tester.
[0113] Table 5 Comparison table of risk levels and matching weights of the first test capability value
[0114] First test capability value Risk Level Matching weight D<=1 Very high 0.85 2<=D<=3 high 0.15 4<=D<=5 middle 0.08 D>5 Low -0.2
[0115] In an illustrative embodiment, Table 6 schematically shows the corresponding risk level and matching weight when the second test capability value is the test experience of the tester.
[0116] Table 6 Comparison table of risk levels and matching weights of the second test capability value
[0117] Second test capability value Risk Level Matching weight E<=1 Very high 0.85 2<=E<=3 high 0.15 4<=E<=5 middle 0.08 E>5 Low -0.2
[0118] In an illustrative embodiment, Table 7 schematically shows the corresponding risk level and matching weight when the third test capability value is the percentage of the number of test problems found by the tester among all testers.
[0119] Table 7 Comparison table of risk levels and matching weights of the third test capability value
[0120] The third test ability value Risk Level Matching weight 0%<=F<=20% Very high 0.85 21%<=F<=50% high 0.15 51%<=F<=75% middle 0.08 76%<=F<=100% Low -0.2
[0121] In an illustrative embodiment, Table 8 schematically shows the corresponding risk level and matching weight when the fourth test capability value is the percentage of the test defect resolution rate of the tester among all testers.
[0122] Table 8 Comparison table of risk levels and matching weights of the fourth test capability value
[0123] Fourth Test Ability Value Risk Level Matching weight 0%<=G<=20% Very high 0.85 21%<=G<=50% high 0.15 51%<=G<=75% middle 0.08 76%<=G<=100% Low -0.2
[0124] In an illustrative embodiment, Table 9 schematically shows the corresponding risk level and matching weight when the first risk parameter value is a Boolean value indicating whether the case to be recommended is a core business.
[0125] Table 9 Comparison table of risk levels and matching weights of the first risk parameter value
[0126]
[0127] In an illustrative embodiment, Table 10 schematically shows the corresponding risk level and matching weight when the second risk parameter value is a Boolean value indicating whether the case to be recommended has a historical application problem.
[0128] Table 10 Comparison table of risk levels and matching weights of the second risk parameter value
[0129] Second risk parameter value Risk Level Matching weight I=0 Low -0.2 I=1 high 0.85
[0130] Based on the above test case recommendation method, the present disclosure also provides a test case recommendation device. Figure 5 The device is described in detail.
[0131] Figure 5 The structural block diagram of the test case recommendation device according to an embodiment of the present disclosure is schematically shown.
[0132] like Figure 5 As shown, the test case recommendation device 500 of this embodiment includes an acquisition module 510, a structure analysis module 520, a risk reference value determination module 530, a test capability value determination module 540, a matching weight determination module 550, a case matching value determination module 560 and a target case recommendation module 570.
[0133] The acquisition module 510 is used to obtain a set of cases to be recommended in response to receiving a request for obtaining test cases, wherein the set of cases to be recommended includes multiple cases to be recommended. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be described in detail here.
[0134] The structure analysis module 520 is used to perform structure analysis on the code of the recommended case to determine the code complexity of the recommended case. In one embodiment, the structure analysis module 520 can be used to perform the operation S220 described above, which will not be described in detail here.
[0135] The risk reference value determination module 530 is used to determine the risk reference value of the case to be recommended based on the application information of the case to be recommended. In one embodiment, the risk reference value determination module 530 can be used to perform the operation S230 described above, which will not be described in detail here.
[0136] The test capability value determination module 540 is used to determine the test capability value of the test object based on the object information of the test object. In one embodiment, the test capability value determination module 540 can be used to perform the operation S240 described above, which will not be described in detail here.
[0137] The matching weight determination module 550 is used to determine the matching weights corresponding to the code complexity, the risk reference value and the test capability value, and obtain a matching weight set. In one embodiment, the matching weight determination module 550 can be used to perform the operation S250 described above, which will not be repeated here.
[0138] The case matching value determination module 560 determines the case matching value between the case to be tested and the test object according to the logistic regression algorithm based on the code complexity, the risk reference value, the test capability value and the matching weight set. In one embodiment, the case matching value determination module 560 can be used to perform the operation S260 described above, which will not be repeated here.
[0139] The target case recommendation module 570 is used to determine the case to be tested as the target case when the case matching value meets the preset matching condition, and recommend the target case to the test object. In one embodiment, the target case recommendation module 570 can be used to perform the operation S270 described above, which will not be repeated here.
[0140] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 510, the structure analysis module 520, the risk reference value determination module 530, the test capability value determination module 540, the matching weight determination module 550, the case matching value determination module 560 and the target case recommendation module 570 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 510, the structure analysis module 520, the risk reference value determination module 530, the test capability value determination module 540, the matching weight determination module 550, the case matching value determination module 560 and the target case recommendation module 570 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the acquisition module 510, the structure analysis module 520, the risk reference value determination module 530, the test capability value determination module 540, the matching weight determination module 550, the case matching value determination module 560 and the target case recommendation module 570 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0141] According to an embodiment of the present disclosure, the structure analysis module 520 includes a lexical analysis submodule, a syntax analysis submodule, a call depth determination submodule, and a code complexity determination submodule.
[0142] The lexical analysis submodule is used to perform lexical analysis on the code and determine the lexical complexity parameters of the code, where the lexical complexity parameters include the number of files, methods and lines of the code.
[0143] The syntax analysis submodule is used to perform syntax analysis on the code and determine the structural complexity parameters of the code, wherein the structural complexity parameters include the number of nodes and the number of edges of the code, and the number of edges includes the number of loop statements and the number of judgment statements.
[0144] The call depth determination submodule is used to determine the call depth parameter of each module based on the coupling index of each module in the code.
[0145] The code complexity determination submodule is used to obtain the code complexity based on the lexical complexity parameter, the structural complexity parameter and the call depth parameter.
[0146] According to an embodiment of the present disclosure, the call depth determination submodule includes a parameter acquisition unit, a coupling index determination unit, and a call depth parameter determination unit.
[0147] A parameter acquisition unit, used to acquire a first number of input data parameters of a module, a second number of input control parameters, a third number of output control parameters, a fourth number of output data parameters, a fifth number of global variables in the module, a sixth number of methods for calling global variables, a seventh number of the first module, and an eighth number of the second module, wherein the first module includes a module called by the module and the second module includes a module for calling the module.
[0148] A coupling index determining unit is used to determine a coupling index of a module based on the first number, the second number, the third number, the fourth number, the fifth number, the sixth number, the seventh number, and the eighth number.
[0149] The calling depth parameter determination unit is used to determine the calling depth parameter based on the coupling index of each module.
[0150] According to an embodiment of the present disclosure, the case matching value determination module 560 includes a target intermediate value determination submodule and a case matching value determination submodule.
[0151] The target intermediate value determination submodule is used to determine the target intermediate value by weighted summing up the code complexity, risk reference value and test capability value based on the matching weight set.
[0152] The case matching value determination submodule is used to determine the case matching value between the case to be tested and the test object based on the logistic regression algorithm and the target intermediate value.
[0153] According to an embodiment of the present disclosure, the test capability value determination module 540 includes a first test capability value determination submodule, a second test capability value determination submodule, a third test capability value determination submodule, and a fourth test capability value determination submodule.
[0154] The first test capability value determination submodule is used to determine the first test capability value of the test object based on the working years of the test object.
[0155] The second test capability value determination submodule is used to determine the second test capability value of the test object based on the test years of the test object.
[0156] The third test capability value determination submodule is used to determine the third test capability value of the test object based on the number of test problems found in the test object.
[0157] The fourth test capability value determination submodule is used to determine a fourth test capability value of the test object based on the test defect resolution rate of the test object.
[0158] According to an embodiment of the present disclosure, the risk reference value determination module 530 includes a first risk parameter value determination submodule, a second risk parameter value determination submodule and a risk reference value determination submodule.
[0159] The first risk parameter value determination submodule is used to determine the first risk parameter value of the case to be recommended based on the application category involved in the case to be recommended.
[0160] The second risk parameter value determination submodule is used to determine the second risk reference value of the case to be recommended based on whether the case to be recommended has any historical application problems.
[0161] The risk reference value determination submodule is used to determine the risk reference value based on the first risk reference value and the second risk reference value.
[0162] According to an embodiment of the present disclosure, the matching weight determination module 550 includes a risk level determination submodule and a matching weight set determination submodule.
[0163] The risk level determination submodule is used to determine the risk levels corresponding to the code complexity, risk reference value and test capability, and obtain a risk level set.
[0164] The matching weight set determination submodule is used to determine the matching weight set based on the risk level set and the predetermined mapping relationship, wherein the predetermined mapping relationship represents the corresponding relationship between the risk level and the matching weight.
[0165] Figure 6 A block diagram of an electronic device suitable for implementing a test case recommendation method according to an embodiment of the present disclosure is schematically shown.
[0166] like Figure 6 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0167] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0168] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0169] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0170] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0171] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the test case recommendation method provided by the embodiment of the present disclosure.
[0172] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0173] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0174] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0175] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0176] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0177] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0178] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A test case recommendation method, characterized in that: The method comprises: In response to receiving a request for obtaining a test case, obtaining a set of cases to be recommended, wherein the set of cases to be recommended includes a plurality of cases to be recommended; Performing structural analysis on the code of the case to be recommended to determine the code complexity of the case to be recommended; Determining a risk reference value of the case to be recommended based on the application information of the case to be recommended; Determining a test capability value of the test object based on the object information of the test object; Determine matching weights corresponding to the code complexity, the risk reference value, and the test capability value, respectively, to obtain a matching weight set; Based on the code complexity, the risk reference value, the test capability value and the matching weight set, determining a case matching value between the case to be tested and the test object according to a logistic regression algorithm; In the case where the case matching value satisfies a preset matching condition, the case to be tested is determined to be a target case, and the target case is recommended to the test subject.
2. The test case recommendation method according to claim 1, characterized in that: The structural analysis of the code of the case to be recommended to determine the code complexity of the case to be recommended includes: Performing lexical analysis on the code to determine lexical complexity parameters of the code, wherein the lexical complexity parameters include the number of files, the number of methods, and the number of lines of the code; Performing syntax analysis on the code to determine a structural complexity parameter of the code, wherein the structural complexity parameter includes the number of nodes and the number of edges of the code, and the number of edges includes the number of loop statements and the number of judgment statements; Determining a call depth parameter of each module based on the coupling index of each module in the code; and The code complexity is obtained based on the lexical complexity parameter, the structural complexity parameter and the call depth parameter.
3. The test case recommendation method according to claim 2, characterized in that: Determining the call depth parameter of each module based on the coupling index of each module in the code includes: Obtaining a first number of input data parameters, a second number of input control parameters, a third number of output control parameters, a fourth number of output data parameters, a fifth number of global variables in the module, a sixth number of methods for calling the global variables, a seventh number of first modules, and an eighth number of second modules, wherein the first module includes a module called by the module and the second module includes a module for calling the module; Determining a coupling index of the module based on the first number, the second number, the third number, the fourth number, the fifth number, the sixth number, the seventh number, and the eighth number; The call depth parameter is determined based on the coupling index of each of the modules.
4. The test case recommendation method according to claim 1, characterized in that: The determining, based on the code complexity, the risk reference value, the test capability value, and the matching weight set, the case matching value between the case to be tested and the test object according to a logistic regression algorithm includes: Based on the matching weight set, weighted summing the code complexity, the risk reference value and the test capability value is performed to determine a target intermediate value; and Based on the logistic regression algorithm and the target intermediate value, a case matching value between the case to be tested and the test object is determined.
5. The test case recommendation method according to claim 1, characterized in that: The determining the test capability value of the test subject based on the personnel file of the test subject comprises: Determining a first test capability value of the test subject based on the working years of the test subject; Determining a second test capability value of the test object based on the test years of the test object; determining a third test capability value of the test object based on the number of test problems found for the test object; and Based on the test defect resolution rate of the test object, a fourth test capability value of the test object is determined.
6. The test case recommendation method according to claim 1, characterized in that: The application information includes application category and historical application problems; The determining the risk reference value of the case to be recommended based on the application information of the case to be recommended includes: Determining a first risk parameter value of the case to be recommended based on the application category involved in the case to be recommended; Determining a second risk reference value of the case to be recommended based on whether the case to be recommended has historical application problems; The risk reference value is determined based on the first risk reference value and the second risk reference value.
7. The test case recommendation method according to claim 1, characterized in that: The determining of the matching weights corresponding to the code complexity, the risk reference value, and the test capability value to obtain a matching weight set includes: Determine the risk level corresponding to each of the code complexity, the risk reference value and the test capability, and obtain a risk level set; The matching weight set is determined based on the risk level set and a predetermined mapping relationship, wherein the predetermined mapping relationship represents a corresponding relationship between risk levels and matching weights.
8. A test case recommendation device, characterized in that: The device comprises: An acquisition module, configured to acquire a set of cases to be recommended in response to receiving a request for acquiring a test case, wherein the set of cases to be recommended includes a plurality of cases to be recommended; A structure analysis module, used for performing structure analysis on the code of the case to be recommended to determine the code complexity of the case to be recommended; A risk reference value determination module, used to determine the risk reference value of the case to be recommended based on the application information of the case to be recommended; A test capability value determination module, used to determine the test capability value of the test object based on the object information of the test object; A matching weight determination module, used to determine the matching weights corresponding to the code complexity, the risk reference value and the test capability value, respectively, to obtain a matching weight set; a case matching value determination module, which determines the case matching value between the case to be tested and the test object according to a logistic regression algorithm based on the code complexity, the risk reference value, the test capability value and the matching weight set; and The target case recommendation module is used to determine that the case to be tested is a target case when the case matching value meets a preset matching condition, and recommend the target case to the test object.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
