Test case recommendation method and device, storage medium and computer equipment

By obtaining and analyzing the change code and location data of the software system, finding and sorting relevant test cases, the problem of low code testing efficiency and accuracy in the existing technology is solved, efficient and accurate test case recommendations are achieved, and R&D efficiency is improved.

CN119669076APending Publication Date: 2025-03-21CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411748707.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the existing technology, code testing efficiency and accuracy are low, and cannot meet the current needs of the software development industry.

Method used

By obtaining all the change codes and location data of the software system to be tested, using the predetermined correlation information to find relevant test cases, calculate the similarity between the change codes, sort and recommend the test cases to the user.

Benefits of technology

It realizes efficient and accurate recommendations of related test cases for changing codes, improves the accuracy and efficiency of software testing, and improves R&D efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669076A_ABST
    Figure CN119669076A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software testing, and discloses a test case recommendation method and device, a storage medium and computer device.The test case recommendation method comprises the steps that all change codes of a to-be-tested software system are obtained, and current position data corresponding to all the change codes are obtained; searching all test cases corresponding to the current position data according to predetermined association relationship information, wherein the association relationship information comprises association relationships between the test cases and the position data; calculating the similarity between the change codes, and sorting the queried test cases according to the calculated similarity value; and recommending the searched test cases to a user according to a sorting sequence. According to the method, a guarantee is provided for accurate recommendation and accurate testing of the use case, and an efficient means is provided for complex software testing, so that the research and development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of software testing management technology and testing process improvement technology, and in particular to a test case recommendation method, device, storage medium and computer equipment. Background Art

[0002] In the era of mobile Internet where software products are being iterated on a large scale, the complexity of software projects is growing rapidly, and agile value delivery has become an indispensable capability for the development of current software technology. Therefore, in the process of software iteration, how to improve R&D efficiency has often become a strategic focus. In the field of R&D efficiency, how to test more efficiently and accurately has always been a topic of constant discussion and research in the industry.

[0003] In the prior art, when a code change occurs in a software system and needs to be tested using test cases, the changed code is usually manually checked and then all test cases are executed in sequence for testing. This method is extremely inefficient and inaccurate and cannot meet current industry needs. Summary of the invention

[0004] The present invention provides a test case recommendation method, device, storage medium and computer equipment to solve the technical problems of low code testing efficiency and accuracy in the prior art.

[0005] In one aspect, the present invention provides a test case recommendation method, comprising:

[0006] Obtain all change codes of the software system to be tested, and obtain current position data corresponding to each of the change codes;

[0007] Searching for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data;

[0008] Calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values;

[0009] The found test cases are recommended to the user in sorted order.

[0010] Furthermore, in the test case recommendation method, before the step of obtaining all the changed codes of the software system to be tested, the method further includes:

[0011] Obtaining the association relationship between the requirement ID and the test case, and obtaining the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID;

[0012] Analyze the position data corresponding to the submitted code, the position data including the starting and ending positions of the submitted code and the starting and ending positions of the reference code corresponding to the submitted code segment;

[0013] An association relationship is established between the requirement ID, the test case and the location data.

[0014] Furthermore, in the test case recommendation method, the step of searching for all test cases corresponding to the current location data according to the predetermined association relationship information includes:

[0015] According to the association relationship between the location data and the demand ID, query the current demand ID corresponding to the current location data;

[0016] According to the association relationship between the requirement ID and the test case, query the test case corresponding to the current requirement ID.

[0017] Furthermore, in the test case recommendation method, the step of calculating the similarity between each of the change codes includes:

[0018] Preprocessing the change code and standardizing the code format;

[0019] Extract valid features from the processed code, and convert the extracted valid features into numerical vectors;

[0020] The cosine similarity algorithm is used to calculate the similarity between the two vectors and obtain the similarity between the changed codes.

[0021] Furthermore, in the test case recommendation method, the step of obtaining all the changed codes of the software system to be tested includes:

[0022] Obtain the submitted code of each version of the software system to be tested recorded by the code version management tool corresponding to the software system to be tested;

[0023] Analyze all the changed codes between different versions of submitted codes.

[0024] On the other hand, the present invention also provides a test case recommendation device, comprising:

[0025] A first acquisition module is used to acquire all change codes of the software system to be tested, and acquire current position data corresponding to each change code;

[0026] A search module, used to search for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data;

[0027] A calculation module, used for calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values;

[0028] The recommendation module is used to recommend the found test cases to the user in sorted order.

[0029] Furthermore, the test case recommendation device further includes:

[0030] A second acquisition module is used to acquire the association relationship between the requirement ID and the test case, and to acquire the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID;

[0031] An analysis module, used to analyze the position data corresponding to the submitted code, wherein the position data includes the starting and ending positions of the submitted code and the starting and ending positions of the referenced code corresponding to the submitted code segment;

