Test case generation method and device based on business map, medium and product
By cutting the business functions from the business map and combined with the instruction engineering template library and large language model, test cases are generated, and the problem of high -quality test cases is difficult to generate in existing technologies. Essence
Patent Information
- Application Number
- CN202411428531.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art is difficult to effectively generate high-quality test cases from business mind maps, especially with limitations in understanding and expressing complex business logic.
By obtaining the business thinking map of business products, cutting the map to determine multiple business functions, and combined with the prefabricated instruction engineering template library and large language model to generate test cases. This method includes obtaining business requirements information and business processes, determining business attribute information, generating business thinking maps, and generating instruction engineering solutions through cutting and template library to generate test cases with large language models.
Realize automatic analysis of business maps, generate comprehensive and accurate test cases, significantly improve the production efficiency and quality of test cases, and meet the needs of modern software testing.
Smart Images

Figure CN119377109A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to a scheduling method, device, readable storage medium and program product. Background Art
[0002] As software systems become increasingly complex, the traditional way of manually writing test cases can no longer cope with the current efficient and comprehensive testing needs. Although there are some automated testing tools and methods in the prior art, they still have certain limitations in understanding and expressing complex business logic. Therefore, how to automatically generate high-quality test cases from graphical representations such as business mind maps has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The purpose of this application is to provide a scheduling method, device, readable storage medium and program product to solve the problem of limitations in generating test cases for business mind maps in the prior art.
[0004] To achieve the above object, an embodiment of the present application provides a test case generation method based on a business map, comprising:
[0005] Get the business mind map of business products;
[0006] Segment the business mind map into multiple business functions;
[0007] Generate a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library;
[0008] According to the first instruction engineering solution and the preset large language model, a plurality of first test cases for the business product are generated.
[0009] Optionally, obtain a business mind map of the business product, including:
[0010] Obtaining business demand information and corresponding business processes of the business products;
[0011] Determine the business attribute information of the business product generated by each node in the business process;
[0012] According to the business attribute information corresponding to each node, a business mind map of the business product is obtained.
[0013] Optionally, the business mind map is segmented to determine multiple business functions, including:
[0014] Determine the business presentation methods at different levels of the business mind map according to the business process corresponding to the business mind map;
[0015] According to the complexity corresponding to the business presentation mode, select the target business presentation mode with the lowest complexity;
[0016] According to the target business presentation method, the business mind map is segmented according to different pages and functions to determine multiple business functions; the business functions are saved in the form of pictures, and each of the business functions has clear boundaries and independent functions.
[0017] Optionally, generating a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library includes:
[0018] Obtain the business requirements, application scenarios and test point dimensions of the business product;
[0019] By utilizing the business requirements, the application scenarios and the test point dimensions, target instructions corresponding to the business functions are selected from the preset instruction engineering template library for writing, and the corresponding first instruction engineering solution is generated.
[0020] Optionally, after generating a test case for the business product according to the instruction engineering solution and the preset large language model, the method further includes:
[0021] By modifying the map presentation method or reducing the levels in the map, the business mind map is re-segmented to generate a target mind map;
[0022] Generate a second instruction engineering solution by using the target map and the preset instruction engineering template library;
[0023] According to the second instruction engineering solution and the preset large language model, a plurality of new second test cases for the business product are generated.
[0024] Optionally, the method further comprises:
[0025] Extracting key features in each test case according to the first test cases or the second test cases;
[0026] Converting the key features into feature vectors;
[0027] Use the cosine similarity algorithm to calculate the similarity between test cases;
[0028] Using the similarity, delete the test cases that are repeated or have high similarity in the first test case or the second test case.
[0029] Optionally, the method further comprises:
[0030] Perform at least one of the following functional operations on the first test case or the second test case:
[0031] Test case prioritization;
[0032] Add test cases;
[0033] Delete test cases;
[0034] Modify test cases;
[0035] Store test cases and record their version information.
[0036] To achieve the above-mentioned purpose, the embodiment of the present application further provides a test case generation device based on a business map, comprising:
[0037] Acquisition module, used to acquire the business mind map of business products;
[0038] A first determination module is used to segment the business mind map and determine it into multiple business functions;
[0039] A first processing module, configured to generate a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library;
[0040] The second processing module is used to generate a plurality of first test cases for the business product according to the first instruction engineering solution and a preset large language model.
[0041] To achieve the above-mentioned purpose, an embodiment of the present application further provides a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps in the method described above are implemented.
[0042] To achieve the above objectives, an embodiment of the present application further provides a computer program product, including computer instructions, which implement the steps of the above method when executed by a processor.
[0043] The beneficial effects of the above technical solution of the present application are as follows:
[0044] In the embodiment of the present application, the business mind map of the acquired business product is segmented, and the first instruction engineering scheme is generated by combining the multiple business functions after segmentation with the preset instruction engineering template library; according to the first instruction engineering scheme and the preset large language model, multiple first test cases of the business product are generated, which solves the problem of the limitation of generating test cases for business mind maps in the prior art. The scheme of the present application can automatically parse the business mind map, and generate comprehensive and accurate test cases based on the parsing results and the pre-trained intelligent model. In this way, the generation efficiency and quality of test cases can be significantly improved, so as to better meet the needs of modern software testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1A flowchart of a test case generation method based on a business map provided in an embodiment of the present application;
[0046] Figure 2 An example diagram of a business mind map provided in an embodiment of the present application;
[0047] Figure 3 An example diagram of the business functions provided by the embodiments of the present application;
[0048] Figure 4 An example diagram of a target map provided in an embodiment of the present application;
[0049] Figure 5 A specific flow chart of a test case generation method based on a business map provided in an embodiment of the present application;
[0050] Figure 6 A structural diagram of a test case generation device based on a business map provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0052] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0053] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0054] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] The embodiment of the present application provides a test case generation method, device, medium and product based on a business map. The method and device are based on the same application concept. Since the method and device solve the problem in a similar way, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0057] like Figure 1 As shown, a test case generation method based on a business map provided in an embodiment of the present application includes:
[0058] Step 11, obtain the business mind map of the business product.
[0059] In an embodiment of the present application, a business mind map input module can be set up, which is designed based on the business product requirement specification and the parameter information of the business product itself. According to the specific type of the business product, a business mind map corresponding to the specific product or specific project software is designed, and the business mind map input module is used to obtain the business mind map of the business product.
[0060] Step 12: segment the business mind map into multiple business functions.
[0061] This application divides the business mind map, and can first determine the complexity of the business mind map. The complexity can be determined according to the business process of the business product. The longer the process of the business process, the higher the corresponding complexity. The more judgment nodes of the business process, the higher the corresponding complexity. Considering the complexity of the business mind map, it will affect the accuracy of character recognition using OCR technology; that is, if the complexity of the business mind map is high, there may be more errors in the recognition results of character recognition using OCR technology. Based on this, in some embodiments, the number of nodes of the business process is obtained, and it is determined whether the number of nodes is greater than the target number threshold; if the number of nodes is greater than the target number threshold, it is determined that the complexity of the business mind map is greater than the target degree threshold. Optionally, if the number of nodes is less than or equal to the target number threshold, it is determined that the complexity of the business mind map is less than or equal to the target degree threshold. Among them, the target number threshold is a pre-set value, such as 20. Of course, the value can also be adjusted according to actual needs, and this embodiment does not limit this.
[0062] In other embodiments, the color types in the image to be identified can also be obtained; if the number of color types is greater than the target type threshold, it is determined that the complexity of the business mind map is greater than the target degree threshold; if the number of color types is less than or equal to the target type threshold, it is determined that the complexity of the business mind map is less than or equal to the target degree threshold. Among them, the target type threshold is a preset value, such as 8. Of course, the value can also be adjusted according to actual needs, and this embodiment does not limit this.
[0063] In some further embodiments, it is also possible to determine whether the background color of the background area of the mind map in the image to be identified is a pure color (i.e., one color). If it is determined that the background color of the background area is a pure color, then the complexity of the business mind map is determined to be less than or equal to the target degree threshold; if it is determined that the background color of the background area is not a pure color, then the complexity of the business mind map is determined to be greater than the target degree threshold.
[0064] Here, each business function can be generated after segmentation for each process node, and each business function is preferably saved as a picture.
[0065] Step 13: Generate a first instruction engineering solution based on the plurality of business functions and a preset instruction engineering template library.
[0066] Step 14: Generate multiple first test cases for the business product according to the first instruction engineering solution and the preset large language model.
[0067] This application combines the segmented business functions with the preset instruction engineering template library to generate corresponding instruction schemes. Here, the preset instruction engineering template library can be a Prompt design scheme template library set in advance. The first instruction engineering scheme generated by the corresponding business function and the preset instruction engineering template library is combined with the preset large language model to generate multiple first test cases for the business product. The preset large language model of this application can adopt the "Big Model Wenxin Yiyan", "Doubao", "Tongyi Qianwen" and "GPT Series" in the relevant technology, or it can import a self-trained large model with industry depth. Select the preset large language model, input the designed first instruction engineering scheme and the picture of the mind map (that is, multiple business functions) into the large language model, and complete the test case generation.
[0068] Optionally, the above step 11 includes:
[0069] Obtaining business demand information and corresponding business processes of the business products;
[0070] Determine the business attribute information of the business product generated by each node in the business process;
[0071] According to the business attribute information corresponding to each node, a business mind map of the business product is obtained.
[0072] In an embodiment of the present application, based on the requirements specification and prototype design, a business mind map is drawn according to the business attributes of the specific product or project software, thereby completing the customization of the test plan. For example, the requirements are as follows: The material cost module of a manufacturing execution system (MES), the business requirement is that when the system lacks materials, the material cost function must be used to generate an order number to complete the purchase. The material cost page must have functions such as editing, saving, publishing, approving, rejecting, printing and historical charges. The business processes corresponding to the business products include: (1) adding amounts and notes to material costs; (2) saving and / or publishing; (3) approval; (4) if the approval is passed and the approval amount is greater than 0, an order number is generated; if the approval is rejected, or if the approval is passed and the approval amount is equal to 0, no order number is generated. Each node in the business process corresponds to the business attribute information of the business product. For example, the business attribute information of the material cost can be as follows Figure 2 As shown, the business attribute information of material costs includes: historical material costs, export, print, approve, pause, publish, page UI, list, query and edit, etc.
[0073] Each business attribute information includes corresponding sub-functions. For example, if the historical material cost includes a confirmed historical quotation corresponding to the product, the confirmed historical quotation will be displayed. Export includes: support for multiple data exports; consistent with the original system export template. Printing includes: for approved data, the electronic signature of the approver is added when the manual cost is printed; consistent with the original system printing template. Approval includes: inspection status (to be released, rejected, passed, suspended, cannot be approved; in approval status, approval can be operated); approval rejected, approval passed, etc. Pause, release, page UI, list, query and edit each correspond to at least one sub-function.
[0074] Here, the business attribute information of material costs and the sub-functions corresponding to each piece of business attribute information together form a business mind map of material costs.
[0075] This application can use the business demand information of the business product, the corresponding business process, the business attribute information of the business product generated by each node, and the sub-function corresponding to each business attribute information to jointly construct a business mind map of the business product.
[0076] Optionally, the above step 12 includes:
[0077] Determine the business presentation methods at different levels of the business mind map according to the business process corresponding to the business mind map;
[0078] According to the complexity corresponding to the business presentation mode, select the target business presentation mode with the lowest complexity;
[0079] According to the target business presentation method, the business mind map is segmented according to different pages and functions to determine multiple business functions; the business functions are saved in the form of pictures, and each of the business functions has clear boundaries and independent functions.
[0080] In the embodiment of the present application, when the business mind map is segmented, the entire business process is first classified according to its complexity to identify the complexity of different levels. Then, the business mind map is segmented according to the different pages and functions, and they are decomposed into several business modules, and it is ensured that each module has clear boundaries and independent functions. Finally, these business modules are saved in the system in the form of pictures so that test cases for business products can be generated later.
[0081] Optionally, the above step 13 includes:
[0082] Obtain the business requirements, application scenarios and test point dimensions of the business product;
[0083] By utilizing the business requirements, the application scenarios and the test point dimensions, target instructions corresponding to the business functions are selected from the preset instruction engineering template library for writing, and the corresponding first instruction engineering solution is generated.
[0084] In the embodiment of the present application, in order to ensure that the large language model can fully understand the test requirements and generate high-quality test cases, a Prompt design solution template library, i.e., a preset instruction engineering template library, is provided. Through this template library, users can flexibly create and modify the first instruction engineering solution (Prompt solution) according to the actual business needs and application scenarios, according to the page, function or other related dimensions. Through the meticulous management and continuous iteration of Prompt, the design of the Prompt solution under the same requirement can be continuously optimized to make it closer to the actual application scenario, thereby improving the accuracy and effectiveness of the test.
[0085] For example, if the business requirement of a business product is a mind map of the functional test points of the material cost page of a certain MES system, please write the test cases of this requirement in a table. Using the business requirement, the application scenario and the test point dimension, the corresponding first instruction engineering plan needs to meet the following requirements: (1) It must be written in the test point dimension; (2) The list must contain the module, use case title, preconditions, operation steps, and expected results; (3) The format of the use case title is page-function point-test point.
[0086] Furthermore, the designed prompt and mind map images are input into the large language model using the preset large language model, and the test case generation is completed.
[0087] Optionally, after generating a test case for the business product according to the instruction engineering solution and the preset large language model, the method further includes:
[0088] By modifying the map presentation method or reducing the levels in the map, the business mind map is re-segmented to generate a target mind map;
[0089] Generate a second instruction engineering solution by using the target map and the preset instruction engineering template library;
[0090] According to the second instruction engineering solution and the preset large language model, a plurality of new second test cases for the business product are generated.
[0091] In the embodiment of the present application, for example, the business map of the material cost function module can be segmented as follows: Figure 3 As shown, Figure 3 As shown, the result only generates one type of use case, "page UI", and fails to cover query, list and other functional points. For this obviously unsatisfactory generation result, the present application uses the method of modifying the map display method or reducing the levels in the map to re-divide the business mind map, optimize it, generate a target map, and use the target map and the preset instruction engineering template library to generate a second instruction engineering plan. The second instruction engineering plan is a new instruction engineering plan. The target map can be achieved by making the following adjustments: (1) modifying the map display method so that the content is on the same side; (2) reducing the levels in the map, merging the content in brackets to the previous level, and improving the recognition of the map image; (3) refining the map segmentation.
[0092] For example, you can merge the multi-level sub-functions in the business function to reduce the level, and put the modified map content on the same side and divide it into multiple pictures. Figure 3 There are missing contents in the list, query and edit use cases. This application modifies the modules to which all use cases belong and generates Figure 4 The business functions shown, Figure 4 The "Module Displayed" column is changed to "Material Module / Material Cost"; and according to Figure 4 The content shown in the figure regenerates a more detailed functional test case. After adjusting the target map and the second instruction engineering plan, the regenerated test case is clearer and more comprehensive.
[0093] Optionally, the method further comprises:
[0094] Perform at least one of the following functional operations on the first test case or the second test case:
[0095] Test case prioritization;
[0096] Add test cases;
[0097] Delete test cases;
[0098] Modify test cases;
[0099] Store test cases and record their version information.
[0100] In the embodiment of the present application, a test case optimization module can be set up, and the test case optimization module can be used to add, delete, modify, prioritize, export and other operations on the generated test cases. For scenarios with many businesses and easy duplication, deduplication can be selected. A test case management module can also be set up to archive and store the generated test cases, and provide test case management functions to support the classification, retrieval, reuse and version control of test cases.
[0101] Optionally, the method of the present application further includes:
[0102] Extracting key features in each test case according to the first test cases or the second test cases;
[0103] Converting the key features into feature vectors;
[0104] Use the cosine similarity algorithm to calculate the similarity between test cases;
[0105] Using the similarity, delete the test cases that are repeated or have high similarity in the first test case or the second test case.
[0106] In the embodiment of the present application, the cosine similarity algorithm can be used, and the deduplication steps are as follows: Step 1: Extract key features. Extract key features from each test case, such as the test case name, keywords in the test description, etc. Step 2: Construct feature vectors. Convert the extracted key features into feature vectors to facilitate subsequent comparison and deduplication. Step 3: Similarity calculation. Use the cosine similarity algorithm to calculate the similarity between test cases. The cosine similarity algorithm formula is as follows:
[0107]
[0108] Among them, A and B are two vectors, A·B represents the vector dot product, and ||A|| and ||B|| represent the modulus lengths of the two vectors.
[0109] Step 4: De-duplication: Delete duplicate and highly similar test cases based on the similarity calculation results.
[0110] In a specific embodiment, referring to Figure 5As shown, the present application provides a test case generation system based on a business mind map, including: a business mind map input module, used to input a business mind map of a business product. A business mind map segmentation module, used to segment the business mind map, generate business functions, and save them as pictures. A prompt design solution module, used to generate an instruction engineering solution based on the segmented business functions. A test case generation module, used to generate test cases corresponding to business products based on the instruction engineering solution, business functions and instruction engineering solutions saved in the form of pictures. The test case optimization module and the test case management module have the same functions as the test case optimization module described above.
[0111] The method of the present application has the following advantages:
[0112] (1) Improve test efficiency: By automatically generating test cases, the time and cost of testers writing test cases are greatly reduced. According to actual project investment comparison, the overall efficiency improvement is between 30% and 50%.
[0113] (2) Improve test quality: Test cases generated based on business mind maps and intelligent models can more comprehensively cover business logic and exception paths, thereby improving the comprehensiveness and accuracy of testing.
[0114] (3) Reduce human errors: Reduce the errors and omissions that may occur when manually writing test cases.
[0115] (4) Strong adaptability: It supports importing data from mind maps in various formats and can flexibly adjust the test case generation strategy based on actual business logic.
[0116] Reference Figure 6 As shown, the embodiment of the present application provides a test case generation device based on a business map, comprising:
[0117] An acquisition module 61 is used to acquire a business mind map of a business product;
[0118] A first determination module 62 is used to segment the business mind map and determine it into multiple business functions;
[0119] A first processing module 63, configured to generate a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library;
[0120] The second processing module 64 is used to generate a plurality of first test cases for the business product according to the first instruction engineering solution and the preset large language model.
[0121] Optionally, the acquisition module 61 of the present application includes:
[0122] A first acquisition unit, used to acquire business demand information and corresponding business processes of the business product;
[0123] A first determining unit, configured to determine the business attribute information of the business product generated by each node in the business process;
[0124] The second acquisition unit is used to acquire the business mind map of the business product according to the business attribute information corresponding to each node.
[0125] Optionally, the first determining module 62 in the present application includes:
[0126] A second determining unit is used to determine the business presentation methods at different levels of the business mind map according to the business process corresponding to the business mind map;
[0127] A first processing unit, configured to select a target service presentation mode with the lowest complexity according to the complexity corresponding to the service presentation mode;
[0128] The third determination unit is used to divide the business mind map into multiple business functions according to the target business presentation method according to different pages and functions; the business functions are saved in the form of pictures, and each of the business functions has clear boundaries and independent functions.
[0129] Optionally, the first processing module 63 in the present application includes:
[0130] A third acquisition unit is used to acquire the business requirements, application scenarios and test point dimensions of the business product;
[0131] The second processing unit is used to select the target instruction corresponding to the business function from the preset instruction engineering template library by utilizing the business requirements, the application scenarios and the test point dimensions, and generate the corresponding first instruction engineering solution.
[0132] Optionally, the device in the present application further includes:
[0133] The third processing module is used to re-divide the business mind map by modifying the map presentation mode or reducing the levels in the map to generate a target mind map;
[0134] A fourth processing module, used to generate a second instruction engineering solution by using the target map and the preset instruction engineering template library;
[0135] The fifth processing module is used to generate a plurality of new second test cases for the business product according to the second instruction engineering solution and the preset large language model.
[0136] Optionally, the device in the present application further includes:
[0137] A sixth processing module, configured to extract key features in each test case according to a plurality of the first test cases or the second test cases;
[0138] A seventh processing module, used for converting the key features into feature vectors;
[0139] An eighth processing module, used for calculating the similarity between test cases using a cosine similarity algorithm;
[0140] A ninth processing module is used to delete duplicate test cases or test cases with high similarity in the first test case or the second test case by using the similarity.
[0141] Optionally, the device in the present application further includes:
[0142] a tenth processing module, configured to perform at least one of the following functional operations on the first test case or the second test case:
[0143] Test case prioritization;
[0144] Add test cases;
[0145] Delete test cases;
[0146] Modify test cases;
[0147] Store test cases and record their version information.
[0148] Among them, the implementation embodiments of the above-mentioned test case generation method based on business map are applicable to the embodiments of the test case generation device based on business map, and can also achieve the same technical effect.
[0149] A readable storage medium of an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the test case generation method based on the business map as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0150] The processor is the processor in the test case generation method based on the business map described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0151] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0152] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present application. Therefore, the present application should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present application will be perfect and complete, and the scope of the present application will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "comprising" and / or "including" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0153] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A test case generation method based on business map, characterized in that: include: Get the business mind map of business products; Segment the business mind map into multiple business functions; Generate a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library; According to the first instruction engineering solution and the preset large language model, a plurality of first test cases for the business product are generated.
2. The method according to claim 1, characterized in that Get a business mind map of your business products, including: Obtaining business demand information and corresponding business processes of the business products; Determine the business attribute information of the business product generated by each node in the business process; According to the business attribute information corresponding to each node, a business mind map of the business product is obtained.
3. The method according to claim 1, characterized in that The business mind map is segmented into multiple business functions, including: Determine the business presentation methods at different levels of the business mind map according to the business process corresponding to the business mind map; According to the complexity corresponding to the business presentation mode, select the target business presentation mode with the lowest complexity; According to the target business presentation method, the business mind map is segmented according to different pages and functions to determine multiple business functions; the business functions are saved in the form of pictures, and each of the business functions has clear boundaries and independent functions.
4. The method according to claim 1, characterized in that: According to the plurality of business functions and the preset instruction engineering template library, a first instruction engineering solution is generated, including: Obtain the business requirements, application scenarios and test point dimensions of the business product; By utilizing the business requirements, the application scenarios and the test point dimensions, target instructions corresponding to the business functions are selected from the preset instruction engineering template library for writing, and the corresponding first instruction engineering solution is generated.
5. The method according to claim 1, characterized in that After generating a test case for the business product according to the instruction engineering solution and the preset large language model, the method further includes: By modifying the map presentation method or reducing the levels in the map, the business mind map is re-segmented to generate a target mind map; Generate a second instruction engineering solution by using the target map and the preset instruction engineering template library; According to the second instruction engineering solution and the preset large language model, a plurality of new second test cases for the business product are generated.
6. The method according to claim 5, characterized in that The method further comprises: Extracting key features in each test case according to the first test cases or the second test cases; Converting the key features into feature vectors; Use the cosine similarity algorithm to calculate the similarity between test cases; Using the similarity, delete the test cases that are repeated or have high similarity in the first test case or the second test case.
7. The method according to claim 5, characterized in that The method further comprises: Perform at least one of the following functional operations on the first test case or the second test case: Test case prioritization; Add test cases; Delete test cases; Modify test cases; Store test cases and record their version information.
8. A test case generation device based on a business map, characterized in that: include: Acquisition module, used to acquire the business mind map of business products; A first determination module is used to segment the business mind map and determine it into multiple business functions; A first processing module, configured to generate a first instruction engineering solution according to the plurality of business functions and a preset instruction engineering template library; The second processing module is used to generate a plurality of first test cases for the business product according to the first instruction engineering solution and a preset large language model.
9. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.