Test case recommendation method, device and electronic device

By automatically extracting and expanding keywords and generating test cases, it solves the problem of ambiguity and long time in requirement identification caused by manual analysis, improves the richness and coverage of test cases, and ensures software quality.

CN112416778BActive Publication Date: 2024-09-03BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011331448.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-24
Publication Date
2024-09-03
Estimated Expiration
2040-11-24

AI Technical Summary

Technical Problem

Existing software test case requirements analysis relies on manual participation, resulting in identification ambiguity, repetitive work and long time, and cannot guarantee that the test cases meet the requirements.

Method used

By obtaining the project documents of the target project, the initial keywords are automatically extracted and expanded into final keywords, and input into the pre-trained use case recommendation model to generate test cases, avoiding identification ambiguity of manual analysis and ensuring the richness and coverage of test cases.

Benefits of technology

It improves the accuracy of demand analysis, reduces the time and errors of manual participation, ensures that test cases can meet testing needs, and reduces risks and difficulty of software quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112416778B
    Figure CN112416778B
Patent Text Reader

Abstract

The present invention provides a test case recommendation method, device and electronic device, which first obtains a project document of a target project, then obtains an initial keyword from the project document, and determines a final keyword associated with the target project based on the initial keyword; finally, the final keyword is input into a pre-trained use case recommendation model to output a test case for the target project; this method can automatically obtain the initial keyword from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity in manual demand analysis, and this method also expands the initial keyword to obtain the final keyword, and the test case output based on the final keyword is richer, thereby ensuring that the designed test case meets the test requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a test case recommendation method, device and electronic equipment. Background Art

[0002] A test case is a description of a test task for a specific software product, usually including test input, execution conditions, and expected results. Test cases can be used to verify whether the software product meets specific software requirements. In existing software projects, when it is necessary to analyze the requirements for software test cases, it often requires the participation of experienced personnel who have participated in and designed multiple similar projects. This manual analysis of requirements places high demands on the participants, the work is repetitive and takes a long time, and there are identification ambiguities caused by factors such as language translation, cultural differences, and usage roles, which can easily lead to insufficient requirements analysis, making it impossible to ensure that the designed test cases meet the testing requirements. Summary of the invention

[0003] The purpose of the present invention is to provide a test case recommendation method, device and electronic device to improve the accuracy of demand analysis and ensure that the designed test cases meet the test requirements.

[0004] The present invention provides a test case recommendation method, which includes: obtaining a project document of a target project; obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords; and inputting the final keywords into a pre-trained use case recommendation model to output test cases for the target project.

[0005] Furthermore, the step of acquiring initial keywords from the project document includes: inputting the project document into a pre-trained vocabulary model, and outputting the initial keywords.

[0006] Furthermore, the vocabulary model is trained in the following manner: obtaining a first project document sample; wherein the first project document sample is marked with a keyword tag; inputting the first project document sample into an initial vocabulary model to extract keywords in the first project document sample through the initial vocabulary model to obtain an output result; determining a first loss value based on the keyword tag and the output result, and updating a weight parameter of the initial vocabulary model based on the first loss value; continuing to execute the step of obtaining the first project document sample until the initial vocabulary model converges to obtain the vocabulary model.

[0007] Furthermore, the preset vocabulary includes multiple keyword groups, each of which includes multiple keywords with preset associations; the step of determining the final keyword associated with the target item based on the initial keyword includes: searching for a target keyword group including at least a part of the initial keyword from the preset vocabulary; and determining multiple keywords in the target keyword group as the final keyword associated with the target item.

[0008] Furthermore, the method further includes: if the preset word library does not contain the initial keyword, updating the initial keyword into the preset word library.

[0009] Furthermore, the use case recommendation model is obtained in the following manner: obtaining a second project document sample; wherein the second project document sample carries a first reference test case corresponding to the second project document sample; inputting the second project document sample into the initial use case recommendation model to output a first test case through the initial use case recommendation model; determining a second loss value based on the first test case and the first reference test case, and updating a weight parameter of the initial use case recommendation model based on the second loss value; continuing to execute the step of obtaining the second project document sample until the initial use case recommendation model converges to obtain a trained first use case recommendation model; obtaining a project document verification sample, and determining the use case recommendation model based on the project document verification sample and the first use case recommendation model; wherein the project document verification sample carries a second reference test case corresponding to the project document verification sample.

[0010] Furthermore, the step of determining the use case recommendation model based on the project document verification sample and the first use case recommendation model includes: inputting the project document verification sample into the first use case recommendation model to output a verification test case through the first use case recommendation model; determining a third loss value based on the verification test case and the second reference test case, and updating the weight parameters of the first use case recommendation model based on the third loss value; and continuing to execute the step of obtaining the project document verification sample until the first use case recommendation model converges to obtain the use case recommendation model.

[0011] Furthermore, the step of inputting the final keyword into a pre-trained use case recommendation model and outputting the test case of the target project includes: inputting the final keyword into the pre-trained use case recommendation model and outputting an initial test case; responding to a user's selection instruction for the initial test case and determining the test case of the target project from the initial test case.

[0012] Furthermore, the preset standardized use case library includes multiple use case modules, each of which includes multiple test cases belonging to the corresponding attributes of the use case module; after the step of inputting the final keyword into the pre-trained use case recommendation model and outputting the test case of the target project, the method also includes: obtaining the use case module from the preset standardized use case library, wherein the use case module includes a login module, a membership module and a user module; comparing the test case of the target project with multiple test cases belonging to the same use case module in the standardized use case library to confirm the coverage of the test case of the target project.

[0013] Furthermore, each test case in the standardized test case library includes feature tags of preset multiple dimensions; wherein the feature tags include the name of the designated project to which the test case belongs, and the technical field to which the designated project belongs.

