Test case generation method and device based on large model, storage medium and equipment

Through the test case generation method based on large models, requirement items are extracted, test cases are generated, verified and standardized, which solves the problems of manual dependence, time-consuming and labor-intensive and low-quality test cases in traditional methods, and achieves high efficiency, accuracy and standardization. test case generation.

CN119336647APending Publication Date: 2025-01-21BEIJING XUEDIRUANJIAN DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411620874.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

Traditional test case generation methods rely on manual labor, are time-consuming and labor-intensive, and are difficult to accurately understand and process complex demand documents, resulting in the generated test cases being unoriented and comprehensive, and the quality is uneven.

Method used

Using a large model-based test case generation method, the requirement items are extracted from the test requirement document through the requirement item extraction large model, test cases are generated using the use case generation large model, and the requirements checker is used to verify whether the test cases meet the preset requirement item test conditions. , and finally standardized through the use case specification large model.

Benefits of technology

It improves the efficiency and quality of test case generation, ensures the accuracy and comprehensiveness of test cases, reduces the time and cost of manual writing, and improves the consistency of test case format and presentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336647A_ABST
    Figure CN119336647A_ABST
Patent Text Reader

Abstract

The invention discloses a test case generation method and device based on a large model, a storage medium and computer equipment, and the method comprises the steps: obtaining a test demand document of a target application, carrying out the demand extraction of the test demand document through a demand extraction large model, and obtaining a demand corresponding to the test demand document; generating a test case based on the demand item through a case generation large model, and checking the test case based on the demand item through a demand checker to determine whether the test case meets a preset demand item test condition; and under the condition that the check result of the large demand check model is that the preset demand item test condition is met, standardizing the test case through a large case specification model to obtain a final test case corresponding to the target application. According to the invention, the generation efficiency and quality of the test case can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a test case generation method, device, storage medium and computer equipment based on a large model. Background Art

[0002] In the software development process, test case generation is a key link to ensure software quality. Traditional test case generation methods often rely on manual analysis of requirement documents and then manual writing of test cases. This method is not only time-consuming and laborious, but also prone to omissions or errors in test cases due to human factors, thus affecting test coverage and test results.

[0003] With the continuous development of artificial intelligence technology, some automated test case generation methods have begun to emerge. However, most of these methods are based on simple rule matching or template filling, which makes it difficult to accurately understand and process complex requirement documents, and the generated test cases often lack pertinence and comprehensiveness. In addition, after generating test cases, these methods often lack an effective inspection mechanism to verify whether the test cases meet the preset requirement test conditions, resulting in uneven quality of test cases. In addition, even if the generated test cases meet the requirements in terms of function, there may still be non-standard problems in format and expression. These problems not only affect the readability and maintainability of the test cases, but may also bring difficulties to subsequent test execution and defect location.

[0004] Therefore, traditional and existing automated test case generation methods often find it difficult to generate high-quality test cases when faced with complex and changing requirement documents, thus affecting the efficiency and effectiveness of software testing. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a test case generation method, apparatus, storage medium and computer equipment based on a large model, which helps to improve the efficiency and quality of test case generation.

[0006] According to one aspect of the present application, a test case generation method based on a large model is provided, comprising:

[0007] Obtain a test requirement document of a target application, extract requirement items from the test requirement document using a requirement item extraction macro model, and obtain requirement items corresponding to the test requirement document;

[0008] Generate a test case based on the requirement item by using a use case generation macro model, and check the test case based on the requirement item by using a requirement checker to determine whether the test case meets a preset requirement item test condition;

[0009] When the inspection result of the requirement inspection big model is that the preset requirement item test condition is met, the test case is standardized through the use case specification big model to obtain the final test case corresponding to the target application.

[0010] According to another aspect of the present application, a test case generation device based on a large model is provided, comprising:

[0011] Document acquisition module, used to obtain the test requirement document of the target application;

[0012] A requirement item extraction module, used to extract requirement items from the test requirement document through a requirement item extraction large model to obtain requirement items corresponding to the test requirement document;

[0013] A use case generation module, used to generate a test case based on the requirement items by using a use case generation macro model;

[0014] A test case checking module, used to check the test case based on the requirement item through a requirement checker to determine whether the test case meets the preset requirement item test condition;

[0015] The use case specification module is used to normalize the test case through the use case specification big model when the inspection result of the requirement inspection big model satisfies the preset requirement item test condition, so as to obtain the final test case corresponding to the target application.

[0016] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned test case generation method based on a large model is implemented.

[0017] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned large model-based test case generation method when executing the program.

[0018] By means of the above technical scheme, a test case generation method, device, storage medium and computer equipment based on a large model provided in the embodiment of the present application first extracts the requirements from the test requirement document of the target application through the large model of requirements extraction; then, the test case is generated according to these requirements using the large model of use case generation, and the test case is verified by the requirements checker whether it meets the preset test conditions of the requirements; after verifying that the test case meets the conditions, the large model of use case specification is used to normalize it to ensure that the test case meets the standard format and quality requirements. The embodiment of the present application can accurately understand the key information in the test requirement document through the large model of requirements extraction, thereby ensuring that the generation of test cases is based on accurate requirements, and can automatically generate test cases through the large model of use case generation, reducing the time and cost of manually writing test cases, and strictly checking the generated test cases through the requirements checker to ensure that the preset test conditions of the requirements are met, thereby improving the accuracy and comprehensiveness of the test cases, and in addition, the test cases are normalized through the large model of use case specification to ensure that the format and expression of the test cases meet the unified standards, thereby improving the efficiency and quality of test case generation, and providing strong support for software testing.

[0019] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 A schematic diagram of a flow chart of a test case generation method based on a large model provided in an embodiment of the present application is shown;

[0022] Figure 2 A schematic diagram of a flow chart of another method for generating test cases based on a large model provided in an embodiment of the present application is shown;

[0023] Figure 3 A structural schematic diagram of a test case generation device based on a large model provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0025] In this embodiment, a test case generation method based on a large model is provided. Figure 1 As shown, the method includes:

[0026] Step 101: Obtain a test requirement document of a target application, extract requirement items from the test requirement document using a requirement item extraction macro model, and obtain requirement items corresponding to the test requirement document.

