Automatic software test case generation method and system based on language AI large model

Through the software test case automatic generation system based on the language AI big model, the problems of low efficiency and quality assurance of automotive software test case generation have been solved, and efficient and accurate test case generation has been achieved in complex testing scenarios of smart cars, reducing dependence on manpower and ensuring the adaptability and quality of test cases.

CN120670305APending Publication Date: 2025-09-19CHERY AUTOMOBILE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510777429.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the existing technology, the efficiency of generating automotive software test cases is low and the quality cannot be guaranteed. In particular, it is difficult to achieve efficient and accurate test case generation in the complex testing scenarios of smart cars.

Method used

A software test case automation generation system based on a language AI big model is adopted, including a task analysis and scheduling module, a test design execution module, a test design merging module and a test case output module. Through a multi-agent collaborative system architecture, full-link closed-loop management of task analysis and scheduling, test design generation, test design correction and test case output is realized.

Benefits of technology

It achieves efficient, accurate and intelligent test case generation, which can break through the limitations of traditional single language models, meet the efficiency, compliance and traceability requirements in complex testing scenarios of smart cars, reduce dependence on manpower and ensure the adaptability and quality of test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670305A_ABST
    Figure CN120670305A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile software testing, and discloses a software test case automatic generation method and system based on a language AI large model, and the method comprises the steps: extracting a position path, a function name and a test design direction content from user input information, generating a configuration file through a preset Prompt template, and calling the AI large model to interpret the user intention. Function, performance and regulation analysis tasks are split, an AI large model is utilized to integrate information, test design analysis is carried out, classification and redundant content cutting are carried out, self-check evaluation is completed, a formatted Markdown test design file is generated and then converted into a mind map, an engineer checks the mind map, manual modification and optimization are carried out according to needs, and the method is simple and convenient. The modified mind map is converted into a Markdown file, a formatted test case file is generated, the difference of the Markdown file before and after modification is compared through an AI large model, a Prompt template is updated, according to the method, the test case can be efficiently generated, manpower dependence is reduced, and therefore the adaptability of the test case is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automotive software testing technology, and specifically to a method and system for automatically generating software test cases based on a language AI big model. Background Art

[0002] With the accelerated advancement of automotive intelligence, the proportion of automotive software functions within the overall vehicle system continues to rise, and their complexity is also increasing. This forces software testing teams to invest significant manpower, often even resorting to outsourcing, to meet stringent automotive software quality milestones. Currently, automotive software testing primarily involves two tasks: software test case generation and test case execution. The traditional automotive industry approach is to manually author test cases, then automatically execute and provide feedback to test engineers. While this approach improves the efficiency of test case execution, test case generation and authoring remain inefficient, and test case quality relies heavily on the individual test engineer and team organizational skills, making it difficult to ensure. While using large language AI models to directly generate test cases from rule-based technical documents can improve software testing efficiency, it presents numerous challenges. Firstly, due to limitations in the maturity and technical capabilities of the large language AI models themselves, the quality of the rule text, and the automated test case generation and execution systems, test case quality cannot be reliably guaranteed. Errors in any link in the entire chain can hinder convergence of final test results, leading to increased time and cost. On the other hand, this method is currently mainly applicable to vertical classification fields with clear input specifications, simple scenarios, and single and clear expected results, such as fault identification and analysis, or unit testing in development and design, and has not yet been applied to the field of smart car software functional testing. Summary of the Invention

[0003] In response to the shortcomings of the existing technology, the present invention provides a method for automatically generating software test cases based on a language AI large model, which has the advantages of clear and comprehensive logic, high efficiency, low cost and strong applicability, and solves the problems of low test case conversion efficiency and inability to guarantee test case quality in the existing technology.

[0004] To achieve the above-mentioned object, the present invention provides the following technical solutions: a software test case automatic generation system based on a language AI big model, comprising a task analysis and scheduling module, a test design execution module, a test design merging module, and a test case output module; The task analysis and scheduling module is used for users to multimodally input the location path, name and test design direction information of the vehicle function description document; through the preset Prompt template, the user input information is integrated to generate a Prompt configuration file; the preset language AI big model is called to interpret the user intention in the Prompt configuration file, split and generate Prompt files for function, performance, and regulatory analysis tasks, and trigger the test design execution module to enter the corresponding task branch tool; its tasks also include, after the final version of the test design Markdown is generated (the Markdown here is the output of the test design output module), calling the preset AI big model, comparing the differences between the user-modified Markdown file and the originally generated Markdown file (the Markdown here is the output product of the test design merge module), and updating the preset Prompt template.