[0014] Furthermore, after the step of inputting the final keyword into a pre-trained use case recommendation model and outputting the test case of the target project, the method also includes: executing the test case of the target project; counting the execution results of the test case of the target project; wherein the execution results include: the test case of the target project is executed, or the test cases in the test case of the target project that are not successfully executed; if the execution results include the test cases that are not successfully executed, generating an alarm message; wherein the alarm message is used to indicate that at least a part of the test cases in the test case of the target project are not successfully executed.

[0015] The present invention provides a test case recommendation device, which includes: an acquisition module, used to acquire a project document of a target project; a determination module, used to acquire initial keywords from the project document, and determine final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords; and an output module, used to input the final keywords into a pre-trained use case recommendation model, and output the test cases of the target project.

[0016] An electronic device provided by the present invention includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement any of the test case recommendation methods described above.

[0017] The present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any of the test case recommendation methods described above.

[0018] The test case recommendation method, device and electronic device provided by the present invention first obtain the project document of the target project, then obtain the initial keyword from the project document, and determine the final keyword associated with the target project based on the initial keyword; finally, input the final keyword into a pre-trained use case recommendation model to output the test case of the target project; this method can automatically obtain the initial keyword from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity in manual analysis of requirements, and this method also expands the initial keyword to obtain the final keyword, and the test case output based on the final keyword is richer, thereby ensuring that the designed test case meets the test requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a test case recommendation method provided by an embodiment of the present invention;

[0021] Figure 2 A flowchart of another test case recommendation method provided by an embodiment of the present invention;

[0022] Figure 3 A flowchart of another test case recommendation method provided by an embodiment of the present invention;

[0023] Figure 4 A flowchart of another test case recommendation method provided by an embodiment of the present invention;

[0024] Figure 5 A flowchart of another test case recommendation method provided by an embodiment of the present invention;

[0025] Figure 6 A flowchart of another test case recommendation method provided by an embodiment of the present invention;

[0026] Figure 7 A schematic diagram of the deployment of a test case recommendation system provided by an embodiment of the present invention;

[0027] Figure 8 A schematic diagram of the structure of a test case recommendation device provided by an embodiment of the present invention;

[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than 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.

[0030] In existing software projects, when it is necessary to analyze the requirements of software test cases, experienced personnel who have participated in and designed multiple similar projects are needed to participate. The requirements for the participants are high, the work is repetitive and takes a long time. This process often requires multiple docking and review of requirements with customers, but serious risks such as ambiguity in requirement identification and omissions in requirement identification are still inevitable.

[0031] At present, most companies still widely adopt the method of manual analysis and decomposition of requirements. Among them, the requirements can be understood as the functions that the product needs to achieve. Testers need to write test cases to verify the functions to test whether the requirements can be achieved and whether there are bugs. The identified test case requirements are uniformly managed through the requirements management platform. This method of manual analysis of requirements has identification ambiguities due to factors such as language translation, cultural differences and user roles, and requires a large amount of manpower to be invested in the early stage to conduct multiple rounds of requirement scope confirmation, but it is still inevitable that the scope coverage does not meet the standards. Among them, the scope coverage can be understood as the scope of the test case requirements and the actual desired effect, as well as whether all the functional points to be tested have been covered. When there are deficiencies in the requirements analysis, it is impossible to guarantee that the test cases and extended cases designed for the current requirements meet the test requirements, resulting in the quality of the requirements analysis and the overall software quality being uncontrollable. In addition, although this method can satisfy the personnel involved in the project to understand the details of the requirements, it can only support the project progress and maintenance work. For testers, there is no risk of identifying abnormal functional points.

[0032] Based on this, the embodiment of the present invention provides a test case recommendation method, device and electronic device, and the technology can be applied to a device that can recommend test cases. To facilitate understanding of this embodiment, a test case recommendation method disclosed in the embodiment of the present invention is first described in detail; Figure 1 As shown, the method comprises the following steps:

[0033] Step S102: Acquire the project document of the target project.

[0034] The above-mentioned project documents can be understood as all the documents before entering the testing phase in the life cycle of the target project; the project documents may include contracts, project establishment documents, requirement analysis specifications, outline design specifications, detailed design specifications, deployment plans, resource allocation specifications, etc.; in actual implementation, when it is necessary to determine the test cases for the target project, it is usually necessary to first obtain the project documents of the target project.

[0035] Step S104, obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0036] The above-mentioned initial keywords can be understood as keywords extracted from the project document, such as the "login" keyword; the above-mentioned final keywords can be understood as a set of keywords obtained after expanding the initial keywords, including the initial keywords and other keywords related to the initial keywords; for example, the extracted initial keyword is "login", and the keywords related to the initial keyword include "account" and "password", and "login", "account" and "password" can be determined as the final keywords associated with the target project.

[0037] Step S106: input the final keywords into the pre-trained use case recommendation model, and output the test cases of the target project.

[0038] The above-mentioned use case recommendation model usually includes multiple convolutional layers, which may be interspersed with excitation layers, pooling layers, etc.; the above-mentioned test case can be understood as a description of a test task for a specific software product, usually including test input, execution conditions, and expected results, etc.; after determining the final keyword associated with the target project, the final keyword is input into the pre-trained use case recommendation model, and the test case of the target project can be output, through which it can be verified whether the software product of the target project meets the specific software requirements.

[0039] A test case recommendation method provided by an embodiment of the present invention first obtains a project document of a target project, then obtains an initial keyword from the project document, and determines a final keyword associated with the target project based on the initial keyword; finally, the final keyword is input into a pre-trained use case recommendation model to output a test case for the target project; this method can automatically obtain the initial keyword from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity in manual analysis of requirements, and this method also expands the initial keyword to obtain the final keyword, and the test case output based on the final keyword is richer, thereby ensuring that the designed test case meets the test requirements.

