Test case supplement method, computer equipment, storage medium and program product

By obtaining historical problem information and user feedback information to generate test description text and automatically generate test cases, the problem of low efficiency in the generation of test cases in the prior art is solved, and the quality and coverage of test cases are improved.

CN119862126APending Publication Date: 2025-04-22GUANGZHOU KUGOU COMP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411940230.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the prior art, the review and supplementation of test cases takes a long time, and it is easy to cause the supplementary test cases to be unable to cover product requirements, resulting in low efficiency in generating test cases.

Method used

By obtaining historical problem information and user feedback information corresponding to the test case task, a test description text is generated, and the test case is automatically generated based on the text.

Benefits of technology

Improve the efficiency of test cases generation, ensuring that the generated test cases can cover product requirements while avoiding known risks and avoiding duplicate errors, and improve the quality of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862126A_ABST
    Figure CN119862126A_ABST
Patent Text Reader

Abstract

The invention relates to a test case generation method, computer equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence. The method comprises the steps of obtaining historical problem information and user feedback information corresponding to a test case task; the historical problem information is description information of problems generated by function points corresponding to the test case tasks in a historical test process and a historical online operation process; the user feedback information is evaluation information of the user on a function point corresponding to the test case task; generating a test description text based on the historical problem information and the user feedback information; the test description text is used for describing a test mode of a function point corresponding to the test case task; and generating at least one test case corresponding to the test case task based on the test description text. According to the scheme, the generation efficiency of the test case can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of AI (Artificial Intelligence) technology, and in particular to a test case generation method, computer equipment, storage medium, and program product. Background Art

[0002] With the rapid development of Internet technology, various software have emerged. Software testing can test the software before it goes online to ensure the quality of the software. In the field of software testing, test cases are used to verify whether the software works as expected. The review of test cases is particularly important.

[0003] In the related technology, testers can review the existing test cases corresponding to the test case tasks based on the changes in the product code, test requirements and historical problems of the product. When the existing test cases cannot meet the test requirements of the product, testers can supplement the missing test cases based on the product code to meet the test requirements of the product.

[0004] However, in the solution shown in the above-mentioned related technology, since the test cases need to be manually reviewed and supplemented by testers, the review and supplement of the test cases takes a long time, and it is easy to cause the supplemented test cases to fail to cover product requirements, resulting in low test case generation efficiency. Summary of the invention

[0005] The embodiment of the present application provides a test case generation method, a computer device, a storage medium, and a program product, which can improve the generation efficiency of test cases. The technical solution is as follows:

[0006] In one aspect, a test case generation method is provided, the method comprising:

[0007] Obtaining historical problem information and user feedback information corresponding to the test case task; the historical problem information is description information of problems generated by the function point corresponding to the test case task during the historical testing process and the historical online operation process; the user feedback information is the user's evaluation information on the function point corresponding to the test case task;

[0008] Generate a test description text based on the historical problem information and the user feedback information; the test description text is a text used to describe the test method for the functional point corresponding to the test case task;

[0009] At least one test case corresponding to the test case task is generated based on the test description text.

[0010] On the other hand, a test case generation device is provided, the device comprising:

[0011] An information acquisition module is used to acquire historical problem information and user feedback information corresponding to the test case task; the historical problem information is the description information of the problems generated by the function point corresponding to the test case task during the historical testing process and the historical online operation process; the user feedback information is the user's evaluation information on the function point corresponding to the test case task;

[0012] A test description text acquisition module, used to generate a test description text based on the historical problem information and the user feedback information; the test description text is a text used to describe the test method for the function point corresponding to the test case task;

[0013] A test case generation module is used to generate at least one test case corresponding to the test case task based on the test description text.

[0014] In some embodiments, a test description text acquisition module is used to generate a prompt statement based on the historical problem information, the user feedback information and a prompt statement template; input the prompt statement into a generative language model to obtain the test description text output by the generative language model.

[0015] In some embodiments, the test description text acquisition module is used to generate a first prompt statement based on a first prompt statement template by combining the historical problem information and the user feedback information; the first prompt statement is used to instruct the generation of a test description text that matches the historical problem information and the user feedback information.

[0016] In some embodiments, the test description text acquisition module is used to generate a second prompt statement based on a second prompt statement template by combining the requirement information of the test case task, the historical problem information and the user feedback information; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the second prompt statement is used to indicate the generation of a test description text that matches the requirement document information, the historical problem information and the user feedback information.

[0017] In some embodiments, the information acquisition module is used to obtain requirement information and project information of the test case task; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the project information includes the project name and project version branch information corresponding to the test case task; based on the requirement information and the project information, code change information and function point information are obtained; the code change information is used to indicate the changed content in the code corresponding to the test case task; the function point information is used to indicate the function corresponding to the test case task; based on the code change information and the function point information, the historical problem information and user feedback information are obtained.

[0018] In some embodiments, the information acquisition module is used to acquire a demand identifier of the demand information and a project identifier of the project information;

[0019] The code library is queried for the code change information and the function point information that match the requirement identifier and the project identifier; the code library is a database for storing and managing source code and change code of the application development project corresponding to the test case task.

[0020] In some embodiments, the information acquisition module is used to acquire historical problem information and user feedback information corresponding to the code change information and the function point information from a knowledge base through a similarity algorithm; the knowledge base is used to store historical problem information and user feedback information corresponding to at least one code change information and at least one function point information.

[0021] In some embodiments, the test case generation module is used to convert the format of the test description text into a format corresponding to the test case to obtain at least one candidate test case; and obtain the test case corresponding to the test case task from the at least one candidate test case.

[0022] In some embodiments, the test case generation module is used to match the at least one candidate test case with the existing test cases of the test case task respectively; and add the candidate test cases among the at least one candidate test case that do not match the existing test cases as test cases corresponding to the test case task.

[0023] In some embodiments, the test case generation module is used to display the at least one candidate test case; upon receiving a selection operation on a target candidate test case, the target candidate test case is acquired as a test case corresponding to the test case task.

[0024] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the test case generation method as described above.

[0025] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the test case generation method as described above.

[0026] In another aspect, a computer program product is provided, the computer program product comprising a computer program, the computer program being stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the test case generation method provided in the above-mentioned various optional implementations.

[0027] The technical solution provided by this application may have the following beneficial effects:

[0028] The historical problem information corresponding to the test case task can indicate the failure points that have occurred in past tests or online operations, and the user feedback information corresponding to the test case task can indicate the real feedback on the functional points of the user product. The test description text generated based on the above two types of information can enable the test description text to indicate the generated test case, while avoiding known risks and repeated errors, it can also avoid problems that may affect user experience, effectively improving the quality of the generated test cases. At least one test case corresponding to the test case task is automatically generated based on the test description text, which can improve the efficiency of test case generation while ensuring quality.

[0029] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0031] Figure 1 is a system configuration diagram of a test case generation method involved in one embodiment of the present application;

[0032] Figure 2 is a flow chart of a test case generation method provided by an embodiment of the present application;

[0033] Figure 3 is a flow chart of a test case generation method provided by an embodiment of the present application;

[0034] Figure 4 It is a schematic diagram of a test case adding process provided by an embodiment of the present application;

[0035] Figure 5 is a schematic diagram showing a candidate test case provided by an embodiment of the present application;

[0036] Figure 6 is a flow chart of a test case generation method provided by an embodiment of the present application;

[0037] Figure 7 This is a method architecture diagram for automatic review and supplementation of test cases provided by an embodiment of the present application;

[0038] Figure 8 is a block diagram of a test case generating device provided by an exemplary embodiment of the present application;

[0039] Fig. 9 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0040] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0041] Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.

[0042] The present application proposes a test case generation scheme, which can effectively combine the historical problem information and user feedback information corresponding to the test case task, so that the generated test cases can satisfy the user experience and improve the efficiency of test case generation on the basis of avoiding known problems. For ease of understanding, some concepts involved in the present application are explained below.

[0043] 1) Test Case: A test case is a set of input data, execution steps, expected results and other related information designed during the software testing process to verify whether the software system meets its functional requirements, performance requirements and other specifications. Each test case corresponds to an independent test purpose, which aims to ensure that a specific function or feature of the software can run correctly as expected.

[0044] 2) Generative Language Model: A generative language model is a machine learning model that learns the statistical laws and structural features of a language by analyzing large amounts of text data, and can generate new, coherent, and semantically reasonable text content based on a given context or prompt.

[0045] 3) LLM (Large Language Model): A large language model is a machine learning model that is trained with massive amounts of text data and can understand and generate complex natural language text. Large language models have the ability to handle a variety of language tasks, such as text generation, machine translation, and question-answering systems.

[0046] 4) API (Application Programming Interface): An application programming interface is a set of rules and protocols that allow different software applications to communicate and exchange data.

[0047] 5) BUG: A BUG is an error or defect in the software or system that causes it to behave differently than expected. It may cause functional failure, data loss or security risks, and needs to be resolved by debugging and correcting the code to ensure the normal operation and stability of the system.

[0048] Figure 1 1 is a system configuration diagram of a test case generation method according to an embodiment of the present application. Figure 1 As shown, the system includes a requesting device 120 and a serving device 130 for test case generation.

[0049] The requester device 120 may be a personal computer device such as a desktop computer, a laptop computer, a personal workstation, or the like.

[0050] The service device 130 may be a server, or a plurality of servers, or a virtualization platform, or a cloud computing service center.

[0051] The requesting device 120 and the serving device 130 may be connected via a communication network. Optionally, the communication network is a wired network or a wireless network.

[0052] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of local area network (LAN), metropolitan area network (MAN), wide area network (WAN), mobile, wired or wireless network, private network or virtual private network. In some embodiments, the data exchanged through the network is represented by technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.

[0053] In a possible implementation, the service side device 130 can obtain the description information (i.e., historical problem information) of the problems generated by the function points corresponding to the test case task during the historical testing process and the historical online operation process, as well as the user's evaluation information (i.e., user feedback information) on the function points corresponding to the test case task; based on the historical problem information and the user feedback information, generate a test description text for describing the test method for the function points corresponding to the test case task; based on the test description text, generate at least one test case corresponding to the test case task. After the service side device 130 generates at least one test case, it can send the generated at least one test case to the requesting side device 120, and display it in the requesting side device 120, and the user chooses whether to add the generated test case as a supplementary test case corresponding to the test case task. Among them, the above-mentioned user can be a test case reviewer, or a software testing engineer, and this application does not limit it.

[0054] In another possible implementation, the steps performed by the service-side device 130 may also be performed by the requesting-side device 120. For example, the requesting-side device 120 obtains from the service-side device 130 the description information of the problems generated by the function points corresponding to the test case tasks during the historical testing process and the historical online operation process, as well as the user's evaluation information on the function points corresponding to the test case tasks; then, based on the historical problem information of the requesting-side device 120 and the user feedback information, a test description text is generated for describing the test method for the function points corresponding to the test case tasks, and based on the test description text, at least one test case corresponding to the test case tasks is generated.

[0055] It should be noted that, in the embodiments of the present application, the above solution is implemented by a single-sided device as an example. Optionally, the above solution can also be implemented by the interaction of two-sided devices.

[0056] Figure 2 1 is a flow chart of a test case generation method provided by an embodiment of the present application. The test case generation method can be executed by a computer device, for example, the computer device can be the above-mentioned Figure 1 The service device 130 or the requester device 120 shown, or the computer device may also be other computer devices, such as a server, or a personal computer, etc. The test case generation method may include the following steps 210 , 220 , and 230 .

[0057] Step 210: Obtain historical problem information and user feedback information corresponding to the test case task; the historical problem information is the description information of the problems generated by the functional point corresponding to the test case task during the historical testing process and the historical online operation process; the user feedback information is the user's evaluation information on the functional point corresponding to the test case task.

[0058] Among them, the above test case tasks are functional testing activities performed on application development projects to verify whether the software functions of the application software can work as expected.

[0059] Among them, the above-mentioned historical problem information may include problem description (used to describe the specific manifestations of problems generated by functional points in the historical testing process and the historical online operation process, such as function failure, data anomaly, interface display error), cause analysis (used to describe the root cause of the problem, such as code logic error, improper database configuration) and solution measures (specific operations taken to solve the problem, such as code modification, configuration adjustment, patch installation).

