Test data processing method and apparatus, and storage medium

By displaying the target flowchart and obtaining natural language configuration information in MBT technology, generating test trajectory diagrams and processing them on the server, the problem of low efficiency in test data writing in MBT technology is solved, and efficient test case generation is achieved.

CN114428721BActive Publication Date: 2025-11-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011179691.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-29
Publication Date
2025-11-25
Estimated Expiration
2040-10-29

AI Technical Summary

Technical Problem

Existing MBT technology suffers from low efficiency, long processing time, and high error rate when generating test data. Adding new nodes can affect the overall graph structure and even render the original graph unusable.

Method used

By displaying the target flowchart, node configuration information and edge configuration information represented in natural language are obtained, a test trajectory diagram is generated, and it is sent to the server for formatting to generate test cases. The client and server jointly participate in data processing to improve writing efficiency.

Benefits of technology

It reduces the difficulty of writing and maintaining test cases, improves the efficiency and readability of test case writing, and solves the problem of low efficiency in writing test data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428721B_ABST
    Figure CN114428721B_ABST
Patent Text Reader

Abstract

The application discloses a kind of test data processing method, device and storage medium.Therein, the method includes: display target flow chart, target flow chart includes at least three test nodes and the directed connection between each test node;In response to the triggering operation of test node and directed connection in target flow chart, obtain the node configuration information corresponding to test node and the edge configuration information corresponding to directed connection, node configuration information and edge configuration information are expressed in natural sentence;According to target flow chart, the node configuration information of test node and the edge configuration information of directed connection, generate test track chart;Test track chart is sent to server, to make server carry out data processing to test track chart, obtain the test case corresponding to test track chart;Receive and display the test case corresponding to test track chart returned by server.The application reduces the difficulty of test case writing and maintenance, improves the readability of test case writing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information processing, in particular to a test data processing method and device and storage medium. BACKGROUND

[0002] MBT (Model-based testing) refers to automatically generating test cases or test suites by using a model, and then executing the test. MBT needs to implement a model, formulate behaviors and relationships between behaviors and behaviors and systems (finite state machines), and then generate a large number of test cases (each execution generates different test cases) according to the state of the system under test, previously set restrictions and strategies, and the test results are affected by a series of operations, which can produce uncertainty and are more likely to find some unexpected deep path BUGs.

[0003] The existing MBT technology generates corresponding test data through a process of "specified data format → generation graph → processing of data in the format". In this process, all data must be in the standard input parameters of the system or the execution program to be correctly interpreted, and the data format cannot be generated and edited when the data format does not meet the specified format requirements. However, the specified data format has the defects of long time consumption, low writing efficiency and easy error, in addition, when a new node is added, it will have a great impact on the overall graph structure, and even cause the original graph to be unavailable.

[0004] At present, there is no effective solution to the above problems. SUMMARY

[0005] The embodiments of the present application provide a test data processing method, device and storage medium to at least solve the technical problem of low test data writing efficiency.

[0006] According to a first aspect of the embodiments of the present application, a test data processing method is provided, applied to a client, including:

[0007] displaying a target flowchart, the target flowchart including at least three test nodes and directed connections between the test nodes;

[0008] in response to a triggering operation on the test nodes and the directed connections in the target flowchart, obtaining node configuration information corresponding to the test nodes and edge configuration information corresponding to the directed connections, the node configuration information and the edge configuration information being represented in natural sentences;

[0009] generating a test track graph according to the target flowchart, the node configuration information of the test nodes and the edge configuration information of the directed connections;

[0010] send the test track graph to a server to make the server perform data processing on the test track graph to obtain a test case corresponding to the test track graph, wherein the data processing comprises: performing format processing on the test track graph to obtain format data corresponding to each test node and each directed connection, traversing the test track graph to generate at least one test path, and generating a test case corresponding to each test path based on the format data of each test node and the format data of each directed connection in the test path;

[0011] receive and display the test case corresponding to the test track graph returned by the server.

[0012] According to a second aspect of the embodiment of the present application, a test data processing method applied to a server is further provided, and the method comprises:

[0013] obtaining a test track graph generated by a client, wherein the test track graph comprises at least three test nodes and directed connections between the test nodes, the test nodes comprise node configuration information, the directed connections comprise edge configuration information, and the node configuration information and the edge configuration information are expressed in natural sentences;

[0014] performing format processing on the test track graph to obtain format data corresponding to each test node and each directed connection;

[0015] traversing the test track graph to generate at least one test path;

[0016] generating a test case corresponding to each test path based on the format data of each test node and the format data of each directed connection in the test path;

[0017] returning the test case to the client.

[0018] According to a third aspect of the embodiment of the present application, a test data processing device applied to a client is further provided, and the device comprises:

[0019] a target flowchart display unit configured to display a target flowchart, wherein the target flowchart comprises at least three test nodes and directed connections between the test nodes;

[0020] a configuration information obtaining unit configured to, in response to a triggering operation on the test nodes and the directed connections in the target flowchart, obtain node configuration information corresponding to the test nodes and edge configuration information corresponding to the directed connections, wherein the node configuration information and the edge configuration information are expressed in natural sentences;

[0021] a test track graph generation unit configured to generate a test track graph according to the target flowchart, node configuration information of the test nodes, and edge configuration information of the directed connections;

[0022] a request sending unit configured to send the test track graph to a server, so that the server performs data processing on the test track graph to obtain test cases corresponding to the test track graph, wherein the data processing includes: performing format processing on the test track graph to obtain format data corresponding to each test node and each directed connection, traversing the test track graph to generate at least one test path, and generating a corresponding test case for each test path based on the format data of each test node and the format data of the directed connection in the test path;

[0023] a test case receiving unit configured to receive and display the test cases corresponding to the test track graph returned by the server.

[0024] According to a fourth aspect of the embodiments of the present application, a test data processing device is further provided, which is applied to a server side, and the device comprises:

[0025] a test track graph acquisition unit configured to acquire a test track graph generated by a client, the test track graph comprising at least three test nodes and directed connections between the test nodes, the test nodes comprising node configuration information, and the directed connections comprising edge configuration information, the node configuration information and the edge configuration information being expressed in natural language sentences;

[0026] a preprocessing unit configured to perform format processing on the test track graph to obtain format data corresponding to each test node and each directed connection;

[0027] a test path generation unit configured to traverse the test track graph to generate at least one test path;

[0028] a test case generation unit configured to generate a corresponding test case for each test path based on the format data of each test node and the format data of the directed connection in the test path;

[0029] a test case sending unit configured to return the test cases to the client.

[0030] According to another aspect of the embodiments of the present application, a computer readable storage medium is further provided, the storage medium storing at least one instruction or at least one program, the at least one instruction or at least one program being loaded and executed by a processor to implement the test data processing method of the first aspect or the second aspect.

[0031] According to another aspect of the embodiments of the present application, a computer device is also provided, which comprises a memory and a processor, the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the test data processing method of the first aspect or the second aspect.

[0032] The technical scheme provided by the embodiments of the present application can have the following beneficial effects:

[0033] By displaying the target flowchart, in response to the triggering operation on the test nodes and the directed connections in the target flowchart, the node configuration information and the edge configuration information edited in natural sentences are obtained, the target flowchart is updated according to the test node configuration information and the edge configuration information, the test track graph is obtained, the test track graph is submitted to the server, and the server processes the test track graph to generate the corresponding test case. The embodiments of the present application provide flowcharts under various businesses, the client can edit and obtain the test track graph by setting the configuration data in natural sentences, the server generates the test case according to the test track graph, the difficulty of writing and maintaining the test case in the front end is reduced, the efficiency and readability of writing the test case are improved, and the technical problem of low test data writing efficiency is solved. BRIEF DESCRIPTION OF DRAWINGS

[0034] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:

[0035] Figure 1 FIG. 1 is a schematic diagram of a hardware environment of the test data processing method according to the embodiments of the present application;

[0036] Figure 2 FIG. 2 is a data sharing system according to the embodiments of the present application;

[0037] Figure 3 FIG. 3 is a flowchart of an optional test data processing method according to the embodiments of the present application;

[0038] Figure 4 FIG. 4 is a drawing interface of an optional target flowchart according to the embodiments of the present application;

[0039] Figure 5 FIG. 5 is a drawing interface of an optional target flowchart according to the embodiments of the present application;

[0040] Figure 6 FIG. 6 is a schematic diagram of an optional test case corresponding to the test track graph displayed in the page according to the embodiments of the present application;

[0041] Figure 7is a schematic diagram of an optional page configuration execution environment information according to an embodiment of the present application;

[0042] Figure 8 is a flow chart of an optional test data processing method according to an embodiment of the present application;

[0043] Figure 9 is a structural block diagram of an optional policy management platform according to an embodiment of the present application;

[0044] Figure 10 is a schematic diagram of a policy execution process according to an embodiment of the present application;

[0045] Figure 11 is a structural schematic diagram of a decision tree according to an embodiment of the present application;

[0046] Figure 12 is a flow schematic diagram of executing a test case according to an embodiment of the present application;

[0047] Figure 13 is a flow schematic diagram of a feature processing method according to an embodiment of the present application;

[0048] Figure 14 is a flow schematic diagram of a keyword processing method according to an embodiment of the present application;

[0049] Figure 15 is a flow chart of an optional test data processing device according to an embodiment of the present application;

[0050] Figure 16 is a flow chart of an optional test data processing device according to an embodiment of the present application;

[0051] Figure 17 is a structural block diagram of a terminal according to an embodiment of the present application;

[0052] Figure 18 is a structural block diagram of a server according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the persons skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by the persons skilled in the art without creative labor should belong to the protection scope of the present application.

[0054] It should be noted that the terms "first", "second", and the like in the description and claims of the application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0055] First, the embodiment of the application discloses an implementation environment of a test data processing method in a feasible embodiment.

[0056] Referring to Figure 1 , the implementation environment includes a client 01 and a server 03.

[0057] The client 01 can include an entity device such as a smart phone, a tablet computer, a notebook computer, a digital assistant, a smart wearable device, a vehicle-mounted terminal, etc., and can also include software running in the entity device, such as an application program with a test data processing function, etc. The client 01 can be communicatively connected with the server 03 based on a browser / server mode (B / S) or a client / server mode (C / S).

[0058] The client 01 can display a target flowchart, obtain node configuration information and edge configuration information by responding to a triggering operation on a test node and a directed connection in the target flowchart, update the target flowchart based on the node configuration information and the edge configuration information, and obtain a test track graph. The client 01 can send the test track graph to the server 03. The server 03 can perform format processing on the test track graph based on a preset data conversion rule, generate at least one test path by traversing the test track graph, generate corresponding test cases based on the test path and the formatted data corresponding to the test track graph, and transmit the test cases to the client 01, so that the client 01 displays each test case corresponding to the test track graph. The client 01 can also obtain execution environment configuration information and a target test case according to a test case execution request, send the execution environment configuration information and the target test case to the server 03, and the server 03 can analyze the target test case and execute the target test case in an execution environment corresponding to the execution environment configuration information to obtain a test case result, and return the test case result to the client 01, so that the client 01 displays the test case result.

[0059] The server 03 can include a standalone server, or a distributed server, or a server cluster composed of multiple servers.

[0060] The server involved in the scenario of the test data processing method of the embodiment of the application can be a data sharing system formed by multiple nodes (any form of computing device in an access network, such as a server, a client) connected through network communication.

[0061] Referring to Figure 2 The data sharing system 400 shown in the figure refers to a system for data sharing between nodes, which can include multiple nodes 101, which can be various clients in the data sharing system. Each node 101 can receive input information during normal operation and maintain shared data in the data sharing system based on the received input information. In order to ensure information exchange in the data sharing system, each node in the data sharing system can have an information connection between nodes, and information transmission between nodes can be performed through the above information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to a consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system is consistent.

[0062] Each node in the data sharing system has a corresponding node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so as to subsequently broadcast the generated block to other nodes in the data sharing system according to the node identifiers of the other nodes. Each node can maintain a node identifier list as shown in the following table, and store the node name and node identifier in the node identifier list. The node identifier can be an IP (Internet Protocol) address and any other information that can be used to identify the node.

[0063] Of course, the method provided by the embodiment of the application is not limited to the application scenario shown in Figure 1 The application scenario shown in the figure can also be used in other possible application scenarios, and the embodiment of the application does not limit the application scenario. The functions that can be achieved by each device in the application scenario shown in the figure will be described together in the subsequent method embodiments, and will not be described in detail here. Figure 1

[0064] Please refer to Figure 3 which shows a flowchart of an optional test data processing method according to an embodiment of the application, which can be implemented in the data sharing system shown in the figure. Figure 1 ​The client in the implementation environment is an execution subject, and the method can include:

[0065] S301: display a target flowchart, the target flowchart including at least three test nodes and directed connections between the test nodes.

[0066] The risk control strategy is mainly to determine whether an object such as a user, a merchant, a transaction order, a device, and a certificate meets a precondition of a decision point according to different business scenarios, so as to find a risk point, reduce the risk, and reduce the cost and improve the efficiency. In order to determine whether the risk control strategy is reasonable, a decision tree is usually constructed by drawing a graph to generate a test case and complete the test work of the risk control strategy. The traditional test of the risk control strategy needs to edit the decision points and conditions into a specified data format, then generate a graph, and then process the formatted data to generate corresponding test data. In the editing process, all data needs to be in the standard input parameters of a system or an execution program, the requirement for the professionalism of non-professionals is relatively high, the readability is poor, and the maintenance cost and the modification cost are relatively high after editing. According to the common characteristics of different scenarios under each business type, the risk control strategy under each business type is abstracted into a business flowchart in the embodiment of the application, a corresponding relationship between the business type and the business flowchart is established, and the function of quickly generating a test track graph and a test case is provided to a client user, including determining a business flowchart according to a business type, determining a target flowchart according to the business flowchart, configuring test nodes and directed connections in the target flowchart, obtaining a test track graph, and generating a test case according to the test track graph, so that the editing difficulty of the test case is reduced and the test efficiency is improved.

