Driving automation test case generation method and system based on large model

By using an automated test case generation method based on large models, the problems of time-consuming, labor-intensive, and inflexible traditional testing methods are solved, achieving efficient and accurate test case generation to meet complex software requirements.

CN120803939APending Publication Date: 2025-10-17BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510938528.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional testing methods are time-consuming and labor-intensive, rely on manual coding, and are difficult to guarantee the accuracy and comprehensiveness of test results. Traditional machine learning methods require a large amount of labeled data and lack flexibility, making it difficult to meet the testing needs of complex software systems.

Method used

An automated test case generation method based on a large model is adopted, including requirement document collection, preprocessing, feature extraction, model generation and optimization, to generate and store test cases. By leveraging the deep learning and reasoning capabilities of the large model, test cases that match the software requirements are intelligently generated.

Benefits of technology

It improves testing efficiency, reduces costs, enhances the maintainability and reusability of tests, supports complex testing scenarios, and improves the accuracy and reliability of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803939A_ABST
    Figure CN120803939A_ABST
Patent Text Reader

Abstract

The invention discloses a drive automation test case generation method and system based on a large model, and the method comprises the steps: collecting software demand information from a demand document, and carrying out the preprocessing of the collected information; analyzing the preprocessed demand text, and extracting demand feature data; transmitting the demand feature data to a large model, and generating test case related information; generating a complete test case; performing optimization processing on the test case to obtain an optimized test case; and storing the optimized test case in a case library. The test efficiency is improved, the test cost is reduced, the maintainability and reusability of the test are enhanced, a complex test scene is supported, and the accuracy and reliability of a test result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software automated testing, and in particular to a large model-based driving automated test case generation method and system. BACKGROUND

[0002] With the rapid development of the software industry, the complexity and size of software systems are increasing, and the traditional test case writing method has been difficult to meet the efficient and comprehensive testing needs.

[0003] The traditional manual testing method uses manual test case writing, which is not only time-consuming, labor-intensive, inefficient, and resource-consuming, but also easily affected by the experience and subjective factors of the tester, and the accuracy, reliability, comprehensiveness and pertinence of the test results are difficult to guarantee. Although some automated testing tools have appeared in recent years, when faced with complex software systems, the design and maintenance of test cases become a tedious and time-consuming task, and traditional machine learning methods require a large amount of labeled data and feature engineering, limiting their application in actual testing. These tools mostly rely on predefined templates or rules, lack sufficient flexibility and intelligence, and are difficult to effectively cope with complex and variable software requirements. SUMMARY

[0004] In view of the above problems, the present application is proposed in order to provide a large model-based driving automated test case generation method and system to overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of the present application, a large model-based driving automated test case generation method is provided, which comprises:

[0006] Collecting software requirement information from a requirement document and preprocessing the collected information;

[0007] Parsing the preprocessed requirement text and extracting requirement feature data;

[0008] Passing the requirement feature data to a large model to generate test case related information;

[0009] Generating a complete test case;

[0010] Optimizing the test case to obtain an optimized test case;

[0011] Storing the optimized test case in a case library.

[0012] Optionally, the collecting software requirement information from a requirement document and preprocessing the collected information specifically comprises:

[0013] Collecting software requirement information from a requirement document;

[0014] The collected information is pre-processed to eliminate format errors in the text, clean up irrelevant annotations and marks, and standardize the text.

[0015] Optionally, the pre-processed requirement text is parsed and requirement feature data is extracted, specifically including:

[0016] A natural language understanding algorithm, including a word vector model and a syntax analyzer, is used to parse the pre-processed requirement text.

[0017] Key requirement features are identified and extracted, and the requirement features are represented in a structured form.

[0018] Optionally, the identification and extraction of key requirement features specifically include function description, input and output parameters, business rules, and exception handling requirements.

[0019] Optionally, the requirement feature data is transmitted to the large model to generate test case related information, specifically including:

[0020] The requirement feature data is transmitted to the selected large model, and the large model is requested to generate test case related information through a specific interface.

[0021] The large model outputs test scenarios, test data suggestions, and preliminary expected results based on the knowledge and patterns obtained through training.

[0022] Optionally, the generation of complete test cases specifically includes:

[0023] Complete test cases are generated based on the large model output results and software testing standard processes.

[0024] The test target, input condition, execution step, and expected output of each test case are clearly defined.

[0025] Optionally, the optimization processing of the test cases to obtain optimized test cases specifically includes:

[0026] The generated test cases are optimized and processed to check for any duplication or similarity, and are combined or adjusted.

[0027] The correctness of the test cases is verified based on known software behavior and historical test data.

[0028] Optionally, the storage of the optimized test cases in the case library specifically includes:

[0029] The generated and optimized test cases are stored in the case library, and are classified and indexed according to software function modules and test types.