[0027] The test case generation method based on the big model provided in the embodiment of the present application is helpful for generating test cases efficiently, accurately and in a standardized manner. The method mainly relies on four core components: a big model for extracting requirements, a big model for generating use cases, a requirement checker and a big model for specifying use cases. First, the test requirement document of the target application is obtained, and the test requirement document is deeply analyzed using the big model for extracting requirements to extract key requirements, which are the basis for the subsequent generation of test cases. The big model for extracting requirements can output the requirements corresponding to the test requirement document in the form of a list of requirements. The big model for extracting requirements can be obtained by fine-tuning the general big model. For example, a large number of documents containing clear descriptions of requirements are collected as training data, the data is cleaned, noise is removed, missing values ​​and outliers are resolved, data quality and consistency are ensured, and data conversion, such as standardization and normalization, is performed to meet the needs of model input. The general big model is trained using the preprocessed data so that the model can accurately extract the requirements in the document.

[0028] Step 102: Generate a test case based on the requirement item by using a use case generation model, and check the test case based on the requirement item by using a requirement checker to determine whether the test case meets a preset requirement item test condition.

[0029] In an embodiment of the present application, the use case generation large model automatically generates test cases based on the list of requirements, and these test cases are intended to cover all key requirements. The requirements checker then checks the generated test cases to ensure that they meet the preset requirements test conditions, such as checking the integrity of the test cases. If not, it may be necessary to return to step 102 for correction or regeneration. The use case generation large model can also be obtained by fine-tuning the general large model. For example, a large number of data sets containing requirements and corresponding test cases are collected, and the data are cleaned and converted to ensure data quality and format consistency. The general large model is trained using preprocessed data so that the model can generate test cases based on the requirements. The generation ability of the model is evaluated by comparing the generated test cases with the real test cases. The model is adjusted according to the evaluation results, such as introducing an attention mechanism, adjusting the generation strategy, etc., to improve the accuracy and comprehensiveness of the test cases.

[0030] Step 103: When the inspection result of the requirement inspection big model satisfies the preset requirement item test condition, the test case is standardized through the use case specification big model to obtain the final test case corresponding to the target application.

[0031] In an embodiment of the present application, for test cases that meet the test conditions of preset requirement items, the use case specification big model normalizes the test cases. Specifically, it may include unifying the format of test cases, standardizing the expression of test cases, ensuring the readability and maintainability of test cases, etc. After processing, the use case specification big model outputs the final test case corresponding to the target application. The use case specification big model can also be obtained by fine-tuning the general big model. For example, a large number of standardized test cases are collected as training data, and the data is cleaned and converted to ensure the consistency of data format and expression. Use the preprocessed data to train the model so that the model can recognize and normalize the format and expression of test cases.

[0032] By applying the technical solution of this embodiment, firstly, the requirement items are extracted from the test requirement document of the target application through the requirement item extraction big model; then, the test cases are generated according to these requirement items using the use case generation big model, and the test cases are verified by the requirement checker whether they meet the preset requirement item test conditions; after verifying that the test cases meet the conditions, the use case specification big model is used to normalize them to ensure that the test cases meet the standard format and quality requirements. The embodiment of the present application can accurately understand the key information in the test requirement document through the requirement item extraction big model, thereby ensuring that the generation of test cases is based on accurate requirement items, and can automatically generate test cases through the use case generation big model, reducing the time and cost of manually writing test cases, and strictly checking the generated test cases through the requirement checker to ensure that the preset requirement item test conditions are met, thereby improving the accuracy and comprehensiveness of the test cases, and in addition, the test cases are normalized through the use case specification big model to ensure that the format and expression of the test cases meet the unified standards, thereby improving the efficiency and quality of test case generation, and providing strong support for software testing.

[0033] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another test case generation method based on a large model is provided, such as Figure 2 As shown, the method includes:

[0034] Step 201, obtaining a test requirement document of a target application, wherein the test requirement document includes at least one copy, and each part of the content in the test requirement document includes a text format and / or a table format; based on the content format of each part of the content in the test requirement document, formatting each part of the content in the test requirement document, and based on each part of the content in the marked test requirement document and the format tag of each part of the content, generating a requirement content document containing multiple sections of content, wherein each section of content includes a format tag and a part of the content in the test requirement document.

[0035] In this embodiment, the test requirement document of the target application is first obtained. These documents include one or more copies and are in various formats, including text format and / or table format. The text format involves a description of natural language, while the table format contains structured data and information. In order to more effectively process and parse these documents, the various parts of the content in the test requirement document are then formatted, and corresponding format tags are added to each part of the content according to the specific format of the content (such as text or table) so as to accurately identify and parse the document content in subsequent steps. Based on the marked test requirement document, a demand content document containing multiple sections of content is obtained. Each section of content not only includes a part of the content in the original document, but also comes with a corresponding format tag to ensure that in subsequent steps, whether the content is text or table, it can be correctly understood and processed. The embodiment of the present application formats the test requirement document and generates a demand content document containing format tags. The method can more flexibly process document content in different formats and accurately distinguish different types of information such as text and table, which helps to improve the accuracy of information parsing and processing in subsequent steps. An example of a demand content document is as follows:

[0036] Text: Requirement content A;

[0037] Table: Requirement content B;

[0038] Text: Required content C.

[0039] Step 202: construct requirement item extraction prompt words based on the requirement content document and the requirement item extraction prompt word template, wherein the requirement item extraction prompt word template includes the text parsing methods of the text format and the table format and the requirement item extraction requirements.

[0040] In this embodiment, requirement item extraction prompt words are constructed based on the requirement content document and the requirement item extraction prompt word template. This template is a key intermediate tool, which contains text parsing methods for different formats (text and tables) and specific requirements for requirement item extraction. By applying this template, a set of targeted prompt words can be generated. These prompt words can guide the requirement item extraction big model to accurately extract key requirement items from the requirement content document. The requirement items are the core elements in the test requirement document, which are used to define key information such as the objectives, scope, and conditions of the test. By constructing requirement item extraction prompt words and using the requirement item extraction big model to extract requirement items, the embodiment of the present application can more efficiently identify key information in the test requirement document, which is faster and more accurate than traditional manual reading and analysis, and shortens the test preparation time.

[0041] Optionally, the requirement item extraction prompt word template also includes boundary information extraction requirements and / or abnormal test information extraction requirements; the requirement item extraction requirements are used to guide the requirement item extraction big model to determine the test requirements corresponding to each part of the content based on the analysis results of each part of the content, and determine the requirement items corresponding to the test requirements; the boundary information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve boundary tests, and determine the boundary requirement information corresponding to the requirement items; the abnormal test information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve abnormal tests, and determine the abnormal test requirement information corresponding to the requirement items.

