Interface testing method and device, electronic equipment and readable storage medium

By generating and executing test case graph data, and using visual orchestration of interface tests, the problem of inefficiency of existing interface testing methods is solved, the efficiency and effectiveness of interface testing is improved, and the generation and display of test cases is simplified.

CN119201736APending Publication Date: 2024-12-27ZHEJIANG GEELY HLDG GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411359268.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing interface testing methods generate test cases with cumbersome and low efficiency, resulting in low efficiency and poor results in interface testing. Especially when the scale and complexity of the software system continue to increase, manual testing is difficult to fully cover and efficiently carry out.

Method used

By obtaining and executing test case graph data generated based on orchestration operations, and orchestrating test cases using visual methods, including flow charts of nodes and edges, simplifying the generation and presentation of test cases, improving the generation efficiency of test cases and the efficiency of interface testing.

Benefits of technology

It realizes simple and convenient generation of test cases, improves the efficiency and effectiveness of interface testing, reduces the difficulty of test case orchestration, and ensures the clarity and consistency of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201736A_ABST
    Figure CN119201736A_ABST
Patent Text Reader

Abstract

The invention discloses an interface testing method and device, electronic equipment and a readable storage medium. Relates to the technical field of automatic testing, and the interface testing method comprises the following steps: obtaining test case graph data used for testing an interface, the test case graph data being generated based on a received arrangement operation, and the arrangement operation being an operation executed for edges between nodes; and executing the test case graph data so as to test the interface, so that the test case is obtained through arrangement in a simple and convenient manner, the generation efficiency of the test case is improved, and the interface test efficiency and effect are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automated testing technology, and in particular to an interface testing method, device, electronic device, and readable storage medium. Background Art

[0002] As the scale and complexity of software systems continue to increase, the number of interfaces is large and closely related to each other, making it difficult for manual testing to fully cover and efficiently perform. Through interface automation testing, the correctness and stability of the interface under various changes can be quickly verified. In addition, automated testing can be executed repeatedly, saving time and resources and speeding up the testing process. Automated testing can ensure that the execution standards of each test are consistent, reduce the differences in test results caused by human factors, and better ensure software quality. In the process of continuous integration and continuous deployment, interface automation testing can detect problems in a timely manner so that they can be repaired as soon as possible to ensure the continuous and stable delivery of software.

[0003] The interface testing method of the related art is cumbersome, inefficient, and inconvenient in generating test cases for interface testing, which results in low efficiency and poor effect of interface testing. Summary of the invention

[0004] The embodiments of the present application aim to solve at least one of the technical problems in the related art to a certain extent. To this end, the embodiment of the present application aims to provide an interface testing method, device, electronic device, storage medium and program product.

[0005] An embodiment of the present application provides an interface testing method, the method comprising: obtaining test case graph data for testing the interface, wherein the test case graph data is generated based on a received orchestration operation, and the orchestration operation is an operation performed on nodes and edges between nodes; executing the test case graph data to test the interface.

[0006] Exemplarily, test case diagram data is generated in the following manner: outputting candidate nodes on a node template interface; receiving selection operations and / or drag operations performed on required nodes among the candidate nodes, and outputting the required nodes on an orchestration interface based on the received selection operations and / or drag operations; receiving connection operations on the required nodes through the orchestration interface, and generating edges between the required nodes based on the connection operations; and obtaining test case diagram data based on the edges between the required nodes and the required nodes.

[0007] Exemplarily, the method further includes: for the test case diagram data output on the orchestration interface, receiving a move operation for any node in the test case diagram data, and moving the any node based on the move operation, so as to update the test case diagram data.

[0008] Exemplarily, the method also includes: selecting a new node on the node template interface; receiving a selection operation and / or a drag operation performed on the new node among the candidate nodes, and outputting the new node on the orchestration interface based on the received selection operation and / or drag operation; and inserting the new node into the test case diagram data so as to update the test case diagram data.

[0009] Exemplarily, the interface test includes at least one test step to be executed, the test case diagram data includes at least one node to be executed and an edge between the nodes to be executed, and at least one node to be executed corresponds one-to-one to at least one test step to be executed; the method also includes: in the process of executing the test case diagram data, when the node to be executed corresponding to the current test step is executed, the corresponding node to be executed is marked in a first marking manner; when the node to be executed corresponding to the current test step is executed successfully, the corresponding node to be executed is marked in a second marking manner; when the node to be executed corresponding to the current test step fails to execute, the corresponding node to be executed is marked in a third marking manner, wherein the step name of the corresponding test step is displayed on the node to be executed.