[0040] The embodiment of the present invention also provides another test case recommendation method, which is implemented on the basis of the above embodiment method; the method focuses on describing the specific process of obtaining initial keywords from project documents, such as Figure 2 As shown, the method comprises the following steps:

[0041] Step S202: Obtain the project document of the target project.

[0042] Step S204: input the project document into the pre-trained vocabulary model and output the initial keywords.

[0043] The above vocabulary model usually contains multiple convolutional layers, which may be interspersed with excitation layers, pooling layers, etc.; after obtaining the project document of the target project, the project document is input into the pre-trained vocabulary model, and the initial keywords corresponding to the project document can be output. In actual implementation, the above vocabulary model can be trained through the following steps 1 to 3:

[0044] Step 1: Obtain a first project document sample; wherein the first project document sample is marked with a keyword tag.

[0045] The first project document sample mentioned above can be an existing completed project document in the enterprise, which can include updated iterative versions and final versions of the project document, such as the first and second iterative versions of the detailed design specification, as well as the final version of the detailed design specification, etc.; based on these completed project documents, any stage of the company's products can be dealt with at any time, for example, from immature products to mature products, and then to the final entry into the market, etc.; in actual implementation, the existing completed project documents in these enterprises can be centrally managed through EleasticSearch to generate a retrieval library to facilitate the program's recommendation of content related to specific nouns; among them, Elasticsearch h can be understood as a distributed, highly scalable, and highly real-time search and data analysis engine, which can easily enable large amounts of data to be searched, analyzed, and explored. It is a non-relational database that can store these first project document samples according to project relationships; the above-mentioned keyword tags can be one or more keywords marked by the first project document sample, and the keyword tags can be manually marked tags, or they can be keywords contained in the first project document sample, such as "login", "exit", "version number", etc.; generally, in the initial stage of training the initial vocabulary model, in order to improve the efficiency of vocabulary model training, some tags can be manually marked in the first project document sample.

[0046] Step 2: Input the first project document sample into the initial vocabulary model to extract keywords in the first project document sample through the initial vocabulary model to obtain an output result.

[0047] The above-mentioned initial vocabulary model can be a network architecture of a deep model Net, etc.; after obtaining the first project document sample, the obtained first project document sample is input into the initial vocabulary model, and the keywords in the first project document sample are extracted through the initial vocabulary model to obtain the corresponding output result; wherein, the first project document sample can be a file of any format, and the number can be multiple, that is, multiple first project document samples can be centrally learned.

[0048] Step three, determine the first loss value based on the keyword label and the output result, and update the weight parameters of the initial vocabulary model based on the first loss value; continue to execute the step of obtaining the first project document sample until the initial vocabulary model converges to obtain the vocabulary model.

[0049] The first loss value can be understood as the difference between the output result and the keyword label marked in the first project document sample; the weight parameter can include all parameters in the initial vocabulary model, such as convolution kernel parameters, etc.; when training the initial vocabulary model, it is usually necessary to update all parameters in the initial vocabulary model based on the keyword label and the output result to train the initial vocabulary model. Then continue to execute the step of obtaining the first project document sample until the initial vocabulary model converges, or the first loss value converges, and finally obtain the trained vocabulary model.

[0050] Step S206, determining final keywords associated with the target item based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0051] Step S208: input the final keywords into the pre-trained use case recommendation model, and output the test cases of the target project.

[0052] A test case recommendation method provided by an embodiment of the present invention first obtains the project document of the target project, then inputs the project document into a pre-trained vocabulary model to output initial keywords; determines the final keywords associated with the target project based on the initial keywords; finally inputs the final keywords into the pre-trained use case recommendation model to output the test cases of the target project. This method can automatically obtain the initial keywords from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity when manually analyzing the requirements, and this method also expands the initial keywords to obtain the final keywords, and the test cases output based on the final keywords are richer, thereby ensuring that the designed test cases meet the test requirements.

[0053] The embodiment of the present invention also provides another test case recommendation method, which is implemented on the basis of the method of the above embodiment; the method focuses on describing the specific process of determining the final keyword associated with the target project based on the initial keyword. In the method, the preset word library includes multiple keyword groups, and each keyword group includes multiple keywords with preset association relationships; in actual implementation, the existing project documents of the enterprise can be input into the trained vocabulary model, and the keywords in the existing project documents can be extracted through the vocabulary model. The set of extracted keywords can constitute the above preset word library, and the preset word library can also be called the special vocabulary dictionary of the enterprise. The preset word library is more convenient for natural language word segmentation, reducing the differences in the use of nouns caused by different working environments, avoiding semantic ambiguity problems, and thus improving the accuracy of noun retrieval; multiple keyword groups can be determined based on the keywords in the preset word library, and each keyword group can include multiple keywords with association relationships; for example, taking the keyword "account" as an example, the keyword group where the keyword "account" is located can include multiple keywords with association relationships with "account", such as "login", "password", "exit", etc.; Figure 3 As shown, the method comprises the following steps:

[0054] Step S302: Obtain the project document of the target project.

[0055] Step S304, obtaining initial keywords from the project document.

[0056] Step S306: searching a preset word library for a target keyword group including at least a portion of the initial keywords.

[0057] In actual implementation, after obtaining the initial keywords from the project documents, a target keyword group including at least a part of the initial keywords can be searched from the preset vocabulary. For example, taking the initial keyword "account" as an example, the keyword group including the initial keyword "account" among multiple keyword groups in the preset vocabulary can be determined as the target keyword group, or the keyword group including at least a part of the initial keyword "account" can be determined as the target keyword group. For example, if a keyword group includes "account", the keyword group can be determined as the target keyword group.