[0032] The relationship establishment module is used to establish the association relationship between the requirement ID, the test case and the location data.

[0033] Furthermore, in the above-mentioned test case recommendation device, the search module is specifically used for:

[0034] According to the association relationship between the location data and the demand ID, query the current demand ID corresponding to the current location data;

[0035] According to the association relationship between the requirement ID and the test case, query the test case corresponding to the current requirement ID.

[0036] On the other hand, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned test case recommendation methods when executing the computer program.

[0037] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned test case recommendation methods are implemented.

[0038] The present invention calls the association relationship between code segment location data and test cases and requirement IDs to efficiently and accurately provide recommendations for associated test cases for code changes, and sorts the recommended test cases by calculating code similarity, thereby providing guarantees for accurate recommendation and testing of use cases, providing an efficient means for complex software testing, and thus improving R&D efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0040] Figure 1 is a schematic diagram of an application environment of a test case recommendation method in an embodiment of the present invention;

[0041] Figure 2 is a flow chart of a test case recommendation method in the first embodiment of the present invention;

[0042] Figure 3 is a flow chart of a test case recommendation method in a second embodiment of the present invention;

[0043] Figure 4 is a structural schematic diagram of a test case recommendation device in one embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;

[0045] Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] The test case recommendation method provided by the embodiment of the present invention can be applied in Figure 1In an application environment, the client communicates with the server through a network. The server can obtain all the change codes of the software system to be tested through the client, and obtain the current location data corresponding to each of the change codes; then search for all the test cases corresponding to the current location data according to the predetermined association relationship information, and the association relationship information includes the association relationship between the test case and the location data; calculate the similarity between each of the change codes, and sort the queried test cases according to the calculated similarity value; recommend the found test cases to the user in the sorted order. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.

[0048] See also Figure 2 As shown, Figure 2 A schematic flow chart of a test case recommendation method provided in the first embodiment of the present invention includes steps S11 to S14.

[0049] Step S11, obtaining all the change codes of the software system to be tested, and obtaining the current position data corresponding to each of the change codes.

[0050] Specifically, after editing the code, the user can submit it through the code version management tool to obtain the changed code. Then obtain the current location data of the submitted changed code, which mainly includes the start and end lines of the code. It can be understood that in actual applications, the location data also includes the path of the code file relative to the project, the hash value of the valid content of the code segment, etc.

[0051] On the other hand, the change code can also be the difference code between different versions of the submitted code of the software system to be tested, that is, the difference between different versions of the submitted code of the software system to be tested is tested. In specific implementation, the submitted code of each version of the software system to be tested recorded by the code version management tool corresponding to the software system to be tested can be obtained and analyzed to obtain all the change codes between different versions of the submitted code.

[0052] Step S12, searching for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data.

[0053] It is understandable that the user can store the set test cases and the location data of the code in the database in advance to establish the association relationship between the test cases and the location data. In practical applications, the association relationship between the requirement ID and the test case can be established first, and then the association relationship between the requirement ID and the location data of the code can be established, thereby establishing the association relationship between the location data, the test case and the requirement ID.

[0054] The requirement ID is the identifier corresponding to the customer's functional requirement, such as registration, login, query, transaction, etc. In specific implementation, multiple functional requirements and corresponding requirement IDs can be constructed in the software system to be tested. Similarly, the requirement IDs of all functional requirements are synchronized in the code version management tool. Corresponding test cases are pre-set for each functional requirement. One or more test cases can be set for a functional requirement to test one or more aspects of the function.

[0055] From the predetermined association relationship information, all test cases corresponding to the current location data can be found.

[0056] Step S13, calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values.

[0057] Step S14: recommend the test cases to the user in sorted order.

[0058] Specifically, the step of calculating the similarity between the change codes includes:

[0059] Preprocessing the change code and standardizing the code format;

[0060] Extract valid features from the processed code, and convert the extracted valid features into numerical vectors;

[0061] The cosine similarity algorithm is used to calculate the similarity between the two vectors and obtain the similarity between the changed codes.

[0062] Preprocess the changed code to remove irrelevant information and standardize the code format. First, remove comments, which usually do not affect the function of the code and can be ignored; then format the code to ensure that the indentation, spacing and other formats of all code segments are consistent, and standardize identifiers, such as variable names, function names, etc., such as converting them all to lowercase. Finally, remove blank lines.

[0063] Extract useful features from the preprocessed change code. Common feature extraction methods include:

[0064] Lexical features: extract keywords, identifiers, constants, etc. from the code;

[0065] Syntax features: extract the abstract syntax tree (AST) of the code;

[0066] Control Flow Graph (CFG): Extract the control flow graph of the code.

[0067] Convert the extracted features into numerical vectors for mathematical operations. Common methods include:

[0068] Bag of Words: Convert words in the code into vectors;