[0030] When the software requirement changes, the related test case is updated to ensure that the test case in the case library conforms to the latest requirement.

[0031] The application further provides a large model-based driving automatic test case generation system, which applies the large model-based driving automatic test case generation method.

[0032] A requirement collection and preprocessing module is used to collect software requirement information from a requirement document and pre-process the collected information.

[0033] A requirement analysis module is used to analyze the pre-processed requirement text and extract requirement feature data.

[0034] A model adaptation and interaction module is used to transmit the requirement feature data to a large model to generate test case related information.

[0035] A test case generation module is used to generate complete test cases.

[0036] A test case optimization and verification module is used to optimize the test cases to obtain optimized test cases.

[0037] A test case management and update module is used to store the optimized test cases into a case library.

[0038] The large model-based driving automatic test case generation method and system improve test efficiency, reduce test cost, enhance the maintainability and reusability of tests, support complex test scenarios, and improve the accuracy and reliability of test results.

[0039] The above description is only a summary of the technical solutions of the application, and the technical solutions can be implemented according to the content of the specification, and in order to make the above and other purposes, features and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS

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

[0041] Figure 1 A flowchart of a method for generating automated test cases for a driver based on a large model is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0043] The terms "comprises" and "comprising" and any variations thereof in the description, embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0044] The technical solution of the present invention is further described in detail below with reference to the accompanying drawings and embodiments.

[0045] The present invention provides a large-model-based demand-driven automated test case generation system and method. The system and method can automatically parse requirements, utilize the deep learning and reasoning capabilities of the large model, and intelligently generate test cases that are highly matched with software requirements, thereby significantly improving the efficiency and accuracy of software testing.

[0046] A large-model-based demand-driven automated test case generation system and method is developed based on the Spring Boot framework to ensure the stability and maintainability of the system.

[0047] The unified front-end communication system is designed and developed in accordance with the bank's financial operating system standards to ensure system compatibility and industry recognition.

[0048] A demand-driven automated test case generation system and method based on a large model simultaneously meets five unified requirements within the industry.

[0049] The application provides a demand-driven automatic test case generation system and method based on a large model, which mainly includes a demand acquisition and preprocessing module, a demand analysis module, a large model adaptation and interaction module, a test case generation module, a test case optimization and verification module, a test case management and update module, and the like. With the powerful language processing capability of the large model, the software demand is quickly analyzed and the test case is automatically generated, thereby reducing the time and cost of manually writing the test case and improving the test efficiency.

[0050] The system generates test cases based on a large model, and the main functions are:

[0051] Demand acquisition and preprocessing module:

[0052] Responsible for receiving software demand information from different sources (such as documents, user input, etc.).

[0053] Performing preprocessing operations such as format unification, grammar and spelling checking, etc. on the demand information, and converting it into a standardized text format for subsequent processing.

[0054] Demand analysis module:

[0055] Using natural language processing technology to deeply analyze the preprocessed demand text.

[0056] Extracting various features including functional requirements, performance requirements, data constraints, user interaction requirements, etc. and representing them as structured data.

[0057] Model adaptation and interaction module:

[0058] Selecting a suitable large model (such as a pre-trained and fine-tuned language model) and establishing an interaction interface with the large model.

[0059] Inputting the extracted demand feature data into the large model and receiving the preliminary information related to the test case output by the large model.

[0060] Test case generation module:

[0061] According to the preliminary information output by the large model, combining with specific rules, further refining and perfecting the test case content.

[0062] Generating complete test cases including test input data, expected output results, test steps, test environment configuration, etc.

[0063] Test case optimization and verification module:

[0064] Optimizing the generated test cases, such as removing redundancy, adjusting the test order to improve execution efficiency.

[0065] Verify the effectiveness and rationality of test cases by historical test data.

[0066] Test case management and update module:

[0067] Responsible for storing generated test cases, establishing an effective indexing and classification system, and facilitating query and use.

[0068] When software requirements change, update the relevant test cases in a timely manner to ensure that the test cases are consistent with the latest requirements.

[0069] Through the six core functions, the demand-driven automated test case generation system and method based on large models have the characteristics of improving test efficiency, reducing test cost, enhancing test maintainability and reusability, supporting complex test scenarios, and improving the accuracy and reliability of test results.

[0070] As shown in Figure 1 :

[0071] 1. Requirement collection and preprocessing step

[0072] Collect software requirement information from requirement documents.

[0073] Preprocess the collected information, such as eliminating format errors in the text, cleaning irrelevant comments and markers, and standardizing the text.

[0074] Requirement analysis module

[0075] Use natural language understanding algorithms such as word vector models and syntax analyzers to analyze the preprocessed requirement text.

[0076] Identify and extract key requirement features, including but not limited to function description, input and output parameters, business rules, and exception handling requirements, and represent these features in a structured form.