[0058] Step S308: multiple keywords in the target keyword group are determined as final keywords associated with the target item; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0059] For the convenience of explanation, still taking the initial keyword "account" as an example, if a target keyword group containing the initial keyword "account" is found from the preset vocabulary, and the target keyword group includes not only the initial keyword "account" but also the three keywords "login", "password" and "exit" that are associated with "account", then the multiple keywords in the target keyword group are determined as the final keywords associated with the target project, that is, the final keywords include "account", "login", "password" and "exit". In addition, for multiple related projects in a project group, this method can also run through one project to another. For example, if a project has both an app end and a web end, this method can extract the functional point of the connection point between the project and other projects.

[0060] Step S310: if the preset word library does not contain the initial keyword, the initial keyword is updated to the preset word library.

[0061] In actual implementation, the keywords in the preset vocabulary can be continuously updated iteratively. Specifically, if the above-mentioned initial keyword is not found from the preset vocabulary, it can be understood that the preset vocabulary does not contain the initial keyword. At this time, the initial keyword can be updated to the preset vocabulary.

[0062] Step S312: input the final keywords into the pre-trained use case recommendation model, and output the test cases of the target project.

[0063] In actual implementation, before the final keyword is input into the use case recommendation model, a process of manually judging the accuracy of the final keyword can also be added. When the accuracy of the manual judgment reaches a preset standard, such as 80% or 90%, the final keyword is input into the use case recommendation model. Specifically, the use case recommendation model can be obtained through the following steps 4 to 7:

[0064] Step 4: Obtain a second project document sample; wherein the second project document sample carries a first reference test case corresponding to the second project document sample.

[0065] The above-mentioned second project document sample can be the final version of the existing project document in the enterprise, such as the final version of the detailed design specification, etc.; the final versions of these project documents can be sorted out, such as manually marking some keywords or tags, to generate a training database; the above-mentioned first reference test case can be understood as a standard test case that can be used as a reference and matches the second project document sample; in actual implementation, when the initial use case recommendation model needs to be trained, it is necessary to first obtain the second project document sample that can be used for training.

[0066] Step five: input the second project document sample into the initial use case recommendation model to output the first test case through the initial use case recommendation model.

[0067] The above-mentioned initial use case recommendation model can be a network architecture of Net, etc.; after obtaining the second project document sample, the obtained second project document sample is input into the initial use case recommendation model, and the output result is obtained through the initial use case recommendation model, and the output result obtained is the above-mentioned first test case.

[0068] Step six, determine the second loss value based on the first test case and the first reference test case, and update the weight parameters of the initial use case recommendation model based on the second loss value; continue to execute the step of obtaining the second project document sample until the initial use case recommendation model converges to obtain the trained first use case recommendation model.

[0069] The second loss value can be understood as the gap between the first test case and the first reference test case; the weight parameters can include all parameters in the initial use case recommendation model, such as convolution kernel parameters, etc.; when training the initial use case recommendation model, it is usually necessary to update all parameters in the initial use case recommendation model based on the first test case and the first reference test case to train the initial use case recommendation model. Then continue to execute the step of obtaining the second project document sample until the initial use case recommendation model converges, or the second loss value converges, and finally obtain the trained first use case recommendation model; it should be noted that the first use case recommendation model can be a recommendation model for test cases in multiple different dimensions such as requirement description and requirement analysis. For example, the first use case recommendation model can be a project-level test case corresponding model, a requirement-level test case corresponding model, a description of a function point test case corresponding model, or a function verification-level test case corresponding model.

[0070] Step seven, obtaining a project document verification sample, and determining a use case recommendation model based on the project document verification sample and the first use case recommendation model; wherein the project document verification sample carries a second reference test case corresponding to the project document verification sample.

[0071] The above-mentioned project document verification samples can be updated iterative versions of existing project documents in the enterprise, such as the first and second editions of the detailed design manual. The updated iterative versions of these project documents can be sorted out, such as manually marking some keywords or tags, to generate a verification database; the project document verification samples can be used to verify the above-mentioned trained first use case recommendation model to determine whether the training is overfitting; the above-mentioned second reference test case can be understood as a standard test case that can be used as a reference and matches the project document verification sample; in actual implementation, when it is necessary to verify the trained first use case recommendation model, it is necessary to first obtain a project document verification sample that can be used for verification.

[0072] Specifically, the process of determining the use case recommendation model based on the project document verification sample and the first use case recommendation model can be implemented by the following steps A and B:

[0073] Step A: inputting the project document verification sample into the first use case recommendation model to output the verification test case through the first use case recommendation model.

[0074] Step B, determine the third loss value based on the verification test case and the second reference test case, and update the weight parameters of the first use case recommendation model based on the third loss value; continue to execute the step of obtaining the project document verification sample until the first use case recommendation model converges to obtain the use case recommendation model.

[0075] The above-mentioned third loss value can be understood as the gap between the above-mentioned verification test case and the above-mentioned second reference test case; the above-mentioned weight parameters may include all parameters in the above-mentioned first use case recommendation model, such as convolution kernel parameters, etc.; after obtaining the above-mentioned trained first use case recommendation model, it is usually necessary to fine-tune the parameters in the first use case recommendation model based on the verification test case and the second reference test case, so that the recommended test cases obtained by the verified use case recommendation model are closer to the actual situation.

[0076] A test case recommendation method provided by an embodiment of the present invention first obtains a project document of a target project, obtains initial keywords from the project document; then searches for a target keyword group including at least a part of the initial keywords from a preset word library; determines multiple keywords in the target keyword group as final keywords associated with the target project; if the preset word library does not contain the initial keywords, updates the initial keywords to the preset word library; inputs the final keywords into a pre-trained use case recommendation model, and outputs test cases for the target project. This method can automatically obtain initial keywords from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity when manually analyzing requirements, and this method also expands the initial keywords to obtain final keywords, and the test cases output based on the final keywords are richer, thereby ensuring that the designed test cases meet the test requirements.

