A large model and test simulation tool-based combined test method and system

CN122547671APending Publication Date: 2026-08-11SICHUAN RURAL COMMERCIAL UNITED BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

例如,对于同一接口在不同业务场景下应返回不同内容的情况,传统测试模拟无法基于请求意图自动推理,导致响应内容单一、缺乏灵活性

Benefits of technology

[0014]第一,本发明旨在解决现有接口模拟工具在参数配置复杂、响应内容生成缺乏智能性、场景覆盖不足等问题,提升测试模拟工具在测试过程中的自动化程度、智能化水平与可扩展性。该系统能够自动识别接口定义与参数结构,基于自然语言理解与语义推理能力,对接口的入参含义、字段约束及业务逻辑进行智能解析,并生成符合真实场景的模拟响应内容。同时,大模型可根据历史接口调用数据、上下文场景及测试目标动态生成不同类型的响应样本,实现多场景覆盖与高仿真度模拟,显著减少人工配置工作量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547671A_ABST
    Figure CN122547671A_ABST
Patent Text Reader

Abstract

A kind of test method based on the combination of large model and test simulation tool, for testing input file, the method comprises the following steps: S1, receiving interface description document and interface request message, and performing check to input file;S2, interface description document and interface request message are parameterized, and interface parameter configuration is generated;S3, according to interface parameter configuration and test target, intelligent generation simulation response content;S4, interface parameter configuration, response message and simulation scene generated are loaded to test simulation engine, and test simulation engine generates or matches corresponding response according to configuration, and returns to the output end of the file to be tested;And a kind of system based on large model and test simulation tool, the present application has the advantages of flexibility and coverage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of simulation testing technology, and in particular to a testing method and system based on a combination of large models and testing simulation tools. Background Technology

[0002] Traditional test simulation tools often require testers to manually configure request parameters one by one based on the interface documentation or sample requests when building simulated interfaces. For example, for interfaces with multi-level nested structures or complex objects, manually filling in and maintaining field information is not only tedious but also prone to errors. Once the interface structure is adjusted or fields are added or deleted, all related configurations must be manually updated. This approach is particularly inefficient in microservice architectures or multi-interface systems, severely restricting the rapid setup and iteration speed of test simulation environments. Existing test simulation tools mostly rely on fixed templates, rule mappings, or predefined scripts when generating response content, lacking the ability to dynamically generate responses based on interface semantics, business logic, or context. For example, for situations where the same interface should return different content in different business scenarios, traditional test simulation cannot automatically infer based on request intent, resulting in simplistic and inflexible response content. This not only affects the realism and coverage of the tests but also limits the further application of test simulation tools in intelligent testing systems. When the interface structure, field definitions, or business logic of the system under test changes, traditional test simulation solutions require manual modification of a large number of configuration files or script logic. For large-scale systems, the number of test simulation configuration files is enormous and their interdependencies are complex. Modifying one interface often triggers a chain of updates, resulting in extremely high maintenance costs. Furthermore, test simulation configurations are often inconsistent across different test environments, further increasing the complexity of management and maintenance, and impacting overall testing efficiency and accuracy. Summary of the Invention

[0003] The purpose of this invention is to provide a testing method and system based on a combination of large models and test simulation tools, which has the advantages of flexibility and coverage.

[0004] To achieve the above objectives, this invention provides a testing method combining a large model and a test simulation tool for testing input files. The method includes: Step S1, receiving an interface description document and an interface request message, and performing validation on the input file; Step S2, parsing the interface description document and the interface request message for parameters, and generating interface parameter configuration; wherein, parameter parsing includes: extracting the interface's field names, field types, required / optional constraints, and value ranges; Step S3, intelligently generating simulated response content based on the interface parameter configuration and test objectives; wherein, test objectives include: normal scenarios / abnormal scenarios / boundary scenarios; simulated response content includes: response messages and simulation scenarios; the response messages include: normal response messages, abnormal response messages, and boundary value messages; Step S4, loading the generated interface parameter configuration, response messages, and simulation scenarios into a test simulation engine, the test simulation engine generating or matching the corresponding response according to the configuration, and returning it to the output end of the file under test.

[0005] Preferably, the interface description document is a standardized technical document used to describe the interaction rules between systems or services. It clearly explains the key information such as the request method, parameter format, response structure, and error handling of the interface, and serves as the core basis for front-end and back-end collaboration, service integration, and testing and verification. The interface request message is a data unit sent by the client to the server to request a specific resource or operation, consisting of a request line, request header, blank line, and optional request body.