[0067] In a feasible embodiment, the target flowchart can be determined by the following steps: displaying a business type; in response to a selection operation on the business type, displaying a business flowchart corresponding to the business type, the business flowchart including at least three test nodes and directed connections corresponding to the test nodes; and in response to a determination operation on the business flowchart, taking the business flowchart as the target flowchart. Each test node in the business flowchart corresponds to node information, and each directed connection corresponds to to-be-configured information.

[0068] In another feasible embodiment, the target flowchart can be determined by the following steps: displaying a business type; in response to a selection operation on the business type, displaying a business flowchart corresponding to the business type, the business flowchart including at least three test nodes and directed connections corresponding to the test nodes; and in response to a modification operation on the business flowchart, updating the test nodes and the directed connections of the business flowchart according to the modification operation, and taking the updated business flowchart as the target flowchart.

[0069] The modification operation includes adding a test node to the business process graph and deleting a test node from the business process graph. The updating the test node and the directed connection of the business process graph according to the modification operation of the business process graph can include the following steps: displaying standard nodes including a start node, an end node and an intermediate node; when the modification operation is adding a test node to the business process graph, adding the standard node corresponding to a selection operation of the standard node as a newly added test node to the business process graph in response to the selection operation; when the newly added test node is an intermediate node or an end node, drawing a directed connection between the newly added test node and other test nodes in the business process graph in response to a trigger operation of other test nodes except the newly added test node; and when the modification operation is deleting a test node from the test trajectory graph, removing the test node corresponding to a deletion operation of the test node in the business process graph and the directed connection associated with the test node from the business process graph in response to the deletion operation.

[0070] In the embodiment of the application, a user can add or delete test nodes and configure information of the nodes and the directed connections according to test requirements, and the graph data is flexible and low in modification cost.

[0071] S303: In response to a trigger operation of the test node and the directed connection in the target process graph, obtaining node configuration information corresponding to the test node and edge configuration information corresponding to the directed connection, the node configuration information and the edge configuration information being expressed in natural sentences.

[0072] Specifically, step S303 can include: in response to a trigger operation of the test node in the target process graph, displaying a node configuration box of the test node, wherein the node configuration box includes a node configuration input control; in response to an input operation of the node configuration input control, obtaining node configuration information corresponding to the test node; in response to a trigger operation of the directed connection in the target process graph, displaying an edge configuration box of the directed connection, wherein the edge configuration box includes an edge configuration input control; and in response to an input operation of the edge configuration input control, obtaining edge configuration information corresponding to the directed connection, the edge configuration information including an edge condition and protocol data.

[0073] Figure 4 An optional drawing interface of a target process graph according to an embodiment of the application is shown. Please refer to FIG. 4. Figure 4The upper part of the interface shown in the figure displays the business type as an external card strategy, the left side of the interface displays standard nodes, the middle part of the interface displays a flowchart of the external card strategy, the flowchart indicates node information of each test node and to-be-configured information of each directed connection, when a test node in the flowchart is selected, the right side of the interface displays a node configuration box corresponding to the selected test node, the node configuration box includes node description information of the selected test node and a condition configuration control, and the content of the node description control is the original data of the test node in the external card strategy by default, and node configuration information corresponding to the selected test node can be added by clicking an add condition button.

[0074] Figure 5 An optional target flowchart drawing interface according to an embodiment of the application is shown. Figure 5 When the user selects a directed connection for configuring a certificate type in the figure, the right side of the interface displays an edge configuration box of the directed connection, the edge configuration box displays description information of the directed connection and a condition configuration control, the user can select a required option corresponding to to-be-configured information (certificate type in the figure) in the form of a drop-down list by clicking the condition configuration control, generate edge configuration information corresponding to the directed connection, or the user can input a keyword into the condition configuration control, and when the keyword matches pre-stored condition information, the pre-stored condition information matching the keyword is used as the edge configuration information, wherein each piece of edge configuration information includes a feature ID, an action description and a target object (a sender or a receiver).

[0075] S305: generating a test track diagram according to the target flowchart, node configuration information of the test node and edge on configuration information of the directed connection.

[0076] Specifically, the method can include: associating the node configuration information with the corresponding test node, and associating the edge on configuration information with the directed connection; displaying the node configuration information on the test node of the target flowchart, and displaying the edge on configuration information on the directed connection.

[0077] The embodiment of the application can generate a test track diagram by providing a business flowchart under a business type, allowing a user to edit an existing business flowchart, adding or deleting test nodes in the flowchart according to test requirements, and editing node configuration information of each test node and edge on configuration information of a directed connection in natural language, thereby greatly reducing the difficulty of generating a test track diagram and improving the efficiency of generating a test track diagram.

[0078] S307: send the test track graph to a server to make the server perform data processing on the test track graph to obtain a test case corresponding to the test track graph; wherein the data processing comprises: performing format processing on the test track graph to obtain format data corresponding to each test node and each directed connection, traversing the test track graph to generate at least one test path, and generating a corresponding test case for each test path based on the format data of each test node and the format data of the directed connection in the test path.

[0079] S309: receive and display the test case corresponding to the test track graph returned by the server.

[0080] Figure 6 is a schematic diagram of an optional page for displaying a test case corresponding to a test track graph according to an embodiment of the present application. As shown in Figure 6 , the test track graph and the test case corresponding to the test track graph are displayed in the interface at the same time, and clicking the test case can highlight the test nodes and directed connections associated with the test case in the test track graph; each test case corresponds to a test state display control, wherein PASS indicates that the test passes, FAIL indicates that the test fails, and NOT RUN indicates that the test is not executed; when the control displays the FAIL identifier, the failure reason can also be displayed in the form of a floating layer.

[0081] In a feasible embodiment, the step S309 further comprises:

[0082] S311: when a test case execution request is received, display an execution environment configuration box.

[0083] S313: in response to an input operation on the execution environment information configuration box, obtain execution environment configuration information corresponding to the input operation.

[0084] Figure 7 is a schematic diagram of an optional page for configuring execution environment information according to an embodiment of the present application. As shown in Figure 7 , the execution environment configuration box can be displayed on the test track graph in the form of a floating layer. Specifically, the execution environment configuration box includes the following to-be-configured information:

[0085] env_type: environment selection (test environment, integration environment, online environment)

[0086] rec_uin: information id of a receiver

[0087] run_method: execution method

[0088] scene: policy-related protocol scene

[0089] send_uin: sender's information id

[0090] spid: merchant information.

[0091] S315: In response to a selection operation on a test case, the selection operation is determined as a target test case.

[0092] S317: According to the target test case and the execution environment configuration information, a case execution request is generated, and the case execution request is sent to the server, so that the server executes the target test case in the execution environment corresponding to the execution environment configuration information to obtain a case execution result.

[0093] S319: The case execution result returned by the server is received and displayed.

[0094] The embodiment of the application displays a target flowchart, responds to a triggering operation on a test node and a directed connection in the target flowchart, obtains node configuration information and edge configuration information edited in natural sentences, updates the target flowchart according to the test node configuration information and the edge configuration information, obtains a test track diagram, and submits the test track diagram to a server, so that the server processes the test track diagram to generate a corresponding test case. The embodiment of the application provides a flowchart under various businesses, and a client can edit a test track diagram by setting configuration data in natural sentences. The server generates a test case according to the test track diagram, reduces the difficulty of writing and maintaining a test case, improves the efficiency and readability of writing a test case, and solves the technical problem of low efficiency of writing a test case.

