Interface automation test intelligent platform
By using an interface automation testing intelligent platform, natural language processing technology is used to parse and generate test cases, which solves the problems of low testing efficiency and poor maintainability in existing technologies, realizes full-process automated testing, and improves testing efficiency and maintainability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 武汉达梦数据技术有限公司
- Filing Date
- 2026-04-08
- Publication Date
- 2026-07-10
AI Technical Summary
Existing automated interface testing relies on manually written scripts and complex automation tools, resulting in low testing efficiency and poor maintainability.
This invention provides an intelligent platform for automated interface testing. It utilizes natural language processing technology to parse test task information, generate test cases, and execute test code, covering the entire process of automated testing from configuration to results, thereby reducing human intervention.
It achieves fully automated testing, improving testing efficiency and maintainability, and reducing problems caused by manual intervention and complex tool calls.
Smart Images

Figure CN122364079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software interface testing technology, and more specifically to an intelligent platform for automated interface testing. Background Technology
[0002] Interface testing is a type of testing that examines the interfaces between components of a software system. It primarily detects interaction points between external systems and the system itself, as well as between internal subsystems. The focus of this testing is to examine the data exchange, transmission, and control processes, as well as the logical dependencies between systems. Simply put, it involves transmitting data to a server or other module via a URL and then checking if the returned data matches our expectations.
[0003] To improve testing efficiency and reduce human error, automated API testing is widely used. Existing automated API testing involves writing scripts and using automated tools to execute API tests. While this reduces the workload of manual testing and improves execution efficiency, it also presents the following technical challenges: automated tools are complex to operate and still require writing scripts in code form, meaning highly skilled personnel are still needed, resulting in lower testing efficiency and poor maintainability.
[0004] Therefore, there is an urgent need to provide an intelligent platform for automated interface testing to overcome the technical problems of low testing efficiency and poor maintainability caused by existing automated testing tools that still rely on manually written scripts and processes and are complex to operate. Summary of the Invention
[0005] In view of this, it is necessary to provide an intelligent platform for automated interface testing to solve the technical problems of low testing efficiency and poor maintainability caused by the reliance on manually written scripts and processes and the operation of complex automated tools in existing technologies.
[0006] To address the aforementioned technical problems, this invention provides an intelligent platform for automated interface testing, comprising: an interface test task configuration module, a test task execution module, a test case module, a test code module, and a test result module; The interface test task configuration module provides a user input interface to receive and manage interface test task information input by the user in the user input interface; The test task execution module is used to respond to test instructions, obtain the interface test task information, parse the interface test task information based on natural language processing technology, generate test cases, generate and execute test code based on the test cases, and generate test results. The test case module is used to display the test cases on the provided test case display interface; The test code module is used to display the test code on the provided test code display interface; The test results module is used to display the test results on the provided test results display interface.
[0007] In one possible implementation, the interface test task information includes an interface requirements specification document, an interface test task name, an interface test address, supplementary interface descriptions, key test functions, and test execution parameters. The test execution parameters include timeout, number of retries for failure, known environmental issues, and whether to execute in parallel.
[0008] In one possible implementation, the user input interface includes an input area, a task list display area, and a test task information management area. The test task information management area is provided with a test task information query button, a test task information modification button, and a test task information deletion button. The interface test task configuration module is used to respond to a first trigger command of the test task information query button to query interface test task information in the task list, respond to a second trigger command of the test task information modification button to modify the interface test task information, and respond to a third trigger command of the test task information deletion button to delete the interface test task information.
[0009] In one possible implementation, the test task execution module includes an interface test task information parsing unit, a test case generation unit, a test code generation unit, and a test automation execution unit; The interface test task information parsing unit is used to respond to the test command by calling the parsing agent. The parsing agent parses the interface test task information based on natural language processing technology to obtain the interface specifications. The test case generation unit is used to call the test case generation agent, which generates test cases covering multiple test types based on the interface specification. The test code generation unit is used to call the test code generation agent, which is used to convert the test cases into test code according to the project and the configured technology stack, and to review the test code. The test automation execution unit is used to call the test automation execution agent when the test code passes the review. The test automation execution agent calls the command-line tool of the test framework to run the test code and generate the test results.
[0010] In one possible implementation, the interface specification includes an interface function description, request parameters, response results, business rules, and dependencies.
[0011] In one possible implementation, before converting the test cases into test code, the test code generation agent is further configured to determine dynamic parameters based on the interface specification, and dynamically obtain and inject the real-time values of the dynamic parameters based on the dependencies of the dynamic parameters.
[0012] In one possible implementation, after the test case is converted into the test code, the test code generation agent is also used to analyze historical bug data, obtain analysis results, optimize the generated test code based on the analysis results, and automatically insert assertion points.
[0013] In one possible implementation, the test case display interface includes a test case display area and a test case management area. The test case management area is provided with a test case query button. The test case display area is used to respond to the test case query trigger instruction of the test case query button and display the target test case that satisfies the test case query trigger instruction and the test case information of the target test case. The use case information includes use case statistics and use case description data. The use case statistics include the total number of use cases, coverage, and the types of tests covered. The use case description data includes the identifier ID, title name, test type, use case description, preconditions, test steps, expected results, and generation time.
[0014] In one possible implementation, the test code display interface includes a test code management area and a test code display area. The test code management area includes a test code modification button, a test code copy button, and a test code download button. The test code display area is used to display the test code and, in response to the code modification trigger instruction of the test code modification button, modify the test code; in response to the code copy trigger instruction of the test code copy button, copy the test code; and in response to the code download trigger instruction of the test code download button, download the test code.
[0015] In one possible implementation, the interface automated testing intelligent platform further includes a test report generation module and an analysis report generation module; The test report generation module is used to generate an Allure test report based on the test results and display the Allure test report on the report display interface; The analysis report generation module is used to call the result analysis agent to automatically analyze the test results, determine the failed test cases and the reasons for failure, and generate subsequent suggestions based on the reasons for failure.
[0016] The beneficial effects of this invention are as follows: The intelligent platform for automated interface testing provided by this invention includes an interface test task configuration module, a test task execution module, a test case module, a test code module, and a test result module, covering the entire process from test configuration to test result acquisition. This achieves fully automated testing without the need for manual script writing or calling automation tools. Users only need to input interface test task information and do not need to participate in any part of the testing process. This realizes fully automated testing, thereby eliminating the technical problems caused by human intervention and complex automation testing tool calls, improving testing efficiency, and enhancing maintainability. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic diagram of an embodiment of the intelligent platform for automated interface testing provided by the present invention; Figure 2 This is a schematic diagram of an embodiment of the test task execution module provided by the present invention. Detailed Implementation
[0019] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0022] This invention provides an intelligent platform for automated interface testing, which will be described in detail below.
[0023] Before describing specific implementations, let's first introduce the concept of an AI agent. An AI agent is a system driven by a large language model, possessing the ability to autonomously understand, perceive, plan, remember, and use tools, enabling it to automatically execute and complete complex tasks. Unlike traditional artificial intelligence, an AI agent can perceive its environment, make decisions, and take actions.
[0024] Figure 1 A schematic diagram of an embodiment of the intelligent platform for automated interface testing provided by the present invention is shown below. Figure 1 As shown, the interface automated testing intelligent platform 10 includes: an interface test task configuration module 100, a test task execution module 200, a test case module 300, a test code module 400, and a test result module 500; The interface test task configuration module 100 provides a user input interface to receive and manage the interface test task information entered by the user in the user input interface.
[0025] It should be noted that, in order to test the parallel processing capability of the interface, the user input interface of the interface test task configuration module 100 can simultaneously receive interface test task information input by multiple users, thereby simulating concurrent requests from multiple users, accelerating large-scale interface testing, and realizing the test of the interface's parallel processing capability.
[0026] The test task execution module 200 is used to respond to test instructions, obtain interface test task information, parse the interface test task information based on natural language processing technology, generate test cases, generate and execute test code based on the test cases, and generate test results.
[0027] Natural Language Processing (NLP) is an important research direction in the field of artificial intelligence, aiming to enable machines to understand, interpret, and generate human language, thereby achieving effective communication between humans and machines.
[0028] Test case module 300 is used to display test cases on the provided test case display interface; The test code module 400 is used to display test code on the provided test code display interface; The test results module 500 is used to display test results on the provided test results display interface.
[0029] Specifically, the test result display interface of the test result module 500 includes an operation button. Responding to the motor operation of this operation button will display the test result on the test result display interface.
[0030] It should be understood that the test case module 300, test code module 400, and test result module 500 display the intermediate process data and result data of the test task execution module 200. Therefore, the test task execution module 200 needs to record logs during execution. The logs include test cases, test code, and test results. Based on this, the test case module 300, test code module 400, and test result module 500 can obtain test cases, test code, and test results from the logs.
[0031] Specifically, the test task execution module 200 is equipped with a log button. When the user clicks the log button, the intermediate process data of the test task execution module 200 will be automatically recorded.
[0032] Furthermore, test instructions can be generated based on the execution button set on the test task execution module 200, that is, when the execution button is pressed, test instructions are generated.
[0033] Compared with existing technologies, the interface automated testing intelligent platform 10 provided in this embodiment of the invention includes an interface test task configuration module 100, a test task execution module 200, a test case module 300, a test code module 400, and a test result module 500, covering the entire process from test configuration to test result acquisition. This achieves fully automated testing without the need for manual script writing or calling automation tools. Users only need to input interface test task information and do not need to participate in any part of the testing process. This realizes fully automated testing, thereby eliminating the technical problems caused by human intervention and complex automation testing tool calls, improving testing efficiency, and enhancing maintainability.
[0034] In some embodiments of the present invention, the interface test task information includes an interface requirement specification document, an interface test task name, an interface test address, supplementary interface descriptions, key test functions, and test execution parameters. The test execution parameters include timeout, number of retries for failure, known environmental issues, and whether to execute in parallel.
[0035] The "Key Testing" feature is used to describe the types of API testing tasks that require priority testing, such as whether to focus on functional testing, performance testing, or security testing. By setting API testing task information including the "Key Testing" feature, testing direction can be provided for subsequent tasks, guiding subsequent tests to align with actual needs.
[0036] The settings for timeout and retry count improve the robustness of automated interface testing. For example, in traditional automated testing, if an interface response times out due to network fluctuations or excessive instantaneous server load, the test is considered a failure or error, and the entire test task is stopped. However, this embodiment of the invention, by setting a timeout and retry count, automatically retryes under the same circumstances. If the test succeeds within the retry count, it is marked as passed.
[0037] By setting timeout times and retry counts, this invention effectively avoids false test failures caused by occasional environmental instability, greatly reduces the number of manual interventions, and further improves the efficiency of automated testing.
[0038] Similarly, including known environmental issues in interface test task information can further improve the robustness and intelligence of automated testing. For example, if the automated execution of the current test task depends on a third-party service, and this third-party service encounters a problem, traditional automated testing would determine the test is faulty due to the inability to connect to the third-party service, and the entire test task would stop. However, by including known environmental issues in the interface test task information, this application identifies the cause of test failure as a known environmental issue during the automated testing process. It then marks this as a skipped issue and automatically marks the current test as skipped. The overall automated testing process does not stop but continues to execute the next test task, ensuring maximum execution of test tasks and improving the robustness and intelligence of the automated testing process.
[0039] To manage test task information, in some embodiments of the present invention, the user input interface includes an input area, a task list display area, and a test task information management area. The test task information management area is provided with a test task information query button, a test task information modification button, and a test task information deletion button. The interface test task configuration module 100 is used to respond to the first trigger command of the test task information query button to query the interface test task information in the task list, respond to the second trigger command of the test task information modification button to modify the interface test task information, and respond to the third trigger command of the test task information deletion button to delete the interface test task information.
[0040] After the interface test task configuration module 100 responds to the first trigger command, it needs to receive the query conditions input by the user. The query conditions can be the name of the interface test task, etc.
[0041] In some embodiments of the present invention, such as Figure 2 As shown, the test task execution module 200 includes an interface test task information parsing unit 210, a test case generation unit 220, a test code generation unit 230, and a test automation execution unit 240. The interface test task information parsing unit 210 is used to respond to test instructions by calling the parsing agent. The parsing agent parses the interface test task information based on natural language processing technology to obtain the interface specifications. The test case generation unit 220 is used to call the test case generation agent, which generates test cases covering multiple test types based on the interface specifications.
[0042] Specifically, the test case generation agent can analyze the API interface structure and, in conjunction with business rules, automatically generate test cases covering various test types. These test cases can cover functional testing, boundary value testing, exception testing, and security testing.
[0043] Functional testing aims to verify whether the basic functions of the interface are working correctly. Boundary value testing designs test cases based on the parameter boundaries at the parsing point to verify whether the boundary parameters pass. Anomaly testing constructs scenarios such as illegal parameters and missing parameters to verify the interface's fault tolerance. Security testing injects attack payloads to verify the interface's security.
[0044] Since the testing process also requires the input of test data, the test case generation agent is also used to automatically generate or manage the required test input data for each test case.
[0045] The test code generation unit 230 is used to call the test code generation agent, which is used to convert test cases into test code according to the project and the configured technology stack, and to review the test code.
[0046] In this context, the technology stack refers to the collection of technologies, frameworks, languages, and tools used in developing a specific project. In the specific scenario of this invention, test scripts differ across programming languages and testing frameworks, such as the Python technology stack and the Java technology stack. This embodiment of the invention converts test cases into test code based on a configured technology stack, improving the relevance of the generated test scripts to the actual scenario and significantly enhancing the usability and maintainability of the generated test code.
[0047] Specifically, reviewing test code can assess its syntax, cleanup mechanisms, and other aspects. If the review fails, the system will invoke the test code generation agent again to regenerate the test code.
[0048] The test automation execution unit 240 is used to call the test automation execution agent when the test code review is passed. The test automation execution agent calls the command line tool of the test framework to run the test code and generate test results.
[0049] The test results include status information and error information. Status information includes: PASSED (test passed, indicating all assertions succeeded), FAILED (test failed, indicating at least one assertion failed), ERROR (an error occurred during testing, possibly due to code or environment issues), XFAIL (expected failure, indicating the test case itself was expected to fail, typically used to mark tests that cannot pass temporarily due to external dependencies), and SKIPPED (test skipped, possibly due to unmet conditions). Error information includes: Syntax Errors (e.g., missing colons, indentation errors), Runtime Errors (e.g., division by zero, accessing non-existent dictionary keys), and Unhandled Exceptions (e.g., file not found, incorrect type).
[0050] It should be noted that the test automation execution unit 240 includes a status bar, which indicates whether the interface test task has been executed. Specifically, when the interface test task is being executed, the status bar displays "Running". When the interface test task is completed, the status bar displays "Stopped".
[0051] The embodiments of the present invention respectively set up a parsing agent, a test case generation agent, a test code generation agent, and a test automation execution agent to realize the entire process of parsing, test case generation, test code generation, and test result generation. By utilizing the characteristics of agents that can quickly adapt to different business needs and scenarios, the flexibility and adaptability of interface testing are improved.
[0052] In a specific embodiment of the present invention, the interface specification includes an interface function description, request parameters, response results, business rules, and dependencies.
[0053] The interface function description is a brief description of what the interface is and its business purpose. For example, "This interface is used for user login; after verifying the username and password, it returns an access token." The interface function description is the starting point for interface testing; testers need to use it to determine whether the tests cover the core business objectives.
[0054] Request parameters define the data that needs to be provided, typically including name, type, whether it is required, and other constraints. For example, the name can be username, productID, etc., and the type includes, but is not limited to, string, boolean, array, and object. Whether it is required indicates whether the parameter is mandatory for calling the API. Other constraints can be additional restrictions on the parameter, such as length limits or value ranges.
[0055] The response defines the data that should be returned after processing the request. A common example is a 404 Not Found error, which indicates that the requested resource does not exist.
[0056] Business rules represent the logic and rules related to a specific scenario or domain. For example, a user can only send a maximum of 5 verification codes per day.
[0057] Dependencies represent the external conditions or other services that an interface depends on for it to function properly. Dependencies include service dependencies, data dependencies, and state dependencies. For example, a data dependency might be that an interface for querying user information needs to obtain a valid token through an authentication interface first.
[0058] In summary, the interface specification is the content that needs to be read and understood during the subsequent generation of test cases, test code, and test results. Only by basing it on the interface specification can test cases covering various scenarios be generated, correct request parameters be constructed, and correct judgments be made on the returned response results.
[0059] As described above, the execution of test code depends on test data. When test data is lost or not obtained, the test code cannot be executed effectively. Traditional automated testing methods return test failure results when test data is missing, and testers need to check logs to locate the problem, affecting testing efficiency. To solve this technical problem, in some embodiments of the present invention, the test automation execution unit 240 is also used to perform pre-checks on test data based on its understanding of interface rules, and issue a prompt message when missing parameters are detected.
[0060] This invention advances the detection of parameter missing errors from after execution to before execution, saving time waiting for request responses and pointing out the problem more directly and clearly, thus further improving the efficiency of automated testing.
[0061] It should be noted that, in addition to missing parameters, the test automation execution unit 240 can also identify other potential errors and provide prompts.
[0062] In existing automated testing processes, parameter extraction and transmission rely on test engineers manually writing complex parameter extraction and transmission logic, which is detrimental to improving testing efficiency. To address this technical problem, in some embodiments of this invention, the test code generation agent, before converting test cases into test code, is also used to determine dynamic parameters based on interface specifications, and dynamically obtain and inject real-time values of dynamic parameters based on their dependencies.
[0063] For example, in a classic scenario, you need to log in to obtain a token, and then use the token to query user information. The traditional testing method is to manually execute the login interface, manually copy the token from the response result, paste the token into the request header of the query interface, and then execute the query interface. That is, this process requires a lot of manual operation.
[0064] The embodiments of the present invention are equipped with dynamic parameter automatic injection. Users only need to configure the task to test "query user information" and the system will automatically identify that the interface requires a token, automatically obtain the token from the login interface, automatically inject the token into the query request and execute it.
[0065] As the examples above demonstrate, the embodiments of the present invention replace tedious manual operations, solve the pain point of interface dependencies, and automatically handle the transmission relationships between parameters. Simultaneously, it always uses the latest data generated during runtime, ensuring the validity of test data and avoiding test failures due to outdated data. Furthermore, it enables automated testing to truly simulate complete, multi-step user business processes, improving the robustness and reliability of the tests.
[0066] To further improve the accuracy of the generated test code, in some embodiments of the present invention, after the test cases are converted into test code, the test code generation agent is also used to analyze historical bug data, obtain analysis results, optimize the generated test code based on the analysis results, and automatically insert assertion points.
[0067] This invention optimizes test code based on historical bug data, improving the adaptive performance of the code generation process. Furthermore, by automatically inserting assertion points, it also enables the judgment and verification of test results.
[0068] In a specific embodiment of the present invention, the test case display interface includes a test case display area and a test case management area. The test case management area is provided with a test case query button. The test case display area is used to respond to the test case query trigger instruction of the test case query button and display the target test case that meets the test case query trigger instruction and the test case information of the target test case. Use case information includes use case statistics and use case description data. Use case statistics include the total number of use cases, coverage, and the types of tests covered. Use case description data includes the identifier ID, title name, test type, use case description, preconditions, test steps, expected results, and generation time.
[0069] The test types include, but are not limited to, functional testing, boundary testing, exception testing, verification testing, security testing, and performance testing.
[0070] In a specific embodiment of the present invention, the test code display interface includes a test code management area and a test code display area. The test code management area includes a test code modification button, a test code copy button, and a test code download button. The test code display area is used to display the test code and, in response to the code modification trigger instruction of the test code modification button, modify the test code; in response to the code copy trigger instruction of the test code copy button, copy the test code; and in response to the code download trigger instruction of the test code download button, download the test code.
[0071] It should be noted that when the test code is displayed, the content shown is the specific code structure, including the import section, configuration constants, data model definition, test case implementation, etc.
[0072] To enable further analysis of the test results and allow testers to intuitively understand the results, in some embodiments of the present invention, such as... Figure 1 As shown, the interface automated testing intelligent platform 10 also includes a test report generation module 600 and an analysis report generation module 700; The test report generation module 600 is used to generate an Allure test report based on the test results and display the Allure test report on the report display interface.
[0073] Specifically, upon opening the report display interface, users can use conditional queries to view the test reports generated for specific interface test tasks. Each interface test task has one action button: the "View Allure Test Report" button. The Allure test report viewing interface displays information including an overview, a defect list, test execution status, data-driven test analysis, chart trends, and a timeline view.
[0074] The Allure test report includes the following sections: **Overview:** This provides an overview of the test execution, including the number of test cases and the pass rate. **Defects:** This displays defects and errors found during testing, allowing developers to quickly locate and fix issues. **Test Execution Results:** This shows the execution results of each test case, including pass and fail statuses. **Data-Driven Testing:** This displays the results of data-driven testing, illustrating test performance under different parameters. **Charts:** This uses charts to show trends and distributions of test results, helping to analyze patterns in the test data. **Timeline:** This displays the execution timeline of test cases, facilitating the tracking of the test execution process. In short, Allure test reports help users intuitively understand the overall performance of the tests.
[0075] The analysis report generation module 700 is used to call the result analysis agent to automatically analyze the test results, determine the failed test cases and the causes of failure, and generate subsequent suggestions based on the causes of failure.
[0076] The analysis report generation module 700 analyzes interface response data, logs, and link tracing together to generate an interactive visual report, completes root cause analysis, locates the root cause of failure, and recommends repair suggestions.
[0077] Specifically, the interface of the analysis report generation module 700 allows users to query results based on conditions and displays test result analysis reports for specific interface test tasks. Each interface test task has one operation button: the "View Analysis Report" button. The analysis report viewing interface displays a test execution summary of the interface test task, failed test cases and their causes, main test result analysis, test coverage analysis, follow-up steps, and recommendations, among other detailed information.
[0078] The test execution summary includes the total number of test cases, the number of successful executions, the number of failed executions, the number of errors, the number of unexecuted cases, the pass rate, and the execution time. The root cause analysis includes the status of key functionalities, major issues, and performance problems. This analysis report provides the development team with better decision-making support.
[0079] The interface automated testing intelligent platform proposed in this embodiment of the invention has the following specific interface automated testing process: Step 1: Access the API automated testing intelligent platform, and add and configure API test tasks in the API test task configuration module. You can modify, delete, and query configured API test tasks.
[0080] Step 2: Open the test task execution module interface and execute the configured interface test tasks. The execution status and detailed steps of the interface automated testing process will be displayed in the log.
[0081] Step 3: In the test case module, select the specific interface test task, click the view button, and the interface will display the test cases automatically generated during the interface test.
[0082] Step 4: Open the test code module interface, select the specific interface test task, and click the view button. The interface displays the test code automatically generated during the interface test, and you can modify, copy, and download the test code.
[0083] Step 5: In the test results module, select the specific interface test task, click the "View Test Results" button, and the interface will display detailed information about the automatic execution of the test code for that task.
[0084] Step 6: Open the Allure test report module interface, select the specific interface test task, and click the "View Report" button. The interface will display the Allure test report generated after the interface test task is completed.
[0085] Step 7: Open the analysis report module interface, select the specific interface test task, and click the view button. The interface will display the report generated after the test results are automatically analyzed, which helps developers locate bugs.
[0086] In summary, the intelligent platform for automated interface testing proposed in this invention uses multiple intelligent agents to parse interface test task information, generate test cases and test code, and execute tests, reducing manual intervention and significantly improving testing efficiency. Furthermore, it can simulate concurrent requests from multiple users simultaneously, further enhancing testing efficiency. Secondly, the generated test cases can cover various scenarios, even including anomaly testing, improving test coverage and accuracy. Simultaneously, the intelligent agents can automatically adjust test strategies and enhance testing intelligence and adaptability through functions such as setting timeouts and analyzing potential problems. Furthermore, the analysis report generation module can determine the cause of failure, enabling rapid location of interface faults and further improving the level of testing intelligence.
[0087] The above provides a detailed description of the intelligent platform for automated interface testing provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An intelligent platform for automated interface testing, characterized in that, include: The interface test task configuration module, test task execution module, test case module, test code module, and test result module are included. The interface test task configuration module provides a user input interface to receive and manage interface test task information input by the user in the user input interface; The test task execution module is used to respond to test instructions, obtain the interface test task information, parse the interface test task information based on natural language processing technology, generate test cases, generate and execute test code based on the test cases, and generate test results. The test case module is used to display the test cases on the provided test case display interface; The test code module is used to display the test code on the provided test code display interface; The test results module is used to display the test results on the provided test results display interface.
2. The intelligent platform for automated interface testing according to claim 1, characterized in that, The interface test task information includes the interface requirements specification document, the interface test task name, the interface test address, supplementary interface descriptions, key test functions, and test execution parameters. The test execution parameters include timeout, number of retries for failure, known environmental issues, and whether to execute in parallel.
3. The intelligent platform for automated interface testing according to claim 1, characterized in that, The user input interface includes an input area, a task list display area, and a test task information management area. The test task information management area is equipped with a test task information query button, a test task information modification button, and a test task information deletion button. The interface test task configuration module is used to respond to the first trigger command of the test task information query button to query the interface test task information in the task list, respond to the second trigger command of the test task information modification button to modify the interface test task information, and respond to the third trigger command of the test task information deletion button to delete the interface test task information.
4. The intelligent platform for automated interface testing according to claim 1, characterized in that, The test task execution module includes an interface test task information parsing unit, a test case generation unit, a test code generation unit, and a test automation execution unit; The interface test task information parsing unit is used to respond to the test command by calling the parsing agent. The parsing agent parses the interface test task information based on natural language processing technology to obtain the interface specifications. The test case generation unit is used to call the test case generation agent, which generates test cases covering multiple test types based on the interface specification. The test code generation unit is used to call the test code generation agent, which is used to convert the test cases into test code according to the project and the configured technology stack, and to review the test code. The test automation execution unit is used to call the test automation execution agent when the test code passes the review. The test automation execution agent calls the command-line tool of the test framework to run the test code and generate the test results.
5. The intelligent platform for automated interface testing according to claim 4, characterized in that, The interface specification includes an interface function description, request parameters, response results, business rules, and dependencies.
6. The intelligent platform for automated interface testing according to claim 4, characterized in that, Before converting the test cases into test code, the test code generation agent is also used to determine dynamic parameters based on the interface specification, and dynamically obtain and inject the real-time values of the dynamic parameters based on the dependencies of the dynamic parameters.
7. The intelligent platform for automated interface testing according to claim 4, characterized in that, After converting the test cases into test code, the test code generation agent also analyzes historical bug data, obtains analysis results, optimizes the generated test code based on the analysis results, and automatically inserts assertion points.
8. The intelligent platform for automated interface testing according to claim 1, characterized in that, The test case display interface includes a test case display area and a test case management area. The test case management area is equipped with a test case query button. The test case display area is used to respond to the test case query trigger command of the test case query button and display the target test case that meets the test case query trigger command and the test case information of the target test case. The use case information includes use case statistics and use case description data. The use case statistics include the total number of use cases, coverage, and the types of tests covered. The use case description data includes the identifier ID, title name, test type, use case description, preconditions, test steps, expected results, and generation time.
9. The intelligent platform for automated interface testing according to claim 1, characterized in that, The test code display interface includes a test code management area and a test code display area. The test code management area includes a test code modification button, a test code copy button, and a test code download button. The test code display area is used to display the test code and, in response to the code modification trigger command of the test code modification button, modify the test code; in response to the code copy trigger command of the test code copy button, copy the test code; and in response to the code download trigger command of the test code download button, download the test code.
10. The intelligent platform for automated interface testing according to claim 1, characterized in that, The intelligent platform for automated interface testing also includes a test report generation module and an analysis report generation module; The test report generation module is used to generate an Allure test report based on the test results and display the Allure test report on the report display interface; The analysis report generation module is used to call the result analysis agent to automatically analyze the test results, determine the failed test cases and the reasons for failure, and generate subsequent suggestions based on the reasons for failure.