[0005] The test design execution module is used to call the language AI large model and search tool preset for functions, performance, and regulations based on the task prompt configuration file input by the task analysis and scheduling module, retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements information from the input function description file and designated channels, execute the test design generation task based on the extracted and retrieved information, and check and correct the generated content; The test design merging module is used to call the preset language AI large model to carry out the test design integration tasks of function, performance, and regulations. Specific operations include classification, redundant pruning, self-inspection and evaluation, and generating formatted Markdown test design files for storage. The tool is then used to convert the Markdown files into mind maps for storage. The test case output module corrects errors and optimizes the mind map when problems arise; calls a tool to convert the mind map into a Markdown file, stores it in a specified path, and generates a formatted test case file; Preferably, the task analysis and scheduling module has built-in user-defined prompt templates for functions, performance and regulations, and supports optimization and iteration of prompt templates.

[0006] Preferably: the task analysis and scheduling module supports calling the language AI large model to analyze user multimodal input, and triggers the calling of the test design execution module, the test design merging module, and the test case output module to enter the corresponding task branch tool.

[0007] Preferably, the language AI large model preset in the task analysis and scheduling module adopts the strong reasoning model built into the ChatGTP or DeepSeek tool, and is called according to the preset functional scenario.

[0008] Preferably: the test design execution module is internally configured with a functional test design branch tool, a performance test design branch tool, a regulatory test design branch tool and a test design inspection branch tool, and supports expansion.

[0009] Preferably: the test design execution module supports receiving function, performance and regulation prompt files, and calls the AI ​​big model of the corresponding task branch tool to output function, performance and regulation Markdown files in the specified corresponding format.

[0010] Preferably: the test design execution module presets each test design branch tool to a strong generation AI model, which adopts the series of models built into the ChatGTP and KIMI tools, and each design branch tool also presets an AI model with search and analysis capabilities, specifically the series of models built into the ChatGTP and KIMI tools.

[0011] Preferably: the test design merging module is configured with a Markdown file merging tool and a Markdown file and mind map file conversion tool. The module supports merging functional, performance and regulatory Markdown files, while removing redundant and repeated branches of Markdown files. The module also supports conversion between Markdown files and mind map files.

[0012] Preferably, the test case output module is configured with a Markdown file parsing and test case output tool, and supports outputting itemized test case formatted files.

[0013] A method for automatically generating software test cases based on a language AI large model, comprising the following steps: S1. The user multimodally inputs the location path, name, and test design direction of the vehicle function description document. The user input information is integrated into a preset Prompt template to generate a Prompt configuration file. The preset language AI model is called to interpret the user intent in the Prompt configuration file and split it into Prompt files for function, performance, and regulatory analysis tasks. S2. Based on the analyzed user intent, the AI ​​model and search function based on the preset language of functions, performance, and regulations are called to retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements from the input function description file and designated channels; S3. Call the language AI model preset for functions, performance, and regulations, integrate the input function design, search and screening results, conduct test design analysis for functions, performance, and regulations, perform classification, eliminate redundancy, complete self-inspection and evaluation, generate a formatted Markdown test design file, and then call the tool to convert the Markdown file into a mind map; S4. When problems arise, modify the errors and optimize the mind map; call the tool to convert the mind map into a Markdown file and generate a formatted test case file; call the preset AI large model, compare the differences between the Markdown file generated by the user's modified mind map and the original Markdown file, and update the preset Prompt template.

[0014] Compared with the existing technology, the present invention provides a method for automatically generating software test cases based on a language AI large model, which has the following beneficial effects: The present invention provides a software test case automatic generation system based on a language AI large model. By establishing a task analysis and scheduling module, a test design execution module, a test design merging module and a test case output module, an innovative system architecture for multi-agent collaboration is created to build a full-link closed-loop system for task analysis and scheduling, task requirement collection, test design generation, test design correction, test design review feedback, test design optimization, test case output, prompt reflection and self-evolution, thereby achieving efficient, accurate and intelligent test case generation and management, and organically integrating dynamic task allocation, dynamic prompt template management, regulatory retrieval and integration, real-time tool calling and feedback, intelligent reflection and self-criticism, long-term and short-term memory management and visual output technology, so that the test case generation process can not only break through the limitations of the traditional single language model, but also achieve three-dimensional accurate coverage of function / performance / regulatory requirements, and continuously optimize prompt templates through an intelligent evolution mechanism, which can meet the multiple requirements of efficiency, compliance and traceability in complex testing scenarios of smart cars.