[0095] Please refer to Figure 8 , which shows a flowchart of an optional test data processing method according to an embodiment of the application. The method can be implemented in Figure 1 The server in the implementation environment is the execution subject, and the method can include the following steps:

[0096] S801: A test track diagram generated by a client is obtained, the test track diagram includes at least three test nodes and directed connections between the test nodes, the test nodes include node configuration information, the directed connections include edge configuration information, and the node configuration information and the edge configuration information are both expressed in natural sentences.

[0097] The process of the client generating the test track diagram is described in Figures 3-7 The corresponding embodiment is described, and will not be repeated here.

[0098] S803: The test track diagram is formatted to obtain formatted data corresponding to each test node and the directed connection.

[0099] In a feasible embodiment, the formatting of the test track graph can include:

[0100] Converting each test node in the test track graph into a JSON object, converting the JSON objects of test nodes with the same edge configuration information to form a JSON array, determining a first target test node corresponding to the edge configuration information, mounting the JSON array to the JSON object converted from the first target test node to obtain a JSON format node content file; performing data processing on the JSON format node content file to obtain the formatted data of each test node in the test track graph; converting the edge configuration information of each directed connection in the test track graph into a JSON object, determining a second target test node associated with the edge configuration information, and mounting the JSON object corresponding to the edge configuration information to the JSON object converted from the second target test node to obtain the formatted data of each directed connection in the test track graph.

[0101] The data processing on the JSON format node content file can include the steps of filtering and supplementing the JSON format data to filter out useless information and complete necessary information for generating test cases. Specifically, it can include adding the node name of the test node according to the shape information of the test node in the node content file, and removing the coordinate information and shape information of the test node in the node content file.

[0102] S805: traversing the test track graph to generate at least one test path.

[0103] In a feasible embodiment, the traversing of the test track graph to generate at least one test path can include: obtaining the node configuration information of the start node in the test track graph; determining the test scene according to the node configuration information of the start node; and using a breadth-first traversal algorithm to traverse the test track graph to generate at least one test path under the test scene.

[0104] In the business process graph corresponding to the business type, the start node carries test scene information. If the user does not modify the original information of the start node in the test track graph, the test scene corresponding to the start node in the test track graph is the corresponding test scene of the start node in the business process graph. If the user reconfigures the node information of the start node, the test scene is determined according to the newly configured node configuration information.

[0105] The breadth-first search algorithm, also known as BFS, is a blind search algorithm that aims to systematically expand and inspect all nodes in a graph to find the solution. The algorithm works as follows: start from a vertex v in the graph, visit v, visit each unvisited adjacent vertex of v, and visit the adjacent vertices of these vertices in the order of "first visited adjacent vertex" to "last visited adjacent vertex", and repeat the process until all adjacent vertices of the visited vertices have been visited. BFS processes vertices by layers, with the closest vertices to the starting point being visited first and the farthest vertices being visited last. The search steps are as follows:

[0106] a. First, select a vertex as the starting vertex and color it gray, and the remaining vertices are white.

[0107] b. Put the starting vertex into the queue.

[0108] c. Select a vertex from the front of the queue and find all adjacent vertices, put the found adjacent vertices into the tail of the queue, and color the visited vertices black and the unvisited vertices white. If the color of a vertex is gray, it means it has been found and put into the queue, and if the color of a vertex is white, it means it has not been found.

[0109] d. Process the next vertex in the queue in the same way. The dequeued vertex becomes black, the vertex in the queue is gray, and the vertex not in the queue is white.

[0110] S807: Based on the formatted data of each test node and the formatted data of the directed connection in the test path, generate a corresponding test case for each test path.

[0111] In a feasible embodiment, based on the formatted data of each test node and the formatted data of the directed connection in the test path, a conditional coverage method can be used to generate a corresponding test case for each test path.

[0112] S809: Return the test case to the client.

[0113] After the client receives the test case returned by the server, the test case and the test track diagram are displayed on the page. When a test case is selected, the test path corresponding to the test case in the test track diagram is highlighted, which facilitates the user to compare and view the test case and the test track diagram, thereby facilitating the optimization of test data.

[0114] This invention employs a breadth-first search algorithm to traverse the node levels of a decision tree, then orthogonally combines relation nodes and edge conditions to generate executable test cases. These test cases are further associated with a test trajectory graph. This achieves automatic test case generation from the graph, eliminating the need for users to edit test cases according to a specified data format, reducing the access cost of strategy testing, and improving test case generation efficiency.

[0115] In one feasible embodiment, after step S809, the method further includes:

[0116] S811: Receive a test case execution request sent by the client, the test case execution request including the target test case and execution environment configuration information.

[0117] S813: Analyze the target test case to obtain edge conditions and protocol data.

[0118] Specifically, each test case contains test node information and edge configuration information. The edge configuration information includes edge conditions and protocol data, which have corresponding specific characters in the test case. The specific characters corresponding to the edge conditions or protocol data in the test case can be queried through the parser, and the strings corresponding to these specific characters can be extracted to obtain the edge conditions and protocol data. For example, for the test case: "(0)WxH1AMLBindLimitNoCKV==>0_1I5012:ID card:send(2)bank_id judgment==>2_4I{"proto":"bank_id=622588780000000"}", the string "bank_id=622588780000000" corresponding to the specific character "bank_id judgment" is the edge condition of this test case.

[0119] S815: Escape the keywords in the edge conditions according to the preset keyword pool, generate parameters in a preset format corresponding to the keywords, and replace the keywords in the edge conditions of the target test case with parameters in the preset format.

[0120] Specifically, the keyword description in the edge condition is escaped into a parameter understandable by the program. The keyword can be escaped according to a preset keyword pool, the preset keyword pool is used to store a mapping relationship between the keyword and a parameter in a preset format, and the parameter corresponding to the keyword is stored in the keyword pool in the preset format, the preset format refers to a standard format that can be understood and executed by the program, and the process of matching the text content input by the user with the keyword in the keyword pool to obtain the corresponding parameter is the process of escaping the text content into the standard format parameter understandable by the program. The mapping relationship between the data such as account, numerical value, character, time, user associated information and the parameter in the preset format corresponding to the data is stored in the keyword pool in advance, and the parameter in the preset format corresponding to the keyword is obtained by matching the keyword with the data stored in the keyword pool. For example, the identity card number of "Zhang San" is obtained, and the identity card information corresponding to the account of "Zhang San" is obtained without manual input. The key is to generate test data through text description without using standard format parameter input, so as to greatly reduce the editing difficulty and improve the writing efficiency.

[0121] S817: replacing the parameters of the protocol data in the target test case according to the principle of ensuring that the protocol data can be executed to the test node to be tested.

[0122] In the embodiment of the application, the client edits the test data in natural sentences, and the test data in the edge configuration information may not be accurate, so before the test case is executed, the original parameters of the protocol are replaced according to the edge protocol data according to the rules to ensure that the protocol data can be executed to the strategy to be tested.

[0123] S819: executing the target test case in the execution environment corresponding to the execution environment configuration information to obtain a test case execution result.