[0010] Exemplarily, the test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers and target node identifiers connected to the edges; executing the test case graph data to test the interface includes: when the node identifier of the current node indicates that the current node is not a conditional node, querying the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node; based on the target node identifier in the current edge, querying the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; executing the next node to test the interface.

[0011] Exemplarily, the test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers, target node identifiers, and edge identifiers connected to the edges; executing the test case graph data to test the interface includes: when the node identifier of the current node indicates that the current node is a conditional node, querying the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node, and the edge identifier of the current edge is consistent with the output parameter of the current node; based on the target node identifier in the current edge, querying the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; executing the next node to test the interface.

[0012] Exemplarily, the test case graph data includes nodes and edges, and the nodes include node identifiers; executing the test case graph data to test the interface also includes: when the node identifier of the current node indicates that the current node has completed initialization, determining the next node from the test case graph data based on the node identifier, wherein the node identifier of the next node indicates that the node type of the next node is a start type.

[0013] Another embodiment of the present application provides an interface testing device, which includes: an acquisition module, used to acquire test case diagram data for testing the interface, wherein the test case diagram data is generated based on a received orchestration operation, and the orchestration operation is an operation performed on nodes and edges between nodes; a testing module, used to execute the test case diagram data to test the interface.

[0014] Another embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.

[0015] Another embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method of any of the above embodiments are implemented.

[0016] Another embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed by a processor of a computer device, the computer device is enabled to perform the steps of the method of any of the above embodiments.

[0017] In the above implementation, by acquiring test case graph data for testing the interface, the test case graph data is executed to test the interface, wherein the test case graph data is generated based on the received orchestration operation, and the orchestration operation is an operation performed on the edges between nodes. The interface testing method of the present application can arrange test cases in a simple and convenient way, improve the generation efficiency of test cases, and thus improve the efficiency and effect of interface testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of an interface testing method provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of arranging test case diagram data in a visual manner provided by an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a test case provided for an implementation example of the present application;

[0021] Figure 4A schematic diagram of the execution flow of the test case diagram data provided for the implementation method of this application;

[0022] Figure 5 A schematic diagram of the system architecture level for performing interface testing provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of an interface testing device provided in an embodiment of the present application;

[0024] Figure 7 A block diagram of an electronic device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0025] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0026] As the scale and complexity of software systems continue to increase, the number of interfaces is large and closely related to each other, making it difficult for manual testing to fully cover and efficiently perform. Through interface automation testing, the correctness and stability of the interface under various changes can be quickly verified. In addition, automated testing can be executed repeatedly, saving time and resources and speeding up the testing process. Automated testing can ensure that the execution standards of each test are consistent, reduce the differences in test results caused by human factors, and better ensure software quality. In the process of continuous integration and continuous deployment, interface automation testing can detect problems in a timely manner so that they can be repaired as soon as possible to ensure the continuous and stable delivery of software.

[0027] In some examples, the test cases generated in the interface automation platform usually display the test steps in the test cases in a table, which has the following shortcomings:

[0028] 1. The test case display effect is rather messy: for example, the step name, domain name, interface path, request header and other parameters are directly displayed on the test case page, and the displayed content is too much and too messy.

[0029] 2. The efficiency of moving use case steps is too low: For example, when you want to move the last step to the first step, if there are many steps in between, you need to move it multiple times, which is inconvenient and inefficient.

[0030] 3. Unable to insert a new step in the middle of a use case step: If you want to insert a new step in the middle, you can only add a step at the end first and then move it to the target position, which is not convenient enough.

[0031] 4. The use case execution process is not intuitive enough: especially when executing branches and loops, the step flow of the use case execution cannot be clearly displayed.

[0032] In view of this, the embodiment of the present application provides an optimized interface testing method, by acquiring test case graph data for testing the interface, executing the test case graph data, so as to test the interface, wherein the test case graph data is generated based on the received orchestration operation, and the orchestration operation is the operation performed on the edge between nodes. The interface testing method of the present application can arrange test cases in a simple and convenient way, improve the generation efficiency of test cases, and then improve the efficiency and effect of interface testing.

[0033] Figure 1 A flowchart of an interface testing method provided in an embodiment of the present application.