[0015] The method flow of the present invention can realize the automatic generation of software test cases, improve the generation efficiency, and thus reduce the dependence on manpower. At the same time, through the inspection of engineers and the self-optimization of the model, the adaptability of the test cases is guaranteed, and the coverage of the test design is expanded in an automated manner, including the regulatory compliance and quality assurance dimensions. Through the rational use of the AI ​​big model, the test design ability requirements for the test engineers are reduced, so as to quickly improve the generation efficiency of the test design and use cases. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Schematic diagram of the system structure for automatically generating software test cases based on a language AI big model in an embodiment of the present invention; Figure 2 Schematic diagram of a task analysis and scheduling module in an embodiment of the present invention. Figure 3 The figure is a flow chart of a method for automatically generating software test cases based on a language AI big model in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0018] See Figure 1 and Figure 2 , the present invention provides a software test case automatic generation system based on a language AI big model, characterized by comprising a task analysis and scheduling module 1, a test design execution module 2, a test design merging module 3 and a test case output module 4; The task analysis and scheduling module is used for users to multimodally input the location path, name, and test design direction information of the vehicle function description document. It integrates the user input information through a preset Prompt template to generate a Prompt configuration file. It calls the preset language AI big model to interpret the user intent in the Prompt configuration file, splits and generates Prompt files for function, performance, and regulatory analysis tasks, and triggers the test design execution module to enter the corresponding task branch tool. Its tasks also include calling the preset AI big model after the final version of the test design Markdown is generated (the Markdown here is the output of the test design output module), comparing the differences between the user-modified Markdown file and the originally generated Markdown file (the Markdown here is the output product of the test design merge module), and updating the preset Prompt template. The test design execution module is used to call the language AI large model and search tool preset for functions, performance, and regulations based on the task prompt configuration file input by the task analysis and scheduling module, retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements information from the input function description file and designated channels, execute the test design generation task based on the extracted and retrieved information, and check and correct the generated content; The test design merging module is used to call the preset language AI large model to carry out the test design integration tasks of function, performance, and regulations. Specific operations include classification, redundant pruning, self-inspection and evaluation, and generating formatted Markdown test design files for storage. The tool is then used to convert the Markdown files into mind maps for storage. Through the above system, the present invention can realize the automatic generation of software test cases, improve the generation efficiency, and reduce the dependence on manpower. At the same time, through the inspection of engineers and the self-optimization of modules, the adaptability of test cases is ensured.

[0019] The task analysis and scheduling module has built-in user-defined prompt templates for functions, performance and regulations, and supports automatic optimization and iteration of prompt templates.

[0020] The task analysis and scheduling module supports the call of the language AI large model to analyze user input and triggers the call of the test design execution module to enter the corresponding task branch tool. The language AI large model preset in the task analysis and scheduling module is a strong inference model built into the ChatGTP and DeepSeek tools. It has multiple options and is called according to preset functional scenarios. By achieving millisecond-level task allocation through the central task analysis and scheduling module, this invention reduces the time and labor costs of task allocation to improve the efficiency of task execution, thereby solving the limitations of the single language model and the drawbacks of real-time interactivity in traditional technologies.

[0021] The test design execution module internally configures functional test design branch tools, performance test design branch tools, regulatory test design branch tools and test design inspection branch tools, and supports extensions.

[0022] The test design execution module supports receiving function, performance and regulatory prompt files, and calls the AI ​​big model of the corresponding task branch tool to output function, performance and regulatory Markdown files in the specified format.

[0023] The test design execution module pre-configures each test design branch tool as a strong generative AI model, a series of models built into the ChatGTP and KIMI tools. Each design branch tool also pre-configures an AI model with search and analysis capabilities, a series of models built into the ChatGTP and KIMI tools. By innovatively designing regulatory test design branch tools, we enable intelligent retrieval and differential integration of regulations across Europe, the US, and China, thereby improving the accuracy of regulatory requirements documents and filling gaps in existing technical regulatory processing capabilities.

[0024] The test design merging module features a Markdown file merging tool and a Markdown file to mind map file conversion tool. This module supports merging functional, performance, and regulatory Markdown files, while removing redundant and duplicate branches from Markdown files. It also supports conversion between Markdown files and mind map files. By innovatively designing the test design merging module's Markdown file to mind map file conversion tool, test designs are converted into structured mind maps, improving the manageability of complex test scenarios and addressing the technical shortcomings of existing CN patents in visual output.

[0025] The test case output module is equipped with Markdown file parsing and test case output tools, and supports the output of itemized test case formatted files.

[0026] This invention introduces an AI model with search and analysis capabilities to realize real-time information retrieval tool calls, which can promptly respond to changes in task requirements. It innovatively designs a three-level reflection mechanism (AI self-inspection + manual acceptance + template evolution) to improve the quality of test cases and requirement coverage, providing a reliable test guarantee base for the V-shaped development model of smart cars.

[0027] The present invention innovates the system architecture of multi-agent collaboration by establishing a task analysis and scheduling module, a test design execution module, a test design merging module and a test case output module, so as to construct a full-link closed-loop system of task analysis and scheduling, task requirement collection, test design generation, test design correction, test design review feedback, test design optimization, test case output, prompt reflection and self-evolution, thereby realizing efficient, accurate and intelligent test case generation and management, and organically integrating dynamic task allocation, dynamic prompt template management, regulatory retrieval and integration, real-time tool calling and feedback, intelligent reflection and self-criticism, long-term and short-term memory management and visual output technology, so that the test case generation process can not only break through the limitations of the traditional single language model, but also achieve three-dimensional accurate coverage of function / performance / regulatory requirements, and continuously optimize the prompt template through the intelligent evolution mechanism, which can meet the multiple requirements of efficiency, compliance and traceability in complex testing scenarios of smart cars.