[0124] S821: returning the test case execution result to the client.

[0125] The embodiment of the application provides a strategy management platform for implementing the above-mentioned embodiment. Figure 9 is a structural block diagram of an optional strategy management platform according to the embodiment of the application, please refer to Figure 9 , the platform can be divided into three layers, namely portal, management middle platform, data center and executor. The functions of each layer structure are described below.

[0126] 1. Portal

[0127] The portal provides a drawing function, and the drawing tool on the page can be used to draw a test trajectory diagram. The portal also provides a process display and a test case display function, which are mainly used for the interaction of the review process, such as Figure 6As shown, clicking a test case can highlight the corresponding flow in the test track graph.

[0128] 2. Management Center

[0129] The management center has use case management, test flow management, and test version management functions.

[0130] Use case management: mainly handles the conversion of test track graphs to test cases, mainly uses breadth-first search algorithm and conditional traversal to generate test cases, and associates test track graphs with test cases. For example, Figure 11 As shown, using breadth-first search Figure 11 the decision tree, taking the leftmost node as an example, the following paths can be generated:

[0131] Path 1: (0) start→(1.1) decision node→(2.1) decision node→(3.1) decision node Path 2: (0) start→(1.1) decision node→(2.1) decision node→(3.2) decision node Path 3: (0) start→(1.1) decision node→(2.2) decision node→(3.1) decision node Path 4: (0) start→(1.1) decision node→(2.2) decision node→(3.2) decision node Path 5: (0) start→(1.1) decision node→(2.3) decision node→(3.2) decision node Path 6: (0) start→(1.1) decision node→(3.1) decision node

[0132] Other paths:...

[0133] Further, conditional coverage is adopted, and test cases can be generated according to paths and edge conditions. Taking path 1 as an example, there are 2 conditions from (1.1) decision node to (2.1) decision node, so two test cases are generated:

[0134] Test case 1: (0) start→condition A→(1.1) decision node→condition B→(2.1) decision node→condition C→(3.1) decision node;

[0135] Test case 2: (0) start→condition A→(1.1) decision node→condition B1→(2.1) decision node→condition C→(3.1) decision node.

[0136] Test flow management: including but not limited to requirement review, use case review, etc.

[0137] Test version management: corresponding the test version to the test version, facilitating subsequent backtracking and problem reproduction.

[0138] 3. Executor and Data Center

[0139] Data center: Primarily stores protocol data, number data, variable data, use cases, use case execution results, and graph data.

[0140] Executor: Used to link with the data center and process data during test case execution, including environment relationship conversion, protocol association, test number acquisition, keyword processing, variable updating, test case execution, and judgment results.

[0141] Figure 10 This is a schematic diagram illustrating the strategy execution process according to an embodiment of the present invention. Please refer to [link / reference]. Figure 10 ,based on Figure 9 The strategy management platform shown implements the following process:

[0142] After saving the test trajectory diagram drawn through the portal (i.e., the strategy flowchart in the diagram), the strategy flowchart is formatted and scenario test cases corresponding to the scenarios are generated through an algorithm. The management platform sends the generated scenario test cases to the executor, which parses the test cases to extract initialization data, strategy data, variable data, protocol data, and assertion data (expected results).

[0143] After parsing, perform the following steps:

[0144] The first step is to initialize the data and set the initial account characteristics.

[0145] The second step is edge condition parsing. The conditions that must be satisfied from one node to the next in the path are the edge conditions. Keyword descriptions in the edge conditions are escaped and converted into parameters that the program can understand. This keyword escaping is linked to the keyword pool. For example, to retrieve the ID number of "xxx", the program will query the pre-stored data in the keyword pool based on the account name to obtain the corresponding ID information, rather than manually inputting it. Other functions such as numerical values, characters, time, and user queries are similar. The key is to generate test data through text descriptions, rather than standard format data input.

[0146] The third step is to replace the original protocol parameters according to the rules based on the concordance data on the edges, so as to ensure that the protocol data can execute the strategy that needs to be tested.

[0147] The fourth step is to execute test cases, update user characteristic variables, send a protocol request to the TCP protocol, and the policy engine reads the user characteristic variables and calls the protocol data to execute test cases.

[0148] The fifth step is to output the judgment results and / or evaluation report based on the test case execution results and assertion results, and write the execution log and corresponding execution results to the database.

[0149] The embodiment of the present application optimizes the determination scheme of the scene protocol corresponding to the strategy, which is embodied in that the correspondence between the strategy and the scene is established, and the relationship between the strategy and the scene is also stored in the strategy management platform, when the strategy flowchart is updated, the scene information associated with the strategy can be obtained from the strategy management platform through interface calling, and in the input parameter, the scene protocol information does not need to be input, only the strategy itself needs to be concerned, and in the use case execution, only the corresponding scene protocol needs to be selected for execution. Figure 12 is a flowchart of executing a test case according to the embodiment of the present application, in which the strategy can be regarded as a strategy flowchart, the strategy name can be regarded as a start node in the strategy flowchart, the strategy management platform stores the corresponding features of the strategy or the corresponding relationship between the strategy name and the scene, the corresponding scene protocols of each strategy can be obtained from the strategy management platform through the corresponding features of the strategy, and the corresponding scene protocols can also be obtained from the strategy management platform through the strategy name.

[0150] Among them, the execution mode is divided into three modes of burying points, burying point execution and protocol execution, which can quickly cover the full-automatic verification of the logic in the strategy, the semi-automatic verification of the terminal state and the full process of the accompanying human-computer interaction, the above execution modes meet the test requirements of the test process of the risk control strategy, and improve the test efficiency and the convenience of product experience.

[0151] Burying points: only the objects are buried, and subsequent verification is performed through terminal operation. The operation process of human-computer interaction is optimized to realize one-key execution.

[0152] Burying point execution: according to the specified edge condition value, the feature description of the object is generated to meet the condition value, and then according to the node name of the start node, the transaction scene associated with the strategy is obtained, and then according to the specified environment information / user information, a request is initiated.

[0153] Protocol execution: according to the protocol related information on the edge, the request field in the protocol is updated to realize accurate hitting of the strategy, and the tested strategy is tested and verified.

[0154] The embodiment of the present application simplifies the process and difficulty of the user to obtain the test case, in the graph data acquisition stage, the user adds node configuration information and edge configuration information to the flowchart by calling the preset flowchart under the business type, to construct a test track graph, wherein the configuration information is mainly input in natural language, and the natural language is processed by the background to generate corresponding test cases. The conversion process involves keyword conversion, that is, the data expressed by the natural language is converted into format data executable by the program, and the specific conversion steps are as follows Figure 13As shown, it comprises: obtaining the feature definition from the database of the strategy management platform according to the "Chinese data + feature id", and then performing rule matching to obtain the field corresponding to the Chinese data from the keyword pool, replacing the original Chinese data with the obtained field to obtain the available feature value (standardized input parameter). Example:

[0155] The defined feature format is as follows: data1, data2, data3.

[0156] The data format is: transaction type, transaction time, transaction amount; and the corresponding standardized input parameter is: 1, 20200608, 500000.