[0077] The embodiment of the present invention also provides another test case recommendation method, which is implemented on the basis of the method in the above embodiment; the method focuses on the specific process of inputting the final keyword into the pre-trained use case recommendation model and outputting the test case of the target project, such as Figure 4 As shown, the method comprises the following steps:

[0078] Step S402: Obtain the project document of the target project.

[0079] Step S404, obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0080] Step S406, input the final keywords into the pre-trained use case recommendation model, and output the initial test case.

[0081] In actual implementation, the above-mentioned final keywords can exist in the form of a keyword list. After the content of the project documents at each stage of the target project is segmented and semantically defined through the enterprise's unique preset vocabulary, a keyword list is output, which is the final keyword. The final keyword can be all the operation function points that need to be tested in the software test. For example, the login function point is to enter the account, enter the password, and click to log in; if the subsequent software function is changed, such as adding a verification code, the login function point will become to enter the account, enter the password, click to log in, enter the image verification code and click to log in, which includes the test, acceptance and operation cycle in the project cycle; the final keyword is input into the pre-trained use case recommendation model, which is usually a verified use case recommendation model. The final keyword is processed by the use case recommendation model to output a full amount of test cases, which is the above-mentioned initial test cases; it should be noted that since machine learning usually cannot guarantee that all the test cases output are valid, there will generally be a certain degree of overfitting, which makes the output initial test cases contain some content that is irrelevant to the target project.

[0082] In addition, when software testing is not urgent, for a functional point being tested, it is usually necessary to obtain all test cases associated with the functional point, such as all test cases associated with "account", "password", "login", etc.; but in the case of more urgent software testing, for example, if only the "login" functional point is changed and it has nothing to do with "account", "password", etc., you can directly input the single keyword "login" into the use case recommendation model, and only the test cases related to "login" can be output; if only the "account" is changed, directly input the single keyword "account" into the use case recommendation model, then the test cases related to "account" can be matched, so that only the test cases related to these accounts can be tested.

[0083] Step S408 , in response to the user's selection instruction for the initial test case, determining the test case of the target project from the initial test case.

[0084] The above selection instruction can be understood as an instruction issued by the user to select the required test cases from the above initial test cases; in actual implementation, since the above initial test cases usually contain some content that is not related to the target project, the user can select the required test cases related to the target project from the obtained initial test cases.

[0085] A test case recommendation method provided by an embodiment of the present invention first obtains a project document of a target project; then obtains initial keywords from the project document, and determines final keywords associated with the target project based on the initial keywords; finally, inputs the final keywords into a pre-trained use case recommendation model, outputs initial test cases; responds to a user's selection instruction for the initial test case, and determines the test case of the target project from the initial test case. This method can automatically obtain initial keywords from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by identification ambiguity when manually analyzing requirements, and this method also expands the initial keywords to obtain final keywords, and the test cases output based on the final keywords are richer, thereby ensuring that the designed test cases meet the test requirements.

[0086] In addition, this method ensures that the coverage of the test case design can reach 90% or more before the test is executed by generating a test case set that slightly exceeds the scope.

[0087] The embodiment of the present invention also provides another test case recommendation method, which is implemented on the basis of the above-mentioned embodiment method; in this method, a preset standardized case library includes multiple case modules, and each case module includes multiple test cases belonging to the corresponding attributes of the case module; for example, the case module may include a login module, a membership module, a user module, etc.; the corresponding attributes of the case module can be understood as the corresponding test function points of the case module, for example, the corresponding attribute of the login module is the login function point, the corresponding attribute of the membership module is the membership function point, etc.; each case module may include multiple test cases belonging to the corresponding test function points of the case module; each test case in the standardized case library includes a preset feature label of multiple dimensions; wherein the feature label includes the name of the specified project to which the test case belongs, and the technical field to which the specified project belongs; in actual implementation, the standardized case library usually includes all the test cases already in the enterprise, and these test cases usually include test cases related to the target project, and test cases related to other projects except the target project; these test cases can generate a standardized case library based on project relationships, wherein the project relationship may include the feature labels of the above multiple dimensions, and in addition to the project name of the specified project to which the test case belongs and the technical field involved, the feature label usually also includes the personnel involved in the test case and the technology involved. Figure 5 As shown, the method comprises the following steps:

[0088] Step S502: Obtain the project document of the target project.

[0089] Step S504, obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0090] Step S506: input the final keywords into the pre-trained use case recommendation model, and output the test cases of the target project.

[0091] Step S508, obtaining a use case module from a preset standardized use case library, wherein the use case module includes a login module, a membership module and a user module.

[0092] In actual implementation, in order to determine the coverage of the test cases of the output target project, or to determine whether the test cases of the output target project meet expectations, after the test cases of the target project are output through the use case recommendation model, the corresponding use case module can be obtained from the preset standardized use case library. For example, if the test case is related to the login function point, the login module in the use case module can be obtained; if the test case is related to the membership function point, the membership module in the use case module can be obtained; if the test case is related to the user function point, the use case module in the use case module can be obtained, etc.; it can also be understood that the standardized use case library includes multiple test sets, which can be called according to the test set when calling.

[0093] Step S510, comparing the test cases of the target project with a plurality of test cases belonging to the same use case module in the standardized use case library to confirm the coverage of the test cases of the target project.

[0094] After obtaining the use case module from the preset standardized use case library, the test cases of the target project can be compared with multiple test cases belonging to the same use case module. For example, if the test cases of the target project are related to the login function point, the test cases of the target project can be compared with the test cases in the login module to confirm whether there are any undesigned test cases and whether there are any missed tests. The coverage of the test cases of the target project can be confirmed through comparison.