[0042] In this embodiment, the requirement item extraction prompt word template not only includes the parsing method in text and table format and the basic requirement item extraction requirements, but also includes boundary information extraction requirements and abnormal test information extraction requirements. The boundary information extraction requirements are intended to guide the requirement item extraction large model to deeply analyze the test requirement document, especially those parts that may involve boundary testing. Boundary testing is a very important part of software testing, focusing on the behavior of the target application under extreme or boundary conditions. Through the boundary information extraction requirements, the large model can identify which requirement items need to be boundary tested and extract the corresponding boundary requirement information, which is crucial for designing test cases that can cover the boundary conditions of the system. Similar to the boundary information extraction requirements, the abnormal test information extraction requirements are also intended to guide the requirement item extraction large model to identify the parts of the test requirement document that may involve abnormal testing. Abnormal testing is intended to verify whether the behavior of the system meets expectations when encountering abnormal situations or erroneous inputs. Through this requirement, the large model can extract requirement items related to abnormal testing and obtain corresponding abnormal test requirement information, which is also very important for designing test cases that can simulate system abnormal situations. By introducing boundary information extraction requirements and abnormal test information extraction requirements, the embodiment of the present application can ensure that the generated test cases not only cover the basic test requirements, but also cover boundary conditions and abnormal situations, which helps to improve the comprehensiveness and coverage of test cases, so that the testing work can more comprehensively verify the functions and performance of the system. In addition, boundary testing and abnormal testing are important means to verify the robustness and reliability of the system. By extracting boundary requirement information and abnormal test requirement information, test cases that are closer to actual application scenarios and potential problems can be generated. These test cases can simulate the behavior of the system under extreme or abnormal conditions, thereby helping the development team to promptly discover and fix potential problems and improve the overall quality and stability of the system. In addition, with the help of the information in the requirement item extraction prompt word template, the requirement item extraction large model can more intelligently analyze and extract key information in the test requirement document. This not only reduces the time cost of manual reading and analysis of documents, but also improves the accuracy and efficiency of information extraction.

[0043] An example of a requirement item extraction prompt word template is as follows:

[0044] Role:

[0045] You are a software requirements understander.

[0046] Profile:

[0047] Please deeply understand the content of the requirements and output a list of requirements items.

[0048] Goals:

[0049] 1. The requirements are thoroughly understood and all requirements are fully covered.

[0050] 2. If the requirements are divided into modules, the requirement items should also be divided into modules, and the module division should be clear.

[0051] 3. Number the requirements.

[0052] 4. The requirements should also include content not given in the document, such as: network anomalies, boundary value conditions, interface data return anomalies, etc.

[0053] Skills:

[0054] 1. Have the knowledge and experience of an expert-level product manager.

[0055] 2. Be familiar with the common interaction flows of software interfaces.

[0056] 3. Be good at analyzing, extracting and summarizing the logical relationship of requirement documents.

[0057] 4. Be good at understanding and processing content in different formats such as paragraphs and csv. The content after "text" in the given requirements is paragraph content, and the content after "table" is text in csv format, using commas as delimiters. The first row contains column headers. The following is sample csv data:

[0058] Column label 1, Column label 2, Column label 3

[0059] Text 1, Text 2, Text 3

[0060] Text 4, Text 5, Text 6

[0061] Constraints:

[0062] 1. The structure is clear, the logic is correct, and the form is neat.

[0063] 2. Do not include any * characters in the output.

[0064] Work flow:

[0065] 1. Divide the modules according to the requirements document and deeply understand the functions within each module.

[0066] 2. Extract the logical relationship between each module and confirm all functions.

[0067] 3. List the requirements.

[0068] Output:

[0069] 1. Output in a list format of markdown code.

[0070] 2. Only return the markdown code, and other irrelevant information does not need to be returned.

[0071] The meanings of the prompt items in the prompt word template are as follows: Role: clarify the agent's responsibilities and identity. Profile: outline the agent's (big model) capabilities and requirements. Goals: set specific goals and expected results. Skills: strengthen the skills that the agent possesses. Constraints: set constraints. Work flow: provide steps and processes to guide the agent to complete the task. Output: define the final results and output.

[0072] Step 203: extract requirement items from the requirement content document based on the requirement item extraction prompt words through the requirement item extraction macro model to obtain requirement items corresponding to the test requirement document.

[0073] Optionally, the requirement item extraction macromodel is used to extract requirement items from the requirement content document based on the requirement item extraction prompt words to obtain requirement items corresponding to the test requirement document, including: parsing each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction macromodel, determining the test requirements for each part of the content based on the parsing results, analyzing the requirement items corresponding to the test requirements and the boundary requirement information involved, and outputting the requirement items and the boundary requirement information corresponding to the requirement items.

[0074] In the above embodiment, when the requirement item extraction prompt includes boundary information extraction requirements, the requirement item extraction large model will first parse each part of the content in the requirement content document according to the guidance in the requirement item extraction prompt, and determine the test requirements corresponding to each part of the content. These test requirements are the basis for the subsequent test case design. Then, the requirement item extraction large model will further analyze these test requirements, especially paying attention to whether they involve boundary testing. By applying the boundary information extraction requirements, the requirement item extraction large model can identify the requirement items related to boundary testing and extract the corresponding boundary requirement information in order to design test cases that can cover the boundary conditions of the system. Finally, the requirement item extraction large model will output these requirement items and their corresponding boundary requirement information to provide key input for subsequent steps.

[0075] Optionally, the requirement item extraction big model is used to extract requirement items from the requirement content document based on the requirement item extraction prompt words to obtain requirement items corresponding to the test requirement document, including: parsing each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction big model, determining the test requirements of each part of the content based on the parsing results, analyzing the requirement items corresponding to the test requirements and the abnormal test requirement information involved, and outputting the requirement items and the abnormal test requirement information corresponding to the requirement items.

[0076] In the above embodiment, similar to the analysis of boundary requirement information, the model will also pay attention to whether the test requirements involve abnormal testing when parsing the requirement content document. In the case where the requirement item extraction prompt includes abnormal test information extraction requirements, by applying the abnormal test information extraction requirements, the requirement item extraction large model can identify the requirement items related to abnormal testing and extract the corresponding abnormal test requirement information, which is helpful in designing test cases that can simulate system abnormalities. Similarly, the requirement item extraction large model will output these requirement items and their corresponding abnormal test requirement information to provide necessary support for subsequent steps.

