Automatic interface testing device and method
By providing an interface automation testing device and method containing multiple management units, the problem that the prior art is difficult to support parameter transmission between multiple interfaces and cross-system environment configuration is solved, and cross-system interface automation testing based on business scenarios is realized, which improves testing efficiency and coverage.
Patent Information
- Application Number
- CN202411945361.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-25
AI Technical Summary
Existing interface automation testing tools are difficult to support parameter transfer between multiple interfaces, cross-system environment configuration, and use case orchestration with contextual business associations, and cannot effectively carry out cross-system interface automation testing based on business scenarios.
Provides an interface automation testing device and method, including a team project management unit, an interface management unit, a use case management unit, a use case set management unit, an execution unit and a test report unit. Through these units, permission management, interface management, test case design, automated test execution and test report generation are implemented, and support cross-system testing steps or test case combination execution and parameter passing.
It realizes cross-system interface automated testing based on business scenarios, improves testing efficiency, reduces testing costs, and ensures the coverage and accuracy of interface tests.
Smart Images

Figure CN119883909A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to an interface automated testing device and method. Background Art
[0002] Interface testing is a type of software testing, which is mainly used to test the interface between the system and other external systems, as well as the interface between various sub-modules within the system, to ensure that the interface function implementation, parameter transfer, and output results meet expectations.
[0003] Interface automation testing uses automated testing tools and techniques to simulate the interaction process between users and software systems to verify the interface's functions, performance, stability, etc. Interface automation testing has significant advantages in improving testing efficiency, reducing testing costs, increasing testing coverage, reducing human errors, and supporting repeated execution and regression testing.
[0004] Large information systems usually contain multiple subsystems, each of which contains multiple modules and components. They interact through interfaces, but the processing logic is complex and they have business associations with each other. Experience shows that in the process of multi-system or module integration, a large number of interface design or connectivity defects cannot be discovered through single interface testing, and cross-system multi-interface end-to-end testing based on business scenarios must be performed. Conventional interface automation testing tools mainly support the function implementation, parameter transfer, and output result verification testing of a single interface, but lack effective support for parameter transfer between multiple interfaces, cross-system environment configuration, and use case orchestration with contextual business associations, which is not conducive to cross-system interface automation testing based on business scenarios.
[0005] Therefore, there is an urgent need for an interface automation testing device and method to realize cross-system interface automation testing based on business scenarios. Summary of the invention
[0006] The present invention aims to provide an interface automation testing device and method, which can realize cross-system interface automation testing based on business scenarios.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] In a first aspect, an embodiment of the present invention provides an interface automation testing device, the device comprising:
[0009] Team project management unit, used to define the roles and permissions of users in different teams and projects, and to manage permissions of different user roles to projects, interfaces, test cases, test case sets, and test reports;
[0010] Interface management unit, used to input interface information, and perform interface management and interface debugging;
[0011] The use case management unit is used to create one or more test steps based on business scenarios and generate test cases;
[0012] A test case set management unit is used to arbitrarily combine different test cases according to different test scopes and different test purposes to obtain a test case set;
[0013] The execution unit is used to execute the automated test scripts in the test cases and test case sets, realize the automated testing of the test cases or test case sets, and obtain the corresponding test running results after the execution is completed;
[0014] The test report unit is used to generate a corresponding test report according to the test running results output by the test execution unit.
[0015] In a second aspect, an embodiment of the present invention provides an interface automation testing method, the method comprising:
[0016] Define the roles and permissions of users in different teams and projects, and implement permission management of projects, interfaces, use cases, use case sets, and test reports for different user roles;
[0017] Enter interface information, and perform interface management and interface debugging;
[0018] Create one or more test steps based on business scenarios and generate test cases;
[0019] According to different test scopes and different test purposes, different test cases can be combined arbitrarily to obtain a test case set;
[0020] Execute the automated test scripts in the test cases and test case sets to realize automated testing of the test cases or test case sets, obtain the corresponding test run results after execution, and generate the corresponding test report based on the test run results.
[0021] The technical effects and advantages of the present invention are as follows: 1. The device of the present invention can be accessed through a browser, supports interface management and configuration management, and designs cross-system test cases and test case sets based on business scenarios, and then writes automated test scripts to execute tests on the test cases and test case sets to generate test reports and statistical views, thereby realizing cross-system interface automated testing based on business scenarios; wherein, the cross-system function is mainly realized through shared projects, customized test environments, execution test environment priorities, customized parameters, pre-scripts, and post-scripts;
[0022] 2. This device replaces manual execution with automation and supports parallel execution, which can greatly improve the efficiency of interface testing and shorten the testing cycle; this device supports standard interface document parsing, supports automatic generation of test cases and test scripts, supports repeated execution and regression testing, replaces a large number of manual operations, and greatly reduces testing costs; this device uses automation to ensure that all interfaces are covered and all test cases are executed, avoiding possible misoperations or omissions in manual testing;
[0023] 3. The main feature of this device is to realize the design of test cases based on business scenarios, and support the execution of test steps or test case combinations and parameter transfer across systems; this device is a Web application, which can be accessed through a browser after successful deployment, without installation and without environmental dependence. It supports cross-team online collaboration and sharing of automated testing results; this device is suitable for most interface software systems or modules, especially for large-scale information system integration testing and end-to-end testing containing multiple subsystems, a large number of modules and components, and is not limited to business areas.
[0024] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 This is a schematic diagram of the structure of an interface automation testing device according to an embodiment of the present invention;
[0027] Figure 2 A detailed structural diagram of an interface automation testing device according to an embodiment of the present invention;
[0028] Figure 3 The present invention provides a flowchart of an interface automation testing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] To solve the deficiencies of the prior art, the present invention is based on an interface automation testing device, such as Figure 1 and Figure 2 As shown, including the following:
[0031] Team project management unit, used to define the roles and permissions of users in different teams and projects, and to implement permission management of projects, interfaces, test cases, test case sets and test reports for different user roles;
[0032] Interface management unit, used to input interface information, and perform interface management and interface debugging;
[0033] The use case management unit is used to create one or more test steps based on business scenarios and generate test cases;
[0034] A test case set management unit is used to arbitrarily combine different test cases according to different test scopes and different test purposes to obtain a test case set;
[0035] The execution unit is used to execute the automated test scripts in the test cases and test case sets, realize the automated testing of the test cases or test case sets, and obtain the corresponding test running results after the execution is completed;
[0036] The test report unit is used to generate a corresponding test report according to the test running results output by the test execution unit.
[0037] Among them, this device mainly uses Spring Boot, Vue, Maven, Nginx, MySQL, and Metabase, and is developed and implemented through JAVA and JavaScript languages.
[0038] In some specific embodiments, the team project management unit is used to formulate the roles and permissions of users in different teams and projects, and implement the permission management of different user roles on projects, interfaces, test cases, test case sets and test reports; the specific process includes:
[0039] (1) Design team information form, project information form and user information form.
[0040] Among them, the team information table is used to maintain team detailed information, including team ID, team name and statistical view URL, etc.; the project information table includes project ID, project name, team ID, whether to delete, etc.; the user information table includes user ID, user number, name, password, whether administrator, whether disabled, etc.
[0041] (2) Set up the hierarchical relationship between teams, projects, and users, including:
[0042] Several teams can be added to the device of the present invention, one team includes multiple projects, and one project includes multiple users; a project can only belong to a certain team, and each user can participate in multiple projects; a user may have different permissions in a project.
[0043] (3) Sharing projects between different user roles, obtaining test cases based on the shared project interface, and a test case set containing test cases of the shared project, including:
[0044] The projects include in-team projects and shared projects, and the users include shared users and out-of-team users.
[0045] The shared user can share the project with users outside the team through the shared project function to realize project sharing; and the users outside the team have read-only permission to the shared project interface and the test cases of the shared project.
[0046] Shared users can assemble their own test cases by calling the shared project interface and obtain test cases based on the shared project interface; shared users can also directly add the test cases of the shared project to their own test case set and obtain a test case set containing the test cases of the shared project.
[0047] In some specific embodiments, the device further includes a configuration management unit, which is used to configure the test environment and parameter information and provide configuration support for the execution unit; specifically including:
[0048] (1) Set the test environment information to build the test environment and implement configuration management of the test environment.
[0049] Among them, the same system usually has multiple test environments based on its purpose, such as functional test environment, performance test environment, and acceptance test environment.
[0050] The test environment information includes a test environment ID, a test environment name, and custom parameters; a set of test environments corresponds to a set of test environment information, and different test environments can define different test environment information combinations.
[0051] For example, each test environment defines a URL parameter for storing the system address of the object under test, but the performance test environment defines a unique parameter responseTime.
[0052] (2) Set environmental parameter information and implement environmental parameter management.
[0053] The environment parameter information includes parameter ID, parameter name, and default value;
[0054] Environment parameter information is used to store system configuration information to support data transfer between multiple interfaces within the system; environment parameters are similar to global variables and are referenced in automated test scripts in the form of {parameter name}.
[0055] (3) Set test environment priorities, including:
[0056] As a system-level configuration, the test environment can be switched at any time under any functional module of the device, and the currently selected test environment shall prevail.
[0057] When debugging an interface, running a test case or a test step, the default test environment is used by default, and the default test environment parameters are obtained in real time by the execution machine to execute the task; the default test environment can be switched at any time, and there is no binding relationship between the test environment and the interface, test case, or test step.
[0058] When creating a test plan for a specified test case set, you need to select the corresponding test environment; one test plan corresponds to one set of test environments, and you can change the corresponding test environment by modifying the test plan.
[0059] Create test steps based on project interfaces within the team or shared project interfaces;
[0060] Among them, for the test steps written based on the shared project interface, the corresponding test environment (i.e. the test environment of the shared project) needs to be specified when creating the test step; because the test environment configuration of the current project is not applicable to the shared project, the test environment configuration of the shared project has a higher priority than the test environment configuration in the test plan;
[0061] For creating test steps based on the team project interface, the team project test environment is the test environment of the current project;
[0062] In summary, the priority order of selecting the test environment for test execution in the same project is set; that is, the priority order of the test environment for execution in the same project is set as: the test environment of the shared project, the test environment of the test plan, and the default test environment;
[0063] The executed test environment includes the test environment of the shared project, the test environment of the test plan, and the default test environment.
[0064] In some specific embodiments, the interface management unit is used to input interface information and perform interface management and debugging; specifically including:
[0065] The interface information includes original interface information, interface debugging information and interface response information.
[0066] The original interface information includes interface name, interface type, URL, Params, Header, Body, creation time, creator, update time, maintainer, etc. That is, the original interface information records in detail all the information that an interface defined based on the standard may contain.
[0067] Interface debugging information includes custom interface parameters, interface parameter values, pre-scripts, post-scripts, etc.
[0068] The interface response information includes Body, General, Headers, Tests, Console, etc. The interface response information is obtained through real-time parsing based on the debugging results of the interface, and its response type supports JSON, RAW, and HTML formats.
[0069] (1) Maintain interface information.
[0070] The maintenance of interface information is mainly done through two methods: manual editing and batch parsing.
[0071] Maintain interface information through manual editing: The staff customizes the interface directory hierarchy through the UI interface and fills in the original information of each interface one by one.
[0072] Maintain interface information through batch parsing: Batch import and parse standard documents such as Swagger and Knife4j (based on standard interface management documents) and enter the original interface information while retaining the interface directory hierarchy.
[0073] (2) Interface information display, including:
[0074] The selected interface is collapsed or displayed in a tree structure, and the interface type and interface name of the interface are prominently displayed. Then, the interface detailed information and interface summary information of the interface are displayed respectively according to the TAB tab.
[0075] The interface detailed information and interface summary information are obtained according to the original interface information.
[0076] (3) Debug the interface, including:
[0077] The interface debugging information of a certain interface is modified to debug the interface and obtain the interface response information of the interface. The interface debugging result is displayed in the interface response information of the interface.
[0078] The default environment configuration is used for interface debugging by default, and the debugging results are displayed in real time without saving changes and execution records by default.
[0079] It should be noted that as an important system asset and the target object of subsequent automated testing, only the project users have the authority to maintain and update the interface information, and shared project users can only view and call the interface.
[0080] In some specific embodiments, the test case generation unit is used to create one or more test steps based on the business scenario to generate a test case, specifically including:
[0081] A test case includes a test case ID, a test case name, and several test steps, that is, each test case includes one or more test steps; and each test case corresponds to a complete real business scenario, regardless of how many systems and interfaces the business scenario involves.
[0082] Among them, business scenarios include functional verification of a single interface, contextual interaction of multiple interfaces in different modules within a project, and end-to-end integration of multiple interfaces across systems.
[0083] Each test step corresponds to an interface, so the process of creating a test step is: select a team project or shared project interface that has entered the original interface information, and create a test step by editing the content information in the test step.
[0084] Then, based on the test case ID, the test case name, and one or more test steps, a test case is generated to complete the writing of the test case.
[0085] The test step includes: test step ID, associated interface, test step name, operation, expectation, test step description, test environment of the test step (when using the shared project interface), and the corresponding automated test script. From the specific content of the test step, it can be seen that the corresponding automated test script needs to be written during the creation of the test step.
[0086] Among them, the test steps support contextual interaction through pre-scripts and post-scripts, the test steps support quick filling of automated test scripts through preset templates, the test steps support binding different test environments, and the test steps support rewriting the test step content based on the automated test scripts.
[0087] In some specific embodiments, the execution unit executes the automated test script in the test case to implement automated testing of the test case, and obtains the corresponding test running result after the execution is completed, including:
[0088] Select some or all of the test steps in the current test case, and send the selected test steps to the execution machine in sequence; the execution machine sequentially executes the automated test scripts in the received test steps to realize the test execution of the test case; when the execution machine completes the test execution of the test case, the execution machine returns the corresponding test execution result.
[0089] In order to simulate the transaction process of real business scenarios, each test case is executed strictly in the order of the test steps during the test execution. If any test step fails, the subsequent test steps will be stopped and the execution record details will be returned.
[0090] In some specific embodiments, the test case set management unit is used to arbitrarily combine different test cases according to different test scopes and different test purposes to obtain a test case set, including:
[0091] The test case set includes: test case set ID, test case set name, several test cases, test plan, test report corresponding to the test case set, and execution log corresponding to the test case set.
[0092] Based on different test scopes and test purposes, you can arbitrarily combine test cases in team projects or shared projects into test case sets. You can drill down through the test case set page to update and maintain test cases, test steps, and automated test scripts.
[0093] In some specific embodiments, the execution unit is used to execute the automated test script in the test case set to implement the automated test of the test case set, and obtain the corresponding test running result after the execution is completed, including:
[0094] Select some or all of the test cases in the current test case set, and send the selected test cases to the execution machine in sequence; the execution machine executes the automated test scripts in the received test cases according to the execution cycle and execution strategy in the test plan to realize the test execution of the test case set; when the execution machine completes the test execution of the test case set, the execution machine returns the corresponding test execution results.
[0095] If any test case fails during the test execution, the failure information of the test case will be recorded, and other test cases in the test plan will be automatically executed according to the execution strategy.
[0096] In some specific embodiments, when test steps, test cases, and test case sets are created or modified, the corresponding automated test scripts need to be written; while the interface only needs to write the corresponding automated test script (i.e., interface debugging information) during debugging; in order to facilitate the subsequent execution of the corresponding automated test script, the test execution of the interface, test steps, test cases, and test case sets can be realized.
[0097] Among them, the automated test script is based on the standard JavaScript language and supports customized script content; through the combination of customized interface parameters, pre-scripts, post-scripts, and template functions, the difficulty of writing automated test scripts can be greatly reduced, and the expected effect can be quickly achieved. Therefore, during the test execution, the customized interface parameters and JavaScript language edited on the interface management page, test step page, test case page, and test case set page are parsed into executable automated test scripts and handed over to the execution machine for execution.
[0098] The custom interface parameters, pre-scripts, post-scripts, and template functions are introduced as follows:
[0099] <1> Custom interface parameters:
[0100] The interface parameters are customized through test methods (boundary values, equivalence class division, etc.), and the API information is automatically filled in according to the customized interface parameter values and packaged into a complete HTTP request, so that the test request simulates the operation of real users.
[0101] <2> Pre-script:
[0102] Before the test is executed, the corresponding front-end script is used to set the environment variables and realize the data transfer between the test steps; the corresponding front-end script is combined with the environment parameters in the configuration management unit to realize the cross-system interface interaction based on the business scenario.
[0103] <3> Post script:
[0104] After the test is executed, the corresponding post-script is used to set the assertion of the test execution result, so that the test execution result corresponding to the test request meets the expectations.
[0105] For example, by using the iatp.test() method provided by this device, the operations and expected field information in the use case steps can be automatically filled in, and the test steps based on the automated test script can be reversed to improve the test efficiency.
[0106] <4> Template functions:
[0107] In the embodiment of the present invention, commonly used pre-script and post-script templates (such as Set / Get environment variables, Status Code check) can be preset, or commonly used JavaScript scripts can be saved as templates for subsequent direct use.
[0108] In some specific embodiments, the test plan includes an execution cycle, an execution strategy, an execution test environment, plan notes, a next execution time (i.e., the last test execution time), and a last execution result (i.e., the last test execution result);
[0109] The execution cycle is set according to the Cron expression and transmitted to the execution machine, so that the execution machine periodically and repeatedly triggers the test execution of the test case or test case set;
[0110] The execution strategies include parallel execution and sequential execution; the execution cycle and execution records of the test plan are parsed to obtain the next execution time and the last execution result.
[0111] In an embodiment of the present invention, in order to better support the interaction between internal and external systems distributed in different network environments, an Nginx proxy server is introduced as a front-end of the execution machine, allowing the execution machine to access the external system through Nginx. Whether to use the proxy service can be selected according to the actual application situation.
[0112] In some specific embodiments, the test reporting unit is used to generate a corresponding test report according to the test running result output by the test execution unit, including:
[0113] When the execution machine completes the test execution, the execution machine returns the test execution results to the test report service to generate a test report.
[0114] The test report includes a test report list and test report detailed information; the test report list includes: test task serial number, test case name or test case set name, test execution result, pass rate, test time, test time consumption, and initiator; the test report detailed information includes: test execution status summary, pass rate pie chart, test case list, and execution status.
[0115] You can drill down on the test report to view the execution results and log details of a specified test case or test step. The execution results of a specified test case or test step can be viewed through the corresponding single execution report of the specified test case or test step.
[0116] The test execution status summary is: a data summary of multiple execution reports during the test execution process.
[0117] The process of obtaining a single execution report includes: when the execution machine completes the test execution and returns the test execution result, the result of successful or failed execution is added before the name of the executed test step, and the test execution report is provided through the test report tab to view the execution details of each test step, thereby completing the generation of the single execution report.
[0118] And during the test execution process, use the log tab to record the complete log information of this test execution and obtain the test log of the test case or test case set.
[0119] In some specific embodiments, the test report unit is also used to automatically trigger an email service while generating a test report, and push a brief test result and a test report link after the test run to team members through a preset mailbox.
[0120] In some specific embodiments, the apparatus further comprises a statistical view unit, the statistical view unit being used to generate a default view and a custom view;
[0121] Among them, generating a default view includes: forming a visualization chart based on data such as the number of newly added interfaces, the number of test cases, the distribution of test cases, and the success rate of automated test execution, that is, generating a default view. That is, the default view can support viewing data visualization charts such as the number of newly added interfaces, the number of test cases, the distribution of test cases, and the success rate of automated test execution within any time period.
[0122] Generate custom views, including: customizing query conditions and view presentation methods through Metabase to generate personalized views, and changing the statistical view configuration to the link address provided by Metabase to replace the default view.
[0123] Based on the same inventive concept, an embodiment of the present invention discloses an interface automation testing method, which is characterized in that: Figure 3 As shown, the method includes:
[0124] Define the roles and permissions of users in different teams and projects, and implement permission management of projects and interfaces for different user roles;
[0125] Enter interface information, and perform interface management and interface debugging;
[0126] Generate test cases based on business scenarios and one or more test steps created;
[0127] According to different test scopes and different test purposes, different test cases can be combined arbitrarily to obtain a test case set;
[0128] Execute the automated test scripts in the test cases and test case sets to realize automated testing of the test cases or test case sets, obtain the corresponding test run results after execution, and generate the corresponding test report based on the test run results.
[0129] Regarding the method in the above embodiment, the specific manner of executing the operation of each step has been described in detail in the embodiment of the device, and will not be elaborated here.
[0130] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An interface automation testing device, characterized in that: The device comprises: Team project management unit, used to define the roles and permissions of users in different teams and projects, and to implement permission management of projects, interfaces, test cases, test case sets and test reports for different user roles; Interface management unit, used to input interface information, and perform interface management and interface debugging; The use case management unit is used to create one or more test steps based on business scenarios and generate test cases; A test case set management unit is used to arbitrarily combine different test cases according to different test scopes and different test purposes to obtain a test case set; The execution unit is used to execute the automated test scripts in the test cases and test case sets, realize the automated testing of the test cases or test case sets, and obtain the corresponding test running results after the execution is completed; The test report unit is used to generate a corresponding test report according to the test running results output by the test execution unit.
2. An interface automation test device according to claim 1, characterized in that: Define user roles and permissions in different teams and projects, including: Design team information tables, project information tables, and user information tables, and set the hierarchical relationships among teams, projects, and users, and then define the roles and permissions of users in different teams and projects; The hierarchical relationships among teams, projects, and users include: Each team in multiple teams includes multiple projects, and each project includes multiple users; a project can only belong to a certain team, each user can participate in multiple projects, and a user has one or more different permissions in a project.
3. An interface automation test device according to claim 1 or 2, characterized in that: Permission management of projects and interfaces for different user roles, including: The projects include in-team projects and shared projects, and the users include shared users and out-of-team users; The shared user shares the project with users outside the team through the shared project function to achieve project sharing; the users outside the team have read-only permissions to the shared project interface and the test cases of the shared project; The shared user assembles his own test cases by calling the shared project interface to obtain test cases based on the shared project interface; the shared user adds the test cases of the shared project to his own test case set to obtain a test case set containing the test cases of the shared project; Only users of the project have the authority to maintain and update interface information, and users of shared projects have the authority to only view and call interfaces.
4. The interface automation testing device according to claim 1, characterized in that: The device also includes a configuration management unit, The configuration management unit is used to perform configuration management on the test environment and environment parameter information; Among them, configuration management of test environment and parameter information includes: Set the test environment information to build a test environment; wherein a set of test environments corresponds to a set of test environment information, and the test environment information includes a test environment ID, a test environment name, and custom parameters; Set parameter information and use the parameter information to store system configuration information to support data transmission between multiple interfaces in the system; The priority order for selecting a test environment for test execution in the same project is set as follows: test environment of the shared project, test environment of the test plan, and default test environment.
5. The interface automation testing device according to claim 1, characterized in that: Enter interface information and perform interface management and debugging, including: The interface information includes original interface information, interface debugging information and interface response information; Input the original interface information by manual editing or batch parsing of standard interface management documents; obtain interface detailed information and interface summary information based on the original interface information; Select an interface to be displayed, fold or display the interface in a tree structure, and use the TAB tab to display the detailed interface information and summary interface information of the interface; The interface is debugged by modifying the interface debugging information of the interface, and the interface response information of the interface is obtained; wherein the interface debugging result is echoed in the interface response information of the interface.
6. The interface automation testing device according to claim 1, characterized in that: Create one or more test steps based on the business scenario and generate test cases, including: Based on the real business environment, select an imported team project interface or shared project interface and edit the test steps to create a test step. Generate a test case based on a test case ID, a test case name, and one or more test steps; Among them, one test step corresponds to one interface; in the process of creating the test step, write the corresponding automated test script; The business scenarios include functional verification of a single interface, contextual interaction of multiple interfaces in different modules within a project, and end-to-end integration of multiple interfaces across systems; The test steps include: test step ID, associated interface, test step name, operation, expectation, test step description, test environment of the test step, and corresponding automated test script.
7. The interface automation testing device according to claim 1, characterized in that: Execute the automated test scripts in the test cases to realize automated testing of the test cases. After execution, the corresponding test run results are obtained, including: Select some or all test steps in the current test case, and send the selected test steps to the execution machine in sequence; The execution machine sequentially executes the automated test scripts in the received test steps to implement the test run of the test case; When the execution machine completes the test execution of the test case, the execution machine returns the corresponding test execution result; If any test step fails during the test execution of the test case, the test execution of the subsequent test steps will be stopped.
8. The interface automation testing device according to claim 1, characterized in that: Execute the automated test scripts in the test case set to implement automated testing of the test case set. After execution, obtain the corresponding test run results, including: Select some or all test cases in the current test case set, and send the selected test cases to the execution machine in sequence; The execution machine executes the automated test scripts in the received test cases according to the execution cycle and execution strategy in the test plan to implement test execution of the test case set; When the execution machine completes the test execution of the test case set, the execution machine returns the corresponding test execution result; Among them, during the test execution process of the test case set, if any test case fails to execute, the failure information of the test case will be recorded, and the other test cases in the test plan will be automatically executed according to the execution strategy.
9. An interface automation test device according to claim 8, characterized in that: The test plan includes the execution cycle, execution strategy, execution test environment, plan notes, next execution time and last execution result; Among them, the execution strategy includes parallel execution and sequential execution; the execution cycle and execution record of the test plan are analyzed to obtain the next execution time and the last execution result.
10. The interface automation testing device according to claim 1, characterized in that: Generate a corresponding test report based on the test run results output by the test execution unit, including: When the execution machine completes the test execution, it returns the test execution results to the test report service to generate a test report, and obtains a single execution report or execution details of each test step; During the test execution, the log tab is used to record the complete log information of the test execution and obtain the execution log of the test case or test case set; The test report includes a test report list and test report details; the test report list includes the test task number, test case name or test case set name, test execution result, pass rate, test time, test time consumption, and initiator; the test report details include a test execution summary, a pass rate pie chart, a test case list, and execution status Obtaining a single execution report, including: when the execution machine completes the test execution and returns the test execution result, adding the execution success or execution failure result and the single test execution report before the executed test step name; Get the execution details of each test step, including: View the test execution report and the execution details of each test step through the Test Report tab.
11. An interface automation testing method, characterized in that: The method comprises: Define the roles and permissions of users in different teams and projects, and implement permission management for projects, interfaces, test cases, test case sets, and test reports for different user roles; Enter interface information, and perform interface management and interface debugging; Create one or more test steps based on business scenarios and generate test cases; According to different test scopes and different test purposes, different test cases can be combined arbitrarily to obtain a test case set; Execute the automated test scripts in the test cases and test case sets to realize automated testing of the test cases or test case sets, obtain the corresponding test run results after execution, and generate the corresponding test report based on the test run results.