[0060] Among them, the above-mentioned user feedback information may include satisfaction scores (i.e., the user's satisfaction with the functional points corresponding to the test case tasks, for example, through numerical scoring, the higher the score, the higher the satisfaction; conversely, the lower the score, the lower the satisfaction), and improvement suggestions (i.e., the functions that the user hopes to add to the functional points corresponding to the test case tasks, such as new functions).

[0061] In some embodiments, when a computer device performs a test operation or runs online on a function point corresponding to a test case task, it automatically generates description information based on the generated problem as problem information, and saves the problem information and the function name of the function point corresponding to the test case task in a test information database in the form of a text pair. The computer device can query the test information database according to the function name of the function point corresponding to the test case task to obtain historical problem information corresponding to the function point.

[0062] In some embodiments, when the function point corresponding to the test case task is running online in a computer device, a user can evaluate the function point. After receiving the user's evaluation information, the computer device automatically generates evaluation information based on problems generated during the online operation as user feedback information, and saves the user feedback information and the function name of the function point corresponding to the test case task in the form of a text pair in a software operation information database. The computer device can query the software operation information database according to the function name of the function point corresponding to the test case task to obtain the user feedback information corresponding to the function point.

[0063] Step 220: Generate a test description text based on the historical problem information and user feedback information; the test description text is a text used to describe the test method for the functional point corresponding to the test case task.

[0064] In some embodiments, the computer device generates a test description text based on historical question information and user feedback information through natural language processing technology.

[0065] Optionally, the computer device extracts key information related to the functional points corresponding to the test case task from historical problem information and user feedback information through natural language processing technology, fills the extracted key information into a specified text template, and obtains the filled text as the test description text; wherein the text template is a text template used to describe the test method for the functional points corresponding to the test case task.

[0066] Optionally, the computer device extracts key information related to functional points corresponding to the test case tasks from historical problem information and user feedback information through natural language processing technology, inputs the extracted key information into a machine learning model, and obtains the output of the machine learning model as a test description text, wherein the machine learning model is a machine learning model that has the ability to generate test description text corresponding to the key information based on the key information.

[0067] In other embodiments, a computer device inputs historical problem information and user feedback information into a test description text generation model, and obtains the output of the test description text generation model as test description text, wherein the test description text generation model is a machine learning model that has the ability to generate test description text based on historical problem information and user feedback information.

[0068] Step 230: Generate at least one test case corresponding to the test case task based on the test description text.

[0069] In an embodiment of the present application, a test case task may correspond to at least one test case, and based on the test description text, a computer device may generate at least one test case.

[0070] In some embodiments, a computer device inputs a test description text into a test case generation model, and obtains the output of the test case generation model as at least one test case corresponding to the test case task; wherein the test case generation model is a machine learning model having the ability to generate at least one test case based on the test description text.

[0071] In other embodiments, a computer device inputs a test description text into a test case generation system, and obtains the output of the test case generation system as at least one test case corresponding to the test case task; wherein the test case generation system is a system that can extract key information from the test description text based on a template matching algorithm, and map the key information to a test case template field, thereby automatically generating at least one test case corresponding to the test case task.

[0072] In an embodiment of the present application, the above-mentioned historical problem information is used to indicate fault points that have occurred in past tests or online operations, and the above-mentioned user feedback information is used to indicate the user's real feedback. The test description text generated based on the above two types of information can enable the test description text to indicate the generated test cases, while avoiding known risks and repeated errors, it can also avoid problems that may affect user experience, effectively improve the quality of the generated test cases, and automatically generate at least one test case corresponding to the test case task based on the test description text, which can improve the efficiency of test case generation while ensuring quality.

[0073] based on Figure 2 , please refer to Figure 3 , Figure 3 This is a flow chart of a test case generation method provided by an embodiment of the present application. Based on the scheme shown in any one or more of the above embodiments, Figure 2 Step 220 in the embodiment may be implemented as step 220a and step 220b.

[0074] Step 220a: Generate a prompt statement based on the historical question information, user feedback information and the prompt statement template.

[0075] The above prompt statement template is a pre-designed structured text framework.

[0076] In some embodiments, after obtaining historical question information and user feedback information, the computer device queries the prompt statement template database based on the historical question information and user feedback information, and obtains the template prompt statement in the prompt statement template database that matches the historical question information and user feedback information; wherein the prompt statement template database is a database for storing at least one prompt statement template that matches the historical question information and user feedback information.

[0077] In an embodiment of the present application, a computer device can extract key features from historical question information and user feedback information through an intelligent matching algorithm, compare the extracted key features with at least one prompt statement template in a prompt statement template database, and obtain a prompt statement template that matches the historical question information and user feedback information.

[0078] Optionally, after obtaining the prompt statement template, the computer device may directly fill the historical question information and the user feedback information into the designated information segment of the prompt statement template to generate a new prompt statement;

[0079] Optionally, after obtaining the prompt statement template, the computer device can input historical question information, user feedback information and the prompt statement template into a prompt statement generation model, and obtain the output of the prompt statement generation model as a prompt statement; wherein the prompt statement generation model is a machine learning model that has the ability to automatically generate prompt statements based on historical question information, user feedback information and the prompt statement template.

[0080] Step 220b: Input the prompt sentence into the generative language model to obtain the test description text output by the generative language model.

[0081] In an embodiment of the present application, after obtaining the prompt statement, the computer device can perform formatting processing on the prompt statement, for example, adjusting the text length of the prompt statement, inputting the formatted prompt statement into the generative language model, and obtaining the test description text output by the generative language model.

[0082] In some embodiments, the computer device is not limited to inputting only prompt statements, but can also perform multimodal input; for example, the computer device inputs the prompt statement, the code content corresponding to the historical problem information, and a screenshot of the user feedback information into the generative language model to obtain the test description text output by the generative language model.

[0083] In an embodiment of the present application, a prompt statement is constructed based on historical problem information and user feedback information, which can ensure that the test description text generated based on the prompt statement avoids known problems and optimizes the user experience. The test description text is obtained through a generative language model based on the prompt statement, which can improve the generation efficiency of the test description text while improving the generation accuracy of the test description text.

[0084] Based on the scheme shown in any one or more of the above-mentioned embodiments, the above-mentioned step 220a can be implemented as: based on the first prompt statement template, combining historical problem information and user feedback information, generating a first prompt statement; the first prompt statement is used to indicate the generation of a test description text that matches the historical problem information and user feedback information.

[0085] Among them, the above-mentioned first prompt sentence template is a pre-designed structured text framework, which includes a historical question information field and a user feedback information field. The historical question information field and the user feedback information field can be dynamically filled according to the historical question information and user feedback information obtained by the computer device.

[0086] In a possible implementation of an embodiment of the present application, a prompt statement template library is pre-set in a computer device, and the prompt statement template library may include at least one type of prompt statement template. Different types of prompt statement templates have corresponding field information different. The above-mentioned first prompt statement template may be one of the above-mentioned at least one type of prompt statement template; optionally, after obtaining historical problem information and user feedback information, the computer device may send a first prompt statement template acquisition request to the server, and the first prompt statement template acquisition request is used to request to obtain a first prompt statement template including a historical problem information field and a user feedback information field. After receiving the prompt statement template sent by the server, it is obtained as the first prompt statement template. It should be noted that the method for obtaining the above-mentioned first prompt statement template is not limited to any one of the above-mentioned two methods, and the embodiment of the present application is not limited here.

[0087] In an embodiment of the present application, after obtaining the first prompt statement template, the computer device fills the historical question information and the user feedback information into the historical question information field and the user feedback information field in the first prompt statement template respectively, and obtains the filled first prompt statement.

[0088] In an embodiment of the present application, the computer device can directly generate a first prompt statement based on known problems and the user's actual experience by embedding historical problem information and user feedback information into a predefined first prompt statement template, thereby effectively improving the generation quality of the first prompt statement.

[0089] Based on the scheme shown in any one or more of the above-mentioned embodiments, the above-mentioned step 220a can be implemented as follows: based on the second prompt statement template, the requirement information, historical problem information and user feedback information of the test case task are combined to generate a second prompt statement; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the second prompt statement is used to indicate the generation of a test description text that matches the requirement document information, historical problem information and user feedback information.

[0090] The requirement information of the test case task is information used to indicate the target and scope of the test case task.

[0091] Among them, the above-mentioned second prompt statement template is a pre-designed structured text framework, which includes the requirement information field, historical problem information field and user feedback information field of the test case task. The requirement information field, historical problem information field and user feedback information field of the test case task can be dynamically filled according to the requirement information, historical problem information and user feedback information of the test case task obtained by the computer device.

[0092] In an embodiment of the present application, a computer device has a prompt statement template library, which may include at least one type of prompt statement template. Different types of prompt statement templates have corresponding field information different. The second prompt statement template may be one of the at least one type of prompt statement template. Optionally, after obtaining the requirement information, historical problem information and user feedback information of the test case task, the computer device may send a second prompt statement template acquisition request to the server. The second prompt statement template acquisition request is used to request the acquisition of a second prompt statement template including the requirement information field, historical problem information field and user feedback information field of the test case task. After receiving the prompt statement template sent by the server, the second prompt statement template is acquired. It should be noted that the method for acquiring the second prompt statement template is not limited to any one of the above two methods, and the embodiment of the present application is not limited thereto.

[0093] In an embodiment of the present application, after obtaining the second prompt statement template, the computer device fills the requirement information, historical problem information and user feedback information of the test case task into the requirement information field, historical problem information field and user feedback information field of the test case task in the second prompt statement template respectively, and obtains the filled second prompt statement.

[0094] In an embodiment of the present application, the above-mentioned requirement information clarifies the objectives and scope of the test, avoids wasting resources on irrelevant tests, combines the requirement information with historical problem information and user feedback, and uses a structured second prompt statement template to make the generated prompt statement targeted and practical, thereby effectively improving the quality of the generated prompt statement.

[0095] Based on the scheme shown in any one or more of the above-mentioned embodiments, in some embodiments, a computer device obtains requirement information and project information of a test case task; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the project information includes the project name and project version branch information corresponding to the test case task; based on the requirement information and project information, code change information and function point information are obtained; the code change information is used to indicate the changed content in the code corresponding to the test case task; the function point information is used to indicate the function corresponding to the test case task; based on the code change information and function point information, historical problem information and user feedback information are obtained.

[0096] In an embodiment of the present application, a computer device is provided with a test case task database, which is used to store at least one test case task, requirement information of the test case task, and project information of the test case task. The computer device can obtain the requirement information and project information corresponding to the test case task by querying the test case task database.

[0097] The changes in the code corresponding to the above test case tasks include, but are not limited to: newly added, modified or deleted code snippets.

[0098] The function corresponding to the above test case task may be a functional module or an operation flow verified by the test case task.

[0099] In an embodiment of the present application, after obtaining the requirement information and project information of the test case task, the computer device can query the code library according to the requirement information and project information to obtain code change information and function point information; optionally, the computer device can query the code library according to the requirement information and project information, and after obtaining the code change information, obtain function point information based on the code change information.

[0100] In an embodiment of the present application, a computer device obtains code change information and function point information based on the requirement information and project information of a test case task, and can more accurately determine the function modules that need to be tested in this test case task, and then obtains historical problem information and user feedback through the code change information and function point information, so that the obtained historical problem information and user feedback are related to the test focus of the test case task, thereby ensuring the pertinence of the historical problem information and user feedback information, thereby effectively improving the accuracy of obtaining the historical problem information and user feedback information.

[0101] Based on the scheme shown in any one or more of the above-mentioned embodiments, in some embodiments, a computer device obtains a requirement identifier of requirement information and a project identifier of project information; queries a code library for code change information and function point information that match the requirement identifier and project identifier; the code library is a database for storing and managing source code and change code of application development projects corresponding to test case tasks.

[0102] The requirement identifier is an identifier used to uniquely identify the requirement corresponding to the test case task.

[0103] The above-mentioned project identifier is an identifier used to uniquely identify a specific project or a project version branch.

[0104] In an embodiment of the present application, a computer device can extract a requirement identifier corresponding to a test case from a requirement management system through an API interface of the requirement management system; and obtain an identifier of project information from a version control system through an API interface of a project control system; wherein the requirement management system is a software system for managing requirement information, and the requirement management system stores requirement information of at least one test case task; and the project management system is a software system for managing projects, and the project management system stores project information of at least one test case task.

[0105] In the embodiment of the present application, the above code base stores the codes of the application development project at different stages of code submission, update and repair. In the above code base, the codes of the application development project have corresponding requirement identifiers and project identifiers. After obtaining the requirement identifier and project identifier, the computer device traverses the code base, queries the code in the code base that contains the requirement identifier and project identifier, and obtains code change information and function point information based on the found code.

[0106] In an embodiment of the present application, a computer device queries and obtains code change information and function point information through unique indication information such as a requirement identifier and a project identifier. This can ensure that the code change information and function point information obtained through the query are close to the requirements of the test case task and the project requirements, thereby making the code change information and function point information obtained through the query more accurate.

[0107] Based on the scheme shown in any one or more of the above embodiments, in some embodiments, a computer device obtains historical problem information and user feedback information corresponding to code change information and function point information from a knowledge base through a similarity algorithm; the knowledge base is used to store historical problem information and user feedback information corresponding to at least one code change information and at least one function point information.

[0108] The similarity algorithm is an algorithm for calculating the similarity between texts, and is used to calculate the similarity between code change information or function point information and historical problem information or user feedback information.

[0109] In the embodiment of the present application, the above similarity algorithm can be implemented by one of cosine similarity, Euclidean distance or Jaccard similarity.

[0110] In an embodiment of the present application, the historical problem information in the above-mentioned knowledge base may correspond to one or at least two code change information and function point information; the above-mentioned user feedback information may correspond to one or at least two code change information and function point information. In an embodiment of the present application, the above-mentioned knowledge base is a vector database that can support efficient vector retrieval.

[0111] In an embodiment of the present application, a computer device may respectively extract features corresponding to code change information, function point information, historical problem information, and user feedback information through natural language processing technology, encode the extracted features, obtain feature vectors, and calculate the similarity between the vector features of the feature vector of the code change information and the feature vector of the function point information and the feature vector of the historical problem information and the feature vector of the user feedback information through a similarity algorithm; when the similarity meets a specified threshold, the historical problem information and user feedback information corresponding to the feature vector are obtained as the historical problem information and user feedback information corresponding to the code change information and the function point information; optionally, the computer device may select the historical problem information and user feedback information corresponding to the feature vector with the highest similarity as the historical problem information and user feedback information corresponding to the code change information and the function point information.

[0112] In an embodiment of the present application, a computer device searches for historical question information and user feedback information in a knowledge base through a similarity algorithm. The similarity algorithm can effectively ensure the precise matching of historical question information and user feedback, thereby ensuring the accuracy of the acquisition of historical question information and user feedback information.

[0113] Based on the scheme shown in any one or more of the above embodiments, in some embodiments, the computer device converts the format of the test description text to the format corresponding to the test case to obtain at least one candidate test case; from the at least one candidate test case, obtain the test case corresponding to the test case task.

[0114] The candidate test cases mentioned above refer to test cases that have not been executed or verified.

[0115] The computer device can convert the format of the test description text into a format corresponding to the test case through a format conversion tool or a natural language generation technology.

[0116] In an embodiment of the present application, after obtaining at least one candidate test case, the computer device can, based on the existing test cases corresponding to the test case task, obtain, from at least one candidate test case, candidate test cases corresponding to functional points in the test case task that are not covered by the existing test cases, as supplementary test cases corresponding to the test case task.

[0117] In an embodiment of the present application, by converting the test description text into a test case format, it can be effectively ensured that the acquired test cases are standardized, avoiding the problem of non-standard test case generation due to inconsistent formats, and performing further screening on at least one candidate test case can effectively ensure that the selected test case can accurately cover the functional points of the test case task, thereby improving the quality and correctness of test case generation.

[0118] Based on the scheme shown in any one or more of the above embodiments, in some embodiments, the computer device matches at least one candidate test case with the existing test cases of the test case task respectively; and adds the candidate test cases in at least one candidate test case that do not match the existing test cases as test cases corresponding to the test case task.

[0119] Among them, the above-mentioned existing test cases correspond to some functional points of the test case tasks, and different test cases correspond to different functional points.

[0120] In an embodiment of the present application, a computer device is provided with a test case database for storing test cases corresponding to test case tasks. Each time the computer device generates a test case having a function point identical to a function point corresponding to a test case task, the generated test case is added to the test case database to be supplemented as the test case corresponding to the test case task. It should be noted that, when the function point of the generated test case is identical to the function point of an existing test case, the existing test case is updated and replaced with the generated test case.

[0121] In some embodiments, the computer device matches at least one candidate test case with the existing test cases of the test case task; obtains a candidate test case that does not match the existing test case among the at least one candidate test case, obtains the similarity between the at least one candidate test case and the existing test case, and when the similarity is less than a specified threshold, adds at least one candidate test case whose similarity with the existing test case is less than the specified threshold as a test case corresponding to the test case task.

[0122] In some embodiments, the computer device compares the execution steps and expected outputs in at least one candidate test case with the execution steps and expected outputs of the existing test cases of the test case task; and adds the candidate test case whose execution steps and expected outputs are different from those of the existing test cases as the test case corresponding to the test case task. Optionally, when the execution steps and expected outputs in the candidate test case are the same as the execution steps and expected outputs of the existing test cases of the test case task, the computer device compares the input data of the candidate test case with the input data of the existing test case, and when the input data of the candidate test case can cover the input data of the existing test case, and the coverage of the input data of the candidate test case to the input data of the existing test case exceeds a specified range threshold, the candidate test case is added as the test case corresponding to the test case task.

[0123] For example, please refer to Figure 4 , Figure 4 Shown is a schematic diagram of a test case adding process provided by an embodiment of the present application.

[0124] like Figure 4 As shown, Figure 4There is at least one candidate test case (candidate test case A and candidate test case B) generated by a computer device and a test case database, and the test case database contains an existing test case A corresponding to the test case task; the computer device matches at least one candidate test case with the existing test case A in the test case database, obtains a candidate test case B in at least one candidate test case that does not match the existing test case and adds it as a supplementary test case A into the test case database.

[0125] In an embodiment of the present application, the computer device matches each candidate test case with the existing test cases of the test case task, and screens out candidate test cases that do not match the existing test cases through the matching mechanism. While ensuring that the newly added test cases do not repeat the existing test cases, it also ensures that the newly added test cases can fill the gaps in the existing test cases, thereby improving the generation quality of the test cases and thus improving the overall test case generation efficiency.

[0126] Based on the scheme shown in any one or more of the above embodiments, in some embodiments, the computer device displays at least one candidate test case; when a selection operation for a target candidate test case is received, the target candidate test case is obtained as a test case corresponding to the test case task.

[0127] In an embodiment of the present application, after generating at least one candidate test case, the generated candidate test case can be displayed in a user interface, and the user can select a candidate test case from at least one candidate test case according to actual needs, and the computer device obtains the selected candidate test case as the target candidate test case. Among them, the above-mentioned at least one candidate test case can be displayed in the form of a list or a table, and each displayed candidate test case will display the name, description, expected results, etc. for describing the detailed information of the test case.

[0128] In an embodiment of the present application, the user can select the target candidate test case through operations such as clicking, keyboard input, and mouse wheel.

[0129] In some embodiments, the computer device displays at least one candidate test case and existing test cases of the test case task; when a selection operation on a target candidate test case is received, the target candidate test case is acquired as the test case corresponding to the test case task.

[0130] For example, please refer to Figure 5 , Figure 5 It is a schematic diagram showing a candidate test case provided by an embodiment of the present application.

[0131] like Figure 5As shown in part (a) of the figure, the user interface 500 displays existing test case 1 and existing test case 2 of the test case task on the left, and displays candidate test case 1 and candidate test case 2 on the right; each test case displays the corresponding step description, expected results, input data and other related information corresponding to the test case, and each candidate test case has a selection box on the right; the user can compare the existing test cases and candidate test cases in the user interface 500, and select the candidate test case as the target candidate test case as the supplementary test case according to actual needs. The user clicks the selection box on the right of candidate test case 2 and selects candidate test case 2, and the user interface 500 displays as shown below. Figure 5 As shown in part (b), when the computer device receives a selection operation on candidate test case 2, it adds candidate test case 2 as a target candidate test case as a test case corresponding to the test case task and stores it as an existing test case 3.

[0132] Optionally, the computer device displays at least one candidate test case, the at least one candidate test case includes at least one recommended candidate test case, and the at least one recommended candidate test case is displayed in a highlighted form; when a selection operation on a target candidate test case is received, the target candidate test case is obtained as the test case corresponding to the test case task.

[0133] Optionally, the computer device displays at least one candidate test case, the at least one candidate test case includes at least one recommended candidate test case, the at least one recommended candidate test case is displayed in different colors according to the degree of mismatch with existing test cases, and the higher the degree of mismatch between the recommended candidate test case and the existing test cases, the brighter the color in which the recommended candidate test case is displayed; when a selection operation for a target candidate test case is received, the target candidate test case is obtained as the test case corresponding to the test case task.

[0134] In an embodiment of the present application, the above-mentioned recommended candidate test cases can be obtained by analyzing at least one candidate test case through a recommendation algorithm after the computer device obtains at least one candidate test case.

[0135] In some embodiments, a computer device displays at least one candidate test case and a function point selection menu, wherein the function point selection menu includes all function points corresponding to at least one candidate test case; in response to receiving a selection operation for a specified function point in the function point selection menu; a recommended test case is displayed on a user interface, wherein the recommended test case is a candidate test case in which the function point is the same as the selected specified function point in at least one candidate test case; and upon receiving a selection operation for at least one of the above recommended test cases, the recommended test case is obtained as the test case corresponding to the test case task.

[0136] In an embodiment of the present application, the computer device provides the user with an intuitive selection interface by displaying all candidate test cases, allowing the user to select the received target candidate test cases, accurately selecting the cases that best meet the current test task requirements, expanding the test case acquisition method, and improving the test case acquisition efficiency.

[0137] Based on the solutions shown in any one or more of the above embodiments, please refer to Figure 6 , Figure 6 is a flow chart of a test case generation method provided by an embodiment of the present application. The test case generation method shown in this embodiment can be executed by a computer device, which can be Figure 1 The test case generation service device 130 in the embodiment.

[0138] like Figure 6 As shown, the test case generation method shown in the embodiment of the present application includes three stages, namely, an information preparation stage, a test description text generation stage, and a test case generation stage.

[0139] S1. Information preparation stage

[0140] The computer device obtains requirement information indicating the target and scope corresponding to the test case task, and project information including the project name corresponding to the test case task and project version branch information; the requirement information includes the requirement identifier; the project information includes the project identifier. Based on the requirement identifier and the project identifier, the computer device queries the code library (i.e., a database for storing and managing source code and change code of the application development project corresponding to the test case task) for code change information and function point information that match the requirement identifier and the project identifier.

[0141] After obtaining the code change information and function point information, the historical problem information and user feedback information corresponding to the code change information and function point information are obtained from the knowledge base (i.e., a database for storing historical problem information and user feedback information corresponding to at least one code change information and at least one function point information) through a similarity algorithm.

[0142] S2. Test description text generation stage

[0143] After obtaining the historical question information and the user feedback information, the computer device combines the historical question information and the user feedback information based on the first prompt sentence template to generate a test description text that matches the historical question information and the user feedback information, namely the first prompt sentence.

[0144] Optionally, based on the second prompt statement template, the requirement information, historical problem information and user feedback information of the test case task are combined to generate a test description text that matches the requirement document information, historical problem information and user feedback information, i.e., the second prompt statement.

[0145] The computer device inputs the first / second prompt sentence into the generative language model to obtain the test description text generated by the generative language model.

[0146] S3, test case generation phase

[0147] In an embodiment of the present application, after obtaining the test description text, the computer device converts the format of the test description text into the format corresponding to the test case to obtain at least one candidate test case; matches the at least one candidate test case with the existing test cases of the test case task; adds the candidate test cases that do not match the existing test cases among the at least one candidate test case as test cases corresponding to the test case task; optionally, the computer device displays at least one candidate test case on a user interface; and upon receiving a selection operation for a target candidate test case, obtains the target candidate test case as the test case corresponding to the test case task.

[0148] In an embodiment of the present application, in the information preparation stage, the computer device obtains the requirement information and project information, and queries the relevant change information and function point information in the code base based on the requirement identification and project identification, and retrieves the historical problem information and user feedback information corresponding to the requirement information and project information from the knowledge base through the similarity algorithm, thereby ensuring that the basic information for test case generation can effectively meet the requirements of the test case task; in the test description text generation stage, by combining the historical problem information and user feedback information, as well as the prompt statement template, the computer device processes the prompt statement through the generative language model, thereby improving the generation quality of the test description text; in the test case generation stage, the computer device matches the candidate test cases with the existing test cases to ensure that the newly added test cases do not repeat the existing content, thereby ensuring the effectiveness of the new test cases. In summary, the above scheme can effectively improve the generation efficiency of test cases on the basis of ensuring the generation quality of test cases.

[0149] Based on the above Figure 2 and Figure 3 In the steps of the embodiment, the embodiment of the present application shows a method and device for automatic review and supplementation of test cases driven by multiple data sources.

[0150] Please refer to Figure 7 , Figure 7It is a method architecture diagram for automatic review and supplement of test cases provided by an embodiment of the present application. The embodiment of the present application can solve the problems of incomplete test case review and low supplement efficiency in the existing test case system. The traditional test case review process relies on manual analysis of code changes and historical issues, which is not only time-consuming, but also easy to miss key test coverage points, especially in a frequently iterated development environment, it is difficult to ensure the comprehensiveness and effectiveness of the test cases. This solution introduces an intelligent and automated data-driven review and supplement mechanism, which can comprehensively analyze multiple data sources such as code changes, requirement documents, historical problem knowledge bases (such as BUG records, replay documents), automatically identify functional modules that may be affected and generate supplementary test cases, thereby improving the coverage and efficiency of the review.

[0151] The above-mentioned method for automatic review and supplementation of test cases driven by multiple data sources includes seven parts, which are as follows.

[0152] 1. Use Case Status Monitoring

[0153] In the embodiment of the present application, the test case system monitors the status of each test case task in real time. When a test case task enters the "pending review" state, it automatically triggers the subsequent test case review supplement process. Figure 5 As shown, the use case system includes status monitoring. The use case system is a platform for managing test cases, which can review test cases and generate additional test cases when test case tasks are missing test cases.

[0154] 2. Obtaining requirement information and code change information associated with use cases

[0155] In the embodiment of the present application, the computer device obtains the requirement information (e.g., requirement name and requirement document address) and project information (e.g., project name and branch information) associated with the test case task from the upstream project management system through the use case task information; then obtains the code change content of the relevant branch from the code repository (for the subsequent third part of the associated BUG information evaluation of the impact on the function point), and obtains the relevant requirement content (e.g., function description and user story), such as Figure 7 As shown, Figure 7 The data source is displayed in the figure, and the computer device can obtain BUG information, review documents and user feedback information from the data source.

[0156] 3. Acquisition and association of past knowledge base data

[0157] The computer device obtains the code change information and required function point information, and uses the similarity algorithm to retrieve past bugs, online problems, user feedback and other information related to the function points and code change points from the knowledge base, and links the relevant information to the use case to be reviewed.

[0158] In the embodiment of the present application, the computer device may periodically obtain information from the data source, such as Figure 7 As shown, the computer device sets a scheduled task to automatically load and process (e.g., slice, convert, clean, vectorize, etc.) data from various data sources on a regular basis, and stores the processed data in a knowledge base.

[0159] IV. Intelligent Use Case Review and Recommendation

[0160] In an embodiment of the present application, a computer device integrates acquired demand information, historical issues, and user feedback information with a preset prompt statement template, and generates use case review points through large language model analysis.

[0161] 5. Test case supplement suggestion generation

[0162] The computer device automatically generates supplementary test cases based on the existing test cases of the test case tasks and the generated test case review points.

[0163] 6. Supplementary use cases for conversion and import

[0164] The computer device automatically converts the generated supplementary use cases into a unified standard format (eg, json), and automatically imports them through an interface of the use case management system.

[0165] VII. Audit Report Generation and Notification

[0166] The computer device generates an audit report based on the audit information of the test case. The audit report includes recommended audit points, supplementary use case information and related historical problem data. After the audit report is generated, the computer device pushes the audit report to the reviewer corresponding to the test case task.

[0167] In the embodiment of the present application, the above-mentioned scheme can realize intelligent review and supplement of test cases based on an automated process driven by multiple data sources, reduce manual operation and maintenance costs, and improve the coverage and accuracy of case review and supplement.

[0168] Please refer to Figure 8 , which shows a block diagram of a test case generation device provided by an exemplary embodiment of the present application, the test case generation device can be implemented as all or part of a computer device by hardware or a combination of hardware and software to achieve the above Figures 2 to 3 All or part of the steps in the embodiments shown. Figure 8 As shown, the test case generating device comprises:

[0169] The information acquisition module 801 is used to acquire historical problem information and user feedback information corresponding to the test case task; the historical problem information is the description information of the problems generated by the function point corresponding to the test case task during the historical testing process and the historical online operation process; the user feedback information is the user's evaluation information on the function point corresponding to the test case task;

[0170] The test description text acquisition module 802 is used to generate a test description text based on historical problem information and user feedback information; the test description text is a text used to describe the test method for the functional point corresponding to the test case task;

[0171] The test case generating module 803 is used to generate at least one test case corresponding to the test case task based on the test description text.

[0172] In some embodiments, the test description text acquisition module 802 is used to generate a prompt sentence based on historical problem information, user feedback information and a prompt sentence template; input the prompt sentence into a generative language model to obtain a test description text output by the generative language model.

[0173] In some embodiments, the test description text acquisition module 802 is used to generate a first prompt statement based on a first prompt statement template, combining historical problem information and user feedback information; the first prompt statement is used to instruct the generation of a test description text that matches the historical problem information and user feedback information.

[0174] In some embodiments, the test description text acquisition module 802 is used to generate a second prompt statement based on a second prompt statement template by combining the requirement information, historical problem information and user feedback information of the test case task; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the second prompt statement is used to indicate the generation of a test description text that matches the requirement document information, historical problem information and user feedback information.

[0175] In some embodiments, the information acquisition module 801 is used to obtain the requirement information and project information of the test case task; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the project information includes the project name and project version branch information corresponding to the test case task; based on the requirement information and project information, code change information and function point information are obtained; the code change information is used to indicate the changed content in the code corresponding to the test case task; the function point information is used to indicate the function corresponding to the test case task; based on the code change information and function point information, historical problem information and user feedback information are obtained.

[0176] In some embodiments, the information acquisition module 801 is used to acquire a demand identifier of the demand information and a project identifier of the project information;

[0177] Query the code library for code change information and function point information that match the requirement identifier and project identifier; the code library is a database used to store and manage source code and change code of application development projects corresponding to test case tasks.

[0178] In some embodiments, the information acquisition module 801 is used to obtain historical problem information and user feedback information corresponding to the code change information and function point information from the knowledge base through a similarity algorithm; the knowledge base is used to store historical problem information and user feedback information corresponding to at least one code change information and at least one function point information.

[0179] In some embodiments, the test case generation module 803 is used to convert the format of the test description text into a format corresponding to the test case to obtain at least one candidate test case; and obtain a test case corresponding to the test case task from the at least one candidate test case.

[0180] In some embodiments, the test case generation module 803 is used to match at least one candidate test case with the existing test cases of the test case task; and add the candidate test cases that do not match the existing test cases in the at least one candidate test case as test cases corresponding to the test case task.

[0181] In some embodiments, the test case generation module 803 is used to display at least one candidate test case; when a selection operation on a target candidate test case is received, the target candidate test case is acquired as a test case corresponding to the test case task.

[0182] Please refer to Fig. 9 , Fig. 9 9 is a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. The computer device 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a basic input / output system (I / O system) 906 that helps transmit information between various devices in the computer, and a large-capacity storage device 907 for storing an operating system 913, application programs 914 and other program modules 915.

[0183] The basic input / output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse and a keyboard for user inputting information. The display 908 and the input device 909 are connected to the central processing unit 901 through an input / output controller 910 connected to the system bus 905. The basic input / output system 906 may also include an input / output controller 910 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 910 also provides output to a display screen, a printer, or other types of output devices.

[0184] The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0185] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM (Random Access Memory), ROM (Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 904 and mass storage device 907 can be collectively referred to as memory.

[0186] The computer device 900 can be connected to the Internet or other network devices through a network interface unit 911 connected to the system bus 905 .

[0187] The memory also includes one or more programs, one or more programs are stored in the memory, and the central processing unit 901 implements the one or more programs by executing the one or more programs. Figures 2 to 3 All or part of the steps in the method shown.

[0188] In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement all or part of the steps of the method shown in the above embodiments of the present application.

[0189] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement all or part of the steps of the method shown in the above-mentioned various embodiments of the present application.

[0190] In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement all or part of the steps of the method shown in the above-mentioned embodiments of the present application.

[0191] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program. The above program may be stored in a computer-readable storage medium. The above storage medium may be a read-only memory, a disk or an optical disk, etc.

[0192] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0193] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A test case generation method, characterized in that: The method comprises: Obtaining historical problem information and user feedback information corresponding to the test case task; the historical problem information is description information of problems generated by the function point corresponding to the test case task during the historical testing process and the historical online operation process; the user feedback information is the user's evaluation information on the function point corresponding to the test case task; Generate a test description text based on the historical problem information and the user feedback information; the test description text is a text used to describe the test method for the functional point corresponding to the test case task; At least one test case corresponding to the test case task is generated based on the test description text.