[0028] See Figure 3 , a method for automatically generating software test cases based on a language AI large model, comprising the following steps: User input specified information: The user multi-modally inputs the location path, name, and test design direction information of the vehicle function description document; Generate Prompt configuration file: Automatically integrate user input information through the preset Prompt template to generate a Prompt configuration file; Split and generate task prompt files: Call the preset language AI model to interpret the user intent in the prompt configuration file, and split and generate prompt files for function, performance, and regulatory analysis tasks; Information retrieval: Based on the analyzed user intent, the AI ​​model and search function based on the preset language of functions, performance, and regulations are called to retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements from the input function description file and designated channels; Test design analysis and document generation: Call the AI ​​model with preset functions, performance, and regulations, integrate the input function design, search and filter results, conduct test design analysis of functions, performance, and regulations, perform classification, eliminate redundancies, complete self-inspection and evaluation, generate a formatted Markdown test design file, and then call the tool to convert the Markdown file into a mind map; Engineers check and optimize mind maps: check mind maps, and when problems exist, manually modify errors and optimize mind maps; Generate test case files: call the tool to convert the mind map into a Markdown file and generate a formatted test case file; Update Prompt template: Call the preset AI large model, compare the differences between the Markdown file generated by the user's modified mind map and the original Markdown file, and update the preset Prompt template.

[0029] The above method is implemented through the system module, specifically: Task Analysis and Scheduling Module 1: As an agent for analyzing task scheduling and coordination, its core responsibility is to achieve full-process intelligent management of complex tasks through a multi-level collaborative mechanism. Specifically, it analyzes user needs and identifies task types and key parameters, breaking down tasks into ordered subtask chains based on dependency relationships; dynamically generates prompt instructions and integrates historical knowledge to optimize content; coordinates and schedules different AI agents in the test design and execution module to perform requirement retrieval, use case generation, and review tasks, and monitors execution status and data flow in real time; triggers iterative rectification through feedback mechanisms, optimizes task context management in combination with short-term / long-term memory systems, and simultaneously utilizes tool calls and self-reflection mechanisms to continuously improve task execution efficiency and resource allocation strategies. Test design execution module: Test design execution module 2 is connected to task analysis and scheduling module 1. Test design execution module 2 completes the full process management of test design tasks through multi-agent collaboration according to the prompt text transmitted by task analysis and scheduling module 1; Test design merging module: The test design merging module 3 is connected to the task analysis and scheduling module 1. The test design merging module 3 integrates and optimizes multi-source test cases according to the prompt text passed by the task analysis and scheduling module 1. The multi-source file merging module receives functional, performance, and regulatory test cases (all in Markdown format) from different inspection modules, uses natural language processing technology to perform structured analysis, automatically merges similar branches, retains different branches, detects conflicts and generates reports, and finally outputs a unified integrated Markdown document. Subsequently, the redundancy removal and optimization module performs semantic similarity analysis and logical dependency analysis on the integrated document, removes redundant descriptions, standardizes the description language based on the historical template library, and outputs a streamlined Markdown document. Next, the Markdown to mind map module converts the streamlined document into a mind map file, supporting hierarchical mapping, visual generation, and dynamic synchronization. Users can reverse modify nodes and synchronize them to the original document in real time. Finally, the mind map to Markdown module converts the user-modified mind map file back to a standardized Markdown document, restores the format and performs consistency verification, and finally outputs it to the task analysis and scheduling module. Test case output module: The test case output module 4 is connected to the task analysis and scheduling module 1. The test case output module 4, according to the prompt text passed by the task analysis and scheduling module 1, processes the test case outline output by the task execution module through Markdown file parsing, item processing, formatting optimization and final output management, and converts it into a Markdown format test case file that complies with the specifications, ensures that the file is correctly saved or uploaded to the specified location, and feeds back the results to the task analysis and scheduling module 1.

[0030] Specifically, in view of the limitations of the single language model in the existing technology, which can only handle simple task allocation and demand analysis, and cannot realize the full-process intelligent management of complex tasks and multi-agent collaborative optimization, in this embodiment, efficient task allocation and dynamic task scheduling are achieved through the task analysis and scheduling module 1; the task analysis and scheduling module 1 can accurately analyze user needs, identify cross-regional regulatory constraints, task types and key parameters, and dynamically decompose them into ordered sub-task chains with priorities based on semantic analysis and task dependencies, while integrating historical knowledge optimization content to generate accurate Prompt instructions.