[0034] like Figure 1 As shown, the interface testing method 100 provided in the embodiment of the present application includes, for example, steps S110 - S120 .

[0035] Step S110, obtaining test case graph data for testing the interface, where the test case graph data is generated based on the received orchestration operation, where the orchestration operation is an operation performed on nodes and edges between nodes.

[0036] Step S120, executing the test case diagram data to test the interface.

[0037] Exemplarily, the test case graph data can be arranged in a visual manner. The test case graph data can be a flowchart including nodes and edges. The edges are used to connect the nodes, and the edges can represent the execution order of the nodes. The arrangement operation includes operations such as selecting nodes, dragging nodes to the arrangement canvas, performing connection operations between nodes to obtain edges, etc. The arrangement operation also includes operations such as updating and modifying the existing test case graph data. The update and modification operations include operations such as deleting nodes and edges, and adding nodes and edges.

[0038] After the test case graph data is compiled, the test case graph data can be executed to test the interface. It can be seen that by compiling the test case graph data in a visual way, the test cases can be compiled in a simple and convenient way, which improves the efficiency of test case generation and further improves the efficiency and effect of interface testing.

[0039] Figure 2 A schematic diagram of arranging test case diagram data in a visual manner provided in an embodiment of the present application.

[0040] like Figure 2As shown, candidate nodes are output on the node template interface, and the candidate nodes may include multiple types of nodes. Then, a selection operation and / or drag operation performed on a desired node in the candidate node is received, and the desired node is output on the orchestration interface based on the received selection operation and / or drag operation, and the orchestration interface may be a canvas. The desired node is the selected node, and the desired node is dragged from the node template interface to the canvas. Next, a connection operation for the desired node is received through the orchestration interface, and an edge between the desired nodes is generated based on the connection operation, for example, a connection operation is performed on the canvas, such as connecting two nodes to generate an edge between the two nodes. Then, based on the desired node and the edge between the desired nodes, test case diagram data is obtained, and the test case diagram data may be a flow chart. When the test case diagram data is executed to perform an interface test, each node is executed in sequence according to the flow chart.

[0041] In addition, the existing test case diagram data can also be updated. For example, for the existing test case diagram data output on the arrangement interface, if a node needs to be moved, a move operation for any node in the test case diagram data can be received, and the any node can be moved based on the move operation to update the test case diagram data. If a new node needs to be added, a new node can be selected on the node template interface, and a selection operation and / or drag operation performed on the new node in the candidate node can be received, and the new node can be output on the arrangement interface based on the received selection operation and / or drag operation, and then the corresponding edge is added to connect the new node and the existing node, so as to insert the new node into the test case diagram data, so as to update the test case diagram data.

[0042] It can be seen that the present application displays test cases in a visual way, and the display effect of the test cases is clear, concise and clear at a glance. The related technology writes and displays test cases in a table manner, and the written test cases are stored and displayed in the form of editable tables. If you need to add test steps, you need to add a new row in the table and then fill in the specific step information in the table. This method is not intuitive enough. The method of the present application can represent test cases in a visual flowchart manner. To add a new test case step, you only need to drag nodes of different shapes to the canvas and then connect them with lines. This method is more smooth and efficient, which improves the efficiency of test case generation and reduces the difficulty of test case arrangement.

[0043] Continue to refer Figure 2 The node template interface, different node types include:

[0044] Start node / end node: When writing test cases, it is mainly used to save the test case name, priority, test case input parameters, test account and other information. When executing the test case, it mainly displays the execution result of the test case, the input parameters when the test case is executed, the output parameters when the test case is executed, and other information. All test cases start to execute from the start node and stop at the end node.

[0045] Pre-step node: When writing a use case, it is mainly used to save information such as node name, node output parameter key, groovy script, etc. When executing a use case, it mainly displays the execution result of the groovy script, groovy script (after replacing variables), etc. The pre-step node can be used to implement data preprocessing.

[0046] Use case node: When writing a use case, it is mainly used to save information such as node name, application name, interface path, request parameters, request header, assertion, node output parameters, etc. When executing a use case, it mainly displays information such as node execution results, execution environment, execution time, execution time, interface return data, node output parameters, request URL, request parameters, etc. Assertions refer to a clear statement that a condition or expression is true. When the program executes to the assertion position, the corresponding assertion should be true. If the assertion is not true, the program will terminate execution and give an error message.