[0069] TF-IDF: used for text features, reflecting the importance of words;

[0070] Word Embedding: Use pre-trained word embedding models (such as Word2Vec, GloVe) to convert vocabulary into vectors;

[0071] Code Embedding: Use embedding models specifically for code (such as CodeBERT, GraphCodeBERT).

[0072] Use cosine similarity to calculate the similarity of two vectors. If the cosine similarity is close to 1, it means that the two code segments are very similar; if it is close to 0, it means that the two code segments are very different.

[0073] The similarity between the changed codes is determined based on the similarity of the vectors, and then the queried test cases are sorted based on the similarity values. In specific implementation, the order can be from high to low. The test cases are recommended to the user in the sorted order.

[0074] This embodiment efficiently and accurately provides recommendations for associated test cases for code changes by calling the association relationship between code segment location data and test cases and requirement IDs, and sorts the recommended test cases by calculating code similarity, thereby providing guarantees for accurate recommendation and testing of use cases, providing an efficient means for complex software testing, and thus improving R&D efficiency.

[0075] Figure 3 A flowchart of a test case recommendation method provided for the second embodiment of the present invention includes steps S21 to S28.

[0076] Step S21, obtaining the association relationship between the requirement ID and the test case, and obtaining the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID.

[0077] Step S22, analyzing the position data corresponding to the submission code, wherein the position data includes the starting and ending positions of the submission code and the starting and ending positions of the reference code corresponding to the submission code segment.

[0078] Step S23: establishing an association relationship between the requirement ID, the test case and the location data.

[0079] During specific implementation, the requirement ID and test case are edited through the requirement management tool platform, and stored in the database accordingly. Then, the code is submitted through the code version management tool, and the requirement ID is marked when submitting. At this time, an association relationship is established between the submitted code, the requirement ID, and the test case, and the relationship is automatically stored in the database. When the submitted code is submitted to the code version management tool, the location of the submitted code is obtained through the code version management tool, and the location of the referenced code of the submitted code is found using the abstract tree related tools. Thus, the location data corresponding to the submitted code is obtained, and the location data includes: the start and end lines of the code segment, the path of the code file relative to the project, the hash value of the effective content of the code segment, etc. The location data corresponding to the submitted code is stored in correspondence with the test case and requirement ID, thereby establishing an association relationship between the three.

[0080] Step S24, obtaining all the change codes of the software system to be tested, and obtaining the current position data corresponding to each of the change codes.

[0081] In specific implementation, the submitted code of each version of the software system to be tested recorded by the code version management tool corresponding to the software system to be tested can be obtained and analyzed to obtain all the changed codes between different versions of the submitted codes and obtain the location data of each changed code.

[0082] Step S25: query the current demand ID corresponding to the current location data according to the association relationship between the location data and the demand ID.

[0083] Step S26: query the test case corresponding to the current requirement ID according to the association relationship between the requirement ID and the test case.

[0084] According to the association between the location data and the requirement ID, the current requirement ID corresponding to the current location data is queried. Then, according to the association between the requirement ID and the test case, the test case corresponding to the current requirement ID is queried. Thus, the test case corresponding to each change code is obtained.

[0085] Step S27, calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values.

[0086] Step S28: recommend the found test cases to the user in sorted order.

[0087] It can be understood that the similarity between each change code can be calculated by a cosine similarity algorithm.

[0088] The queried test cases are sorted according to the similarity values ​​of the change codes. Specifically, the corresponding test cases can be sorted in descending order according to the similarity values ​​of the change codes. The test cases are recommended to the user in the sorted order.

[0089] The method of this embodiment provides accurate test cases for code changes and provides an efficient solution for complex software testing.

[0090] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0091] In one embodiment, a test case recommendation device is provided, which corresponds one-to-one to the test case recommendation method in the above embodiment. Figure 4 As shown, the test case recommendation device includes a first acquisition module 101, a search module 102, a calculation module 103, and a recommendation module 104. The detailed description of each functional module is as follows:

[0092] The first acquisition module 101 is used to acquire all the change codes of the software system to be tested, and acquire the current position data corresponding to each of the change codes;

[0093] A search module 102, configured to search for all test cases corresponding to the current location data according to predetermined association information, wherein the association information includes an association relationship between the test case and the location data;

[0094] The calculation module 103 is used to calculate the similarity between each of the change codes, and sort the queried test cases according to the calculated similarity values;

[0095] The recommendation module 104 is used to recommend the found test cases to the user in sorted order.

[0096] In one embodiment, the test case recommendation device further includes:

[0097] A second acquisition module is used to acquire the association relationship between the requirement ID and the test case, and to acquire the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID;

[0098] An analysis module, used to analyze the position data corresponding to the submitted code, wherein the position data includes the starting and ending positions of the submitted code and the starting and ending positions of the referenced code corresponding to the submitted code segment;