[0077] In addition, when the requirement item extraction prompt word template includes boundary information extraction requirements and abnormal test information extraction requirements, step 203 can be integrated into the following description: through the requirement item extraction large model, based on the requirement item extraction prompt words (including text and table format parsing methods, requirement item extraction requirements, boundary information extraction requirements and abnormal test information extraction requirements), the various parts of the content in the requirement content document are parsed. Based on the parsing results, the requirement item extraction large model determines the test requirements corresponding to each part of the content, and analyzes whether these test requirements involve boundary tests or abnormal tests. For requirement items involving boundary tests, the model extracts the corresponding boundary requirement information; for requirement items involving abnormal tests, the model extracts the corresponding abnormal test requirement information. Finally, the requirement item extraction large model outputs all requirement items and their corresponding boundary requirement information and abnormal test requirement information, providing key input for the generation of subsequent test cases. By introducing requirement item extraction prompt words and corresponding parsing requirements, the embodiment of the present application can more accurately identify and understand the key information in the test requirement document, thereby improving the accuracy and comprehensiveness of requirement item extraction. By extracting boundary requirement information and abnormal test requirement information, test cases that are closer to actual application scenarios and potential problems can be generated, thereby improving the pertinence and effectiveness of test cases.

[0078] Step 204: construct a use case generation prompt word based on the requirement items and the use case generation prompt word template, wherein the use case generation prompt word template includes test case generation requirements and test case output form, and the test case output form includes annotating the requirement items corresponding to the test case; input the use case generation prompt word into the use case generation macro model to generate a test case based on the test case generation requirements through the use case generation macro model, and output the test case in the test case output form.

[0079] In this embodiment, a specific use case generation prompt word is constructed based on the previously extracted requirement items and use case generation prompt word template. This template provides clear guidance and requirements for the generation of test cases, ensuring that the generated test cases not only meet the test requirements, but also have a standardized output form. Among them, the test case generation requirements in the use case generation prompt word template represent the specific requirements that need to be followed when generating test cases, such as which requirements should be covered by the test case, how the test scenario should be designed, how the test data should be prepared, etc., to ensure that the generated test cases can fully and accurately reflect the test requirements. The test case output form in the use case generation prompt word template specifies the output format and standard of the test case, especially requiring the requirement items corresponding to each test case to be marked. The advantage of this is that the source and purpose of each test case can be clearly tracked, ensuring the traceability and verifiability of the test work. Further, based on the use case generation prompt word template, the use case generation prompt word is constructed in combination with specific requirement items, guiding the use case generation large model to generate test cases according to specific requirements and formats. The constructed use case generation prompt words are input into the use case generation large model. The use case generation large model will generate test cases based on these prompt words and built-in algorithm logic. These test cases will strictly follow the test case generation requirements and be presented in a specified output form. Finally, the use case generation large model will output a series of test cases that meet the requirements, and each test case will clearly mark its corresponding requirement items to facilitate subsequent test execution and result analysis. The embodiment of the present application can quickly and accurately generate test cases that meet the requirements and improve the efficiency of testing work by introducing the use case generation prompt word template and the use case generation large model.

[0080] An example of a use case generation prompt template is as follows:

[0081] Role:

[0082] You are a software test case generator.

[0083] Profile:

[0084] Please generate a mind map of software test cases for the requirements document and output it in markdown format. The format of the requirements document is not fixed, and you need to understand the content of the requirements first.

[0085] Goals:

[0086] 1. Thorough understanding of requirements and comprehensive coverage of test cases.

[0087] 2. The modules are clearly divided, and each use case contains the use case number, prerequisites, user interactions, expected results, and covered requirements.

[0088] 3. Includes functional testing, interface testing, and compatibility testing (if it is not involved in the document, compatibility testing can be omitted).

[0089] 4. For use cases with higher priority or importance, please mark them with P0, and P0 use cases should not exceed 30% of the total number of use cases. Others should be marked with P1, P2, or P3.

[0090] Skills:

[0091] 1. Familiar with common software testing methods.

[0092] 2. Be familiar with common methods of use case writing, including but not limited to equivalence class method, boundary value method, scenario design method, etc.

[0093] 3. Be good at analyzing, extracting and summarizing the logical relationship of requirement documents.

[0094] Constraints:

[0095] Do not include any * characters in the output.

[0096] Work flow:

[0097] 1. Confirm the functional points and divide the test points according to the requirement document.

[0098] 2. Write forward and reverse test cases based on the test points.

[0099] Output:

[0100] 1. Output in a list format of markdown code.

[0101] 2. Only return the markdown code, and other irrelevant information does not need to be returned.

[0102] Step 205: Check the test case based on the requirement item by a requirement checker to determine whether the test case meets the preset requirement item test condition.

[0103] Optionally, the requirement checker includes a requirement item coverage checker; step 205 includes: traversing the test case through the requirement item coverage checker, checking the covered requirement items in the requirement items that are hit by the requirement items marked in the test case, and determining the requirement item coverage corresponding to the test case based on the number of covered requirement items and the number of requirement items; if the requirement item coverage is greater than or equal to a preset requirement item coverage threshold, determining that the test case meets the requirement item coverage test condition, wherein the preset requirement item test condition includes the requirement item coverage test condition; if the requirement item coverage is less than the preset requirement item coverage threshold, adding the missed requirement items to the requirement pool, and continuing to generate new test cases based on the requirement pool through the use case generation large model until the obtained test case meets the requirement item coverage test condition.

[0104] In this embodiment, the requirement coverage checker traverses the test cases to check whether they cover all the requirements. The requirement coverage checker will check the test cases one by one and record the requirements marked by the test cases. These hit requirements are called covered requirements. Then, the checker will calculate the requirement coverage corresponding to the test case based on the number of covered requirements and the total number of requirements, indicating how much proportion of requirements are covered by the test case. The preset requirement coverage threshold is used as the criterion for judging whether the test case is qualified. If the requirement coverage of the test case is greater than or equal to this threshold, then the test case is considered to meet the requirement coverage test condition. If the requirement coverage of the test case is lower than this threshold, then we think that the test case does not cover enough requirements and is unqualified. At this time, the missed requirements (i.e., those requirements that are not covered by the test case) are added to a requirement pool as the basis for subsequent generation of new test cases, and then the use case generation model is continued to be used to generate new test cases based on this requirement pool. This process will be repeated until the test cases we obtain can meet the requirement coverage test conditions, thereby improving the quality of the test cases.