[0006] Preferably, step S2 includes: step S21, parsing the interface description document and interface request message to extract the interface path, request method, parameter information, and field description information, and converting them into structured data; step S22, performing semantic understanding on the structured data to complete the meaning of fields and their business logic relationships; step S23, parsing the processed structured data to form an interface parameter configuration table and outputting it; wherein, the interface parameter configuration table includes field names, types, constraints, default values, descriptions, and hierarchical structures; step S24, organizing the interface parameter configuration table and outputting standardized interface parameter configurations.

[0007] Preferably, step S22 includes: extracting the name, data type, whether it is required, business meaning and value range of each field, and inferring the logical relationship between the fields; if the meaning of a field is ambiguous, please complete the reasonable explanation according to the context, and output it as a standardized parameter configuration table structure.

[0008] Preferably, step S3 includes: step S31, mapping the interface parameter configuration and test target to the prompt words to generate complete input; step S32, generating response messages for different scenarios based on the complete input; step S33, performing structural verification and compliance processing on the generated response messages to obtain qualified response messages; and step S34, saving the qualified response messages to the test simulation configuration library and providing them to the simulation engine for use.

[0009] Preferably, in step S31, the normal scenario template is to generate a successful response message that conforms to normal business logic based on the time format and response code description interface definition.

[0010] Preferably, in step S31, the abnormal scenario template is generated by creating several abnormal response message examples based on the definitions of parameter errors, insufficient permissions, and abnormal business interfaces, and these messages must include error codes and error information.

[0011] Preferably, in step S31, the boundary scenario template is generated by generating a boundary test response based on the definitions of minimum value, maximum value, null value, and excessively long input interface.

[0012] A combined testing system based on a large model and test simulation tools is provided to implement the aforementioned combined testing method based on a large model and test simulation tools. The system includes: an interface input module, which receives interface documents and request messages from users or the testing platform, performs format recognition, syntax parsing, and validity checks on the input content, forming a standardized raw interface dataset. This module supports automatic recognition of multiple interface description formats; a parameter parsing module, which calls the large model to perform semantic-level understanding and structured analysis of interface request parameters, generating an interface parameter configuration table. Relying on the semantic parsing capabilities of the large language model, it performs in-depth analysis of the interface description documents and request examples, automatically identifying the business semantics, data types, hierarchical relationships, and dependency constraints of fields; a response generation module, which, based on the interface parameter configuration and test objectives, calls the large model to generate simulated response content for multiple scenarios, including normal responses, abnormal responses, and boundary responses, and performs structural and logical checks; and a simulation engine module, which loads the parameter configuration and response content, receives requests from the system under test, and returns simulated responses. The interface input module, parameter parsing module, response generation module, and simulation engine module are interconnected and can interact with each other.

[0013] In summary, compared with the prior art, the testing method and system based on a large model and testing simulation tools provided by the present invention have the following beneficial effects:

[0014] First, this invention aims to address the problems of complex parameter configuration, lack of intelligence in response content generation, and insufficient scenario coverage in existing interface simulation tools, thereby improving the automation, intelligence, and scalability of test simulation tools during the testing process. This system can automatically identify interface definitions and parameter structures, and based on natural language understanding and semantic reasoning capabilities, intelligently parse the meaning of interface input parameters, field constraints, and business logic, generating simulated response content that conforms to real-world scenarios. Simultaneously, the large model can dynamically generate different types of response samples based on historical interface call data, contextual scenarios, and test objectives, achieving multi-scenario coverage and high-fidelity simulation, significantly reducing manual configuration workload.

[0015] Secondly, by introducing the semantic parsing capability of a large model, the system can automatically identify interface definition files or request samples, automatically extract the interface parameter structure, type and constraints, and fill in default values ​​or generate diverse input combinations according to the interface semantics, thereby greatly reducing the workload of manual configuration and improving the accuracy and consistency of parameter configuration.

[0016] Third, this invention leverages the content generation and logical reasoning capabilities of a large model to dynamically generate response content that conforms to actual logic based on interface input parameters, historical call context, and business rules. This response maintains structural consistency at the field level and closely resembles real business logic at the semantic level, thereby effectively improving the realism, flexibility, and coverage of the test simulation response.

[0017] Fourth, the system of this invention can automatically construct various test scenarios by combining test objectives and business semantics, such as normal processes, abnormal paths, boundary conditions, and special data combinations. The large model automatically generates corresponding expected responses and verification content based on contextual reasoning results, supporting automated testing and adaptive verification, thereby reducing the cost of manually designing test scenarios. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a testing method based on a combination of a large model and a test simulation tool proposed in this invention. Detailed Implementation

[0019] The following will be combined with the appendix in the embodiments of the present invention. Figure 1 The technical solutions, structural features, objectives and effects achieved in the embodiments of the present invention will be described in detail.