[0031] The test design execution module 2 starts the multi-agent collaborative network of the functional test design branch tool, the performance test design branch tool, the regulatory test design branch tool, and the test design inspection branch tool in accordance with the Prompt instruction passed by the task analysis and scheduling module 1. After the functional test design branch tool receives the task input, the task input and parsing module parses the task content, the task execution module directly executes the test task, the memory management module is responsible for updating and managing the intermediate results and memory, and finally outputs the functional test design Markdown; the performance test design branch tool receives the task and parses the task content through the task input and parsing module, and then the performance retrieval module searches for relevant performance requirements. The task execution module executes the test design generation task according to the parsing results and performance requirements, and updates and manages the intermediate results and memory through the memory management module, and finally outputs the performance test design Markdown. The regulatory test design branch tool specializes in cross-regional regulatory retrieval and integration, and simultaneously calls the EU UNECE regulatory library and the US SAE standard library. And China GB national standard library, implement multi-source regulatory retrieval and alignment of difference clauses; parse tasks through task input and parsing module, retrieve regulatory requirements through regulatory retrieval module, integrate and process regulatory requirements through regulatory integration module, and execute tasks according to the integrated regulatory requirements, and finally output regulatory test design Markdown; test design inspection branch tool, receive and parse tasks through task input and parsing module, use test case outline inspection module to verify test case coverage, logical rigor and accuracy of requirements based on requirement coverage matrix, and then output inspection results, feedback and modification suggestions through feedback generation and suggestion module, and use memory management module to record intermediate results and update memory to optimize subsequent task processing and improve the quality and efficiency of test design.

[0032] The Test Design Merge Module 3 uses natural language processing technology to perform semantic-level merging of multi-source test cases, automatically merging similar branches while retaining divergent ones. It also uses a conflict detection algorithm to automatically eliminate redundant entries and generate a difference-preserving report. Subsequently, the Redundancy Pruning Optimization Module performs semantic similarity and logical dependency analysis on the merged documents, prunes redundant descriptions, and standardizes the description language based on a historical template library.

[0033] Based on a structured processing pipeline, the test case output module 4 converts the optimized test plan into a standard document format. Through automated path detection and version traceability mechanisms, it ensures the integrity and traceability of the output files, thereby forming a closed-loop testing system covering the entire V-shaped development process of smart cars, and realizing full-process intelligent management of complex tasks and multi-agent collaborative optimization.

[0034] During the implementation process, the above test case generation and management system is mainly deployed in computer equipment. The generation and management system can be integrated into the existing continuous integration tool framework and connected to the original file management system.

[0035] In the specific implementation of this application, Figure 2 As shown in Figure 1, the task analysis and scheduling model includes: The task parsing and requirement analysis module 5 is connected to the task decomposition and sub-goal generation module 6 and the user input interface respectively. The task parsing and requirement analysis module outputs the parsed task requirements (task type, key parameters, etc.) to the task decomposition and sub-goal generation module according to the user's original input (natural language request); The task decomposition and sub-goal generation module 6 is connected to the task parsing and requirement analysis module 5, the dynamic prompt generation and management module 7, and the task allocation and coordination module 8 respectively. The task decomposition and sub-goal generation module outputs sub-task chain information to the dynamic prompt generation and management module according to the analysis results of the task parsing and requirement analysis module, and outputs the sub-task chain and dependency relationship to the task allocation and coordination module. The dynamic prompt generation and management module is connected to the task decomposition and sub-goal generation module, the task allocation and coordination module, and the memory management module. The dynamic prompt generation and management module outputs the filled prompt templates (such as the regulation retrieval prompt and the function use case generation prompt) to the task allocation and coordination module based on the sub-task chain information (from the task decomposition and sub-goal generation module) and the long-term memory data (from the memory management module). Task allocation and coordination module 8, which is connected to dynamic prompt generation and management module 7, feedback processing and dynamic adjustment module 9, tool call decision and execution module 10, memory management module 12, and reflection and self-optimization module 11. The task allocation and coordination module assigns subtasks to each AI agent (such as AI Agent Y / X / A) based on the input of subtask chains and dependencies (from the task decomposition and sub-goal generation module) and prompt templates (from the dynamic prompt generation and management module), outputs task execution results and status to the memory management module, and transmits review results to the feedback processing and dynamic adjustment module; The memory management module connects to the task allocation and coordination module, the dynamic prompt generation and management module, the tool call decision and execution module, and the reflection and self-optimization module. Based on the current task's intermediate results and rectification information (from the task allocation and coordination module), tool execution results (from the tool call decision and execution module), and optimization strategies (from the reflection and self-optimization module), the memory management module outputs updated long-term memory (such as user preferences and high-frequency regulatory keywords) to the dynamic prompt generation and management module. The feedback processing and dynamic adjustment module is connected to the task allocation and coordination module and the memory management module respectively. Based on the review results (such as "missing low-temperature test cases") transmitted by the task allocation and coordination module, the feedback processing and dynamic adjustment module triggers the rectification process (such as regenerating test cases) to the task allocation and coordination module and outputs the rectification information to the memory management module. The tool call decision and execution module is connected to the task allocation and coordination module and the memory management module respectively. The tool call decision and execution module returns the tool execution results (such as the original text of the regulatory provisions) to the task allocation and coordination module according to the tool call requirements (such as search API) input from the task allocation and coordination module, and records the tool usage status to the memory management module; Reflection and self-optimization module, the reflection and self-optimization module is connected to the task allocation and coordination module and the memory management module respectively. The reflection and self-optimization module outputs the optimized task allocation strategy (such as reducing redundant retrieval) to the task allocation and coordination module according to the input of task execution process data (time consumption, resource occupancy, etc.) transmitted by the task allocation and coordination module, and records the optimization history to the memory management module.