[0047] Sub-process node: It is mainly used to save node name, sub-process id, sub-process input parameters and other information when writing a test case. When executing a test case, it mainly displays node execution results, detailed entry, sub-process output parameters, sub-process input parameters and other information. Other test cases can be called through sub-process nodes. For example, if the current test case includes a sub-process node, if the sub-process node is executed during the execution of the current test case, it will jump to other test cases corresponding to the sub-process node. After executing other test cases, it means that the sub-process node has been executed, and the current test case will be returned and the next node of the current test case will continue to be executed.

[0048] SQL node: When writing a test case, it is mainly used to save information such as node name, data source, SQL script, assertion, node output parameter, etc. When executing a test case, it mainly displays information such as execution result, execution time, execution time, SQL script (after replacing variables), SQL execution result, node output parameter, etc. Through this SQL node, you can query data to check whether the parameter modification is successful.

[0049] Conditional node: It is mainly used to save information such as node name, parameter key, groovy script, etc. when writing a use case. It mainly displays the node parameter when executing the use case.

[0050] Edge: Represented by arrows or lines, used to connect different nodes. When the starting node of an edge is a conditional node, click the edge to set the name of the edge. When the test case is executed, the edge with the same name as the conditional node output parameter will be selected so that the next node can be selected based on the selected edge.

[0051] In one example, the test case is presented in the form of a flowchart visualization, which allows you to clearly see what each step of the test case does and what branch processes there are. In terms of technical implementation, React Flow can be used as a plug-in for flowchart rendering. The flowchart consists of nodes and edges, and the edges connect the nodes together. The main data structure of the node is shown in Table 1, and the main data structure of the edge is shown in Table 2.

[0052] Table 1 Main data structure of the node

[0053] id Node id data.label Node Name data.color Node color (used to render node color when using the test case) position.x The x-axis position of the node in the canvas position.y The node's y-axis position in the canvas type Node Type

[0054] The main data structure of table 2

[0055] id Edge id source Source node id target Target node id sourceHandle Source node handle targetHandle Target node handle label Name of the edge

[0056] Exemplarily, the interface test includes at least one test step to be executed, the test case graph data includes at least one node to be executed and an edge between the nodes to be executed, and at least one node to be executed corresponds to at least one test step to be executed. The main data structure of the test case is shown in Table 3, and the main data structure of the test step is shown in Table 4.

[0057] Table 3 Main data structure of test cases

[0058] id Use case id name Use Case Name input_params Add ginseng output_params Specimens nodes node edges side

[0059] Table 4 Main data structure of test cases

[0060] id Step id (consistent with node id) testcase_id Use case id app_id Application Id api_id Interface Id request_headers Request Header request_params Request Parameters asserts_list Assertions List input_params Add ginseng output_params Specimens sub_case_id Subprocess id

[0061] Figure 3 A schematic diagram of a test case provided for an implementation example of the present application.

[0062] like Figure 3 As shown in Figure 1, a test case contains nodes, edges, and test case steps (test steps). The test case steps correspond to the nodes one by one, and the edges connect different nodes together. Through such an association relationship, a one-to-one correspondence can be formed between the nodes and the test case steps.

[0063] In the process of executing the test case diagram data, when executing to the to-be-executed node corresponding to the current test step, the corresponding to-be-executed node is marked in a first marking manner, and the first marking manner includes, for example, marking the to-be-executed node in gray.

[0064] When the to-be-executed node corresponding to the current test step is executed successfully, the corresponding to-be-executed node is marked in a second marking manner. The second marking manner, for example, includes marking the successfully executed node in green.

[0065] In the case that the to-be-executed node corresponding to the current test step fails to execute, the corresponding to-be-executed node is marked in a third marking manner, and the second marking manner includes, for example, marking the failed node in red.

[0066] It is understandable that the first marking method, the second marking method, and the third marking method can be flexibly determined, and the three can be different. Compared with the related art, the execution results of the test case are displayed in the form of a table, which makes it difficult to effectively represent the execution process of the test case. The present application represents the execution results of the use case in the form of a visual flowchart, each node is a test step, and the nodes of the flowchart are rendered in different colors to represent the execution results of the step, so that the execution process of the test case can be clearly and intuitively represented.