[0157] By adopting the scheme of the application, only "5012: today's transfer transaction amount is equal to 500000" needs to be input. The specific implementation process is: according to "5012: today's transfer transaction amount is equal to 500000", the database is queried to obtain the input parameter as 1, gen_time, gen_num = 500000, which is converted into 1, 20200608, 500000 in the program.

[0158] In the keyword processing process, gen_num is a type of action, and the specified attribute action is the generation date or the amount, = 500000 is a type of action, which is a supplementary action of a type of action, or can be regarded as an input parameter operation. Referring to Figure 14 , the field is replaced according to the type of the keyword to obtain the available feature value.

[0159] The embodiment of the application has the following beneficial effects:

[0160] 1) The test case is generated by using "drawing → graph data formatting → breadth-first traversal", which reduces the access cost of the strategy test model, reduces the maintenance cost of the strategy test model, and the model can be updated by mouse operation without editing the data format, thereby improving the reusability of the strategy test model.

[0161] 2) The processing of the feature keyword uses general and understandable text description to replace the original standard input parameter, thereby improving the readability of the model.

[0162] 3) The scene protocol related to the strategy is dynamically obtained, the query cost of manual operation is reduced, the protocol related field is dynamically updated, the precise coverage of the test is realized, the redundant test is reduced, the initial state data is used to ensure that the test data is not polluted, the accuracy of the strategy test is ensured, the use case is automatically generated, and the product experience cost is reduced, which is reduced from 30 minutes of strategy experience of an original use case to 2 minutes.

[0163] According to the embodiment of the application, a test data processing device 1500 is further provided, which is used to implement the method as Figures 3-7The test data processing method shown in the embodiment, the device comprises a target flowchart display unit 1510, a configuration information acquisition unit 1520, a test track graph generation unit 1530, a request sending unit 1540 and a use case receiving unit 1550.

[0164] The target flowchart display unit 1510 is configured to display a target flowchart, the target flowchart comprising at least three test nodes and directed connections between the test nodes;

[0165] The configuration information acquisition unit 1520 is configured to, in response to a triggering operation on the test nodes and the directed connections in the target flowchart, acquire node configuration information corresponding to the test nodes and edge configuration information corresponding to the directed connections, the node configuration information and the edge configuration information being expressed in natural language sentences;

[0166] The test track graph generation unit 1530 is configured to generate a test track graph according to the target flowchart, the node configuration information of the test nodes and the edge configuration information of the directed connections;

[0167] The request sending unit 1540 is configured to send the test track graph to a server, so that the server performs data processing on the test track graph to obtain test use cases corresponding to the test track graph; wherein the data processing comprises: performing format processing on the test track graph to obtain format data corresponding to each test node and each directed connection, traversing the test track graph to generate at least one test path, and generating a corresponding test use case for each test path based on the format data of each test node and the format data of the directed connections in the test path;

[0168] The use case receiving unit 1550 is configured to receive and display the test use cases corresponding to the test track graph returned by the server.

[0169] It should be noted that the target flowchart display unit 1510 in this embodiment can be configured to perform step S301 in the embodiments of the present application, the configuration information acquisition unit 1520 in this embodiment can be configured to perform step S303 in the embodiments of the present application, the test track graph generation unit 1530 in this embodiment can be configured to perform step S305 in the embodiments of the present application, the request sending unit 1540 in this embodiment can be configured to perform step S307 in the embodiments of the present application, and the use case receiving unit 1550 in this embodiment can be configured to perform step S309 in the embodiments of the present application.

[0170] It should be noted that the above-mentioned units have the same examples and application scenarios as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments. It should be noted that the above-mentioned modules as part of the device can run in a device such as a server, a terminal or a combination thereof.Figure 1 In the hardware environment shown, the implementation can be realized by software or hardware.

[0171] The device can solve the technical problem of low efficiency of test data writing, and further improve the test efficiency.

[0172] It should be noted that the test data processing device of the embodiment and the test data processing method in the embodiment are based on the same inventive concept, and will not be described here.

[0173] According to the embodiment of the application, a test data processing device 1600 is also provided for implementing the test data processing method as shown. Figure 8 The device includes a test trajectory graph acquisition unit 1610, a preprocessing unit 1620, a test path generation unit 1630, a test case generation unit 1640, and a case sending unit 1650.

[0174] The test trajectory graph acquisition unit 1610 is configured to acquire a test trajectory graph generated by a client, the test trajectory graph including at least three test nodes and directed connections between the test nodes, the test nodes including node configuration information, and the directed connections including edge configuration information, the node configuration information and the edge configuration information being represented in natural language statements.

[0175] The preprocessing unit 1620 is configured to perform format processing on the test trajectory graph to obtain formatted data corresponding to each test node and directed connection.

[0176] The test path generation unit 1630 is configured to traverse the test trajectory graph to generate at least one test path.

[0177] The test case generation unit 1640 is configured to generate corresponding test cases for each test path based on the formatted data of each test node and the formatted data of the directed connection in the test path.

[0178] The case sending unit 1650 is configured to return the test cases to the client.

[0179] The test data processing device of the embodiment and the test data processing method in the embodiment are based on the same inventive concept. The test trajectory graph acquisition unit 1610 can be configured to perform step S801 in the embodiment, the preprocessing unit 1620 can be configured to perform step S803 in the embodiment, the test path generation unit 1630 can be configured to perform step S805 in the embodiment, the test case generation unit 1640 can be configured to perform step S807 in the embodiment, and the case sending unit 1650 can be configured to perform step S809 in the embodiment.

[0180] The embodiment of the present application also provides a structural diagram of a terminal, as shown in the figure. Figure 17 The terminal can be used to implement the test data processing method provided in the above embodiments. Specifically,

[0181] The client can include RF (Radio Frequency) circuit 1710, memory 1720 including one or more computer readable storage media, input unit 1730, display unit 1740, sensor 1750, audio circuit 1760, WiFi (wireless fidelity) module 1770, processor 1780 including one or more processing cores, and power supply 1790, etc. Those skilled in the art can understand, Figure 17 The client structure shown in the figure does not constitute a limitation on the client, and can include more or fewer components than the figure, or combine certain components, or different component arrangements. Among them:

[0182] The RF circuit 1710 can be used for receiving and sending signals in the process of information or communication, especially receiving the downlink information of the base station and handing it over to one or more processors 1780 for processing; in addition, sending data related to uplink to the base station. Usually, the RF circuit 1710 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a SIM (Subscriber Identity Module) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. In addition, the RF circuit 810 can also communicate with the network and other clients through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile Communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0183] The memory 1720 can be used to store software programs and modules, and the processor 1780 can execute various function applications and data processing by running the software programs and modules stored in the memory 1720. The memory 1720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by functions, etc., and the data storage area can store data created according to the use of the client, etc. In addition, the memory 1720 can include a high-speed random access memory, and can also include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1720 can also include a memory controller to provide access for the processor 880 and the input unit 1730 to the memory 1720.