[0077] Model adaptation and interaction module

[0078] Pass the requirement feature data to the selected large model and request the large model to generate test case related information through a specific interface.

[0079] The large model outputs test scenarios, test data suggestions, and expected results based on the knowledge and patterns obtained through training.

[0080] Test case generation module

[0081] Generate complete test cases based on the large model output results and software test standard processes.

[0082] Clearly define the test goal, input condition, execution steps and expected output of each test case, ensure the operability and repeatability of the test case.

[0083] Test case optimization and verification module

[0084] Optimize the generated test cases, check if there are repeated or similar test cases, and merge or adjust them.

[0085] According to the known software behavior and historical test data, verify the correctness of the test case, and ensure that the test case can effectively detect the function and performance of the software.

[0086] Test case management and update module

[0087] Store the generated and optimized test cases into the case library, and classify and index them according to the software function modules, test types, etc.

[0088] When the software requirements change, re-execute the above steps, update the relevant test cases, and ensure that the test cases in the case library are consistent with the latest requirements.

[0089] Beneficial effects:

[0090] 1. Improve the efficiency of test case generation: with the powerful language processing ability of large model, quickly analyze software requirements and generate test cases, reduce the workload and time cost of manual writing.

[0091] 2, Enhance the comprehensiveness of test case coverage: large model can handle complex semantics and implicit logic, and the generated test cases can better cover various functions and scenarios of software, including boundary conditions and exception handling.

[0092] 3, Improve the adaptability to requirement changes: when the software requirements change, the system can quickly update the test cases, effectively reduce the maintenance cost, and ensure that the test work keeps pace with the continuous development of the software.

[0093] 4, Optimize the quality of test cases: through optimization and verification module, further improve the effectiveness and rationality of test cases, improve the quality and accuracy of software testing, and reduce the software quality problems caused by test case defects.

[0094] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for generating automated test cases based on a large model, characterized in that: The test case generation method comprises: Collect software requirement information from requirement documents and pre-process the collected information; Parse the preprocessed requirement text and extract requirement feature data; Passing the demand feature data to the big model to generate test case related information; Generate complete test cases; Optimizing the test case to obtain an optimized test case; The optimized test case is stored in a case library.

2. A method for generating automated test cases based on a large model according to claim 1, characterized in that: The collecting of software requirement information from the requirement document and preprocessing of the collected information specifically include: Collect software requirement information from requirement documents; The collected information is preprocessed to eliminate formatting errors in the text, clean up irrelevant comments and tags, and standardize the text.

3. The method for generating automated test cases based on a large model according to claim 1, characterized in that: The parsing of the pre-processed demand text and extracting demand feature data specifically includes: Use natural language understanding algorithms, including word vector models and grammatical analyzers, to parse preprocessed demand text; Identify and extract key demand features and express them in a structured form.

4. The method for generating automated test cases based on a large model according to claim 3, characterized in that: The identification and extraction of key demand features specifically include functional descriptions, input and output parameters, business rules, and exception handling requirements.

5. The method for generating automated test cases based on a large model according to claim 1, characterized in that: The step of transferring the demand feature data to the large model and generating test case related information specifically includes: Pass the required feature data to the selected big model, and request the big model to generate test case related information through a specific interface; Based on the knowledge and patterns obtained through training, the big model outputs test scenarios, test data recommendations, and preliminary content of expected results.

6. The method for generating automated test cases based on a large model according to claim 1, characterized in that: Generating a complete test case specifically includes: Generate complete test cases based on the large model output results and software testing standard process; Clarify the test objectives, input conditions, execution steps, and expected outputs for each test case.

7. The method for generating automated test cases based on a large model according to claim 1, characterized in that: Optimizing the test case to obtain the optimized test case specifically includes: Optimize the generated test cases, check whether there are duplicate or similar test cases, and merge or adjust them; Verify the correctness of test cases based on known software behavior and historical test data.

8. The method for generating automated test cases based on a large model according to claim 1, characterized in that: The step of storing the optimized test case in the case library specifically includes: Store the generated and optimized test cases in the case library, and classify and index them according to the dimensions of software functional modules and test types; When software requirements change, update the relevant test cases to ensure that the test cases in the case library are consistent with the latest requirements.

9. A large-model-based automated driving test case generation system, applying the large-model-based automated driving test case generation method according to any one of claims 1 to 8, characterized in that: The test case generation system includes: The requirements collection and preprocessing module is used to collect software requirements information from the requirements document and preprocess the collected information; Requirement parsing module, used to parse the pre-processed requirement text and extract requirement feature data; A model adaptation and interaction module is used to transmit the demand feature data to the big model and generate test case related information; Test case generation module, used to generate complete test cases; A test case optimization and verification module is used to optimize the test case to obtain an optimized test case; The test case management and update module is used to store the optimized test cases in the case library.