[0067] Continue to refer Figure 2 , the step name of the corresponding test step can be displayed on the node to be executed. For example, for each node in the test case diagram data, the step name of the corresponding test step can be displayed on the node. Taking a node as an example, the step name of the test step displayed on the node is such as "Modify the vehicle billing method". The related technology displays test cases in the form of a table, and the display effect is relatively messy. For example, the step name, domain name, interface path, request header and other parameters are directly displayed on the use case page, and the displayed content is too much and too messy. The nodes on the test case diagram data of the present application only display the name of the step, so that the display effect of the test case is clear and understandable.

[0068] Exemplarily, the test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers, target node identifiers, and edge identifiers connected by the edges.

[0069] When executing the test case diagram data, after the current node is executed, you need to find the next node. The method to find the next node is as follows:

[0070] In the case where the node identifier of the current node indicates that the current node has completed initialization, the next node is determined from the test case diagram data based on the node identifier, wherein the node identifier of the next node indicates that the node type of the next node is the start type. For example, if the current node id is null, that is, initialized, the start node (node ​​type type = StartNode) is searched and the start node is used as the next node.

[0071] If the current node id is not null: when the node identifier of the current node indicates that the current node is not a conditional node, query the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node; based on the target node identifier in the current edge, query the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; after finding the next node, execute the next node to test the interface.

[0072] That is, if the current node is not a conditional node, that is, the node type != ConditionNode, then find the edge whose source node id is the current node, and then the target node id of the edge is the next node id.

[0073] If the current node id is not null: when the node identifier of the current node indicates that the current node is a conditional node, query the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node, and the edge identifier of the current edge is consistent with the output parameter of the current node; based on the target node identifier in the current edge, query the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; after finding the next node, execute the next node to test the interface.

[0074] That is, if the current node is a conditional node, that is, the node type = ConditionNode, then find an edge whose source node id is the current node and whose name is consistent with the conditional node output parameter, and then the target node id of the edge is the next node id.

[0075] Figure 4 A schematic diagram of the execution flow of the test case diagram data provided for the implementation mode of this application.

[0076] like Figure 4 As shown, the execution of the test case diagram data includes the following steps:

[0077] ST1: Initialize the current node, that is, set the current node to null and return to ST2;

[0078] ST2: Determine whether the current node is null. If the current node is null, return to ST3, otherwise return to ST6;

[0079] ST3: Determine whether the current node is a conditional node. If it is a conditional node, return to ST4; otherwise, return to ST5.

[0080] ST4: Find the next node based on the current node and conditions, and return to ST7;

[0081] ST5: Find the next node based on the current node and return to ST7;

[0082] ST6: Find the start node and return to ST7;

[0083] ST7: Determine whether the next node is found. If the next node is found, return to ST8; otherwise, return to ST15;

[0084] ST8: Set the next node found as the current node and return to ST9;

[0085] ST9: Render the current node in gray (gray means it is being executed), and return to ST10;

[0086] ST10: Determine the type of the current node. If the current node is a use case node, return to ST11; if the current node is a preceding step node, return to ST12; if the current node is an SQL node, return to ST13; if the current node is a conditional node, return to ST14; if the current node is an end node, return to ST15; if the current node is a sub-process node, return to ST16;

[0087] ST11: Obtain the interface path, request header, request parameters and other information according to the use case steps, initiate an HTTP call, and assert the return result;

[0088] ST12: Execute the groovy script and put the execution result into the use case variable;

[0089] ST13: Execute SQL and assert the SQL result;

[0090] ST14: Execute the groovy script and use the execution result as the condition for finding the next node;

[0091] ST15: Process execution ends;

[0092] ST16: Execute the sub-process, then return to ST0, and use the current use case variable as the sub-process input parameter of the next process;

[0093] ST17: Determine whether the current process is a sub-process, if so, return to ST18, otherwise return to ST21;

[0094] ST18: Determine whether the current node is executed successfully. If so, return to ST19; otherwise, return to ST20;

[0095] ST19: Render the current node green and return to ST2;

[0096] ST20: Render the current node in red and return to ST21;

[0097] ST21: Use case execution ends.

[0098] Figure 5 A schematic diagram of the system architecture level for performing interface testing provided in an embodiment of the present application.

[0099] like Figure 5 As shown, the bottom layer of the system architecture is project management. The data between different projects are isolated from each other, supporting a large team to use different projects at the same time without affecting each other.

[0100] In addition to project management, it includes some basic configuration information, such as domain name management, data source management, etc., which all support multi-environment configuration.