[0020] It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions. They are only used to facilitate and clarify the purpose of illustrating the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationship, or adjustments to the size should still fall within the scope of the technical content disclosed in the present invention, provided that they do not affect the effects and objectives that the present invention can produce.

[0021] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only the expressly listed elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0022] like Figure 1 As shown, this invention proposes a testing method based on a combination of a large model and a test simulation tool; used to test input files, the method comprising:

[0023] Step S1: Receive the interface description document and interface request message, and perform validation on the input file;

[0024] Specifically, the system receives user input of interface description documents and interface request messages, and performs format recognition and validity verification on the input files. The interface description document is a standardized technical document used to describe the interaction rules between systems or services. It clearly explains key information such as the interface request method, parameter format, response structure, and error handling, and serves as the core basis for front-end and back-end collaboration, service integration, and testing verification. The interface request message is a data unit sent by the client to the server to request specific resources or operations. It consists of a request line, request header, blank line, and optional request body.

[0025] Step S2: Parse the parameters of the interface description document and the interface request message, and generate the interface parameter configuration;

[0026] Specifically, the large model is invoked to perform semantic parsing on the interface description document and interface request message, extracting the interface field names, field types, required / optional constraints, value ranges, etc.

[0027] Step S3: Based on the interface parameter configuration and test objectives, intelligently generate simulated response content; wherein, the simulated response content includes: response message and simulation scenario;

[0028] Specifically, the interface parameter configuration and test target (normal scenario / abnormal scenario / boundary scenario) are filled into the preset prompt word template; the large model is called to generate the corresponding response message, which includes: normal response message, abnormal response message and boundary value message. The system performs structured verification on the normal response message, abnormal response message and boundary value message generated by the large model to ensure that they conform to the JSON specification and simulation scenario, etc.

[0029] Step S4: Load the generated interface parameter configuration, response message and simulation scenario into the test simulation engine. The test simulation engine generates or matches the corresponding response according to the configuration and returns it to the output end of the file under test.

[0030] In a specific embodiment, step S2 includes:

[0031] Step S21: Parse the interface description document and interface request message to extract the interface path, request method, parameter information, and field description information, and convert them into structured data.

[0032] Step S22: Perform semantic understanding on the structured data to complete the meaning of fields and their relationship with business logic;

[0033] Specifically, step S22 includes: extracting the name, data type, whether it is required, business meaning and value range of each field, and inferring the logical relationship between the fields; if the meaning of a field is ambiguous, please complete the reasonable explanation according to the context, and output it as a standardized parameter configuration table structure.

[0034] Step S23: Parse the processed structured data to form an interface parameter configuration table and output it; wherein, the interface parameter configuration table includes field names, types, constraints, default values, descriptions and hierarchical structures;

[0035] Step S24: Organize the interface parameter configuration table and output the standardized interface parameter configuration.

[0036] In a specific embodiment, step S3 includes:

[0037] Step S31: Based on the interface parameter configuration and test objectives, map the input to the prompt words to generate complete input;

[0038] As mentioned earlier, the test targets are normal scenarios, abnormal scenarios, and boundary scenarios, as shown in the following examples:

[0039] Normal Scenario Template: Generate a successful response message that conforms to normal business logic based on the following interface definitions; for example, the time format and response code description must include reasonable field values.

[0040] Abnormal Scenario Templates: Generate several examples of abnormal response messages based on the following interface definitions; for example, incorrect parameters, insufficient permissions, business exceptions, etc., and must include error codes and error information.

[0041] Boundary scenario template: Generate boundary test responses based on the following interface definitions, such as system responses under scenarios like minimum value, maximum value, null value, and excessively long input.

[0042] Step S32: Generate response messages for different scenarios based on the complete input;

[0043] Step S33: Perform structural verification and compliance processing on the generated response message to obtain a qualified response message;

[0044] Step S34: Save the qualified response message to the test simulation configuration library and provide it to the simulation engine for use.

[0045] This invention provides a testing system based on a large model and testing simulation tools, mainly comprising:

[0046] The interface input module receives interface documents and request messages from users or the testing platform, performs format recognition, syntax parsing, and validity checks on the input content, and forms a standardized raw dataset of interfaces. The module supports automatic recognition of various interface description formats.

[0047] The parameter parsing module is used to call the large model to perform semantic-level understanding and structured analysis of interface request parameters, generate an interface parameter configuration table, rely on the semantic parsing capabilities of the large language model, perform in-depth analysis of interface description documents and request examples, and automatically identify the business semantics, data types, hierarchical relationships and dependency constraints of fields.