[0184] The input unit 1730 can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 1730 can include a touch-sensitive surface 1731 and other input devices 1732. The touch-sensitive surface 1731, also known as a touch display screen or touchpad, can collect user touch operations (such as user operations using fingers, styluses, etc. or any suitable objects or accessories near the touch-sensitive surface 1731) on or near it and drive the corresponding connection device according to the pre-set program. Optionally, the touch-sensitive surface 1731 can include two parts of touch detection device and touch controller. The touch detection device detects the touch position of the user and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch coordinates, and sends it to the processor 1780, and can also receive commands from the processor 1780 and execute them. In addition, the touch-sensitive surface 1731 can be implemented in various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch-sensitive surface 1731, the input unit 1730 can also include other input devices 1732. Specifically, the other input devices 1732 can include one or more of a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc.

[0185] The display unit 1740 can be configured to display information input by a user or provided to the user, as well as various graphical user interfaces of the client, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 1740 can include a display panel 1741, which can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 1731 can cover the display panel 1741, and when the touch-sensitive surface 1731 detects a touch operation thereon or adjacent thereto, transmit to the processor 1780 to determine the type of touch event, and then the processor 1780 provides corresponding visual output on the display panel 1741 according to the type of touch event. Among them, the touch-sensitive surface 1731 and the display panel 1741 can realize the input and output functions as two independent components, but in some embodiments, the touch-sensitive surface 1731 and the display panel 1741 can be integrated to realize the input and output functions.

[0186] The client can also include at least one sensor 1750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1741 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1741 and / or the backlight when the client is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the size of the acceleration in each direction (generally three axes), and when at rest, it can detect the size and direction of gravity, which can be used for applications such as identifying the posture of the client (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), and the like. As for other sensors that the client can also be configured, such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here.

[0187] The audio circuit 1760, the speaker 1761, and the microphone 1762 can provide an audio interface between the user and the client. The audio circuit 1760 can convert the received audio data into an electrical signal and transmit it to the speaker 1761, which converts it into a sound signal output. On the other hand, the microphone 1762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1760 and converted into audio data. After being processed by the processor 1780, the audio data is output to the RF circuit 1710 for transmission to another client, for example, or to the memory 1720 for further processing. The audio circuit 1760 can also include a earphone jack to provide communication between an external earphone and the client.

[0188] WiFi belongs to short distance wireless transmission technology, and the client can help users send and receive emails, browse web pages, access streaming media, etc. through the WiFi module 1770, which provides users with wireless broadband Internet access. Although Figure 17 The WiFi module 1770 is shown, but it is understood that it does not belong to the necessary components of the client, and can be omitted as needed without changing the essence of the application.

[0189] The processor 1780 is the control center of the client, which connects various parts of the client through various interfaces and lines, executes various functions of the client and processes data by running or executing software programs and / or modules stored in the memory 1720 and calling data stored in the memory 1720, thereby monitoring the client as a whole. Optionally, the processor 1780 can include one or more processing cores; preferably, the processor 1780 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, etc., and the modem processor mainly processes wireless communication. It is understood that the above-mentioned modem processor can also not be integrated into the processor 1780.

[0190] The client also includes a power supply 1790 (such as a battery) for powering various components, and the power supply can be logically connected to the processor 1780 through a power management system, so that the power management system can realize functions such as management of charging, discharging and power consumption management. The power supply 1790 can also include one or more DC or AC power sources, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and any other components.

[0191] Although not shown, the client can also include a camera, a Bluetooth module, etc., which will not be described here. In this embodiment, the display unit of the client is a touch screen display, and the client also includes a memory and one or more programs stored in the memory and configured to be executed by one or more processors to execute the instructions in the method embodiments of the application.

[0192] The embodiments of the application also provide a storage medium which can be arranged in a terminal to save at least one instruction and at least one program related to a test data processing method in the method embodiments, which are loaded and executed by the processor to realize the above Figures 3-7 corresponding test data processing method.

[0193] Optionally, in the embodiment, the storage medium can be located in at least one of the plurality of network clients of the computer network. Optionally, in the embodiment, the storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media capable of storing program codes.

[0194] The embodiment of the present application further provides a structural diagram of a server, please refer to Figure 18 The server 1800 is used for implementing the test data processing method provided in the above embodiments. Specifically, the server structure can include the above-mentioned device for identifying an Internet protocol IP address. The server 1800 can have great differences due to different configurations or performances, and can include one or more central processing units (CPUs) 1810 (for example, one or more processors) and a memory 1830, one or more storage media 1820 (for example, one or more mass storage devices) for storing application programs 1823 or data 1822. The memory 1830 and the storage media 1820 can be temporary storage or persistent storage. The programs stored in the storage media 1820 can include one or more modules, and each module can include a series of instruction operations in the server. Further, the central processing unit 1810 can be configured to communicate with the storage media 1820 and execute the series of instruction operations in the storage media 1820 on the server 1800. The server 1800 can further include one or more power supplies 1860, one or more wired or wireless network interfaces 1850, one or more input and output interfaces 1840, and / or one or more operating systems 1821, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0195] The embodiment of the present application further provides a storage medium, which can be arranged in a server to save at least one instruction and at least one program related to a test data processing method in the method embodiment, the at least one instruction and the at least one program are loaded and executed by the processor to implement the above Figure 8 corresponding test data processing method.

[0196] Optionally, in the embodiment, the storage medium can be located in at least one of the network servers in the computer network.

[0197] The embodiment of the present application also provides a storage medium.

[0198] Optionally, in the embodiment, the storage medium can be located in at least one of the network devices in the network shown in the above embodiment.

[0199] Optionally, in the embodiment, the storage medium is configured to store program codes for executing the method steps shown in Figure 3 or the method steps shown in Figure 8 .

[0200] Optionally, the specific examples in the embodiment can refer to the examples described in the above embodiment, and the embodiment will not be described here.

[0201] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0202] The embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the test data processing method provided in the various optional implementation manners.

[0203] The embodiment of the present application provides an electronic device, which includes a processor and a memory, and the memory stores at least one instruction and at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to realize the test data processing method shown in Figure 3 or Figure 8 .

[0204] The memory can be used to store software programs and modules, and the processor executes various function applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by functions, etc.; and the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory can also include a memory controller to provide access for the processor to the memory.

[0205] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0206] The integrated units in the above-mentioned embodiments, if realized in the form of software function units and sold or used as independent products, can be stored in the above-mentioned computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium and includes a plurality of instructions for causing one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.

[0207] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0208] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented by other means. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual units can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.

[0209] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0210] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0211] The above description is only the preferred embodiment of the present application, and it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A test data processing method applied to a client, characterized in that, The method comprises: displaying a target flowchart comprising at least three test nodes and directed connections between the test nodes, the target flowchart being determined according to a business flowchart, the business flowchart being determined according to a business type; in response to a triggering operation on the test nodes and the directed connections in the target flowchart, obtaining node configuration information corresponding to the test nodes and edge configuration information corresponding to the directed connections, the node configuration information and the edge configuration information being expressed in natural sentences; generating a test track chart according to the target flowchart, the node configuration information of the test nodes and the edge configuration information of the directed connections; sending the test track chart to a server to enable the server to perform data processing on the test track chart to obtain test cases corresponding to the test track chart; wherein the data processing comprises: performing format processing on the test track chart to obtain formatted data corresponding to each test node and each directed connection, traversing the test track chart to generate at least one test path, and generating corresponding test cases for each test path based on the formatted data of each test node and the formatted data of the directed connections in the test path; receiving and displaying the test cases corresponding to the test track chart returned by the server.