2. The method according to claim 1, characterized in that The generating of a test description text based on the historical problem information and the user feedback information includes: Generate a prompt statement based on the historical question information, the user feedback information and a prompt statement template; The prompt sentence is input into a generative language model to obtain the test description text output by the generative language model.

3. The method according to claim 2, characterized in that The generating a prompt statement based on the historical question information, the user feedback information and the prompt statement template includes: Based on a first prompt statement template, the historical problem information and the user feedback information are combined to generate a first prompt statement; the first prompt statement is used to instruct generation of a test description text that matches the historical problem information and the user feedback information.

4. The method according to claim 2, characterized in that: The generating a prompt statement based on the historical question information, the user feedback information and the prompt statement template includes: Based on the second prompt statement template, the requirement information of the test case task, the historical problem information and the user feedback information are combined to generate a second prompt statement; the requirement information is used to indicate the objectives and scope corresponding to the test case task; the second prompt statement is used to indicate the generation of a test description text that matches the requirement document information, the historical problem information and the user feedback information.

5. The method according to any one of claims 1 to 4, characterized in that: The obtaining of historical problem information and user feedback information corresponding to the test case task includes: Obtaining the requirement information and project information of the test case task; the requirement information is used to indicate the target and scope corresponding to the test case task; the project information includes the project name and project version branch information corresponding to the test case task; Based on the requirement information and the project information, code change information and function point information are obtained; the code change information is used to indicate the changed content in the code corresponding to the test case task; the function point information is used to indicate the function corresponding to the test case task; Based on the code change information and the function point information, the historical problem information and the user feedback information are obtained.