[0036] In a specific embodiment of the present application, the test design execution module includes: a functional test design branch tool, a performance test design branch tool, a regulatory test design branch tool, and a test design check branch tool.

[0037] Functional test design branching tools include: The task input and parsing module is connected to the task analysis and scheduling module 1 and the task execution module respectively. The task input and parsing module inputs the task instruction of the task analysis and scheduling module 1 and outputs the parsed task details to the task execution module; The task execution module is connected to the task input and parsing module and the task analysis and scheduling module 1 respectively. The task execution module outputs the generated test case outline to the task analysis and scheduling module 1 according to the task input and parsing result of the parsing module; The memory management module is connected to the task input and analysis module and the task execution module respectively. The memory management module inputs the intermediate results and tool execution results of the current task and outputs the updated long-term memory to the task input and analysis module.

[0038] Performance test design branching tools include: The task input and parsing module is connected to the task analysis and scheduling module 1 and the performance retrieval module respectively. The task input and parsing module inputs the task instructions of the task analysis and scheduling module 1 and outputs the parsed task details to the performance retrieval module; The performance retrieval module is connected to the task input and parsing module and the task execution module respectively. The performance retrieval module outputs the retrieved performance requirement information to the task execution module according to the task input and the parsing result of the parsing module; The task execution module is connected to the performance retrieval module and the task analysis and scheduling module 1 respectively. The task execution module outputs the performance requirement document and the performance test case outline to the task analysis and scheduling module 1 according to the performance requirement input of the performance retrieval module; The memory management module is connected to the performance retrieval module and the task execution module respectively. The memory management module outputs the updated long-term memory to the task input and analysis module according to the intermediate results and retrieval data input.

[0039] Regulatory Test Design Branching Tools include: The task input and parsing module is connected to the task analysis and scheduling module 1 and the regulations retrieval module respectively. The task input and parsing module inputs the task instructions of the task analysis and scheduling module 1 and outputs the parsed task details to the regulations retrieval module; The regulations retrieval module is connected to the task input and parsing module and the regulations integration and execution module respectively. The regulations retrieval module is input according to the task input and the parsing result of the parsing module, and outputs the retrieved regulatory requirement information to the regulations integration and execution module; The regulatory integration execution module is connected to the regulatory retrieval module and the task analysis and scheduling module 1 respectively. The regulatory integration execution module outputs the regulatory requirements document and the regulatory test case outline to the task analysis and scheduling module 1 according to the regulatory requirements input of the regulatory retrieval module; The memory management module is connected to the regulations retrieval module and the regulations integration execution module respectively. The memory management module outputs the updated long-term memory to the task input and analysis module according to the intermediate results and retrieval data input.

[0040] Test design check branch tools include: The task input and parsing module is connected to the task analysis and scheduling module 1 and the test case outline checking module respectively. The task input and parsing module follows the inspection instruction input of the task analysis and scheduling module 1 and outputs the parsed inspection task details to the test case outline checking module; The test case outline checking module is connected to the task input and analysis module and the feedback generation and suggestion module respectively. The test case outline checking module outputs the checking results to the feedback generation and suggestion module according to the test case outline input; The feedback generation and suggestion module is connected to the test case outline inspection module and the task analysis and scheduling module 1 respectively. The feedback generation and suggestion module inputs the inspection results and outputs modification suggestions to the task analysis and scheduling module 1; The memory management module is connected to the test case outline checking module and the feedback generation and suggestion module respectively. The memory management module outputs the updated long-term memory to the task input and analysis module according to the intermediate results and inspection data input.

[0041] In a specific embodiment of the present application, the test design merging module includes: The multi-source file merging module is connected to the task analysis and scheduling module 1 and the redundancy removal and optimization module respectively. Based on the input of the functional test case (Markdown), performance test case (Markdown), and regulatory test case (Markdown) from the task analysis and scheduling module 1, it performs structured parsing, logical merging, and conflict detection, and outputs the integrated unified Markdown test document to the redundancy removal and optimization module. The redundancy removal and optimization module is connected to the multi-source file merging module and the Markdown to mind map module. It integrates the Markdown document input and outputs a streamlined Markdown test document to the Markdown to mind map module through semantic similarity analysis, logical dependency analysis and template optimization processing. The Markdown to Mind Map module connects to the Redundancy Removal and Optimization module and the external test management repository. It takes a streamlined Markdown document as input, and outputs a mind map file to the external test management repository through hierarchical parsing, visual generation, and dynamic synchronization. The mind map to Markdown module is connected to the external user upload warehouse and the task analysis and scheduling module 1 respectively. According to the external mind map file input, it outputs a standardized Markdown document to the task analysis and scheduling module 1 through node parsing, format restoration and consistency verification.