[0101] Next up are environment management, application management, and interface management; environment management is used to maintain the configuration information of each application and each environment, mainly including parameters such as domain name, environment variables, and request header. Application management mainly maintains application-related information. Interface management mainly maintains interface-related information, such as interface name, interface path, request method, parameter type, timeout, etc.

[0102] Then there are interface use cases and scenario use cases. When writing use cases, some downstream configurations will be relied on. Scenario use cases include multiple interface use cases.

[0103] The top layer is the scheduled task, which allows you to create different scheduled tasks and specify the execution time, execution case, environment and other information of the task. Executing scheduled tasks can run test cases to implement interface testing.

[0104] Figure 6 A schematic diagram of an interface testing device provided in an embodiment of the present application.

[0105] like Figure 6 As shown, the interface testing device 600 provided in the embodiment of the present application includes: an acquisition module 610 and a testing module 620 .

[0106] The acquisition module 610 is used to acquire test case diagram data for testing the interface, wherein the test case diagram data is generated based on the received orchestration operation, and the orchestration operation is an operation performed on the edges between nodes.

[0107] The test module 620 is used to execute the test case diagram data so as to test the interface.

[0108] Exemplarily, test case diagram data is generated in the following manner: outputting candidate nodes on a node template interface; receiving selection operations and / or drag operations performed on required nodes among the candidate nodes, and outputting the required nodes on an orchestration interface based on the received selection operations and / or drag operations; receiving connection operations on the required nodes through the orchestration interface, and generating edges between the required nodes based on the connection operations; and obtaining test case diagram data based on the edges between the required nodes and the required nodes.

[0109] Exemplarily, the interface testing device 600 is further used to perform: for the test case diagram data output on the arrangement interface, receiving a move operation for any node in the test case diagram data, and moving the any node based on the move operation, so as to update the test case diagram data.

[0110] Exemplarily, the interface testing device 600 is also used to perform: selecting a new node on the node template interface; receiving a selection operation and / or a drag operation performed on the new node among the candidate nodes, and outputting the new node on the orchestration interface based on the received selection operation and / or drag operation; and inserting the new node into the test case diagram data so as to update the test case diagram data.

[0111] Exemplarily, the interface test includes at least one test step to be executed, the test case diagram data includes at least one node to be executed and an edge between the nodes to be executed, and at least one node to be executed corresponds one-to-one to at least one test step to be executed; the method also includes: in the process of executing the test case diagram data, when the node to be executed corresponding to the current test step is executed, the corresponding node to be executed is marked in a first marking manner; when the node to be executed corresponding to the current test step is executed successfully, the corresponding node to be executed is marked in a second marking manner; when the node to be executed corresponding to the current test step fails to execute, the corresponding node to be executed is marked in a third marking manner, wherein the step name of the corresponding test step is displayed on the node to be executed.

[0112] Exemplarily, the test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers and target node identifiers connected to the edges; the test module 620 is also used to execute: when the node identifier of the current node indicates that the current node is not a conditional node, query the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node; based on the target node identifier in the current edge, query the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; execute the next node to test the interface.

[0113] Exemplarily, the test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers, target node identifiers, and edge identifiers connected to the edges; the test module 620 is also used to execute: when the node identifier of the current node indicates that the current node is a conditional node, query the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node, and the edge identifier of the current edge is consistent with the output parameter of the current node; based on the target node identifier in the current edge, query the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; execute the next node to test the interface.

[0114] Exemplarily, the test case graph data includes nodes and edges, and the nodes include node identifiers; the test module 620 is also used to execute: when the node identifier of the current node indicates that the current node has completed initialization, determine the next node from the test case graph data based on the node identifier, wherein the node identifier of the next node indicates that the node type of the next node is a start type.

[0115] It can be understood that the specific implementation process of the interface testing device 600 can refer to the implementation process of the interface testing method above, and will not be repeated here.

[0116] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

[0117] One embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed by a processor of a computer device, the computer device can perform the steps of the method of any of the above embodiments.

[0118] Figure 7 A block diagram of an electronic device provided for an embodiment of the present application.

[0119] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned interface testing method when executing the computer program.

[0120] like Figure 7 As shown, for ease of understanding, the embodiment of the present application shows a specific electronic device 700.