[0095] A test case recommendation method provided by an embodiment of the present invention first obtains a project document of a target project, obtains initial keywords from the project document, and determines final keywords associated with the target project based on the initial keywords; then inputs the final keywords into a pre-trained use case recommendation model to output test cases for the target project; finally obtains a use case module from a preset standardized use case library, compares the test cases of the target project with multiple test cases belonging to the same use case module in the standardized use case library, and confirms the coverage of the test cases of the target project. This method can automatically obtain initial keywords from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by identification ambiguity when manually analyzing requirements, and this method also expands the initial keywords to obtain final keywords, and the test cases output based on the final keywords are richer, thereby ensuring that the designed test cases meet the test requirements.

[0096] The embodiment of the present invention also provides another test case recommendation method, which is implemented on the basis of the method in the above embodiment; Figure 6 As shown, the method comprises the following steps:

[0097] Step S602: Obtain the project document of the target project.

[0098] Step S604, obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords.

[0099] Step S606: input the final keywords into the pre-trained use case recommendation model, and output the test cases of the target project.

[0100] Step S608: execute the test cases of the target project.

[0101] Step S610, counting the execution results of the test cases of the target project; wherein the execution results include: the test cases of the target project are executed successfully, or the test cases in the test cases of the target project that are not executed successfully.

[0102] In this embodiment, any use case execution method can be used to execute the test cases of the target project. During the execution of the test cases, the execution status of the test cases is usually also counted. Specifically, during the execution of the test cases, the execution status of the test cases of the target project can be confirmed based on whether the user clicks on the test case to pass. For example, if all the test cases of the target project have been tested, the execution status can be that all the test cases have been executed; if some test cases have not been specifically executed, the execution status can be used to confirm these test cases that have not been successfully executed.

[0103] Step S612: if the execution result includes test cases that have not been successfully executed, an alarm message is generated; wherein the alarm message is used to indicate that at least a portion of the test cases in the target project have not been successfully executed.

[0104] In actual implementation, if the execution results include test cases that have not been executed successfully, corresponding notification prompt information will usually be generated, that is, the above-mentioned alarm message. The alarm message can prompt the user the number of test cases that have not been executed successfully, so as to remind the user that there are still some test cases that have not been executed successfully in the test cases of the target project, and the alarm message can also be sent to the user via email or other means.

[0105] A test case recommendation method provided by an embodiment of the present invention comprises the following steps: firstly obtaining a project document of a target project, obtaining initial keywords from the project document, and determining final keywords associated with the target project based on the initial keywords; then inputting the final keywords into a pre-trained use case recommendation model, and outputting test cases for the target project; finally executing the test cases for the target project, and counting the execution results; and generating an alarm message if the execution results include test cases that have not been successfully executed; this method can automatically obtain initial keywords from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity when manually analyzing the requirements, and this method also expands the initial keywords to obtain final keywords, and the test cases output based on the final keywords are richer, thereby ensuring that the designed test cases meet the test requirements.

[0106] To further understand the above embodiments, the following is provided: Figure 7A deployment diagram of a test case recommendation system is shown, which includes a retrieval database cluster unit, a machine learning unit, a test case number list generation unit and a test machine cluster unit; wherein the retrieval database cluster unit includes multiple EleasticSearch unit blocks such as EleasticSearch part1 and EleasticSearch part2, and also includes EleasticSearch disaster recovery, through which EleasticSearch is used to centrally manage the existing project documents in the enterprise to generate the retrieval database cluster; these already formed project documents are input into the machine learning unit, which includes a source data processing module, and a project name-description relationship training module, a description-test case relationship training module, a description-function point relationship training module and a function point-test case relationship training module respectively connected to the source data processing module, and the four training modules respectively connected to the source data processing module and the source data processing module can output the keyword list (corresponding to the above-mentioned final keyword) corresponding to the output of each training module; the output keyword list is respectively input into the project-level test case corresponding model (corresponding to the above-mentioned pre-trained use case recommendation model), the requirement-level use case corresponding model in the test case number list generation unit. In the corresponding model (corresponding to the above-mentioned pre-trained use case recommendation model), the corresponding model describing the test cases involving function points (corresponding to the above-mentioned pre-trained use case recommendation model) and the corresponding model for function verification level use cases (corresponding to the above-mentioned pre-trained use case recommendation model), each model outputs the corresponding test case, and the test cases output by these four corresponding models are combined to generate a test case set, which is the current project process document, wherein the granularity of the test case set can be flexibly controlled. Since the test case set is associated by keywords, the granularity of the test case set can be adjusted by changing the number of keywords; it should be noted that each corresponding model can usually only be designed for a single architecture, and different architectural parameters are usually different. The corresponding model can be defined in a specific scenario. For different projects, it usually only involves parameter adjustment, and does not involve model changes; the relevant test cases generated by the current project process document output are input into the test machine cluster to execute the test cases manually or by other means.

[0107] The above test machine cluster can implement different test tasks according to different test requirements, and usually adopts local code deployment, test results, and process log transmission. It should be noted that the system can be fault-tolerant by continuously running test cases. If an error occurs indicating that the input keyword is incorrect, the keyword can be deleted, which can be deleted manually.

[0108] The above-mentioned test case recommendation system can be applied to an application of test cases to the system being tested, for example, two testers cross-test, that is, the two testers test each other's test software function points. If one tester does not understand the product that the other tester wants to test, for example, for the login part of the product, tester A only knows to enter the account and password and click to log in, but in fact the product also includes many login-related modules, such as checking whether you are a member after logging in, whether the membership has expired, whether the current login cookie information is erased after logging out, etc. These login-related parts, because tester A does not understand, usually cannot identify and verify these function points; the above-mentioned Cookies are sometimes also used in their plural form Cookies, the type is "small text file", which is data stored on the user's local terminal by some websites in order to identify the user's identity and conduct Session tracking. The data is usually encrypted data, information temporarily or permanently stored by the user's local terminal.