6. The method according to claim 5, characterized in that The acquisition of code change information and function point information based on the test case task requirement information and project information includes: Acquire the demand identifier of the demand information and the project identifier of the project information; The code library is queried for the code change information and the function point information that match the requirement identifier and the project identifier; the code library is a database for storing and managing source code and change code of the application development project corresponding to the test case task.

7. The method according to claim 5, characterized in that The acquiring of historical problem information and user feedback information based on the code change information and the function point information includes: The historical problem information and user feedback information corresponding to the code change information and the function point information are obtained from the knowledge base through a similarity algorithm; the knowledge base is used to store the historical problem information and user feedback information corresponding to at least one code change information and at least one function point information.

8. The method according to any one of claims 1 to 4, characterized in that: The generating at least one test case corresponding to the test case task based on the test description text includes: Convert the format of the test description text into a format corresponding to the test case to obtain at least one candidate test case; A test case corresponding to the test case task is obtained from the at least one candidate test case.

9. The method according to claim 8, characterized in that The obtaining, from the at least one candidate test case, a test case corresponding to the test case task, comprises: Matching the at least one candidate test case with the existing test cases of the test case task respectively; A candidate test case among the at least one candidate test case that does not match the existing test case is added as a test case corresponding to the test case task.

10. The method according to claim 8, characterized in that The obtaining, from the at least one candidate test case, a test case corresponding to the test case task, comprises: displaying the at least one candidate test case; When a selection operation on a target candidate test case is received, the target candidate test case is acquired as a test case corresponding to the test case task.

11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores instructions, and the instructions are executed by the processor to implement the test case generation method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: The storage medium stores instructions, and the instructions are executed by a processor of a computer device to implement the test case generation method as described in any one of claims 1 to 10.

13. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the test case generation method as described in any one of claims 1 to 10.