Automatic test framework for AI interface

Through the AI ​​interface automation testing framework developed by artificial intelligence technology, the traditional interface testing methods are solved, and the intelligence and automation of interface testing are realized, which significantly improves the testing efficiency and accuracy and reduces the cost burden.

CN120179545APending Publication Date: 2025-06-20鲁俊
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510071146.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-09
Filing Date
2025-01-16
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

Traditional interface testing methods are inefficient, error-prone and resource-consuming, testing engineers lack the ability to write code, and the tool learning curve in the market is steep, making it difficult to meet the industry's demand for efficient and accurate testing.

Method used

The AI ​​interface automation testing framework is developed using artificial intelligence technology, including interface document intelligent analysis module, test case intelligent generation module, test data intelligent orchestration module, automated test execution engine and test result intelligent verification and report generation module to realize the intelligence and automation of interface testing.

Benefits of technology

It significantly improves the efficiency and accuracy of interface testing, reduces the requirements for the professional skills of test engineers, reduces the cost burden of enterprises in the selection and training of test tools, adapts to a rapidly iterative software development environment, and quickly produces test reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179545A_ABST
    Figure CN120179545A_ABST
Patent Text Reader

Abstract

The invention discloses an AI automatic testing framework and belongs to the technical field of software testing. The invention provides an AI automatic test framework integrated with an AI technology to solve the problems that an existing interface test is low in efficiency, prone to errors and large in resource consumption, and test engineers are difficult to understand and encode interface documents. The framework has the functions of interface document intelligent analysis, test case automatic intelligent generation, test data intelligent generation and management, interface automatic test intelligent execution and test result intelligent verification and reporting. By means of the technical scheme, the interface testing efficiency and accuracy are improved, dependence on professional skills of testing engineers is reduced, the testing cost of enterprises is reduced, the rapid iteration software development requirement is met, and the urgent requirement of the industry for efficient and accurate testing is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to an interface automation testing framework and method implemented by using artificial intelligence technology. Background Art

[0002] In the field of software testing, interface testing is an important means to ensure the quality and reliability of software systems. With the continuous improvement of the complexity of software systems, the importance of interface testing has become increasingly prominent. However, traditional interface testing methods, such as manually writing test cases and scripts, are not only time-consuming and laborious, but also prone to errors due to human factors. At present, many test engineers have difficulties in reading and understanding interface documents and lack the ability to write code, which limits their ability to effectively conduct interface testing. In addition, the learning curve of many interface testing tools on the market is steep and the usage cost is high, which increases the cost burden of enterprises in test tool selection and training. The preparation of test data is also a time-consuming link in software testing, and test engineers need to invest a lot of time in designing and producing test data. In a software development environment with rapid iteration, test engineers also face the challenges of rapid testing and generating test reports. These factors together lead to the difficulty of existing testing methods and technologies in meeting the industry's requirements for efficient and accurate testing. Therefore, developing an AI interface automation testing framework that can lower the usage threshold, improve testing efficiency, and can automatically analyze interface documents, generate test data, execute tests, and generate test reports has become an urgent need in the field of software testing. The present invention is proposed to solve the above technical problems and provide an intelligent interface automation testing solution. Summary of the Invention

[0003] The present invention provides an AI interface automation testing framework, aiming to solve the problems of low efficiency, error-proneness, and resource consumption in traditional interface testing methods. The core of the present invention lies in applying artificial intelligence technology to realize the intelligence and automation of interface testing. The specific technical solutions are as follows:

[0004] 1. Intelligent interface document parsing module: This module uses artificial intelligence technology to intelligently parse interface documents in various formats, including but not limited to RESTful API, SOAP, etc., and extracts information such as interface specification descriptions, parameter definitions, and return value structures.

[0005] 2. Intelligent test case generation module: Based on the interface document parsing results, this module uses artificial intelligence technology to automatically generate interface test cases. The system can identify the functional requirements of the interface, including interface specifications and required parameters, and automatically determine the execution order of the interface and its dependencies.

[0006] 3. Intelligent Orchestration Module for Test Data: According to the requirements of interface test execution, this module uses artificial intelligence technology to orchestrate the execution order of test interfaces and intelligently generate or provide corresponding test data. The test data can be pre-set or dynamically generated by the system to ensure the comprehensiveness and effectiveness of the test.

[0007] 4. Automated Test Execution Engine: This engine is responsible for executing interface tests and intelligently transmitting test data. It can automatically call interfaces, transmit corresponding input parameters, and capture output results at the same time.

[0008] 5. Intelligent Verification and Test Report Generation Module for Test Results: After the test is completed, this module uses artificial intelligence technology to intelligently verify the test results and compare them with the expected results. The system can automatically identify whether the test passes and generate a detailed test report, including key information such as test coverage and failure cause analysis.

[0009] Through the above technical solutions, the AI interface automated test framework of the present invention can significantly improve the efficiency and accuracy of interface tests, reduce the professional skill requirements for test engineers, and reduce the cost burden of enterprises in test tool selection and training. In addition, the present invention can also adapt to the rapidly iterative software development environment, quickly produce test reports, and meet the industry's needs for efficient and accurate testing. Description of the Drawings