[0109] The test case recommendation system can effectively recommend these login-related test cases to avoid software testers from under-testing or missing tests, and thus being unable to grasp the test quality. The system can fully recommend all related test cases and recommend accurate test cases to R&D personnel.

[0110] The above test case recommendation system can effectively avoid semantic ambiguity problems through semantic keywords, and other dimensional parameters of the project can further avoid other potential problems; it can also reduce the problem of repeated test cases caused by unclear test requirements, and at the same time can support testers to participate in the quality control process of the project as early as possible to reduce the risk rate.

[0111] The embodiment of the present invention also provides a test case recommendation device, such as Figure 8 As shown, the device includes: an acquisition module 80, used to acquire the project document of the target project; a determination module 81, used to acquire initial keywords from the project document, and determine the final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords, and keywords related to the initial keywords; an output module 82, used to input the final keywords into a pre-trained use case recommendation model, and output the test cases of the target project.

[0112] A test case recommendation device provided by an embodiment of the present invention first obtains a project document of a target project, then obtains an initial keyword from the project document, and determines a final keyword associated with the target project based on the initial keyword; finally, the final keyword is input into a pre-trained use case recommendation model to output a test case for the target project; the device can automatically obtain the initial keyword from the project document of the target project, thereby avoiding the problem of insufficient demand analysis caused by recognition ambiguity in manual demand analysis, and the device also expands the initial keyword to obtain the final keyword, and the test case output based on the final keyword is richer, thereby ensuring that the designed test case meets the test requirements.

[0113] Furthermore, the determination module 81 is also used to: input the project document into a pre-trained vocabulary model and output initial keywords.

[0114] Furthermore, the device also includes a vocabulary model training module, which is used to: obtain a first project document sample; wherein the first project document sample is marked with a keyword label; input the first project document sample into an initial vocabulary model to extract keywords in the first project document sample through the initial vocabulary model to obtain an output result; determine a first loss value based on the keyword label and the output result, and update the weight parameters of the initial vocabulary model based on the first loss value; continue to execute the step of obtaining the first project document sample until the initial vocabulary model converges to obtain a vocabulary model.

[0115] Furthermore, the preset word library includes multiple keyword groups, each keyword group includes multiple keywords with preset associations; the determination module 81 is also used to: search for a target keyword group including at least a part of the initial keywords from the preset word library; and determine the multiple keywords in the target keyword group as final keywords associated with the target project.

[0116] Furthermore, the device is also used for: if the preset word library does not contain the initial keyword, updating the initial keyword into the preset word library.

[0117] Furthermore, the device also includes a use case recommendation model determination module, which is used to: obtain a second project document sample; wherein the second project document sample carries a first reference test case corresponding to the second project document sample; input the second project document sample into the initial use case recommendation model to output a first test case through the initial use case recommendation model; determine a second loss value based on the first test case and the first reference test case, and update the weight parameter of the initial use case recommendation model based on the second loss value; continue to execute the step of obtaining the second project document sample until the initial use case recommendation model converges to obtain the trained first use case recommendation model; obtain a project document verification sample, and determine the use case recommendation model based on the project document verification sample and the first use case recommendation model; wherein the project document verification sample carries a second reference test case corresponding to the project document verification sample.

[0118] Furthermore, the use case recommendation model determination module is also used to: input the project document verification sample into the first use case recommendation model to output the verification test case through the first use case recommendation model; determine the third loss value based on the verification test case and the second reference test case, and update the weight parameter of the first use case recommendation model based on the third loss value; continue to execute the step of obtaining the project document verification sample until the first use case recommendation model converges to obtain the use case recommendation model.

[0119] Furthermore, the output module 82 is also used to: input the final keywords into the pre-trained use case recommendation model to output the initial test case; respond to the user's selection instruction for the initial test case, and determine the test case of the target project from the initial test case.

[0120] Furthermore, the preset standardized use case library includes multiple use case modules, each use case module includes multiple test cases belonging to the corresponding attributes of the use case module; the device is also used to: obtain the use case module from the preset standardized use case library, wherein the use case module includes a login module, a membership module and a user module; compare the test cases of the target project with the multiple test cases belonging to the same use case module in the standardized use case library to confirm the coverage of the test cases of the target project.

[0121] Furthermore, each test case in the standardized test case library includes preset feature tags of multiple dimensions; wherein the feature tags include the name of the specified project to which the test case belongs, and the technical field to which the specified project belongs.

[0122] Furthermore, the device is also used to: execute the test cases of the target project; count the execution results of the test cases of the target project; wherein the execution results include: the test cases of the target project are executed, or the test cases in the test cases of the target project that are not successfully executed; if the execution results include the test cases that are not successfully executed, generate an alarm message; wherein the alarm message is used to indicate that at least a part of the test cases in the test cases of the target project are not successfully executed.

[0123] The test case recommendation device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned test case recommendation method embodiment. For the sake of brief description, for matters not mentioned in the test case recommendation device embodiment, reference may be made to the corresponding contents in the aforementioned test case recommendation method embodiment.

[0124] The embodiment of the present invention further provides an electronic device, see Fig. 9 As shown, the electronic device includes a processor 130 and a memory 131 , wherein the memory 131 stores machine executable instructions that can be executed by the processor 130 , and the processor 130 executes the machine executable instructions to implement the above-mentioned test case recommendation method.

[0125] Further, Fig. 9 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0126] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0127] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the above embodiment in combination with its hardware.