[0099] The relationship establishment module is used to establish the association relationship between the requirement ID, the test case and the location data.

[0100] In one embodiment, the search module 102 of the test case recommendation device is specifically used to:

[0101] According to the association relationship between the location data and the demand ID, query the current demand ID corresponding to the current location data;

[0102] According to the association relationship between the requirement ID and the test case, query the test case corresponding to the current requirement ID.

[0103] In one embodiment, in the test case recommendation device, the calculation module 103 is specifically used for:

[0104] Preprocessing the change code and standardizing the code format;

[0105] Extract valid features from the processed code, and convert the extracted valid features into numerical vectors;

[0106] The cosine similarity algorithm is used to calculate the similarity between the two vectors and obtain the similarity between the changed codes.

[0107] In one embodiment, in the test case recommendation device, the first acquisition module 101 is specifically used for:

[0108] Obtain the submitted code of each version of the software system to be tested recorded by the code version management tool corresponding to the software system to be tested;

[0109] Analyze all the changed codes between different versions of submitted codes.

[0110] For the specific definition of the test case recommendation device, please refer to the definition of the test case recommendation method above, which will not be repeated here. Each module in the above-mentioned test case recommendation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0111] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or 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 network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of a test case recommendation method.

[0112] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a test case recommendation method

[0113] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0114] Obtain all change codes of the software system to be tested, and obtain current position data corresponding to each of the change codes;

[0115] Searching for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data;

[0116] Calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values;

[0117] The found test cases are recommended to the user in sorted order.

[0118] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0119] Obtain all change codes of the software system to be tested, and obtain current position data corresponding to each of the change codes;

[0120] Searching for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data;

[0121] Calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values;

[0122] The found test cases are recommended to the user in sorted order.

[0123] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed 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, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0125] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0126] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A test case recommendation method, characterized in that: include: Obtain all change codes of the software system to be tested, and obtain current position data corresponding to each of the change codes; Searching for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data; Calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values; The found test cases are recommended to the user in sorted order.

2. The test case recommendation method according to claim 1, characterized in that: The step of obtaining all the changed codes of the software system to be tested also includes: Obtaining the association relationship between the requirement ID and the test case, and obtaining the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID; Analyze the position data corresponding to the submitted code, the position data including the starting and ending positions of the submitted code and the starting and ending positions of the reference code corresponding to the submitted code segment; An association relationship is established between the requirement ID, the test case and the location data.

3. The test case recommendation method according to claim 2, characterized in that: The step of searching for all test cases corresponding to the current location data according to the predetermined association relationship information includes: According to the association relationship between the location data and the demand ID, query the current demand ID corresponding to the current location data; According to the association relationship between the requirement ID and the test case, query the test case corresponding to the current requirement ID.

4. The test case recommendation method according to claim 1, characterized in that: The step of calculating the similarity between each of the change codes comprises: Preprocessing the change code and standardizing the code format; Extract valid features from the processed code, and convert the extracted valid features into numerical vectors; The cosine similarity algorithm is used to calculate the similarity between the two vectors and obtain the similarity between the changed codes.

5. The test case recommendation method according to claim 1, characterized in that: The step of obtaining all the change codes of the software system to be tested includes: Obtain the submitted code of each version of the software system to be tested recorded by the code version management tool corresponding to the software system to be tested; Analyze all the changed codes between different versions of submitted codes.

6. A test case recommendation device, characterized in that: include: A first acquisition module is used to acquire all change codes of the software system to be tested, and acquire current position data corresponding to each change code; A search module, used to search for all test cases corresponding to the current location data according to predetermined association relationship information, wherein the association relationship information includes an association relationship between the test case and the location data; A calculation module, used for calculating the similarity between each of the change codes, and sorting the queried test cases according to the calculated similarity values; The recommendation module is used to recommend the found test cases to the user in sorted order.

7. The test case recommendation device according to claim 6, characterized in that: Also includes: A second acquisition module is used to acquire the association relationship between the requirement ID and the test case, and to acquire the submitted code and identification information of the submitted code recorded by the code version management tool, wherein the identification information includes the requirement ID; An analysis module, used to analyze the position data corresponding to the submitted code, wherein the position data includes the starting and ending positions of the submitted code and the starting and ending positions of the referenced code corresponding to the submitted code segment; The relationship establishment module is used to establish the association relationship between the requirement ID, the test case and the location data.

8. The test case recommendation device according to claim 7, characterized in that: The search module is specifically used for: According to the association relationship between the location data and the demand ID, query the current demand ID corresponding to the current location data; According to the association relationship between the requirement ID and the test case, query the test case corresponding to the current requirement ID.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the test case recommendation method according to any one of claims 1 to 5 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the test case recommendation method according to any one of claims 1 to 5 are implemented.