[0105] Optionally, the requirement checker also includes a boundary coverage check model; step 205 also includes: constructing a boundary check prompt word based on the requirement item, the boundary requirement information, the test case and the boundary check prompt word template, wherein the boundary check prompt word template includes boundary item generation guidance information, boundary item check guidance information, and first new requirement item output guidance information; inputting the boundary check prompt word into the boundary coverage check model in the requirement checker, so that the boundary coverage check model generates guidance information according to the boundary item, generates boundary items corresponding to each requirement item based on each requirement item and each boundary requirement information, and generates guidance information based on the requirement items marked in the test case and the corresponding boundary items of each boundary item. The requirement item determines the first test case to be checked corresponding to each boundary item, and identifies whether the first test case to be checked meets the boundary test requirement of the corresponding boundary item according to the boundary item check guidance information; if the coverage of the boundary items that meet the boundary test requirement for all boundary items is greater than or equal to the preset boundary item coverage threshold, it is determined that the test case meets the boundary item coverage test condition; otherwise, the boundary item that does not meet the boundary test requirement is constructed as the first new requirement item according to the guidance information output by the first new requirement item; the first new requirement item is added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation large model until the obtained test case meets the boundary item coverage test condition.

[0106] In this embodiment, a boundary check prompt word is constructed based on a requirement item, boundary requirement information, a test case, and a boundary check prompt word template. This template includes three key parts: boundary item generation guide information, boundary item check guide information, and first new requirement item output guide information. The boundary item generation guide information is used to guide how to generate corresponding boundary items based on the requirement item and the boundary requirement information. The boundary item check guide information provides guidance for checking whether the test case meets the boundary test requirements. The first new requirement item output guide information defines how to construct these unsatisfied boundary items into new requirement items when the test case does not meet the boundary test requirements. The constructed boundary check prompt word is input into the boundary coverage check large model in the requirement checker. The model first generates guide information based on the boundary item, and generates corresponding boundary items based on each requirement item and each boundary requirement information. Then, the model determines which test cases correspond to which boundary items according to the requirement items marked in the test case, forming a first set of test cases to be checked. Then, the model checks the boundary item check guide information one by one to check whether these test cases to be checked meet the boundary test requirements of the corresponding boundary items. If the coverage of the boundary items that meet the boundary test requirements to all boundary items is greater than or equal to the preset boundary item coverage threshold, then the test case is considered to meet the boundary item coverage test conditions. If the coverage is lower than this threshold, then it is considered that the test case does not cover enough boundary items. At this time, it is necessary to output guidance information based on the first new requirement item, and construct those boundary items that do not meet the boundary test requirements as the first new requirement item. Add these first new requirement items to a requirement pool, and then continue to use the use case generation large model to generate new test cases based on this requirement pool. This process can be repeated until the obtained test case can meet the boundary item coverage test conditions. The embodiment of the present application can more accurately evaluate the coverage of the test case on the boundary requirements by introducing the boundary check prompt word template and the boundary coverage check large model, thereby improving the boundary coverage of the test case, making the test case generation method more perfect, and being able to more comprehensively cover the system's requirement items and boundary requirements, and improving the quality and efficiency of the testing work.

[0107] An example of a bounds check hint template is as follows:

[0108] Role:

[0109] You are a test case edge case checker.

[0110] Profile:

[0111] You have extensive experience in software testing, especially in boundary value analysis and test case design. You are familiar with various testing methods and strategies, and can identify potential edge cases and evaluate the coverage of existing test cases.

[0112] Goals:

[0113] 1. Check the boundary conditions involved in each requirement item and generate a list of boundary items.

[0114] 2. Check whether the boundary items have been covered by existing test cases. If uncovered boundary conditions are found, output them as new requirement items.

[0115] 3. When the requirements involve numerical values, it is necessary to consider the impact of "greater than, equal to, or less than" the value.

[0116] Skills:

[0117] 1. Boundary value analysis.

[0118] 2. Equivalence class division method.

[0119] 3. Test case design.

[0120] 4. Requirements analysis.

[0121] 5. Logical reasoning.

[0122] 6. Attention to details.

[0123] Constraints:

[0124] 1. The * character is not required in the text.

[0125] 2. It is necessary to comply with test case design methods such as equivalence class partitioning and boundary value analysis.

[0126] 3. You can only perform analysis based on the provided requirements and test cases.

[0127] 4. You need to complete the analysis within a reasonable time and cannot go into detail indefinitely.

[0128] Work flow:

[0129] 1. Receive requirements and test cases.

[0130] 2. Perform boundary value analysis on each requirement item, identify potential boundary conditions, and generate a list of boundary items.

[0131] 3. Check whether existing test cases cover these edge cases.

[0132] 4. For uncovered edge cases, generate new requirements and output them.

[0133] Output:

[0134] 1. A list of all boundary items and a list of uncovered boundary items.

[0135] 2. Output in a list format of markdown code.

[0136] 3. Only return the markdown code, and other irrelevant information does not need to be returned.

[0137] Optionally, the requirement checker also includes an exception coverage check big model, and step 205 also includes: constructing an exception check prompt word based on the requirement item, the exception test requirement information, the test case and the exception check prompt word template, wherein the boundary check prompt word template includes exception item generation guidance information, exception item inspection guidance information, and second new requirement item output guidance information; inputting the exception check prompt word into the exception coverage check big model in the requirement checker, so that the exception coverage check big model generates guidance information according to the exception item, generates an exception item corresponding to the requirement item based on the requirement item and the exception test requirement information, and generates a second new requirement item output guidance information based on the requirement item and the exception item marked in the test case. Determine the second test case to be checked corresponding to each abnormal item according to the corresponding requirement item, identify whether the second test case to be checked meets the abnormal test requirement of the corresponding abnormal item according to the abnormal item check guidance information, if the coverage rate of the abnormal items that meet the abnormal test requirement for all abnormal items is greater than or equal to the preset abnormal item coverage threshold, determine that the test case meets the abnormal item coverage test condition, otherwise, construct the abnormal items that do not meet the abnormal test requirement as the second new requirement item according to the second new requirement item output guidance information; add the second new requirement item to the requirement pool, and continue to generate new test cases based on the requirement pool through the use case generation large model until the obtained test cases meet the abnormal item coverage test condition.