[0010] Figure 1 : Framework architecture diagram. Figure 1 Shows the system architecture of the AI interface automated test framework of the present invention. The figure includes an intelligent parsing module for interface documents, an intelligent test case generation module, an intelligent orchestration module for test data, an automated test execution engine, and an intelligent verification and test report generation module for test results, as well as their interaction relationships.

[0011] Figure 2 : Test parameter configuration diagram. Figure 2 Details the parameter configuration of the AI interface test framework. The parameters include the maximum number of threads (MAX_THREADING), request interval (REQUEST_INTERVAL), project name (PROJECT_NAME), project description (PROJECT_DESC), list of test URLs (TEST_URLS), interface documents (API_DOCS), and test cases (TEST_CASES). These parameters jointly define the operating environment and test cases of the AI interface automated test framework, ensuring the accuracy and repeatability of the test.

[0012] Figure 3 : Framework flow chart. Figure 3Shows the flow chart of the AI interface automation testing framework. From top to bottom, they are: intelligent interface document parsing module, intelligent test case generation module, intelligent test data orchestration module, automation test execution engine, and intelligent test result verification and report generation module. Each module is connected by an arrow, indicating the sequence and data flow between them. Detailed implementation

[0013] 1. Intelligent interface document parsing module: This module is the first step of the AI interface automation testing framework. It uses deep learning and natural language processing technologies to fine-tune the large language model and intelligently parse the interface document. The module can perform semantic understanding and structural analysis on the interface document, thereby accurately extracting the interface specification, parameter definition, and return value structure. For example, for a RESTful API interface document, this module can automatically identify and parse the interface path, HTTP request method, parameter type, and the necessity and constraints of the parameters.

[0014] 2. Intelligent test case generation module: After the interface document is successfully parsed, this module, as the second step, uses the fine-tuned language model to automatically generate test cases according to the functional requirements of the interface. The module can identify the interface specification and required parameters, and automatically determine the execution order and dependencies of the interface. For example, this module can generate diverse test cases including normal cases, boundary cases, and abnormal cases to ensure the correct response of the interface in various situations.

[0015] 3. Intelligent test data orchestration module: As the third step of the AI interface automation testing framework, this module uses the fine-tuned language model to intelligently orchestrate the execution order of the test interfaces and generate or screen the test data provided manually. The module can dynamically generate or screen the test data that meets the test requirements based on the analysis of the test business requirements and interface parameters. For example, this module can generate test data that meets these conditions according to the data type (such as string, integer, date, etc.) and valid range of the interface parameters, or select appropriate test data from the pre-prepared test dataset to ensure the comprehensiveness and effectiveness of the test. At the same time, it guides the generation and screening process of the test data based on the test business analysis.

[0016] 4. Automation test execution engine: As the fourth step, this engine uses multi-threading technology to achieve concurrent execution of multiple interface tests and intelligently transfer the test data. The engine can automatically call the interface, transfer the input parameters, and capture the output results. For example, this engine can execute multiple test cases simultaneously to improve the test efficiency and handle the dependencies between interfaces to ensure the sequentiality and accuracy of the test.

[0017] 5. Intelligent Test Result Verification and Report Generation Module: Finally, as the fifth step, after the test is completed, this module uses the fine-tuned language model to perform intelligent verification on the test results and compare them with the expected results. The module can automatically identify whether the test passes and generate a detailed test report. For example, this module can calculate the test coverage rate, analyze the reasons for test failures, and provide improvement suggestions so that developers can quickly locate and fix problems.

Claims

1. An AI interface automated testing framework, comprising: The interface document intelligent parsing module is used to intelligently parse the interface document using artificial intelligence technology to extract information such as interface specifications, parameter definitions, and return value structures; The test case intelligent generation module is used to automatically generate interface test cases based on the interface document parsing results using artificial intelligence technology; the test data intelligent arrangement module is used to arrange the execution order of the test interface using artificial intelligence technology according to the requirements of interface test execution, and intelligently generate or provide corresponding test data; Automated test execution engine, used to execute interface tests and intelligently transmit test data; The test result intelligent verification and report generation module is used to use artificial intelligence technology to intelligently verify the test results, compare them with the expected results, automatically identify whether the test has passed, and generate a detailed test report.

2. According to the AI ​​interface automation testing framework according to claim 1, the interface document intelligent parsing module is capable of intelligently parsing interface documents in formats including RESTful API, SOAP, etc.

3. The AI ​​interface automation testing framework according to claim 1, wherein the test case intelligent generation module is capable of identifying the functional requirements of the interface, including interface specifications and required parameters, and automatically determining the execution order of the interface and its dependencies.

4. According to the AI ​​interface automation testing framework of claim 1, the test data intelligent orchestration module can dynamically generate or filter out test data that meets the test requirements based on the test business requirements and interface parameter analysis.

5. The AI ​​interface automated testing framework according to claim 1, wherein the automated testing execution engine adopts multi-threading technology to realize concurrent execution of multiple interface tests and intelligently transmit test data.

6. According to the AI ​​interface automated testing framework of claim 1, the test result intelligent verification and report generation module is capable of calculating the test coverage, analyzing the causes of test failure, and providing improvement suggestions.