[0042] In a specific embodiment of the present application, the test case output module includes: The Markdown file parsing module is connected to the task analysis and scheduling module 1 and the test case entry module. Based on the test case outline (including detailed information of functional / performance / regulatory test cases) input by the task analysis and scheduling module 1, the module parses the outline into a Markdown text structure and formats the hierarchy / content, and then outputs a Markdown-formatted test case file draft to the test case entry module. The test case entry module is connected to the Markdown file parsing module and the test case formatting tool module respectively. It takes the test case file draft input passed by the Markdown file parsing module, converts the test case into standard entries, splits the complex logic processing, and outputs the test case text in the entry format to the test case formatting tool module. The test case formatting tool module is connected to the test case entry module and the test case output management module respectively. According to the test case text input passed by the entry module, it outputs the formatted Markdown test case file to the test case output management module through template format adjustment, keyword highlighting and syntax verification.

[0043] The test case output management module is connected to the test case formatting tool module and the external test management warehouse respectively. According to the final file input delivered by the formatting tool module, it outputs the final Markdown test case file to the designated storage location / external platform through file path management, unique identifier generation and platform upload processing. At the same time, it outputs the file saving status or upload confirmation information to the task analysis and scheduling module 1 through the result feedback mechanism.

[0044] The test case generation and management system provided above includes a task analysis and scheduling module 1, a test design execution module 2, a test design merging module 3 and a test case output module 4. Each module is interconnected through an interface to form a closed-loop feedback mechanism.

[0045] Example 1 (Overall Architecture of a Test Case Generation and Management System for a Large Language AI Model) System composition: including task analysis and scheduling module 1, test design execution module 2, test design merging module 3 and test case output module 4. Each module is interconnected through a data interface to form a closed-loop feedback mechanism. Task Analysis and Scheduling Module 1: The core control unit receives user natural language requests, identifies task types, key parameters, and dependencies through semantic analysis, dynamically breaks down tasks into ordered subtask chains, generates prompt instructions that integrate historical knowledge bases, coordinates multiple agents in Test Design and Execution Module 2 to execute subtasks in parallel, and monitors status in real time. Test Design and Execution Module 2: Generates a preliminary draft of test cases based on multi-agent collaboration. The functional test design branch tool receives instructions, parses requirements, and generates Markdown test case documents. The regulatory test design branch tool simultaneously calls the EU UNECE and Chinese GB regulatory API interfaces and generates cross-regional compliance test items through a difference clause alignment algorithm. Test Design Merger Module 3: Integrate and optimize multi-source test cases. The multi-source file merge module performs structural analysis on Markdown files for functional, performance, and regulatory test cases, using a semantic similarity algorithm to merge similar entries, retaining divergent branches, detecting conflicts, and generating reports. The redundancy pruning optimization module uses the LDA topic model to identify redundant descriptions and prunes invalid test cases based on the logical dependency graph. Test case output module 4: Standardizes the output of test case documents, parses the merged Markdown document into an entry structure, automatically adds version identification and traceability code through the template engine, outputs it to the test management platform, and feeds back the file hash value to the task analysis and scheduling module 1 for audit.

[0046] Example 2 (Dynamic Optimization Mechanism of Task Analysis and Scheduling Module) Feedback processing and dynamic adjustment module: When the test design check branch tool feedback issues (such as missing test cases required by specific regulations), it generates correction prompt instructions; Reflection and self-optimization module: Statistics of historical task data, automatic optimization strategies, such as establishing a local cache library of regulations to reduce the frequency of API calls, and pre-generating knowledge graphs for high-frequency search terms. Example 3 (Cross-platform visualization and collaboration of test cases) Markdown to mind map module: maps Markdown title levels to mind map nodes, generates mind map files, and supports node color marking; Mind map reverse synchronization: When the user adds a new node in the mind map, the system automatically inserts the corresponding chapter in the Markdown document and triggers the version update of the test case output module 4. In a specific implementation, the dynamic prompt generation and task allocation strategy in the task analysis and scheduling module is replaced with a reinforcement learning driven model, and the task type, resource occupancy rate, historical execution success rate, etc. are defined as state variables to form the state space; the subtask splitting granularity, agent selection priority, prompt template optimization direction, etc. constitute the action space; the reward function is constructed with task completion time, use case coverage, and conflict detection accuracy as optimization targets, and the scheduling model is trained by Q-learning or PPO algorithm to optimize the task allocation strategy in real time. By adaptively learning complex task patterns, we can reduce the cost of manual rule maintenance, dynamically balance the load of multiple agents, and improve execution efficiency in high-concurrency scenarios (actually measured task processing speed increased by 20%-30%). The task analysis and scheduling module has expanded its input methods, integrating an ASR (Automatic Speech Recognition) engine to support voice input. This allows it to recognize flowcharts or tables in requirements documents (e.g., extracting test parameter tables from Excel using OCR) for image analysis, integrating multimodal features of text, speech, and images to understand requirements. By adapting to diverse user input habits, the requirements analysis coverage rate has increased by 35%, reducing the workload of manually organizing requirements documents, making it particularly suitable for agile development scenarios.