[0138] In this embodiment, an abnormality check prompt word is constructed based on the requirement items, abnormal test requirement information, test cases and abnormality check prompt word template. This template includes three key parts: abnormality item generation guidance information, abnormality item check guidance information, and second new requirement item output guidance information. The abnormality item generation guidance information is used to guide how to generate corresponding abnormal items based on the requirement items and abnormal test requirement information. These abnormal items represent abnormal situations or error scenarios that the system may encounter. The abnormality item check guidance information provides guidance for checking whether the test case meets the abnormal test requirements, including how to simulate abnormal conditions, how to verify the system's handling of abnormalities, etc. The second new requirement item output guidance information defines how to construct these unsatisfied abnormal items into new requirement items when the test case does not meet the abnormal test requirements. Input the constructed abnormality check prompt words into the abnormality coverage check model in the requirement checker. The model first generates guidance information based on the abnormal items, and generates corresponding abnormal items based on the requirement items and abnormal test requirement information. Then, the model will determine which test cases correspond to which abnormal items based on the requirement items marked in the test case, forming a second set of test cases to be checked. Then, the model checks the guidance information based on the abnormal items, and checks whether these test cases to be checked meet the abnormal test requirements of the corresponding abnormal items one by one. If the coverage rate of the abnormal items that meet the abnormal test requirements for all abnormal items is greater than or equal to the preset abnormal item coverage threshold, then the test case is considered to meet the abnormal item coverage test conditions. If the coverage rate is lower than this threshold, then it is considered that the test case does not cover enough abnormal items. At this time, it is necessary to output guidance information based on the second new requirement item, and construct those abnormal items that do not meet the abnormal test requirements as the second new requirement item. For the constructed second new requirement items, they represent the inadequately tested abnormal situations or error scenarios that the system may encounter. These second new requirement items are added to a requirement pool, and then the use case generation large model is used to generate new test cases based on this requirement pool. This process can be repeated until the obtained test cases can meet the abnormal item coverage test conditions. By introducing the abnormality check prompt word template and the abnormality coverage check large model, we can more accurately evaluate the coverage of the test cases for the abnormal test requirements, thereby improving the abnormal coverage of the test cases. The embodiment of the present application can ensure that the system can work normally under various abnormal situations by continuously generating new test cases to meet the abnormal item coverage test conditions, thereby improving the robustness of the system.

[0139] An example of an abnormal inspection prompt word template is as follows:

[0140] Role:

[0141] You are a test case exception checker.

[0142] Profile:

[0143] You have extensive experience in software testing, and are particularly good at identifying and handling various abnormal situations, such as network disconnection, weak network, interface errors, empty data, etc.

[0144] Goals:

[0145] 1. List all exceptions involved in the requirements.

[0146] 2. Check whether each exception item has been covered by the test case.

[0147] 3. For uncovered exception items, generate new requirement items.

[0148] Skills:

[0149] 1. Be familiar with various abnormal situations and their impact on software functions.

[0150] 2. Ability to quickly identify coverage in test cases.

[0151] 3. Have the ability to generate detailed and clear new requirements.

[0152] Constraints:

[0153] 1. You can only perform analysis based on the provided requirements and test cases.

[0154] 2. You need to complete the inspection and generate new requirements within a limited time.

[0155] 3. Output in the format of requirement items.

[0156] Work flow:

[0157] 1. Receive and understand requirements and test cases.

[0158] 2. List all possible exceptions to the requirements.

[0159] 3. Check if the test cases cover every exception situation.

[0160] 4. For uncovered exceptions, generate new requirements.

[0161] 5. Output the results, including the covered exceptions and new requirements.

[0162] Output:

[0163] 1. A full list of exception items and a list of uncovered exception items.

[0164] 2. Output in a list format of markdown code.

[0165] 3. Only return the markdown code, and other irrelevant information does not need to be returned.

[0166] Step 206: De-redundancy processing is performed on the test cases marked with the same requirement items, de-duplication processing is performed on each test case, and format standard processing is performed on the remaining test cases to obtain the final test cases corresponding to the target application through the use case specification large model.

[0167] In this embodiment, a series of optimization and normalization processes are performed on the test cases using the use case specification large model. First, de-redundancy processing is performed on the test cases marked with the same requirement items. This is because in the actual test process, multiple test cases for the same requirement item may be generated, and there may be a large number of repeated contents or test steps between these test cases. The purpose of de-redundancy processing is to find these repeated test cases and retain one of them as a representative, thereby reducing the number of test cases and improving test efficiency. Next, all test cases are de-duplicated. The goal of de-duplication processing is to ensure that each test case is unique, that is, there are no two or more test cases with exactly the same content or too high similarity. Once a duplicate test case is found, it can be deleted and only one unique version is retained. Finally, the remaining test cases are formatted and standardized to ensure that all test cases follow the same format and standards, thereby facilitating subsequent test execution and result analysis. After the above-mentioned de-redundancy processing, de-duplication processing and format specification processing, a final test case set for the target application can be obtained, which is not only less in number and higher in quality, but also has a unified format and is easy to understand and execute.

[0168] By applying the technical solution of this embodiment, the comprehensiveness and accuracy of test cases are improved. By refining the analysis of requirement items, deeply covering boundary and exception test requirements, and removing redundant and repeated test cases, it is ensured that test cases are neither missed nor redundant. At the same time, the standardized format processing of test cases further improves their readability and execution efficiency, provides great convenience for test execution and result analysis, and ultimately promotes the overall efficiency and quality of testing work, and enhances the reliability of the software and user satisfaction.

[0169] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a test case generation device based on a large model, such as Figure 3 As shown, the device comprises:

[0170] Document acquisition module, used to obtain the test requirement document of the target application;

[0171] A requirement item extraction module, used to extract requirement items from the test requirement document through a requirement item extraction large model to obtain requirement items corresponding to the test requirement document;

[0172] A use case generation module, used to generate a test case based on the requirement items by using a use case generation macro model;

[0173] A test case checking module, used to check the test case based on the requirement item through a requirement checker to determine whether the test case meets the preset requirement item test condition;

[0174] The use case specification module is used to normalize the test case through the use case specification big model when the inspection result of the requirement inspection big model satisfies the preset requirement item test condition, so as to obtain the final test case corresponding to the target application.

[0175] Optionally, the test requirement document includes at least one copy, and each part of the content in the test requirement document includes a text format and / or a table format; the document acquisition module is further used to: based on the content format of each part of the content in the test requirement document, format mark each part of the content in the test requirement document, and based on each part of the content in the marked test requirement document and the format tag of each part of the content, generate a requirement content document containing multiple sections of content, wherein each section of content includes a format tag and a part of the content in the test requirement document;

[0176] Correspondingly, the requirement item extraction module is also used to: construct requirement item extraction prompt words based on the requirement content document and the requirement item extraction prompt word template, wherein the requirement item extraction prompt word template includes the text parsing methods of the text format and the table format respectively and the requirement item extraction requirements; extract requirement items from the requirement content document based on the requirement item extraction prompt words through the requirement item extraction big model to obtain the requirement items corresponding to the test requirement document.

[0177] Optionally, the use case generation module is further used to:

[0178] Based on the requirement items and the use case generation prompt word template, construct a use case generation prompt word, wherein the use case generation prompt word template includes test case generation requirements and a test case output form, and the test case output form includes annotating the requirement items corresponding to the test case;

[0179] The use case generation prompt words are input into the use case generation macromodel, so as to generate test cases based on the test case generation requirements through the use case generation macromodel, and output the test cases in the test case output form.

[0180] Optionally, the requirement item extraction prompt word template also includes boundary information extraction requirements and / or abnormal test information extraction requirements; the requirement item extraction requirements are used to guide the requirement item extraction big model to determine the test requirements corresponding to each part of the content based on the analysis results of each part of the content, and determine the requirement items corresponding to the test requirements; the boundary information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve boundary tests, and determine the boundary requirement information corresponding to the requirement items; the abnormal test information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve abnormal tests, and determine the abnormal test requirement information corresponding to the requirement items.

[0181] Optionally, the requirement checker includes a requirement coverage checker; and the use case checking module is further used to:

[0182] Traversing the test case by the requirement item coverage checker, checking the coverage requirement items in the requirement items that are hit by the requirement items marked in the test case, and determining the requirement item coverage corresponding to the test case based on the number of the coverage requirement items and the number of the requirement items;

[0183] If the requirement item coverage is greater than or equal to a preset requirement item coverage threshold, determining that the test case meets the requirement item coverage test condition, wherein the preset requirement item test condition includes the requirement item coverage test condition;

[0184] If the requirement item coverage is less than the preset requirement item coverage threshold, the missed requirement items are added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation model until the obtained test cases meet the requirement item coverage test conditions.

[0185] Optionally, the requirement item extraction module is further used to:

[0186] Parsing each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction big model, determining the test requirements of each part of the content based on the parsing results, analyzing the requirement items corresponding to the test requirements and the boundary requirement information involved, and outputting the requirement items and the boundary requirement information corresponding to the requirement items;

[0187] Accordingly, the use case checking module is also used for:

[0188] Based on the requirement item, the boundary requirement information, the test case and the boundary check prompt word template, construct a boundary check prompt word, wherein the boundary check prompt word template includes boundary item generation guide information, boundary item check guide information, and first new requirement item output guide information;

[0189] Input the boundary check prompt word into the boundary coverage check large model in the requirement checker, so that the boundary coverage check large model generates guidance information according to the boundary item, generates boundary items corresponding to each requirement item based on each requirement item and each boundary requirement information, determines the first test case to be checked corresponding to each boundary item based on the requirement items marked in the test case and the requirement items corresponding to each boundary item, identifies whether the first test case to be checked meets the boundary test requirement of the corresponding boundary item according to the boundary item check guidance information, if the coverage rate of the boundary item that meets the boundary test requirement for all boundary items is greater than or equal to the preset boundary item coverage threshold, determines that the test case meets the boundary item coverage test condition, otherwise, outputs guidance information according to the first new requirement item to construct the boundary item that does not meet the boundary test requirement as the first new requirement item;

[0190] The first new requirement item is added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation large model until the obtained test cases meet the boundary item coverage test conditions.

[0191] Optionally, the requirement item extraction module is further used to: parse each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction large model, determine the test requirements of each part of the content based on the parsing results, analyze the requirement items corresponding to the test requirements and the abnormal test requirement information involved, and output the requirement items and the abnormal test requirement information corresponding to the requirement items;

[0192] Accordingly, the use case checking module is also used for:

[0193] Based on the requirement item, the abnormal test requirement information, the test case and the abnormal check prompt word template, construct an abnormal check prompt word, wherein the boundary check prompt word template includes abnormal item generation guide information, abnormal item check guide information, and second new requirement item output guide information;

[0194] Input the abnormality check prompt word into the abnormality coverage check large model in the requirement checker, so that the abnormality coverage check large model generates guidance information according to the abnormal item, generates the abnormal item corresponding to the requirement item based on the requirement item and the abnormal test requirement information, determines the second test case to be checked corresponding to each abnormal item based on the requirement item marked in the test case and the requirement item corresponding to each abnormal item, identifies whether the second test case to be checked meets the abnormal test requirement of the corresponding abnormal item according to the abnormal item check guidance information, if the coverage rate of the abnormal item that meets the abnormal test requirement to all abnormal items is greater than or equal to the preset abnormal item coverage threshold, determines that the test case meets the abnormal item coverage test condition, otherwise, outputs guidance information according to the second new requirement item to construct the abnormal item that does not meet the abnormal test requirement as the second new requirement item;

[0195] The second new requirement item is added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation large model until the obtained test cases meet the abnormal item coverage test condition.

[0196] Optionally, the use case specification module is also used to: deduplicate test cases marked with the same requirement items through the use case specification model, deduplicate each test case, and format the remaining test cases to obtain the final test cases corresponding to the target application.

[0197] It should be noted that for other corresponding descriptions of the functional units involved in the test case generation device based on a large model provided in the embodiment of the present application, reference can be made to Figure 1 to Figure 2 The corresponding description in the method will not be repeated here.

[0198] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0199] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0200] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0201] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0202] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0203] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0204] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0205] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A test case generation method based on a large model, characterized in that: The method comprises: Obtain a test requirement document of a target application, extract requirement items from the test requirement document using a requirement item extraction macro model, and obtain requirement items corresponding to the test requirement document; Generate a test case based on the requirement item by using a use case generation macro model, and check the test case based on the requirement item by using a requirement checker to determine whether the test case meets a preset requirement item test condition; When the inspection result of the requirement inspection big model is that the preset requirement item test condition is met, the test case is standardized through the use case specification big model to obtain the final test case corresponding to the target application.

2. The method according to claim 1, characterized in that The test requirement document includes at least one copy, and each part of the test requirement document includes a text format and / or a table format; after obtaining the test requirement document, the method further includes: Based on the content format of each part of the content in the test requirement document, format marking is performed on each part of the content in the test requirement document, and based on each part of the content in the marked test requirement document and the format label of each part of the content, a requirement content document containing multiple sections of content is generated, wherein each section of content includes a format label and a part of the content in the test requirement document; Accordingly, the requirement item extraction macromodel is used to extract requirement items from the test requirement document to obtain requirement items corresponding to the test requirement document, including: Based on the requirement content document and the requirement item extraction prompt word template, construct the requirement item extraction prompt word, wherein the requirement item extraction prompt word template includes the text parsing method of the text format and the table format respectively and the requirement item extraction requirements; The requirement item extraction macromodel is used to extract requirement items from the requirement content document based on the requirement item extraction prompt words to obtain requirement items corresponding to the test requirement document.