[0048] The response generation module, based on the interface parameter configuration and test objectives, calls the large model to generate simulated response content for multiple scenarios, including normal responses, abnormal responses, and boundary responses, and performs structural and logical verification.

[0049] The simulation engine module is used to load parameter configurations and response content, receive requests from the system under test, and return simulated responses.

[0050] The interface input module, parameter parsing module, response generation module, and simulation engine module can communicate and interact with each other.

[0051] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for testing based on a combination of a large model and a test simulation tool, characterized by, The method for testing input files includes: Step S1: Receive the interface description document and interface request message, and perform validation on the input file; Step S2 involves parsing the interface description document and the interface request message to generate the interface parameter configuration; wherein, parameter parsing includes: extracting the interface field name, field type, required / optional constraints, and value range; Step S3: Based on the interface parameter configuration and test objectives, intelligently generate simulated response content; wherein, the test objectives include: normal scenario / abnormal scenario / boundary scenario; the simulated response content includes: response messages and simulation scenario; the response messages include: normal response messages, abnormal response messages and boundary value messages; Step S4: Load the generated interface parameter configuration, response message and simulation scenario into the test simulation engine. The test simulation engine generates or matches the corresponding response according to the configuration and returns it to the output end of the file under test.

2. The test method based on the combination of a large model and a test simulation tool according to claim 1, characterized in that, An interface description document is a standardized technical document used to describe the interaction rules between systems or services. It clearly explains the key information of the interface, such as the request method, parameter format, response structure, and error handling. It is the core basis for front-end and back-end collaboration, service integration, and testing and verification. An interface request message is a data unit sent by the client to the server to request a specific resource or operation. It consists of a request line, request header, blank line, and optional request body.

3. The method of claim 2, wherein the method further comprises: Step S2 includes: Step S21: Parse the interface description document and interface request message to extract the interface path, request method, parameter information, and field description information, and convert them into structured data. Step S22: Perform semantic understanding on the structured data to complete the meaning of fields and their relationship with business logic; Step S23: Parse the processed structured data to form an interface parameter configuration table and output it; wherein, the interface parameter configuration table includes field names, types, constraints, default values, descriptions and hierarchical structures; Step S24: Organize the interface parameter configuration table and output the standardized interface parameter configuration.

4. The method of claim 3, wherein the method further comprises: Step S22 includes: Extract the name, data type, whether it is required, business meaning and value range of each field, and infer the logical relationship between the fields; if the meaning of a field is ambiguous, please complete the reasonable explanation based on the context, and output it as a standardized parameter configuration table structure.

5. The method of claim 4, wherein the method further comprises: Step S3 includes: Step S31: Based on the interface parameter configuration and test objectives, map the input to the prompt words to generate complete input; Step S32: Generate response messages for different scenarios based on the complete input; Step S33: Perform structural verification and compliance processing on the generated response message to obtain a qualified response message; Step S34: Save the qualified response message to the test simulation configuration library and provide it to the simulation engine for use.

6. The method of claim 5, wherein the method further comprises: In step S31, the normal scenario template is to generate a successful response message that conforms to normal business logic based on the time format and response code description interface definition.

7. The testing method based on a combination of a large model and a test simulation tool according to claim 6, characterized in that, In step S31, the abnormal scenario template is to generate several abnormal response message examples based on the definitions of parameter error, insufficient permissions, and abnormal business interfaces, which must be accompanied by error codes and error information.

8. The testing method based on a combination of a large model and a test simulation tool according to claim 7, characterized in that, In step S31, the boundary scenario template is generated by defining the minimum value, maximum value, null value, and excessively long input interface to produce a boundary test response.

9. A large model and test simulation tool combined test system based on the large model and test simulation tool combined test method of claim 8, wherein The system includes: The interface input module receives interface documents and request messages from users or the testing platform, performs format recognition, syntax parsing, and validity checks on the input content, and forms a standardized raw dataset of interfaces. The module supports automatic recognition of various interface description formats. The parameter parsing module is used to call the large model to perform semantic-level understanding and structured analysis of interface request parameters, generate an interface parameter configuration table, rely on the semantic parsing capabilities of the large language model, perform in-depth analysis of interface description documents and request examples, and automatically identify the business semantics, data types, hierarchical relationships and dependency constraints of fields. The response generation module, based on the interface parameter configuration and test objectives, calls the large model to generate simulated response content for multiple scenarios, including normal responses, abnormal responses, and boundary responses, and performs structural and logical verification. The simulation engine module is used to load parameter configurations and response content, receive requests from the system under test, and return simulated responses. The interface input module, parameter parsing module, response generation module, and simulation engine module can communicate and interact with each other.