[0047] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A software test case automatic generation system based on language AI big model, characterized by: It includes task analysis and scheduling module, test design execution module, test design merging module and test case output module; The task analysis and scheduling module is used for users to multimodally input the location path, name, and test design direction information of the vehicle function description document; through the preset prompt template, the user input information is integrated to generate the prompt configuration file; Call the preset language AI model to interpret the user intent in the prompt configuration file, split and generate prompt files for functional, performance, and regulatory analysis tasks, and trigger the test design execution module to enter the corresponding task branch tool; The test design execution module is used to call the language AI large model and search tool preset for functions, performance, and regulations based on the task prompt configuration file input by the task analysis and scheduling module, retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements information from the input function description file and designated channels, execute the test design generation task based on the extracted and retrieved information, and check and correct the generated content; The test design merging module is used to call the preset language AI large model to carry out the test design integration tasks of function, performance, and regulations. Specific operations include classification, redundant pruning, self-inspection and evaluation, and generating formatted Markdown test design files for storage. The tool is then used to convert the Markdown files into mind maps for storage. Test case output module, when there are problems, correct errors and optimize mind maps; Call the tool to convert the mind map into a Markdown file, store it in the specified path, and generate a formatted test case file.

2. The software test case automatic generation system based on the language AI large model according to claim 1 is characterized by: The task analysis and scheduling module has built-in user-defined prompt templates for functions, performance and regulations, and supports dynamic prompt generation and prompt template optimization and iteration.

3. The software test case automatic generation system based on the language AI large model according to claim 2 is characterized by: The task analysis and scheduling module supports calling the language AI large model to analyze user multimodal input, coordinates the scheduling of the test design execution module, the test design merging module, and the test case output module to enter the corresponding task branch tool, and monitors the execution status and data flow in real time.

4. The software test case automatic generation system based on the language AI large model according to claim 3 is characterized by: The language AI large model preset in the task analysis and scheduling module adopts the strong reasoning model built into the ChatGTP or DeepSeek tool and is called according to predefined usage scenarios.

5. The software test case automatic generation system based on the language AI large model according to claim 1 is characterized by: The test design execution module is internally configured with a functional test design branch tool, a performance test design branch tool, a regulatory test design branch tool and a test design inspection branch tool, and supports extension.

6. The software test case automatic generation system based on the language AI large model according to claim 5 is characterized by: The test design execution module supports receiving function, performance and regulation prompt files, and calls the AI ​​big model of the corresponding task branch tool to output function, performance and regulation Markdown files in the specified format.

7. The software test case automatic generation system based on the language AI large model according to claim 6 is characterized by: The test design execution module presets each test design branch tool as a strong generation AI model. The strong generation AI model adopts the series of models built into the ChatGTP and KIMI tools, and each design branch tool also presets an AI model with search and analysis capabilities, specifically the series of models built into the ChatGTP and KIMI tools.

8. The software test case automatic generation system based on the language AI large model according to claim 1 is characterized by: The test design merging module is equipped with a Markdown file merging tool and a Markdown file and mind map file conversion tool. The module supports merging functional, performance and regulatory Markdown files, while removing redundant and repeated branches of Markdown files. The module also supports conversion between Markdown files and mind map files.

9. The software test case automatic generation system based on the language AI large model according to claim 1 is characterized by: The test case output module is equipped with a Markdown file parsing tool, a test case output tool, and a Markdown file and mind map file conversion tool, and supports the output of itemized test case formatted files.

10. A method for automatically generating software test cases based on a language AI large model, characterized in that: The following steps are involved: S1. The user multi-modally inputs the location path, name, and test design direction information of the vehicle function description document; the user input information is integrated through the preset prompt template to generate a prompt configuration file; Call the preset language AI model to interpret the user intent in the Prompt configuration file, and split and generate Prompt files for functional, performance, and regulatory analysis tasks; S2. Based on the analyzed user intent, the AI ​​model and search function based on the preset language of functions, performance, and regulations are called to retrieve function implementation and indicators, performance complaints and evaluations, and regulatory mandatory requirements from the input function description file and designated channels; S3. Call the language AI model preset for functions, performance, and regulations, integrate the input function design, search and screening results, conduct test design analysis for functions, performance, and regulations, perform classification, eliminate redundancy, complete self-inspection and evaluation, generate a formatted Markdown test design file, and then call the tool to convert the Markdown file into a mind map; S4. When there are problems, correct the errors and optimize the mind map; Call the tool to convert the mind map into a Markdown file and generate a formatted test case file; call the preset AI large model, compare the differences between the Markdown file generated by the user's modified mind map and the original Markdown file, and update the preset Prompt template.

Citation Information

Cited By

  • Vehicle performance test method and device, electronic equipment and storage medium

    CN121165696A

  • Test set construction method of large model system and electronic equipment

    CN121901113A