Transaction system interface automatic testing method and system based on large model
By adopting an automated testing method for trading system interfaces based on large models, the problems of low efficiency and limited coverage in the testing of financial trading system interfaces are solved. It achieves fully automated testing and self-learning optimization, thereby improving testing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-10
AI Technical Summary
Existing financial transaction system interface testing relies on manual work, which is inefficient, has limited coverage, lacks fully automated verification and unified management, and is difficult to adapt to system changes.
The automated testing method for trading system interfaces based on a large model parses interface information through a multi-layered knowledge base, generates test cases, and automatically executes and analyzes the test results through the large model, forming a closed-loop feedback.
It improves the efficiency and accuracy of interface testing, achieves fully automated test coverage and self-learning optimization, simplifies the testing process, and enhances the system's adaptability.
Smart Images

Figure CN121636355A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interface testing for financial trading systems, and in particular to an automated testing method and system for trading system interfaces based on a large model. Background Technology
[0002] Currently, during the deployment and modification of financial trading systems (such as futures, options, and bond interfaces), interface testing is generally done manually, which presents the following problems: 1. Testers need to manually read the interface documentation and write test cases, which is inefficient; 2. Limited test coverage, making it easy to miss boundary conditions and abnormal scenarios; 3. It cannot achieve fully automated verification of interface functions, exception handling, and error code mapping; 4. The lack of a unified test instruction and test case management mechanism makes regression and review difficult.
[0003] Existing automated testing tools mainly focus on the script level, such as command execution tools like pytest and postman. However, manual test case design and script writing are still required, lacking intelligent generation and verification mechanisms, and making it difficult to adapt to the characteristics of frequent system changes. For example, Chinese patent CN120560999A discloses a software automated testing system based on generative artificial intelligence, which adopts a UI automated testing method that integrates large language models and multi-agent systems. The software parsing module identifies UI component attributes and logical relationships, generates structured information documents, and combines this with a knowledge retrieval module to retrieve historical test data. The interaction module understands user intent, generates test cases and scripts, and the script execution module executes the tests and records the results, forming a closed-loop mechanism. However, this automated testing, analysis, and optimization focuses on the UI interaction flow and is not suitable for interface testing. It lacks automated analysis capabilities for interface characteristics and lacks closed-loop feedback and updates.
[0004] Therefore, there is an urgent need for an intelligent testing system that can automatically parse, generate test cases, execute test scripts, and provide closed-loop feedback based on interface knowledge, in order to improve the efficiency, accuracy, and maintainability of interface testing. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology by providing an automated testing method and system for trading system interfaces based on a large model.
[0006] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, an automated testing method for the interface of a trading system based on a large model is provided, the method comprising the following steps: Get the interface name entered by the user; Based on the interface name, a search is performed in a multi-level knowledge base to obtain interface knowledge information; Based on the interface name matching, the corresponding interface code file in the transaction system is located, and the method chain of the interface code file is parsed to obtain the call chain graph. The interface knowledge information, call chain graph, and historical error information in the error knowledge base are used as multiple context backgrounds. These are input into the large model along with the test case design method, test requirements, and context-specific processing methods. The large model automatically identifies test points based on given prompt words and generates test cases for the interfaces required by the user. Based on the interface knowledge information, the generated test cases are transformed into specified instruction format data that can be recognized by the interface reporting tool, which can be executed as automated test cases. Through the text data driven mode, the interface reporting tool is automatically called to report the interface to the transaction system and obtain the returned response results. Read the response results and log files returned by the trading system, filter out unnecessary data, and compare them with the error codes and error messages in the expected results; Based on the comparison results, the large model is invoked to automatically analyze the test results, calculate the pass rate, and attribute the causes of failed test cases to the error knowledge base, thereby expanding the knowledge base and forming a self-learning closed loop.
[0007] As a preferred technical solution, the interface knowledge information includes interface definition, structure name, field name, field information and field type information, wherein the field information includes explanations and enumerations related to business, and the field type information includes variable definition types at the code level.
[0008] As a preferred technical solution, the retrieval based on the interface name in a multi-level knowledge base specifically includes the following steps: Based on the interface name entered by the user, the system retrieves the structure name corresponding to the interface definition and the interface name from the interface definition knowledge base. Based on the obtained structure name, the field names corresponding to the structure name are retrieved from the structure information knowledge base; Based on each field name, the field information knowledge base and the field type knowledge base are searched separately to obtain the field information and field type information.
[0009] As a preferred technical solution, the method chain parsing method specifically involves: performing syntax analysis on the code, identifying the core method call relationships in the interface, including nested method calls, parameter passing links, and return value dependencies, and constructing a method call chain graph.
[0010] As a preferred technical solution, the prompts include role positioning, test background, knowledge information, test case design method, output format, and content requirements.
[0011] As a preferred technical solution, the test points include normal scenario test points, abnormal scenario test points, and boundary condition test points.
[0012] As a preferred technical solution, the historical error information in the error knowledge base includes the correspondence between error codes, trigger paths, and input samples.
[0013] According to a second aspect of the present invention, an automated testing system for the interface of a trading system based on a large model is provided, the system comprising: Interface information input module: used to obtain the interface name input by the user; Multi-level knowledge base retrieval and parsing module: used to retrieve interface knowledge information from the multi-level knowledge base based on the interface name; Method chain parsing module: used to locate the corresponding interface code file in the trading system based on the interface name, and to perform method chain parsing on the interface code file to obtain the call chain graph; Large Model Test Case Generation Module: This module takes the interface knowledge information, call chain graph, and historical error information from the error knowledge base as multiple context backgrounds and inputs them into the large model along with the test case design method, test requirements, and context-specific processing methods. The large model automatically identifies test points based on given prompts and generates test cases for the interfaces required by the user. The automated test case script generation and execution module is used to convert the generated test cases into specified instruction format data that can be recognized by the interface reporting tool, based on interface knowledge information. This results in executable automated test cases. Through a text data-driven mode, it automatically calls the interface reporting tool to submit interface input to the transaction system and obtains the returned response results. Response acquisition, processing and comparison module: used to read the response results and log files returned by the transaction system, filter out unnecessary data and compare them with the error codes and error messages in the expected results; The results analysis and closed-loop management module is used to automatically analyze test results and calculate pass rates based on comparison results by calling a large model. It also performs cause attribution for failed test cases, attributing the causes to the error knowledge base, thereby expanding the knowledge base and forming a self-learning closed loop.
[0014] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described thereon.
[0015] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. Multi-layered knowledge base-driven automated interface understanding mechanism: This invention constructs a multi-layered knowledge base including interface definitions, structure information, field types, and field information, which can be used to achieve automatic interface semantic parsing. This multi-layered knowledge base retrieval method can significantly improve the accuracy and efficiency of detection, and avoid misleading subsequent use case generation due to unreasonable data.
[0017] 2. White-box test case generation mechanism based on method chain parsing: Based on black-box interface testing, this invention introduces white-box method chain parsing technology. By tracing the function method chain behind the interface, more targeted test cases are generated based on the branch path structure of the method chain, realizing abnormal input of specific paths and abnormal branches, significantly improving the depth and accuracy of testing.
[0018] 3. Multi-context combination mechanism: This invention uses interface information obtained through knowledge retrieval, call chain graph obtained through method chain parsing, historical error knowledge base and other information as multiple contexts, and combines them into inputs that are easy for large models to read, thereby improving the quality of generated test cases.
[0019] 4. Large-Model-Guided Automatic Test Case Generation Mechanism: This invention uses a large model, employs multiple contexts and prompts, to generate test cases that conform to the required test design methods, automated test cases that can be recognized by testing tools, and expected response files. It also performs self-review and can analyze test cases based on actual execution results for further self-optimization.
[0020] 5. Data-driven automated interface reporting tool: This invention uses a data-driven automated interface reporting tool as input and output, which separates test cases from tool code. Since the input and output are text data, it can reduce the difficulty of generating large models, simplify the execution process, and improve the convenience of testing.
[0021] 6. Automated result processing, comparison and collection script: This invention automates the result processing of the interface output of the order placement tool and the transaction system, filters out some non-fixed fields in the response, and then compares the actual results with the expected results and collects the comparison results.
[0022] 7. Closed-loop test execution and analysis feedback mechanism: This invention forms a self-learning closed loop by automatically executing test cases, collecting actual responses, comparing them with expected responses, and analyzing pass rates and error causes using a large model. Through closed-loop feedback, it continuously optimizes the process to further improve performance.
[0023] 8. Dynamic evolution and reuse mechanism of error knowledge base: This invention forms an error knowledge base by recording the correspondence between error codes, trigger paths and input samples, and reuses this knowledge in subsequent interface tests to realize the accumulation and transfer of testing experience, thereby improving testing efficiency and adaptability. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the multi-level knowledge base structure and its retrieval and parsing process of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0027] This invention is applied to the field of interface testing for financial trading systems, and relates to: Large Language Model: Combines structured interface context and method call path graph for controlled generation, identifies test points and produces candidate test cases and expected results.
[0028] Prompt words: Textual information input into the large language model to clarify operation instructions, provide system background, and set output goals, thereby guiding it to generate the required interface test cases.
[0029] Context: refers to the specific environment in which language or information exists, usually including the surrounding text, event background, scene setting, etc., which helps to understand the complete meaning of the language or information.
[0030] Interface testing: Verifying whether the interface for transmitting data between the user and the system can receive requests normally and return correct results, ensuring that the data interaction meets expectations.
[0031] Automated testing: A testing method that uses code, scripts, or tools to replace manual work, automatically execute test steps, verify results, and generate feedback, thereby efficiently covering test scenarios.
[0032] Equivalence class test design method: A standard software test case design method that divides the program's input domain into several equivalence classes and selects representative data from each equivalence class as test cases. It usually includes valid equivalence classes and invalid equivalence classes, and the data selection methods usually include weak general and weak robust methods.
[0033] Interface Knowledge Base: A multi-level knowledge repository organized layer by layer according to interface definition description, structure information, field information and field type.
[0034] Knowledge retrieval: Accurately search and extract relevant information from the interface knowledge base and use it as prompt words to provide data support for large models.
[0035] Method chain analysis: Extracting nested method calls, parameter passing chains, and return value dependencies from the code.
[0036] Interface reporting tool: A commonly used command tool for testing transaction interfaces, used to execute interface calls based on test scripts.
[0037] This embodiment first provides an automated testing method for the interface of a trading system based on a large model, such as... Figure 1 As shown, the method includes the following steps: S1, Get the interface name input by the user.
[0038] This step enables users to trigger the system to automatically retrieve interface information using natural language or interface names.
[0039] The specific implementation process is as follows: receive the interface name input by the user, such as ReqQuoteAction, and transmit it as a search keyword to step S2.
[0040] S2, based on the interface name, search in a multi-level knowledge base to obtain interface knowledge information.
[0041] This step enables the automatic extraction of interface definitions, structure names, field names, field information, and field type information from the interface knowledge base.
[0042] The interface knowledge information includes interface definition, structure name, field name, field information, and field type information.
[0043] The structure of a multi-level knowledge base, such as Figure 2 As shown, the retrieval process based on a multi-level knowledge base includes the following steps: S21, based on the interface name input by the user, retrieve the structure name corresponding to the interface definition and interface name in the interface definition knowledge base, such as CFfexFtdcInputQuoteField; S22, based on the obtained structure name, retrieve the field names corresponding to the structure name in the structure information knowledge base, such as ParticipantID, ClientID, UserID, AskPrice, etc. S23. Based on each field name, retrieve field information and field type information from the field information knowledge base and the field type knowledge base respectively. The field information includes explanations and enumerations related to the business. For example, the field information of AskPrice includes "selling price, must be greater than buying price, must be within the price limit range", etc. The field type information includes the variable definition type at the code level. For example, the variable type of AskPrice is defined as double.
[0044] The interface knowledge information obtained in this step will be transferred to the large model for test case generation.
[0045] S3. Based on the interface name matching, locate the corresponding interface code file in the transaction system, perform method chain parsing on the interface code file, and obtain the call chain graph.
[0046] This step enables the extraction and parsing of the method chain of the code for a specified interface of the trading system.
[0047] The specific processing steps are as follows: First, the corresponding interface code file in the trading system is located by matching the interface name, containing key information such as class definition, method implementation, parameter declaration, and return type. Then, method chain parsing is initiated. Method chain parsing first performs syntax analysis on the code, identifying the core method call relationships in the interface, including nested method calls, parameter passing chains, and return value dependencies. A clear method call chain graph is then constructed, including the name of each method, parameter list, return type, call order, and dependent pre-methods. This call chain graph can organize interface information at the code level, helping the larger model further understand interface relationships. Finally, the method call chain graph obtained in this step will be transferred to the larger model for test case generation.
[0048] S4. The interface knowledge information, call chain graph, and historical error information in the error knowledge base are used as multiple context backgrounds. These are input into the large model along with the test case design method, test requirements, and context-specific processing methods. The large model automatically identifies test points based on given prompt words and generates test cases for the interfaces required by the user.
[0049] This step enables reasoning capabilities based on a large model, generating compliant test cases and expected results according to given prompts (including role positioning, test background, knowledge information, test case design methods, output format, and content requirements).
[0050] The specific process includes: taking interface knowledge information obtained from knowledge retrieval, call chain graphs derived from method chain parsing, and historical error information (if any) from the error knowledge base as multiple context backgrounds, and inputting them into the large model along with test case design methods, test background descriptions, test requirements, context handling methods, and test case examples. The large model automatically identifies test points based on prompts, including normal scenario test points based on the core functionality of the interface, abnormal scenario test points based on parameter anomalies, dependency anomalies, and historical error types, and boundary condition test points based on parameter value boundaries and critical conditions of the execution flow, and generates test cases. For example, for the AskPrice field in CFfexFtdcInputQuoteField of the ReqQuoteAction interface, it generates AskPrice = 98.30 (normal scenario) and AskPrice = -1.00, abc, 999999999.99 (abnormal and boundary scenarios). Finally, the test cases and expected results obtained in this module will be transferred to the automated test case script generation and execution module.
[0051] S5, based on interface knowledge information, transforms the generated test cases into executable automated test cases by matching fields one by one, using specified instruction format data recognizable by the interface reporting tool. For example, it matches text fields such as ParticipantID=2017, ClientID=00009219, UserID= TECHOP, InstrumentID=TF2409, AskPrice=98.30 from the ReqQuoteInsert interface into specified comma-separated format data, storing it line by line as text data, as shown below: S02,APIQUOTEINSERT,2017,00009219,TECHOP,TF2409,0,1,98.20,5,0,1,5,98.30. Using a text data-driven mode, this text data serves as input parameters for the interface reporting tool, automatically invoking the tool to submit interface reports to the transaction system and obtaining the returned response.
[0052] This step enables automated translation and execution of test case scripts.
[0053] S6 reads the response and log file returned by the trading system, filters out unnecessary data, and compares it with the error codes and error messages in the expected results. During the comparison, the error codes and error messages are compared one by one using string comparison, and the comparison result is recorded. For example, if the expected error code is 58 with the error message "user mismatch," but the actual returned error code is 66 with the error message "user not logged in," the comparison result in this case is "failed."
[0054] This step enables the automatic collection of execution logs and response data, processing of the data, and comparison with the expected response.
[0055] S7, based on the comparison results, calls the large model to automatically analyze the test results, calculate the pass rate, and attribute the causes of failed test cases to the error knowledge base, supporting dynamic evolution and reuse. It records the correspondence between error codes, trigger paths and input samples, and calls the knowledge base in subsequent interface tests to realize the transfer of test experience.
[0056] This step enables the large model to automatically analyze test results, calculate pass rates, and attribute the causes of failed test cases to the error knowledge base, thereby expanding the knowledge base and forming a self-learning closed loop.
[0057] As a preferred technical solution, the historical error information in the error knowledge base includes the correspondence between error codes, trigger paths, and input samples.
[0058] The above is an introduction to the method embodiments. The following system embodiments will further illustrate the solution of the present invention.
[0059] An automated testing system for the interface of a trading system based on a large model, comprising: Interface information input module: used to obtain the interface name input by the user; Multi-level knowledge base retrieval and parsing module: used to retrieve interface knowledge information from the multi-level knowledge base based on the interface name; Method chain parsing module: used to locate the corresponding interface code file in the trading system based on the interface name, and to perform method chain parsing on the interface code file to obtain the call chain graph; Large Model Test Case Generation Module: This module takes the interface knowledge information, call chain graph, and historical error information from the error knowledge base as multiple context backgrounds and inputs them into the large model along with the test case design method, test requirements, and context-specific processing methods. The large model automatically identifies test points based on given prompts and generates test cases for the interfaces required by the user. The automated test case script generation and execution module is used to convert the generated test cases into specified instruction format data that can be recognized by the interface reporting tool, based on interface knowledge information. This results in executable automated test cases. Through a text data-driven mode, it automatically calls the interface reporting tool to submit interface input to the transaction system and obtains the returned response results. Response acquisition, processing and comparison module: used to read the response results and log files returned by the transaction system, filter out unnecessary data and compare them with the error codes and error messages in the expected results; The results analysis and closed-loop management module is used to automatically analyze test results and calculate pass rates based on comparison results by calling a large model. It also performs cause attribution for failed test cases, attributing the causes to the error knowledge base, thereby expanding the knowledge base and forming a self-learning closed loop.
[0060] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0061] The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0062] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0063] The processing unit executes the various methods and processes described above, such as methods S1 to S7. For example, in some embodiments, methods S1 to S7 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S7 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S7 by any other suitable means (e.g., by means of firmware).
[0064] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0065] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0066] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0067] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A large model-based transaction system interface automatic testing method, characterized in that, The method comprises the following steps: An interface name input by a user is acquired; Interface knowledge information is obtained by searching in a multi-level knowledge base based on the interface name; A corresponding interface code file in a transaction system is located and matched based on the interface name, and a method chain is parsed to obtain a call chain graph; The interface knowledge information, the call chain graph, and historical error information in an error knowledge base are used as multiple context backgrounds, and are input into a large model together with a test case design method, test requirements, and a context-oriented processing method, the large model automatically identifies test points according to a given prompt word, and generates test cases for the interface required by the user; Based on the interface knowledge information, the generated test cases are converted into specified instruction format data recognizable by an interface order tool, that is, executable automatic test cases, the interface order tool is automatically called to report to the transaction system through a text data driving mode, and a returned response result is obtained; The returned response result and a log file of the transaction system are read, unnecessary data is filtered, and error codes and error prompts in an expected result are compared; Based on the comparison result, the large model is called to automatically analyze the test result, calculate a pass rate, and attribute the reason for the failed test case to the error knowledge base, so as to realize expansion of the knowledge base and form a self-learning closed loop.
2. The large model-based transaction system interface automated testing method of claim 1, wherein, The interface knowledge information comprises interface definition, structure body name, field name, field information, and field type information, wherein the field information comprises business-related explanation and enumeration, and the field type information comprises variable definition type at a code level.
3. The method of claim 1, wherein the method further comprises: The searching in the multi-level knowledge base based on the interface name comprises the following steps: An interface definition and a structure body name corresponding to the interface name are searched in an interface definition knowledge base based on the interface name input by the user; Field names corresponding to the structure body name are searched in a structure body information knowledge base based on the obtained structure body name; Field information and field type information are obtained by searching in a field information knowledge base and a field type knowledge base based on each field name.
4. The large model-based transaction system interface automated testing method of claim 1, wherein, The method chain parsing is specifically that syntax analysis is performed on the code, core method call relationships in the interface are recognized, including nested call of the method, parameter transmission link, and dependency relationship of return values, and a method call chain graph is constructed.
5. The large model-based transaction system interface automated testing method of claim 1, wherein, The prompt word comprises role positioning, test background, knowledge information, test case design method, output format, and content requirement.
6. The large model-based transaction system interface automated testing method of claim 1, wherein, The test points comprise normal scene test points, abnormal scene test points, and boundary condition test points.
7. The large model-based transaction system interface automated testing method of claim 1, wherein, The historical error information in the error knowledge base comprises a corresponding relationship among error codes, trigger paths, and input samples.
8. A large model based transaction system interface automation testing system, characterized in that, The system comprises: An interface information input module is configured to acquire an interface name input by a user; A multi-level knowledge base searching and analyzing module is configured to search in a multi-level knowledge base based on the interface name to obtain interface knowledge information; A method chain analyzing module is configured to locate and match a corresponding interface code file in a transaction system based on the interface name, and parse a method chain of the interface code file to obtain a call chain graph. The big model test case generation module is configured to input the interface knowledge information, the calling chain graph, and historical error information in the error knowledge base as multiple context backgrounds, input a test case design method, test requirements, and a context processing method into a big model, and automatically identify test points according to a given prompt word to generate a test case for an interface required by a user. The automatic test case script generation and execution module is configured to convert the generated test case into specified instruction format data that can be recognized by an interface order placing tool, that is, an executable automatic test case, automatically call the interface order placing tool to place an order into a transaction system through a text data driven mode, and obtain a returned response result. The response acquisition processing and comparison module is configured to read the response result and a log file returned by the transaction system, filter unnecessary data, and compare the filtered data with error codes and error prompts in an expected result. The result analysis and closed loop management module is configured to automatically analyze a test result, calculate a pass rate, and attribute a reason for a failed test case to the error knowledge base based on a comparison result, expand the knowledge base, and form a self-learning closed loop.
9. An electronic device comprising a memory and a processor, said memory having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method in any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method in any one of claims 1-7.
Citation Information
Patent Citations
Software automatic testing method and system based on generative artificial intelligence
CN120560999A