[0121] The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0122] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0123] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0124] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods described above. For example, in some embodiments, any one or more of the various methods described above may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, any one or more of the various methods described above may be executed. One or more steps. Alternatively, in other embodiments, the computing unit 701 may be configured to perform any one or more of the various methods described above by any other appropriate means (e.g., by means of firmware).

[0125] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this application, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.

[0126] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0127] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0128] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0129] In addition, the terms "first", "second", etc. used in the embodiments of the present application are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the present embodiment. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present application can explicitly or implicitly indicate that at least one of the features is included in the embodiment. In the description of the present application, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.

[0130] In this application, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. appearing in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to the specific implementation situation.

[0131] In the present application, unless otherwise clearly specified and limited, a first feature being “above” or “below” a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being “above”, “above”, and “above” a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “below”, “below”, and “below” a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0132] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An interface testing method, characterized in that: The method comprises: Acquire test case graph data for testing the interface, wherein the test case graph data is generated based on the received orchestration operation, and the orchestration operation is an operation performed on nodes and edges between nodes; Execute the test case diagram data to test the interface.

2. The method according to claim 1, characterized in that The test case diagram data is generated in the following way: Output candidate nodes on the node template interface; receiving a selection operation and / or a drag operation performed on a desired node among the candidate nodes, and outputting the desired node on an orchestration interface based on the received selection operation and / or drag operation; receiving a connection operation for the required nodes through the orchestration interface, and generating edges between the required nodes based on the connection operation; The test case graph data is obtained based on the required nodes and the edges between the required nodes.

3. The method according to claim 2, characterized in that The method further comprises: For the test case diagram data output on the arrangement interface, a move operation for any node in the test case diagram data is received, and the any node is moved based on the move operation, so as to update the test case diagram data.

4. The method according to claim 2, characterized in that: The method further comprises: Select a new node on the node template interface; receiving a selection operation and / or a drag operation performed on a newly added node among the candidate nodes, and outputting the newly added node on the arrangement interface based on the received selection operation and / or drag operation; Insert the newly added node into the test case graph data so as to update the test case graph data.

5. The method according to claim 1, characterized in that The interface test includes at least one test step to be executed, the test case graph data includes at least one node to be executed and an edge between the nodes to be executed, and at least one node to be executed corresponds to at least one test step to be executed one by one; the method further includes: In the process of executing the test case diagram data, when executing to a to-be-executed node corresponding to a current test step, marking the corresponding to-be-executed node in a first marking manner; When the to-be-executed node corresponding to the current test step is successfully executed, marking the corresponding to-be-executed node in a second marking manner; When the execution of the to-be-executed node corresponding to the current test step fails, the corresponding to-be-executed node is marked in the third marking mode. Among them, the step name of the corresponding test step is displayed on the node to be executed.

6. The method according to any one of claims 1 to 5, characterized in that: The test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers and target node identifiers connected to the edges; executing the test case graph data to test the interface includes: In the case where the node identifier of the current node indicates that the current node is not a conditional node, querying the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node; Based on the target node identifier in the current edge, querying the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; The next node is executed to test the interface.

7. The method according to any one of claims 1 to 5, characterized in that: The test case graph data includes nodes and edges, the nodes include node identifiers, and the edges include source node identifiers, target node identifiers, and edge identifiers connected to the edges; and executing the test case graph data to test the interface includes: In the case where the node identifier of the current node indicates that the current node is a conditional node, querying the current edge from the test case graph data, wherein the source node identifier of the current edge is consistent with the node identifier of the current node, and the edge identifier of the current edge is consistent with the output parameter of the current node; Based on the target node identifier in the current edge, querying the next node from the test case graph data, wherein the target node identifier in the current edge is consistent with the node identifier of the next node; The next node is executed to test the interface.

8. The method according to any one of claims 1 to 5, characterized in that: The test case graph data includes nodes and edges, and the nodes include node identifiers; the executing the test case graph data to test the interface also includes: When the node identifier of the current node indicates that the current node has completed initialization, the next node is determined from the test case diagram data based on the node identifier, wherein the node identifier of the next node indicates that the node type of the next node is a start type.

9. An interface testing device, characterized in that: The device comprises: An acquisition module, used to acquire test case graph data for testing an interface, wherein the test case graph data is generated based on a received orchestration operation, and the orchestration operation is an operation performed on nodes and edges between nodes; The test module is used to execute the test case diagram data so as to test the interface.

10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.