[0128] An embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned test case recommendation method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0129] The computer program product of the test case recommendation method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0130] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A test case recommendation method, It is characterized in that The method comprises: Get the project documentation of the target project; Acquire initial keywords from the project document, and determine final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords; Input the final keyword into a pre-trained use case recommendation model, and output the test case of the target project; The preset word library includes a plurality of keyword groups, each of which includes a plurality of preset keywords having a correlation relationship; The step of determining the final keyword associated with the target item based on the initial keyword comprises: Searching for a target keyword group including at least a portion of the initial keywords from the preset word library; determining a plurality of keywords in the target keyword group as the final keywords associated with the target item; The use case recommendation model is obtained in the following way: Acquire a second project document sample; wherein the second project document sample carries a first reference test case corresponding to the second project document sample; Inputting the second project document sample into an initial use case recommendation model to output a first test case through the initial use case recommendation model; Determine a second loss value based on the first test case and the first reference test case, and update a weight parameter of the initial use case recommendation model based on the second loss value; continue to perform the step of obtaining a second project document sample until the initial use case recommendation model converges to obtain a trained first use case recommendation model; Obtaining a project document verification sample, and determining the use case recommendation model based on the project document verification sample and the first use case recommendation model; wherein the project document verification sample carries a second reference test case corresponding to the project document verification sample; The step of determining the use case recommendation model based on the project document verification sample and the first use case recommendation model comprises: Inputting the project document verification sample into the first use case recommendation model to output a verification test case through the first use case recommendation model; Determine a third loss value based on the verification test case and the second reference test case, and update the weight parameters of the first use case recommendation model based on the third loss value; continue to execute the step of obtaining project document verification samples until the first use case recommendation model converges to obtain the use case recommendation model.

2. The method according to claim 1, It is characterized in that The step of obtaining initial keywords from the project document comprises: The project document is input into a pre-trained vocabulary model, and the initial keywords are output.

3. The method according to claim 2, It is characterized in that The vocabulary model is trained in the following way: Obtain a first project document sample; wherein the first project document sample is marked with a keyword tag; Inputting the first project document sample into an initial vocabulary model to extract keywords in the first project document sample through the initial vocabulary model to obtain an output result; Determine a first loss value based on the keyword tag and the output result, and update the weight parameter of the initial vocabulary model based on the first loss value; continue to execute the step of obtaining a first project document sample until the initial vocabulary model converges to obtain the vocabulary model.

4. The method according to claim 1, It is characterized in that The method further comprises: If the preset word library does not contain the initial keyword, the initial keyword is updated to the preset word library.

5. The method according to claim 1, It is characterized in that The step of inputting the final keyword into a pre-trained use case recommendation model to output the test case of the target project includes: Inputting the final keyword into the pre-trained use case recommendation model, and outputting an initial test case; In response to a user's selection instruction for the initial test case, a test case for the target project is determined from the initial test case.

6. The method according to claim 1, It is characterized in that The preset standardized use case library includes a plurality of use case modules, each of which includes a plurality of test cases belonging to corresponding attributes of the use case module; After the step of inputting the final keyword into the pre-trained use case recommendation model and outputting the test case of the target project, the method further includes: Acquire the use case module from the preset standardized use case library, wherein the use case module includes a login module, a membership module and a user module; The test cases of the target project are compared with a plurality of test cases belonging to the same use case module in the standardized use case library to confirm the coverage of the test cases of the target project.

7. The method according to claim 6, It is characterized in that Each test case in the standardized test case library includes preset feature tags of multiple dimensions; wherein the feature tags include the name of the designated project to which the test case belongs, and the technical field to which the designated project belongs.

8. The method according to claim 1, It is characterized in that After the step of inputting the final keyword into the pre-trained use case recommendation model and outputting the test case of the target project, the method further includes: Execute the test cases of the target project; Counting the execution results of the test cases of the target project; wherein the execution results include: the test cases of the target project have been executed, or the test cases of the target project that have not been successfully executed; If the execution result includes the test case that was not successfully executed, an alarm message is generated; wherein the alarm message is used to indicate that at least a part of the test cases in the target project were not successfully executed.

9. A test case recommendation device, It is characterized in that The device comprises: The acquisition module is used to obtain the project documents of the target project; A determination module, configured to obtain initial keywords from the project document, and determine final keywords associated with the target project based on the initial keywords; wherein the final keywords include the initial keywords and keywords related to the initial keywords; An output module, used to input the final keywords into a pre-trained use case recommendation model, and output the test cases of the target project; The preset word library includes a plurality of keyword groups, each of which includes a plurality of preset keywords having a correlation relationship; The determining module is also used for: Searching for a target keyword group including at least a portion of the initial keywords from the preset word library; determining a plurality of keywords in the target keyword group as the final keywords associated with the target item; The device further includes a use case recommendation model determination module, wherein the use case recommendation model determination module is configured to: Acquire a second project document sample; wherein the second project document sample carries a first reference test case corresponding to the second project document sample; Inputting the second project document sample into an initial use case recommendation model to output a first test case through the initial use case recommendation model; Determine a second loss value based on the first test case and the first reference test case, and update a weight parameter of the initial use case recommendation model based on the second loss value; continue to perform the step of obtaining a second project document sample until the initial use case recommendation model converges to obtain a trained first use case recommendation model; Obtaining a project document verification sample, and determining the use case recommendation model based on the project document verification sample and the first use case recommendation model; wherein the project document verification sample carries a second reference test case corresponding to the project document verification sample; The use case recommendation model determination module is also used for: Inputting the project document verification sample into the first use case recommendation model to output a verification test case through the first use case recommendation model; Determine a third loss value based on the verification test case and the second reference test case, and update the weight parameters of the first use case recommendation model based on the third loss value; continue to execute the step of obtaining project document verification samples until the first use case recommendation model converges to obtain the use case recommendation model.

10. An electronic device, It is characterized in that It includes a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the test case recommendation method according to any one of claims 1 to 8.

11. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the test case recommendation method described in any one of claims 1-8.