2. The method of claim 1, wherein, Before the display of the target flowchart comprising at least three test nodes and directed connections between the test nodes, the method further comprises: displaying a business type; in response to a selection operation on the business type, displaying a business flowchart corresponding to the business type, the business flowchart comprising at least three test nodes and directed connections corresponding to each test node; in response to a determination operation on the business flowchart, taking the business flowchart as the target flowchart; or, in response to a modification operation on the business flowchart, updating the test nodes and the directed connections of the business flowchart according to the modification operation, and taking the updated business flowchart as the target flowchart.

3. The method of claim 2, wherein, The modification operation comprises adding test nodes to the business flowchart and deleting test nodes from the business flowchart; in response to the modification operation on the business flowchart, updating the test nodes and the directed connections of the business flowchart according to the modification operation, comprises: displaying standard nodes, the standard nodes comprising a start node, an end node and an intermediate node; when the modification operation is to add test nodes to the business flowchart, in response to a selection operation on the standard nodes, adding the standard node corresponding to the selection operation as a new test node to the business flowchart, and when the new test node is an intermediate node or an end node, in response to a triggering operation on other test nodes except the new test node, drawing directed connections between the new test node and other test nodes in the business flowchart. When the modification operation is to delete a test node from the test track graph, in response to a deletion operation on a test node in the business process graph, the test node corresponding to the deletion operation and a directed connection associated with the test node are removed from the business process graph.

4. The method of claim 1, wherein, in response to the trigger operation on the test node and the directed connection in the target process graph, the node configuration information corresponding to the test node and the edge configuration information corresponding to the directed connection are obtained, including: in response to the trigger operation on the test node in the target process graph, a node configuration box of the test node is displayed, wherein the node configuration box includes a node configuration input control; in response to an input operation on the node configuration input control, the node configuration information corresponding to the test node is obtained; in response to the trigger operation on the directed connection in the target process graph, an edge configuration box of the directed connection is displayed, wherein the edge configuration box includes an edge configuration input control; in response to an input operation on the edge configuration input control, the edge configuration information corresponding to the directed connection is obtained, the edge configuration information including an edge condition and protocol data; the test track graph is generated according to the target process graph, the node configuration information of the test node, and the edge configuration information of the directed connection, including: the node configuration information is associated with the corresponding test node, and the edge configuration information is associated with the directed connection; the node configuration information is displayed on the test node of the target process graph, and the edge configuration information is displayed on the directed connection.

5. The method of claim 1, wherein, after the test case corresponding to the test track graph returned by the server is received and displayed, the method further includes: when a test case execution request is received, an execution environment configuration box is displayed; in response to an input operation on the execution environment information configuration box, execution environment configuration information corresponding to the input operation is obtained; in response to a selection operation on a test case, the test case corresponding to the selection operation is determined as a target test case; a case execution request is generated according to the target test case and the execution environment configuration information, and the case execution request is sent to the server, so that the server executes the target test case in an execution environment corresponding to the execution environment configuration information to obtain a case execution result; the case execution result returned by the server is received and displayed.

6. A test data processing method applied to a server, comprising: the method includes: a test track graph generated by a client is obtained, the test track graph including at least three test nodes and directed connections between the test nodes, the test nodes including node configuration information, and the directed connections including edge configuration information, the node configuration information and the edge configuration information being represented in natural language sentences; the test track graph is formatted to obtain formatted data corresponding to each test node and directed connection; at least one test path is generated by traversing the test track graph; generating a corresponding test case for each of the test paths based on the formatted data of each of the test nodes and the formatted data of the directed connections in the test paths; returning the test case to the client; wherein the test track graph is generated according to a target flowchart, node configuration information of the test nodes and edge configuration information of the directed connections, the target flowchart is determined according to a business flowchart, the business flowchart is determined according to a business type, and the node configuration information of the test nodes and the edge configuration information of the directed connections are obtained in response to a triggering operation on the test nodes and the directed connections in the target flowchart.

7. The method of claim 6, wherein, After the test case is returned to the client, the method further includes: receiving a test case execution request sent by the client, the test case execution request including a target test case and execution environment configuration information; parsing the target test case to obtain edge conditions and protocol data; escaping keywords in the edge conditions according to a preset keyword pool to generate parameters in a preset format corresponding to the keywords, and replacing the keywords in the edge conditions in the target test case with the parameters in the preset format; replacing parameters in the protocol data in the target test case according to the principle of ensuring that the protocol data can be executed to the test nodes that need to be tested; executing the target test case in an execution environment corresponding to the execution environment configuration information to obtain a test case execution result; returning the test case execution result to the client.

8. A test data processing apparatus applied to a client, characterized by comprising: The apparatus includes: a target flowchart display unit configured to display a target flowchart, the target flowchart including at least three test nodes and directed connections between the test nodes, the target flowchart being determined according to a business flowchart, the business flowchart being determined according to a business type; a configuration information obtaining unit configured to, in response to a triggering operation on the test nodes and the directed connections in the target flowchart, obtain node configuration information corresponding to the test nodes and edge configuration information corresponding to the directed connections, the node configuration information and the edge configuration information both being represented in natural language sentences; a test track graph generating unit configured to generate a test track graph according to the target flowchart, the node configuration information of the test nodes and the edge configuration information of the directed connections; a request sending unit configured to send the test track graph to a server to enable the server to perform data processing on the test track graph to obtain test cases corresponding to the test track graph, wherein the data processing includes: performing formatting processing on the test track graph to obtain formatted data corresponding to each of the test nodes and each of the directed connections, traversing the test track graph to generate at least one test path, and generating a corresponding test case for each of the test paths based on the formatted data of each of the test nodes and the formatted data of the directed connections in the test paths; a test case receiving unit configured to receive and display the test cases corresponding to the test track graph returned by the server. 9.A test data processing apparatus applied to a server, characterized in that, The apparatus includes: The test track graph acquisition unit is configured to acquire a test track graph generated by a client, the test track graph comprising at least three test nodes and directed connections between the test nodes, the test nodes comprising node configuration information, and the directed connections comprising edge configuration information, the node configuration information and the edge configuration information being expressed in natural language sentences. The preprocessing unit is configured to perform a format processing on the test track graph to obtain format data corresponding to each of the test nodes and the directed connections. The test path generation unit is configured to traverse the test track graph to generate at least one test path. The test case generation unit is configured to generate a test case corresponding to each of the test paths based on the format data of each of the test nodes and the format data of the directed connections in the test path. The test case sending unit is configured to return the test case to the client. The test track graph is generated according to a target flowchart, node configuration information of the test nodes, and edge configuration information of the directed connections, the target flowchart being determined according to a business flowchart, the business flowchart being determined according to a business type, and the node configuration information of the test nodes and the edge configuration information of the directed connections being acquired in response to a trigger operation on the test nodes and the directed connections in the target flowchart.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the test data processing method according to any one of claims 1-5 or the test data processing method according to claim 6 or 7.

Citation Information

Patent Citations

  • End-to-end test method, medium, device and computing device

    CN109977005A