3. The method according to claim 2, characterized in that The step of generating a large model through use cases and generating test cases based on the requirement items includes: Based on the requirement items and the use case generation prompt word template, construct a use case generation prompt word, wherein the use case generation prompt word template includes test case generation requirements and a test case output form, and the test case output form includes annotating the requirement items corresponding to the test case; The use case generation prompt words are input into the use case generation macromodel, so as to generate test cases based on the test case generation requirements through the use case generation macromodel, and output the test cases in the test case output form.

4. The method according to claim 2, characterized in that: The requirement item extraction prompt word template also includes boundary information extraction requirements and / or abnormal test information extraction requirements; the requirement item extraction requirements are used to guide the requirement item extraction big model to determine the test requirements corresponding to each part of the content based on the analysis results of each part of the content, and determine the requirement items corresponding to the test requirements; the boundary information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve boundary tests, and determine the boundary requirement information corresponding to the requirement items; the abnormal test information extraction requirements are used to guide the requirement item extraction big model to analyze whether the test requirements involve abnormal tests, and determine the abnormal test requirement information corresponding to the requirement items.

5. The method according to claim 4, characterized in that The requirement checker includes a requirement item coverage checker; The checking the test case based on the requirement item by the requirement checker to determine whether the test case meets the preset requirement item test condition includes: Traversing the test case by the requirement item coverage checker, checking the coverage requirement items in the requirement items that are hit by the requirement items marked in the test case, and determining the requirement item coverage corresponding to the test case based on the number of the coverage requirement items and the number of the requirement items; If the requirement item coverage is greater than or equal to a preset requirement item coverage threshold, determining that the test case meets the requirement item coverage test condition, wherein the preset requirement item test condition includes the requirement item coverage test condition; If the requirement item coverage is less than the preset requirement item coverage threshold, the missed requirement items are added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation model until the obtained test cases meet the requirement item coverage test conditions.

6. The method according to claim 4, characterized in that The step of extracting requirement items from the requirement content document based on the requirement item extraction prompt words by using the requirement item extraction macro model to obtain requirement items corresponding to the test requirement document includes: Parsing each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction big model, determining the test requirements of each part of the content based on the parsing results, analyzing the requirement items corresponding to the test requirements and the boundary requirement information involved, and outputting the requirement items and the boundary requirement information corresponding to the requirement items; Accordingly, the checking of the test case based on the requirement item by the requirement checker to determine whether the test case meets the preset requirement item test condition includes: Based on the requirement item, the boundary requirement information, the test case and the boundary check prompt word template, construct a boundary check prompt word, wherein the boundary check prompt word template includes boundary item generation guide information, boundary item check guide information, and first new requirement item output guide information; Input the boundary check prompt word into the boundary coverage check large model in the requirement checker, so that the boundary coverage check large model generates guidance information according to the boundary item, generates boundary items corresponding to each requirement item based on each requirement item and each boundary requirement information, determines the first test case to be checked corresponding to each boundary item based on the requirement items marked in the test case and the requirement items corresponding to each boundary item, identifies whether the first test case to be checked meets the boundary test requirement of the corresponding boundary item according to the boundary item check guidance information, if the coverage rate of the boundary item that meets the boundary test requirement for all boundary items is greater than or equal to the preset boundary item coverage threshold, determines that the test case meets the boundary item coverage test condition, otherwise, outputs guidance information according to the first new requirement item to construct the boundary item that does not meet the boundary test requirement as the first new requirement item; The first new requirement item is added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation large model until the obtained test cases meet the boundary item coverage test conditions.

7. The method according to claim 4, characterized in that The step of extracting requirement items from the requirement content document based on the requirement item extraction prompt words by using the requirement item extraction macro model to obtain requirement items corresponding to the test requirement document includes: Parsing each part of the content in the requirement content document based on the requirement item extraction prompt words through the requirement item extraction big model, determining the test requirements of each part of the content based on the parsing results, analyzing the requirement items corresponding to the test requirements and the abnormal test requirement information involved, and outputting the requirement items and the abnormal test requirement information corresponding to the requirement items; Accordingly, the checking of the test case based on the requirement item by the requirement checker to determine whether the test case meets the preset requirement item test condition includes: Based on the requirement item, the abnormal test requirement information, the test case and the abnormal check prompt word template, construct an abnormal check prompt word, wherein the boundary check prompt word template includes abnormal item generation guide information, abnormal item check guide information, and second new requirement item output guide information; Input the abnormality check prompt word into the abnormality coverage check large model in the requirement checker, so that the abnormality coverage check large model generates guidance information according to the abnormal item, generates the abnormal item corresponding to the requirement item based on the requirement item and the abnormal test requirement information, determines the second test case to be checked corresponding to each abnormal item based on the requirement item marked in the test case and the requirement item corresponding to each abnormal item, identifies whether the second test case to be checked meets the abnormal test requirement of the corresponding abnormal item according to the abnormal item check guidance information, if the coverage rate of the abnormal item that meets the abnormal test requirement to all abnormal items is greater than or equal to the preset abnormal item coverage threshold, determines that the test case meets the abnormal item coverage test condition, otherwise, outputs guidance information according to the second new requirement item to construct the abnormal item that does not meet the abnormal test requirement as the second new requirement item; The second new requirement item is added to the requirement pool, and new test cases are continuously generated based on the requirement pool through the use case generation large model until the obtained test cases meet the abnormal item coverage test condition.

8. The method according to any one of claims 1 to 7, characterized in that The step of normalizing the test case through the use case specification macro model to obtain a final test case corresponding to the target application includes: The test cases marked with the same requirement items are de-redundanted through the use case specification large model, each test case is de-duplicated, and the remaining test cases are formatted in a standardized manner to obtain the final test cases corresponding to the target application.

9. A test case generation device based on a large model, characterized in that: The device comprises: Document acquisition module, used to obtain the test requirement document of the target application; A requirement item extraction module, used to extract requirement items from the test requirement document through a requirement item extraction large model to obtain requirement items corresponding to the test requirement document; A use case generation module, used to generate a test case based on the requirement items by using a use case generation macro model; A test case checking module, used to check the test case based on the requirement item through a requirement checker to determine whether the test case meets the preset requirement item test condition; The use case specification module is used to normalize the test case through the use case specification big model when the inspection result of the requirement inspection big model satisfies the preset requirement item test condition, so as to obtain the final test case corresponding to the target application.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.