A test task processing method, device and equipment and a storage medium
By constructing a relational tree structure for the test data table, key nodes and test data tables are identified, solving the problem of unreasonable resource allocation in existing technologies and achieving reasonable allocation of test resources and improved test efficiency.
Patent Information
- Application Number
- CN202111480858.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-12-06
AI Technical Summary
Existing data testing methods rely heavily on a business understanding of data definitions, leading to a significant amount of time being spent on unimportant parts during full script testing, resulting in unreasonable resource allocation and waste.
By constructing a tree structure relating test data tables, key nodes and test data tables are identified, test resources are configured based on the key nodes, and priority is given to key test data tables and fields.
This enables the rational allocation of test resources, improves testing efficiency, reduces resource consumption on unimportant parts, and helps identify critical issues in advance.
Smart Images

Figure CN114185656B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a test task processing method, apparatus, device and storage medium. Background Technology
[0002] Data testing is a new testing field in the era of big data, primarily used to verify the accuracy and completeness of data in products such as reports and dashboards. The testing process places high demands on both business logic and data logic. Currently, most data testing methods involve sequentially studying the development scripts based on data definition documents and then reproducing the definition requirements one by one. During testing, one might focus on important parts of the script based on experience, but if there is limited understanding of the business, it may result in indiscriminate testing of the entire script, often wasting effort on unimportant parts.
[0003] In the process of realizing this invention, the inventors discovered that the prior art has at least the following technical problems: the existing data testing methods rely heavily on the business understanding of the data scope. Without relevant business knowledge, time cannot be planned according to the importance of tables and fields. During execution, full script testing is performed, and a lot of time is spent on some unimportant parts. This inability to allocate resources reasonably leads to waste. Summary of the Invention
[0004] This invention provides a test task processing method, apparatus, device, and storage medium to accurately determine key test data tables, thereby making test resource allocation more reasonable.
[0005] In a first aspect, embodiments of the present invention provide a test task processing method, including:
[0006] Obtain the test data table corresponding to the test task, and create the relationship tree structure corresponding to the test data table based on the table dependencies between the test data tables;
[0007] Execute test tasks and determine the key nodes in the relationship tree structure based on the test task execution process;
[0008] Key test data tables are determined based on key nodes, and test resources are configured based on these key test data tables.
[0009] Optionally, based on the above scheme, a relational tree structure corresponding to the test data tables can be created according to the table dependencies between the test data tables, including:
[0010] Each test data table is treated as a node in the relational tree structure. The directed connections between nodes are determined based on the table dependencies between the test data tables, and the relational tree structure is constructed.
[0011] Optionally, based on the above scheme, key nodes in the relationship tree structure can be determined according to the test task execution process, including:
[0012] The weight of each node is determined based on the calling parameters of each node during the execution of the test task;
[0013] The key nodes in the relational tree structure are determined based on the weights of each node.
[0014] Optionally, based on the above scheme, the weight of each node is determined according to the degree parameter value of each node during the execution of the test task, including:
[0015] For each directed edge in the relational tree structure, the weight of the directed edge is determined based on the calling parameters of the nodes associated with the directed edge.
[0016] For each node, the weight of the node is determined based on the weight of the directed edges associated with the node.
[0017] Optionally, based on the above scheme, the nodes associated with the directed edge are the first node and the second node. The weight of the directed edge is determined according to the calling parameters of the nodes associated with the directed edge, including:
[0018] The first call parameter value of the first node is determined based on the call parameters of the first node, and the second call parameter value of the second node is determined based on the call parameters of the second node.
[0019] The product of the first and second call parameter values is used as the weight of the directed edge.
[0020] Optionally, based on the above scheme, the weight of a node is determined according to the weight of the directed edges associated with it, including:
[0021] The weight of a node is obtained by summing the weights of the directed edges that are out-degree of the node.
[0022] Secondly, embodiments of the present invention also provide a test task processing apparatus, comprising:
[0023] The relation tree structure construction module is used to obtain the interface definition parameters corresponding to the detected interface definition command in response to the interface definition command.
[0024] The key node determination module is used to generate proxy implementation classes based on interface definition parameters;
[0025] The key data table determination module is used to determine key test data tables based on key nodes, so as to configure test resources according to the key test data tables.
[0026] Thirdly, embodiments of the present invention also provide a computer device, the device comprising:
[0027] One or more processors;
[0028] Storage device for storing one or more programs;
[0029] When one or more programs are executed by one or more processors, the one or more processors implement the test task processing method provided in any embodiment of the present invention.
[0030] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the test task processing method as provided in any embodiment of the present invention.
[0031] The test task processing method provided in this invention obtains the test data table corresponding to the test task, creates a relational tree structure corresponding to the test data table based on the table dependencies between test data tables, executes the test task, determines key nodes in the relational tree structure based on the test task execution process, and determines key test data tables based on the key nodes, so as to configure test resources according to the key test data tables. By constructing the relational tree structure corresponding to the test data table and determining key nodes based on the node calling behavior in the relational tree during the test task execution, and thus determining the key test data table, the method achieves accurate determination of key test data tables, making the test resource configuration based on the test data table more reasonable. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating a test task processing method provided in Embodiment 1 of the present invention;
[0033] Figure 2a This is a flowchart illustrating a test task processing method provided in Embodiment 2 of the present invention;
[0034] Figure 2b This is a schematic diagram of a table dependency relationship provided in Embodiment 2 of the present invention;
[0035] Figure 2c This is a schematic diagram of a relationship tree structure provided in Embodiment 2 of the present invention;
[0036] Figure 3 This is a schematic diagram of the structure of a test task processing device provided in Embodiment 3 of the present invention;
[0037] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Detailed Implementation
[0038] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0039] Example 1
[0040] Figure 1 This is a flowchart illustrating a test task processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations involving the execution of test tasks and the configuration of test task resources. The method can be executed by a test task processing device, which can be implemented in software and / or hardware; for example, the test task processing device can be configured in a computer device. Figure 1 As shown, the method includes:
[0041] S110. Obtain the test data table corresponding to the test task, and create a relational tree structure corresponding to the test data table based on the table dependencies between the test data tables.
[0042] In this embodiment, the test data table corresponding to the test task can be determined according to the task requirements. Optionally, after generating a specification document for the test task based on the task requirements, a data script is generated based on the specification document to obtain multiple test data tables, and table dependencies between the test data tables are established. When executing the test task, the test task execution instruction can be initiated based on the test data tables and the table dependencies between the test data tables.
[0043] After detecting a test task execution instruction, the test task processing device obtains the test task corresponding to the instruction and the corresponding test data table. Based on the table dependencies between the test data tables, it creates a relational tree structure, abstracting the scheduling relationships in the test tasks into a tree structure. It's understandable that the table dependencies between test data tables are directed; therefore, the relational tree structure built based on these dependencies is also directed.
[0044] In one embodiment of the present invention, creating a relational tree structure corresponding to the test data tables based on the table dependencies between test data tables includes: treating each test data table as a node in the relational tree structure, determining the directed connection relationships between the nodes based on the table dependencies between the test data tables, and constructing the relational tree structure. When constructing a directed relational tree based on the test data tables, the test data tables are treated as nodes in the relational tree structure, and the edges of the relational tree structure represent the dependencies and calling relationships between the test data tables. For example, assuming test data table A calls test data table B, when constructing the relational tree structure, test data table A is set as node A, and test data table B is set as node B, resulting in a directed relational tree structure from node B to node A.
[0045] S120. Execute the test task and determine the key nodes in the relationship tree structure based on the test task execution process.
[0046] After abstracting the scheduling relationship in the test task into a directed relational tree structure, the call dependency of each node can be dynamically obtained during the execution of the test task script, and the calling and being called of each node can be recorded. Thus, the key nodes in the relational tree structure can be determined based on the calling and being called of each node.
[0047] Overall, the system can record the number of times each node is called and invoked, identifying nodes with higher call and invoke frequency as key nodes. One implementation determines key nodes in the relational tree structure based on the test task execution process. This includes: determining the weight of each node based on its call parameters during test task execution; and determining key nodes in the relational tree structure based on their weights. Call parameters can be parameters characterizing the node's call behavior, such as those calculated from the node's call count, out-degree, invoked count, and in-degree. After determining the call parameters for each node, the weight of each node is determined based on these parameters, and key nodes are identified based on the weights of all nodes. A node's weight characterizes its position within the relational tree structure; a higher weight indicates greater importance and criticality within the structure.
[0048] Understandably, the higher the weight of a node, the greater its importance within the relational tree structure, and the more crucial it is. Therefore, nodes can be directly sorted based on their weights to determine key nodes. In other words, determining key nodes in the relational tree structure based on the weights of each node includes: reversing the order of nodes based on their weights, and selecting a predetermined number of nodes as key nodes. Specifically, the nodes are sorted in reverse order based on their weights, with higher weights appearing earlier in the order, and the key nodes are determined based on this sorting result. For example, assuming a predetermined number of nodes (2), reversing the order based on weights yields: Node B - Node A - Node N - Node M. The first two nodes in the reverse order, Node B and Node A, are then considered key nodes.
[0049] Regarding the calculation of node weights, the node's calling parameters can be directly used as the node's weight, or the calling parameters can be further calculated to obtain the node's weight. In one embodiment, the weight of each node is determined based on the degree parameter value of each node during the execution of the test task, including: for each directed edge in the relationship tree structure, determining the weight of the directed edge based on the calling parameters of the nodes associated with the directed edge; for each node, determining the weight of the node based on the weight of the directed edges associated with the node. To make the calculation of node weights more accurate and strongly correlated with the calling relationship, the weights of the directed edges in the relationship tree structure can be determined first, and then the node weights can be determined based on the weights of the directed edges. Assuming there are two directed edges in the relationship tree structure: directed edge 1 and directed edge 2, directed edge 1 points from node A to node B, and directed edge 2 points from node A to node C, then the weight of directed edge 1 is first calculated based on the calling parameters of node A and node B, and the weight of directed edge 2 is calculated based on the calling parameters of node A and node C. Then, the weight of node A is determined based on the weight of directed edge 1 and the weight of directed edge 2.
[0050] Optionally, the nodes associated with a directed edge are a first node and a second node. The weight of the directed edge is determined based on the calling parameters of the associated nodes, including: determining the first calling parameter value of the first node based on the calling parameters of the first node, and determining the second calling parameter value of the second node based on the calling parameters of the second node; the product of the first calling parameter value and the second calling parameter value is used as the weight of the directed edge. The weight of each directed edge is related to the out-degree, in-degree, and whether it has been called by its connected nodes. It can be understood that each directed edge is associated with two nodes. Assuming that the nodes associated with a directed edge are a first node and a second node, the weight of the directed edge can be calculated based on the first calling parameter value of the first node and the second calling parameter value of the second node. In this embodiment, the product of the first calling parameter and the second calling parameter is used as the weight of the directed edge. The first calling parameter is determined by the position of the first node in the directed edge and the calling status of the first node, and the second calling parameter is determined by the position of the second node in the directed edge and the calling status of the second node.
[0051] Assuming a directed edge points from the first node to the second node, the first calling parameter is determined by whether the first node is called and its out-degree, and the second calling parameter is determined by whether the second node is called and its in-degree. The out-degree and in-degree of a node can be calculated using existing techniques, and will not be elaborated here.
[0052] In one embodiment, determining the weight of a node based on the weights of the directed edges associated with it includes summing the weights of the directed edges out of the node to obtain the node's weight. In this embodiment, the weight of a node is equal to the sum of the weights of the directed edges corresponding to its out-degree. Assuming that the directed edges out of node A include directed edge 1 and directed edge 2, then the weight of node A is equal to the sum of the weights of directed edge 1 and directed edge 2.
[0053] S130. Determine the key test data table based on the key nodes, and configure test resources according to the key test data table.
[0054] In this embodiment, the correspondence between nodes and test data tables is determined when constructing the relationship tree structure. Therefore, after identifying key nodes, the test data tables corresponding to the key nodes are used as key test data tables based on the correspondence between nodes and test data tables.
[0055] Once the key test data tables are identified, they can be highlighted for emphasis. This allows for focused and prioritized monitoring of these tables during data testing, enabling early identification of critical issues and effectively improving testing efficiency. Optionally, test resources can be automatically configured based on the key test data tables. For example, multiple archives can be configured for each key test data table according to pre-defined rules, reducing the load on these tables during data script calls. Alternatively, the key test data tables can be displayed and used as the basis for resource allocation. In other words, key test data tables can provide a basis for test resource allocation, allowing for targeted allocation of test resources (such as time and manpower) to key test data tables, avoiding wasting effort on unimportant parts.
[0056] Furthermore, for each key test data table, key fields can be identified based on the number of times each test field is executed during the test task. These key fields can then be highlighted to allow for focused monitoring during data testing, enabling early detection of critical issues and effectively improving testing efficiency. Optionally, fields can be sorted in reverse order based on their execution count, and a predetermined number of fields in the sorted results can be selected as key fields.
[0057] Based on the above, if certain test data tables play an important role in a large number of scheduling relationships, that is, they are all critical test data tables, it is recommended to take measures before the test task is executed, such as multiple clusters or multiple archives of critical tables, and call them separately when the data script is executed, so as to reduce the pressure of a large number of queries on a single table.
[0058] The test task processing method provided in this invention obtains the test data table corresponding to the test task, creates a relational tree structure corresponding to the test data table based on the table dependencies between test data tables, executes the test task, determines key nodes in the relational tree structure based on the test task execution process, and determines key test data tables based on the key nodes, so as to configure test resources according to the key test data tables. By constructing the relational tree structure corresponding to the test data table and determining key nodes based on the node calling behavior in the relational tree during the test task execution, and thus determining the key test data table, the method achieves accurate determination of key test data tables, making the test resource configuration based on the test data table more reasonable.
[0059] Example 2
[0060] Figure 2a This is a flowchart illustrating a test task processing method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment provides a preferred embodiment. Figure 2a As shown, the test task processing method provided in this embodiment of the invention includes:
[0061] Step 1: After determining the scope and documentation based on the project workflow, generate the data script according to the documentation and create the corresponding table dependencies.
[0062] Step 2: Classify the importance of the test data tables according to the dependencies of the scripts.
[0063] The specific calculation logic is as follows:
[0064] (1) The scheduling task (i.e., the test task) is abstracted into a directed tree structure, where the nodes of the tree are tables and the edges of the tree are the dependencies and calling relationships between tables. During the execution of the script task, the dependencies of each table are dynamically captured, and the calling and being called status of each table is recorded.
[0065] Figure 2b This is a schematic diagram of a table dependency relationship provided in Embodiment 2 of the present invention. Figure 2b The diagram illustrates the dependencies of a specific task, exe_app_vsc_amway_cloud_shop_spot_det. Then, based on... Figure 2b The dependencies are used to construct a relationship tree. Figure 2c This is a schematic diagram of a relationship tree structure provided in Embodiment 2 of the present invention. Figure 2c Lieutenant General Figure 2b Each test data table in the diagram is designated as a node, schematically illustrating the data based on... Figure 2b The relationship tree structure is built from the dependencies in the data.
[0066] (2) After constructing the relation tree structure, define the weights of the nodes and directed edges in the relation tree structure.
[0067] Wherein, the weight of a node is equal to the sum of the weights of the directed edges corresponding to the out-degree of the node;
[0068] The weight of each directed edge depends on the out-degree, in-degree, and whether it is invoked by the nodes connected to it, as defined below:
[0069] The weight of a directed edge ij = (call status of node i) * (call status of node j)
[0070] = (whether node i was called / the out-degree of node i) * (whether node j was called / the in-degree of node j)
[0071] by Figure 2c Taking node E as an example, the set of nodes reachable from E is S (K∈S), and the set of nodes reachable from it is N (A∈N). Therefore, the weight of node E is the sum of the out-degree edges corresponding to node E. Figure 2b The only edge with an out-degree from node E is edge EK, meaning the weight of edge EK is the weight of edge EK. The weight of edge EK is calculated based on the in-degree and out-degree of node E: (1 / 1)*(1 / 9)=1 / 9
[0072] (3) During the execution of the scheduling task, the weight of each node (i.e., the table) is calculated, and the first n nodes, i.e. the nodes corresponding to the key test data table, are obtained. The fields that appear more often in the key test data table are the key fields.
[0073] Still with Figure 2c For example, the weights of each node are:
[0074] The weight of A = the weight of edge AE + the weight of edge AF = (1 / 2)*(1 / 1) + (1 / 2)*(1 / 1) = 1
[0075] The weights of B, C, D, E, F, G, H, I, J are equal to the weights of edges B, C, D, E, F, G, H, I, J to K, which is (1 / 1) * (1 / 9) = 1 / 9.
[0076] According to the calculation results, node A is a key node in the secondary scheduling relationship, and its corresponding table is the key table in the calling relationship.
[0077] The recording of node calls during task execution can be achieved in the following way:
[0078] The parent-child relationships are recorded in a table structure. Each node has a field recording the parent node and a field recording the child node. A set algorithm is used to calculate the weight of each node, automatically outputting the weight of each node. Specifically, first, a table is created, and the final tree structure result is recorded in the table according to the table dependencies in the task scheduling. Then, each table in the dependency relationship is stored in the `node` field. The tree structure is traversed in a breadth-first search. If a node has an out-degree, the out-degree value is recorded in the `out_degree` field, and the corresponding node is stored in `son_node`. If a node has an in-degree, the in-degree value is recorded in the `in_degree` field, and the corresponding node is stored in `father_node`. This process is repeated until all nodes have been traversed. Based on the in-degree and out-degree information in the dependency table, the weight of each node is stored in the `weight` field according to the set method. Finally, the importance of each table is determined based on the node weights, and the top n key tables are selected as the key test data tables.
[0079] The method provided in this invention quantifies each table and field based on the dependencies between tables in the scheduling task, assigning weights to each table and field to make the determination of key test data tables more accurate. Furthermore, during data testing, it allows for focused and prioritized attention to key tables and fields, enabling early detection of critical issues and effectively improving testing efficiency. Simultaneously, if certain tables play a crucial role in numerous scheduling relationships, measures can be taken, such as using multiple clusters or archives of key tables, with separate calls during data script execution, reducing the pressure of numerous queries on a single table.
[0080] Example 3
[0081] Figure 3 This is a schematic diagram of a test task processing device provided in Embodiment 3 of the present invention. This test task processing device can be implemented in software and / or hardware, for example, it can be configured in a computer device. In this embodiment, the explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here. Figure 3 As shown, the device includes a relationship tree structure construction module 310, a key node determination module 320, and a key data table determination module 330, wherein:
[0082] The relation tree structure building module 310 is used to obtain the test data table corresponding to the test task and create the relation tree structure corresponding to the test data table based on the table dependency relationship between the test data tables.
[0083] The critical node determination module 320 is used to execute test tasks and determine the critical nodes in the relational tree structure based on the test task execution process.
[0084] The key data table determination module 330 is used to determine the key test data table based on the key nodes, so as to configure test resources according to the key test data table.
[0085] This invention employs a relational tree structure construction module to obtain the test data table corresponding to the test task, and creates a relational tree structure corresponding to the test data table based on the table dependencies between test data tables. A key node determination module executes the test task and determines the key nodes in the relational tree structure based on the test task execution process. A key data table determination module determines the key test data table based on the key nodes, and then configures test resources according to the key test data table. By constructing the relational tree structure corresponding to the test data table and determining the key nodes based on the node calls in the relational tree during test task execution, and thus determining the key test data table, accurate determination of the key test data table is achieved, making the test resource configuration based on the test data table more reasonable.
[0086] Optionally, based on the above scheme, the relationship tree structure construction module 310 is specifically used for:
[0087] Each test data table is treated as a node in the relational tree structure. The directed connections between nodes are determined based on the table dependencies between the test data tables, and the relational tree structure is constructed.
[0088] Optionally, based on the above scheme, the key node determination module 320 is specifically used for:
[0089] The weight of each node is determined based on the calling parameters of each node during the execution of the test task;
[0090] The key nodes in the relational tree structure are determined based on the weights of each node.
[0091] Optionally, based on the above scheme, the key node determination module 320 is specifically used for:
[0092] For each directed edge in the relational tree structure, the weight of the directed edge is determined based on the calling parameters of the nodes associated with the directed edge.
[0093] For each node, the weight of the node is determined based on the weight of the directed edges associated with the node.
[0094] Optionally, based on the above scheme, the nodes associated by the directed edge are the first node and the second node, and the key node determination module 320 is specifically used for:
[0095] The base determines the first call parameter value of the first node based on the call parameters of the first node, and determines the second call parameter value of the second node based on the call parameters of the second node;
[0096] The product of the first and second call parameter values is used as the weight of the directed edge.
[0097] Optionally, based on the above scheme, the key node determination module 320 is specifically used for:
[0098] The weight of a node is obtained by summing the weights of the directed edges that are out-degree of the node.
[0099] Optionally, based on the above scheme, the key node determination module 320 is specifically used for:
[0100] Based on the weight of each node, the nodes are sorted in reverse order, and a set number of nodes before the sorted result are designated as key nodes.
[0101] The test task processing device provided in the embodiments of the present invention can execute the test task processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] Example 4
[0103] Figure 4This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Figure 4 This is a schematic diagram of the structure of the computer device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary computer device 412 suitable for implementing embodiments of the present invention is shown. Figure 4 The computer device 412 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0104] like Figure 4 As shown, the computer device 412 is represented in the form of a general-purpose computing device. The components of the computer device 412 may include, but are not limited to: one or more processors 414, system memory 428, and bus 418 connecting different system components (including system memory 428 and processor 414).
[0105] Bus 418 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor 414, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0106] Computer device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 412, including volatile and non-volatile media, removable and non-removable media.
[0107] System memory 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Computer device 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage device 434 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 418 via one or more data media interfaces. Memory 428 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0108] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in memory 428. Such program modules 442 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 442 typically perform the functions and / or methods described in the embodiments of the present invention.
[0109] Computer device 412 can also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), and with one or more devices that enable a user to interact with the computer device 412, and / or with any device that enables the computer device 412 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 422. Furthermore, computer device 412 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 420. As shown, network adapter 420 communicates with other modules of computer device 412 via bus 418. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0110] The processor 414 executes various functional applications and data processing by running programs stored in the system memory 428, such as implementing the test task processing method provided in this embodiment of the invention, which includes:
[0111] Obtain the test data table corresponding to the test task, and create the relationship tree structure corresponding to the test data table based on the table dependencies between the test data tables;
[0112] Execute test tasks and determine the key nodes in the relationship tree structure based on the test task execution process;
[0113] Key test data tables are determined based on key nodes, and test resources are configured based on these key test data tables.
[0114] Of course, those skilled in the art will understand that the processor can also implement the technical solutions of the test task processing method provided in any embodiment of the present invention.
[0115] Example 5
[0116] Embodiment 5 of the present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the program implements the test task processing method provided in the embodiments of the present invention. The method includes:
[0117] Obtain the test data table corresponding to the test task, and create the relationship tree structure corresponding to the test data table based on the table dependencies between the test data tables;
[0118] Execute test tasks and determine the key nodes in the relationship tree structure based on the test task execution process;
[0119] Key test data tables are determined based on key nodes, and test resources are configured based on these key test data tables.
[0120] Of course, the computer program stored on the computer-readable storage medium provided in the embodiments of the present invention is not limited to the above-described method operation, but can also perform related operations of the test task processing method provided in any embodiment of the present invention.
[0121] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0122] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0123] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0124] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—as well as conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0125] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A test task processing method, characterized in that, include: Obtain the test data table corresponding to the test task, and create a relation tree structure corresponding to the test data table based on the table dependencies between the test data tables; The test task is executed, and the weight of each node is determined based on the calling parameters of each node during the execution of the test task. The key nodes in the relational tree structure are determined based on the weights of each node; Based on the key nodes, a key test data table is determined, and test resources are configured according to the key test data table; The step of determining the weight of each node based on the calling parameters of each node during the execution of the test task includes: For each directed edge in the relational tree structure, the weight of the directed edge is determined based on the calling parameters of the node associated with the directed edge; For each node, the weight of the node is determined based on the weight of the directed edge associated with the node; The step of determining the key nodes in the relation tree structure based on the weights of each node includes: Based on the weight of each node, the nodes are sorted in reverse order, and a set number of nodes before the sorted result are taken as the key nodes.
2. The method according to claim 1, characterized in that, The step of creating the relational tree structure corresponding to the test data table based on the table dependencies between the test data tables includes: Each of the test data tables is used as a node in the relational tree structure. The directed connection relationship of the nodes is determined according to the table dependency relationship between the test data tables, and the relational tree structure is constructed.
3. The method according to claim 1, characterized in that, The nodes associated with the directed edge are a first node and a second node. Determining the weight of the directed edge based on the calling parameters of the nodes associated with the directed edge includes: The first call parameter value of the first node is determined based on the call parameters of the first node, and the second call parameter value of the second node is determined based on the call parameters of the second node. The product of the first call parameter value and the second call parameter value is used as the weight of the directed edge.
4. The method according to claim 1, characterized in that, Determining the weight of a node based on the weights of the directed edges associated with the node includes: The weight of a node is obtained by summing the weights of the directed edges that have an out-degree of the node.
5. A test task processing device, characterized in that, include: The relational tree structure construction module is used to obtain the test data table corresponding to the test task and create the relational tree structure corresponding to the test data table based on the table dependency relationship between the test data tables. A key node determination module is used to execute the test task and determine the key nodes in the relationship tree structure based on the execution process of the test task. The key data table determination module is used to determine the key test data table based on the key nodes, so as to configure test resources according to the key test data table; The key node determination module is specifically used for: The weight of each node is determined based on the calling parameters of each node during the execution of the test task; where the calling parameters are parameters that characterize the calling status of the node. The key nodes in the relational tree structure are determined based on the weights of each node; The key node determination module is specifically used for: For each directed edge in the relational tree structure, the weight of the directed edge is determined based on the calling parameters of the node associated with the directed edge; For each node, the weight of the node is determined based on the weight of the directed edge associated with the node; The key node determination module is specifically used for: Based on the weight of each node, the nodes are sorted in reverse order, and a set number of nodes before the sorted result are taken as the key nodes.
6. A computer device, characterized in that, The device includes: One or more processors; Storage device for storing one or more programs; When one or more programs are executed by one or more processors, the one or more processors implement the test task processing method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the test task processing method as described in any one of claims 1-4.
Citation Information
Patent Citations
Debugging method and device for online visual programming
CN109582561A
Automatic test method and device, electronic equipment and readable storage medium
CN110059003A