Test flow arrangement method and system based on hierarchical control domain
By using a test process orchestration method based on hierarchical control domains, a hierarchical recursive control domain structure is generated and bounding boxes are used, which solves the problem that the logical structure is difficult to display in traditional test systems, and simplifies the process orchestration diagram and improves its readability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-24
AI Technical Summary
Traditional automated testing systems struggle to clearly display the logical structure when dealing with complex testing processes, making process diagrams difficult to read and maintain, and making it difficult to trace the cause of errors when anomalies occur.
A test process orchestration method based on hierarchical control domains is adopted. A hierarchical recursive control domain is generated through control nodes, and bounding boxes are generated within the control domains to simplify the process orchestration diagram structure. An automatic layout algorithm is used to optimize the node layout.
It achieves clarity and maintainability of the process diagram, reduces the number of connecting lines, improves the readability and maintainability of the test logic, and simplifies the cognitive load of process editing.
Smart Images

Figure CN121210328B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated testing technology, and in particular to a test process orchestration method and system based on hierarchical control domains, electronic devices, and computer-readable storage media. Background Technology
[0002] With the increasingly widespread application of satellite navigation technology, it has penetrated into fields such as consumer electronics, automobiles, aerospace and military equipment. While driving industry development, it has also put forward more efficient and accurate requirements for the quality assessment of navigation products. As the number of test items increases, the cycle lengthens and the requirements change frequently, traditional automated test systems are difficult to respond quickly and the design complexity continues to rise. Therefore, in order to improve R&D efficiency, a node-based process orchestration system is usually introduced into the automated test system.
[0003] However, existing node-based process orchestration systems are based on a flat, node-connector mesh model. When the test process involves conditional branches, parallel branches, or nested loops, the intertwined nodes form a "spider web" structure that is difficult to trace. This causes critical business logic and minor details to pile up, making it difficult to clearly display the test logic structure. This makes the process orchestration diagram difficult to read and maintain. Moreover, the positions of nodes and connections are relatively arbitrary and unconstrained, leading to tangled and intersecting connections that make it difficult for the human eye to trace the start and end points of the logic, resulting in visual confusion. Especially for very complex business processes, the number of nodes and connections becomes large, and the connection relationships and data reference relationships between nodes become very complex, further making the process orchestration diagram difficult to understand and maintain. In addition, anomalies that occur during the test system's operation are difficult to analyze and locate in terms of data and process. After a test failure, it is difficult to quickly trace which node, parameter, or data caused the final error. Summary of the Invention
[0004] This invention provides a test process orchestration method and system based on hierarchical control domains, as well as an electronic device and a computer-readable storage medium. It not only simplifies the overall structure but also makes the test process logic clearer, making the process orchestration diagram easier to understand and maintain.
[0005] According to one aspect of the present invention, a test flow orchestration method based on hierarchical control domains is provided, comprising the following:
[0006] The test logic based on the test process drags multiple components from the built-in components and the preset component library onto the canvas to form multiple process nodes and generate connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port.
[0007] A hierarchical recursive control domain is generated based on the control node. The control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The control domain has one input port and one output port.
[0008] Bounding boxes are generated based on the region extent of each control domain to enclose all nodes within each control domain, thus generating a hierarchical flowchart.
[0009] Furthermore, the process of generating a hierarchical recursive control domain based on control nodes includes the following:
[0010] Starting from the control node, the subsequent process nodes connected to its output port are accessed according to the breadth-first principle. If the subsequent process node is a normal node, it is directly assigned to the control domain of the control node. If the subsequent process node is a control node, a new sub-control domain is generated. The process nodes contained in the sub-control domain are determined according to the recursive principle, and the sub-control domain is assigned to the control domain of the control node. Then, the subsequent process nodes connected to the output port of the sub-control domain are accessed. This process is repeated until there are no more accessible subsequent process nodes, thus generating a control domain with a hierarchical recursive structure.
[0011] Furthermore, the process of generating bounding boxes based on the region extent of the control domain includes the following:
[0012] Create an empty parent coordinate list. Traverse all process nodes within the control domain using a breadth-first search approach. If a process node is a regular node, directly add the coordinates of the four corners of the graphic it represents to the parent coordinate list. If a process node is a control node, recursively calculate the child coordinate lists of its child control domains, calculate the convex hull of the child coordinate lists, and the polygon corresponding to the convex hull of the child coordinate lists is the bounding box shape of the child control domain. Add the child coordinate lists to the parent coordinate list. After completing the traversal, calculate the convex hull of the parent coordinate list again. The polygon corresponding to the convex hull of the parent coordinate list is the bounding box shape of the parent control domain.
[0013] Furthermore, a data area is set up within each control domain, and the lifecycle and accessibility of the data area are limited to all nodes within this control domain and its sub-control domains.
[0014] Furthermore, after generating the flowchart, the following content is also included:
[0015] Automatically layout and format the flowchart.
[0016] Furthermore, the process of automatically layouting the flowchart includes the following:
[0017] First, set the horizontal and vertical spacing of the layout. Then, obtain the subsequent traversal list of the process diagram. For all process nodes in the subsequent traversal list, use the output port position of the parent node or the input port position of the current node as the origin of the coordinates to calculate their relative coordinates and collision areas. After completing the subsequent traversal calculation of all process nodes, the automatic layout of the process diagram is realized.
[0018] Furthermore, after generating the flowchart, the following content is also included:
[0019] Set the thumbnail level of the flowchart. If the level of a bounding box is greater than the thumbnail level, it will be displayed as a thumbnail; otherwise, it will be displayed in detail.
[0020] In addition, the present invention also provides a test process orchestration system based on hierarchical control domains, comprising:
[0021] The process node generation module is used to drag multiple components from the built-in components and preset component libraries onto the canvas based on the test logic of the test process, forming multiple process nodes and generating connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port.
[0022] The control domain generation module is used to generate a hierarchical recursive control domain based on the control node. Here, the control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The number of input ports and output ports of the control domain is one.
[0023] The bounding box generation module is used to generate bounding boxes based on the regional extent of the control domain, so as to surround all nodes within each control domain and generate a hierarchical process orchestration diagram.
[0024] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0025] In addition, the present invention provides a computer-readable storage medium for storing a computer program for orchestrating test processes based on a hierarchical control domain, wherein the computer program executes the steps of the method described above when run on a computer.
[0026] The present invention has the following beneficial effects:
[0027] The test flow orchestration method based on hierarchical control domains of this invention facilitates the introduction of complex control flows such as branches, loops, parallelism, and events by setting control nodes. It generates hierarchical recursive control domains based on these control nodes, and then generates bounding boxes based on the area of each control domain. This results in a simple sequential structure in the overall flow orchestration diagram, with one node connecting to another or bounding boxes. Each bounding box contains a tree-like branching structure, accurately and clearly representing complex control flows such as branches, loops, parallelism, and events. Furthermore, all control flows within a control domain flow uniformly out from the output port of the bounding box, requiring only a single connection line to subsequent nodes. This significantly reduces the number of connections in the flow orchestration diagram, simplifying the overall structure and making the test flow logic clearer, thus making the flow orchestration diagram easier to understand and maintain.
[0028] In addition, the test process orchestration system based on hierarchical control domain of the present invention also has the above-mentioned advantages.
[0029] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0030] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0031] Figure 1 This is a flowchart illustrating a preferred embodiment of the test process orchestration method based on hierarchical control domains in this application.
[0032] Figure 2 This is a schematic diagram of the bounding box generated in a preferred embodiment of this application;
[0033] Figure 3 This is another schematic diagram of the test flow orchestration method based on hierarchical control domains according to a preferred embodiment of this application;
[0034] Figure 4 This is another flowchart illustrating the test process orchestration method based on hierarchical control domains, a preferred embodiment of this application.
[0035] Figure 5This is another schematic diagram of the test process orchestration method based on hierarchical control domains according to a preferred embodiment of this application;
[0036] Figure 6 This is a schematic diagram of the module structure of a test process orchestration system based on a hierarchical control domain, according to another embodiment of this application. Detailed Implementation
[0037] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0038] Reference Figure 1 A preferred embodiment of this application provides a test flow orchestration method based on hierarchical control domains, including the following:
[0039] Step S1: Based on the test logic of the test process, drag multiple components from the built-in components and the preset component library onto the canvas to form multiple process nodes and generate connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. The number of input ports and output ports of ordinary nodes is at most one, and the number of input ports of control nodes is at most one and the number of output ports is at least one.
[0040] Step S2: Generate a hierarchical recursive control domain based on the control node. The control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The number of input ports and output ports of the control domain is one.
[0041] Step S3: Generate bounding boxes based on the region extent of the control domain to enclose all nodes within each control domain, thereby generating a hierarchical flowchart.
[0042] It is understood that the test flow orchestration method based on hierarchical control domains in this embodiment facilitates the introduction of complex control flows such as branches, loops, parallelism, and events by setting control nodes. It generates hierarchical recursive control domains based on the control nodes, and then generates bounding boxes based on the area of each control domain. This results in a simple sequential structure in the overall flow orchestration diagram, with one node connecting to another or bounding boxes. Each bounding box contains a tree-like branching structure, accurately and clearly representing complex control flows such as branches, loops, parallelism, and events. Furthermore, all control flows within a control domain flow uniformly out from the output port of the bounding box, and subsequent nodes only need to be connected to the output port of the bounding box by a single line. This significantly reduces the number of connecting lines in the flow orchestration diagram, simplifying the overall structure and making the test flow logic clearer, thus making the flow orchestration diagram easier to understand and maintain.
[0043] The components include built-in components and custom components. Built-in components are built through code and can be extended; their requirements are determined by the business logic supported by the system. Custom components consist of a component name, input parameter definitions, return value types, and a component flowchart. Multiple custom components form a pre-defined component library. Components can be called in the flowchart. Components provide a quick and flexible way to extend system functionality. Based on the built-in components and the pre-defined component library, all test items in the test process can be quickly constructed through the flowchart. For example, components include basic functional components such as business processing components (e.g., positioning accuracy calculation components, sensitivity calculation components, etc.), device components (e.g., device control components, device event components, etc.), and display components (data display components, chart components, etc.). Therefore, in step S1, multiple components can be dragged and dropped onto the canvas from the built-in components and the pre-defined component library according to the test logic of the test process, forming multiple process nodes and generating connection lines between different process nodes. Additionally, when creating a process node, the required input parameters for the component and the data items for saving the component's returned results must be set in the node setting parameters. Node setting parameters can be displayed and edited; the number of parameters and the data type of each parameter will vary depending on the node type. Process nodes have input ports and output ports. There can be at most one input port and at least one output port. Some special process nodes have no input or output ports, such as sequence start nodes and result return nodes. When more than one output port appears, a port identifier will be displayed on each output port for differentiation. These characteristics are determined by the component's attributes. An output port of a node can connect to an input port of another node, and each port can only have a maximum of one connection line. Connection lines cannot form a loop. The node connected to the current node's input port is defined as the current node's predecessor (also called the parent node), and the node connected to the current node's output port is defined as the current node's successor (also called the child node).
[0044] In a flowchart, there is at least one sequence start node. The set of nodes connected to a sequence start node forms a sequence. One sequence is identified as the main sequence, serving as the execution entry point for the flowchart. The remaining sequences are identified as sub-sequences and can be called repeatedly. The node settings parameters for the sequence start node include the sequence name, input parameter list, and sequence return result type. When the flowchart starts execution, a control flow is generated. The control flow enters the sequence start node of the main sequence and executes it. When a node completes execution, the control flow flows out through the output port of that node and into subsequent nodes through the connecting lines. When the control flow reaches a subsequent node, that node is executed. This continues until the control flow can no longer flow, at which point the execution of this control flow is complete. If all control flows in the main sequence have been executed, the flowchart has finished running.
[0045] This invention categorizes process nodes into two main types: ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port. For ordinary nodes, after the control flow enters and executes, it unconditionally flows out of the output port to execute subsequent nodes. For control nodes, after the control flow enters and executes, it selectively flows out of certain output ports based on the node's execution result. For example, a conditional branch node has two output ports: one representing the execution exit when the condition is true, and the other representing the execution exit when the condition is false. Ordinary nodes mainly include expression nodes, device control nodes, subsequence call nodes, component call nodes, display nodes, and result return nodes, and can be expanded as needed. Control nodes mainly include branch nodes, loop nodes, parallel nodes, and event nodes, and can also be expanded as needed. It can be understood that when executing a branch node, the branch condition is first determined, and then the control flow flows to the output port selected by the branch condition, mainly used to simulate if statements and if-else statements. Switch statements, etc.; When executing a loop node, the loop condition is first checked. If the condition is false, the loop exits. If the condition is true, the loop is executed, and the control flow flows to the output port of the loop node, continuing to execute subsequent nodes until there are no more executable nodes. Then, the control flow automatically returns to this loop node, repeating the above process until the condition is false. Parallel nodes can set the number of parallel branches, which determines the number of output ports. When executing a parallel node, the control flow is divided into multiple branches, each flowing to each output port of the parallel node, executing subsequent nodes in parallel. Event nodes have an event occurrence output port and an event timeout output port, and can set the event name and timeout interval. When executing an event node, it waits for the event. If the waiting time exceeds the timeout interval, the control flow flows to the event timeout output port. If the event occurs within the timeout interval, the control flow flows to the event occurrence output port, and the data generated by the event is saved for use by subsequent nodes. The occurrence of an event can be triggered externally, such as when a device receives a data protocol, or it can be actively triggered by a corresponding node (e.g., based on an event-driven architecture).
[0046] Furthermore, in step S2, a hierarchical recursive control domain is generated based on the control node. The control domain of a control node is defined as the set of all nodes directly or indirectly connected to its output port. The control node is the starting node of the control domain. The control domain is automatically calculated and entirely determined by the connection relationships between nodes. Each control domain has one input port, which is combined with the input port of its starting node (i.e., the control node). It also has one output port, indicating the control flow that exits after the control domain's execution is complete. Nodes connected to the input ports of a control domain are its predecessors (i.e., parent nodes), and nodes connected to its output ports are its successors (i.e., child nodes). Additionally, all process nodes in the flowchart can constitute a global control domain, and each sequence can constitute a sequence control domain.
[0047] It is understood that by setting control nodes in the process orchestration diagram, this invention facilitates the introduction of complex control processes such as branches, loops, parallelism, and events. This allows complex control processes to be presented in different areas of the control domain, effectively avoiding the formation of a "spider web" structure due to incorrect node connections, and facilitating a clear display of the logical structure of the test process.
[0048] The process of generating a hierarchical recursive control domain based on control nodes includes the following:
[0049] Starting from the control node, the subsequent process nodes connected to its output port are accessed according to the breadth-first principle. If the subsequent process node is a normal node, it is directly assigned to the control domain of the control node. If the subsequent process node is a control node, a new sub-control domain is generated. The process nodes contained in the sub-control domain are determined according to the recursive principle, and the sub-control domain is assigned to the control domain of the control node. Then, the subsequent process nodes connected to the output port of the sub-control domain are accessed. This process is repeated until there are no more accessible subsequent process nodes, thus generating a control domain with a hierarchical recursive structure.
[0050] It is understood that the control domain of a control node can be automatically calculated and generated during node orchestration based on its connection relationships, without manual intervention. The generated control domain is a hierarchical recursive structure, meaning that a control domain includes other control domains within it. The outermost control domain is the parent control domain, with a level of 1. The control domains inside it are child control domains, and the level of a child control domain is 1 higher than that of its parent control domain. This can form a hierarchical recursive structure of at least two levels, creating a clearly defined nested display effect that can accurately and clearly represent complex control flows such as branches, loops, parallelism, and events. Furthermore, in other embodiments of the present invention, a custom control domain can also be generated by the user according to their intentions. For example, a group of logically cohesive adjacent nodes can be set as a custom control domain. Custom control domains can be modified and deleted.
[0051] Optionally, a data area can be set up within each control domain. The lifecycle and accessibility of the data area are limited to all nodes within the current control domain and its sub-control domains; other nodes cannot access it. This ensures both data availability and data security. The data area can contain multiple data items, each including a data name, data type, and initial value. Furthermore, during the flowchart editing process, the data area of the control domain containing the currently selected node can be displayed, and editing functions for the data area can be provided, such as adding, deleting, and modifying data items, making operation very convenient.
[0052] Additionally, in step S3, bounding boxes are generated based on the area of each control domain to enclose all nodes within each control domain. The shape of the bounding box can be rectangular, polygonal, or other shapes. The input ports of the control domain can be displayed at the front of the bounding box, and the output ports of the control domain can be displayed at the back of the bounding box. The bounding box can display the area of the control domain, making it easier for users to intuitively understand the control domain. After generating the bounding boxes for all control domains, a hierarchical flowchart is generated.
[0053] The process of generating bounding boxes based on the region extent of the control domain includes the following:
[0054] An empty parent coordinate list is created. All process nodes within the control domain are traversed using a breadth-first search principle. If a process node is a regular node, the coordinates of its four corners are directly added to the parent coordinate list. Process nodes are typically displayed as rectangles, rhombuses, or other quadrilaterals on the canvas; this invention preferably uses rectangles. If a process node is a control node, the child coordinate list of the sub-control domain is recursively calculated. The convex hull of the child coordinate list is calculated, and the polygon corresponding to the convex hull is the bounding box shape of the sub-control domain. The child coordinate list of the sub-control domain is then added to the parent coordinate list. This process is repeated until the corner coordinates of all process nodes within the control domain are added to the parent coordinate list. The convex hull of the parent coordinate list is then calculated again, and the polygon corresponding to the convex hull is the bounding box shape of the parent control domain. After obtaining the bounding box shape, it is visually visualized on the canvas, such as displaying the bounding box's boundary and internal fill color, clarifying the area governed by the control domain and creating a hierarchical bounding box nesting effect. Optionally, for nodes that are adjacent to each other, when dragged until they are close, they will automatically align and merge into a single node block, further reducing the number of connecting lines in the diagram. It can be understood that the bounding box generated in one embodiment of the present invention is as follows: Figure 2 As shown.
[0055] In other embodiments of the present invention, the shape of the bounding box can be further processed as needed, converting it into a rectangular bounding box or a bounding box of other shapes, such as simplifying it to an axis-aligned bounding box. Additionally, the bounding boxes of the global control domain and the sequence control domain can be calculated, but to clearly demonstrate the jurisdiction of different control domains, the bounding boxes of the global control domain and the sequence control domain are usually not displayed.
[0056] Furthermore, as actions are performed in the workflow arrangement on the canvas, the system automatically updates the affected control domains and their corresponding bounding boxes. For example, adding, deleting, moving, or connecting / disconnecting nodes can cause changes to the control domains and bounding boxes. Additionally, operations such as picking and moving bounding boxes are possible. When a bounding box moves, all nodes within it and subsequent nodes move synchronously in a cascading fashion. When bounding boxes are nested, the inner bounding box appears at a higher level than the outer bounding box to prevent visual and picking obstructions. When bounding boxes without parent-child relationships intersect and overlap, the overlapping area is prominently displayed. Clicking on a node or bounding box within a bounding box automatically displays all available data within the current control domain, allowing for quick setting of node parameters. During editing, incorrect node parameter settings, such as incorrect configuration or missing data items, are prominently displayed on the canvas.
[0057] It is understood that this invention, through the nesting of control domains and bounding boxes, hides complex logic such as conditions, branches, loops, and parallelism within abstract bounding boxes, making the top-level flowchart structure concise, clear, and easy to understand. It completely solves the problem of "spider web"-like chaos, greatly simplifies the flowchart structure, and makes the overall flowchart present a simple sequential structure. The interior of each bounding box presents a tree-like branching structure, which can accurately and clearly represent complex control flows such as branches, loops, parallelism, and events. Furthermore, it ensures that all control flows within a control domain flow out uniformly from the output port of the bounding box. Subsequent nodes only need to be connected to the output port of the bounding box by a single connection line, reducing a large number of connection lines, greatly simplifying flowchart writing, significantly improving the readability and maintainability of test logic, and significantly reducing the cognitive load and operational complexity of flowchart editing.
[0058] Optional, such as Figure 3 As shown, the test process orchestration method based on hierarchical control domains, after generating the process orchestration diagram, also includes the following:
[0059] Step S4: Automatically layout and format the flowchart.
[0060] The process of automatically laying out the flowchart includes the following:
[0061] First, set the horizontal and vertical spacing of the layout. Then, obtain the subsequent traversal list of the process diagram. For all process nodes in the subsequent traversal list, use the output port position of the parent node or the input port position of the current node as the origin of the coordinates to calculate their relative coordinates and collision areas. After completing the subsequent traversal calculation of all process nodes, the automatic layout of the process diagram is realized.
[0062] It is understandable that manipulating nodes and connecting lines will inevitably change the layout of the flowchart. Currently, the common layout method involves users manually dragging and dropping nodes to determine their positions. However, this manual layout method may require users to frequently adjust node positions to ensure no collisions occur and maintain overall aesthetics, especially when the test process is complex, significantly increasing the workload of flowchart editing. Furthermore, while existing tree structure layout algorithms can achieve automatic layout, they are only applicable to tree structures. Since this invention contains elements such as control domains and bounding boxes, traditional tree structure layout algorithms are no longer suitable. Therefore, this invention proposes a novel automatic layout algorithm.
[0063] Specifically, first, set the horizontal spacing Δx and vertical spacing Δy of the layout. The specific values of Δx and Δy can be set according to actual needs. Then, obtain the subsequent traversal list of the flowchart. Subsequent traversal is a commonly used existing traversal method; therefore, the specific process of obtaining the subsequent traversal list will not be elaborated here. It can be understood that in this invention, the horizontal direction to the right is the positive x-axis, and the vertical direction upward is the positive y-axis. Of course, in other embodiments, the positive x-axis and positive y-axis can be adjusted according to actual needs.
[0064] Next, for all process nodes in the subsequent traversal list, their relative coordinates and collision areas are calculated using the output port position of their parent node as the origin. For example, for a certain process node, if the parent node of the current node is a normal node or a control domain, then the relative coordinates of the current node are (0, -Δy), meaning the current node moves downwards by one vertical interval. If the parent node of the current node is a control node, then the relative coordinates of the current node are (to be determined, -Δy), meaning the relative coordinates of the current node in the horizontal direction are to be determined when processing its parent node. If the current node is a control node, then the x-axis coordinates of the current node are determined based on the relative positions of all its child nodes on the x-axis. Specifically, the relative coordinates of the first child node of the current node are first set to (0, -Δy), and then... Set the relative coordinates of the second child node to be consistent with those of the first child node. Check if the collision areas of the first and second child nodes overlap. If they overlap, shift the x-axis coordinate of the second node to the right by Δx, updating it to (Δx, -Δy). Repeat this process until the collision areas of the two child nodes no longer overlap. Process the third and second child nodes in the same way. After all child nodes have been moved along the x-axis, translate the x-axis coordinates of all child nodes so that the center position of all child nodes is vertically aligned with the center of the current node (i.e., the parent node). After completing the subsequent traversal and calculation, the relative coordinates of all process nodes can be obtained. During the traversal, the collision regions of process nodes also need to be calculated simultaneously. For each process node's collision region, if the current node is the starting node of the control domain (i.e., the control node), then the collision region of the current node is the combined region of the collision regions of all child nodes (i.e., process nodes directly connected to the output ports of the control node), the collision regions of the child nodes of the control domain (i.e., process nodes directly connected to the output ports of the control domain), and its own collision region. If the current node is a normal node, then the collision region of the current node is the combined region of the collision regions of its child nodes and its own collision region. The collision region of each process node itself is a rectangle, a convex polygon, or other shapes, which can be set to the same shape according to the bounding box shape. In this invention, it is preferably set to a rectangle. It is understandable that after calculating the relative coordinates and collision areas of all process nodes, the automatic layout of the process arrangement diagram is completed. This is because nodes cannot overlap, only left and right nodes can overlap. The collision area of a node represents the union of the bounding boxes of the node and all its subsequent nodes. By controlling the overlap detection calculation of the collision areas between the child nodes of a node, it is ensured that left and right nodes will not overlap. Then, a preorder traversal is performed starting from the first node of the sequence. By adding the relative coordinates of the node to the absolute coordinates of its parent node, the absolute coordinates of all nodes can be recursively obtained. The absolute coordinates of the first node of the sequence can be determined by the user dragging on the canvas.
[0065] It is understood that the automatic layout algorithm of the present invention can automatically complete the positioning and layout calculation of all elements on the canvas without manual adjustment, which greatly reduces the workload of process editing and ensures that there is no collision or interference between nodes, thus improving the overall aesthetics of the process layout diagram.
[0066] Optionally, if a node is changed (including adding, deleting, or modifying), the layout needs to be updated. The update process is as follows: remove the node before the changed node from the subsequent traversal list, and then perform subsequent traversal calculations on the remaining nodes in the subsequent traversal list. In this way, only the affected nodes need to be updated, instead of updating all nodes, which reduces the amount of calculation.
[0067] Optional, such as Figure 4 As shown, the test process orchestration method based on hierarchical control domains, after generating the process orchestration diagram, also includes the following:
[0068] Step S5: Set the thumbnail level of the flowchart. If the level of a bounding box is greater than the thumbnail level, it will be displayed as a thumbnail; otherwise, it will be displayed in detail.
[0069] Specifically, to further enhance the visual hierarchy of the flowchart and provide bounding box display mode control, the display mode can be divided into detailed display and thumbnail display. After setting the thumbnail level of the flowchart, if the bounding box level is greater than the thumbnail level, it will be displayed in thumbnail mode. In thumbnail mode, all internal nodes and sub-bounding boxes of the entire control domain are no longer displayed, and the control domain is simplified to a single node; otherwise, it will be displayed in detailed mode. Furthermore, switching display modes will cause changes in the bounding box size. The system will update the visual effects of nodes, connectors, bounding boxes, and other elements in real time and automatically update the layout, maintaining the relative positions of all elements.
[0070] Optionally, the present invention may also provide a semi-automatic layout mode, in which the node position is determined by the user by dragging. During the dragging of the node, the system will automatically calculate all subsequent affected nodes and control domains of the currently dragged node, so that they move synchronously with the current dragged node as a whole.
[0071] Optional, such as Figure 5 As shown, the test process orchestration method based on hierarchical control domains, after generating the process orchestration diagram, also includes the following:
[0072] Step S6: Generate a phase diagram based on the process orchestration diagram.
[0073] Specifically, stage attributes can be configured for nodes in the process orchestration diagram. Stage attributes can set information such as the stage name and estimated time. The estimated time is a constant or a numerical expression. Stage attribute nodes are generally selected as critical path nodes in the test process. If a stage attribute node is the start node of a control domain, it means that this control domain is also a stage attribute. After setting the stage attribute nodes, the main sequence of the process orchestration diagram is copied as is to form the diagram to be processed. The diagram to be processed is traversed based on a depth-first principle. During traversal, non-stage attribute nodes are added to the sequence of nodes to be processed. After traversal, the sequence of nodes to be processed is reversed. Then, a node is taken from the sequence and processed as follows: If the current node is not the start node of the control domain, it is deleted from the diagram to be processed, and a connection is generated between its predecessor and successor nodes. If the current node is the start node of the control domain, it and its corresponding bounding box are deleted. Then, it is determined whether there are any stage attribute nodes in the control domain. If not, a connection is generated between the predecessor and successor nodes of the control domain. If there are any stage attribute nodes in the control domain, they are connected to the predecessor node of the current node. After the sequence of nodes to be processed is traversed, the diagram to be processed is simplified into a stage diagram. The stage diagram is a simplified version of the process orchestration diagram and serves as the skeleton structure of the test process. The stage diagram and the process orchestration diagram support bidirectional linkage. In addition, after generating the stage diagram, the above-mentioned automatic layout algorithm can be used to automatically lay out the stage diagram.
[0074] It is understood that by setting stage attributes for the critical path nodes of the test process in the process orchestration diagram, this invention can automatically extract stage attribute nodes from complex process orchestration diagrams, automatically generate simplified stage diagrams, provide users with a clear process skeleton view, and also perform runtime estimation and progress monitoring.
[0075] In addition, after generating the flowchart, test plans can be created for testing. A test plan consists of multiple test items, each storing the name of the flowchart and the input parameters for calling it. During test execution, the test items in the test plan are run cyclically, unit by unit. During runtime, views such as test results, flow execution, stage execution, timeline, and device data are available. The flowchart execution process is as follows: starting from the main sequence control domain, the input parameters of the main sequence are passed in, a control flow is created, the main sequence start node is executed, and then the control flow flows into subsequent nodes for execution. When the node being executed is a normal node, it is executed directly. When the node being executed is the start node of a control domain, that control domain is executed. After the control domain is completed, the control domain input parameters are executed. The process repeats for each subsequent node pointed to by the output port until no further nodes are reached. Once this sequence is complete, the corresponding result data is returned. The execution process of the control domain is as follows: When a control flow flows into the control domain, an instance of the corresponding data item is created based on the data area of the control domain. The control flow first enters the start node of the control domain, and then flows within the control domain according to node rules and connecting lines until it can no longer flow into subsequent nodes. This indicates that the control flow has completed execution. When all control flows within the control domain have completed execution, the control flow flows out from the bounding box output node, destroying the instance of the corresponding data item. At this point, the control domain execution is complete. For example, in the flowchart of a certain embodiment, the working state and parameters of the controlled device are first set through the device control component, then the data reported by the device is collected through the device event component, and the process data is calculated in real time through the business processing component. Then, the process data is displayed through the display component, and finally, all process data is evaluated to obtain the final test result. Finally, the result setting component sets whether the current test item passes the test and sets performance data, etc. All the above data is updated in real time on the test result view in the form of text, data, and various visual charts.
[0076] The test results view displays real-time test data and results using text, data, and various visual charts, driven by the display and result setting components within the workflow. The workflow execution view displays the status changes generated during execution in a read-only workflow diagram. Currently executing nodes / bounding boxes are highlighted in real-time, while executed nodes / bounding boxes display different colors based on the execution result (success, warning, or error). The execution path is visually traced, using a striking light flow or animation to show how the execution process proceeds step by step, especially highlighting which path was selected in branches and loops. Users can view data items and their values within the currently running and running control domains. For nodes with execution errors, detailed error information can also be viewed. The stage execution view calculates the estimated execution time for each stage node in the stage diagram using a time-consuming expression. Then, by accumulating the execution times of all nodes in the stage diagram, the total estimated execution time of the test item is obtained. Different colors are used to display the stage attribute nodes based on their status: executed, in progress, and not executed. The execution time is displayed on executed stage attribute nodes, while currently executing stage attribute nodes are highlighted in real-time and display their execution time and estimated remaining time. The estimated remaining time is displayed on not yet executed stage attribute nodes. These statuses and process execution are kept synchronized and updated in real-time with the overall progress percentage, execution time, and estimated remaining time of the entire test item. The device data view displays device control commands and device data transmission and reception in a log format. Each data entry includes the time, device name, and related data.The timeline view is a global timeline view, represented as a horizontal Gantt chart. The horizontal X-axis represents time, starting from the beginning of the process execution, using a linear scale and providing zoom and pan interactions. The vertical Y-axis consists of multiple horizontal Gantt bars, displaying a vertical timeline representing the current time and progressing forward. As time advances, the display status of all Gantt bars is updated in real time. Each Gantt bar represents an entity, and its status and activities are displayed at the corresponding time coordinate within the Gantt bar. The displayed Gantt bars mainly include stage Gantt bars and device instruction Gantt bars. Within the stage Gantt bars, the area comprising the start and end execution time periods of each stage is color-coded, and information such as the stage name and duration is displayed within this area. Clicking on this area highlights the stage's attribute node in the stage execution view. Furthermore, if a warning or error occurs at any point in the process flow, it will be displayed in the stage... The Gantt bar displays a prominent icon corresponding to the time position. Clicking the icon displays the details of the anomaly and allows for linked location in other views. Additionally, a device instruction Gantt bar is generated for each device controlled by the test item (e.g., spectrum analyzer, navigation signal simulator, navigation receiver, etc.). In the device instruction Gantt bar, when data is received from the device or a control command is issued to the device, a transmit / receive indicator is displayed at the event time position, with different colors indicating normal or abnormal conditions. Clicking this indicator displays the command or data details and allows for linked location in other views. When a control command (issued) and its corresponding response data (received) are connected, a request-response correlation line is drawn from the command indicator to the data indicator. The length of the line visually represents the device response delay. Data received without a connection line represents data actively reported by the device (such as heartbeat packets or alarms) and is unrelated to any specific command. In addition, the timeline view features a time cursor—a draggable vertical dashed line—used for time positioning. This cursor interacts bidirectionally with the process execution view, stage execution view, and device data view, allowing other views to synchronously highlight and locate elements at the current time. For example, dragging the time cursor in the timeline view identifies the node corresponding to the cursor time in the process execution view, the stage corresponding to the cursor time in the stage execution view, and the data near the cursor time in the device data view. This linkage mechanism combines the time and hierarchical dimensions of process execution, transforming an abstract runtime state into concrete, interactive, and analyzable visual information. This significantly enhances the system's observability and debuggability, perfectly linking temporal anomalies with spatial location and logical context, reducing fault location time from hours to seconds.
[0077] Optionally, a debug mode can be set during test execution, allowing users to pause and resume the current process. It provides functions such as stepping over, stepping into (entering a node or bounding box), stepping out, running to the cursor position, and conditional breakpoints. During execution or pause, users can observe data item values in real-time through the hover view and monitoring panel, and dynamically adjust these values for interactive debugging. Additionally, necessary data can be collected and stored in files or databases during test execution, forming test records to support test item playback mode. When replaying a test item, the test record is loaded into playback mode. Based on the data and timestamps in the test record, the display of relevant views is driven according to the time sequence, providing the same visualization and interactive effects as in real-time execution. Playback mode offers additional features, including setting pause time and time speed, dragging the timeline to view the status at specific moments, and supporting snapshots of the data area in the process flowchart. When a test fails, users can not only view the final state, but also slide the timeline back to any step like using a "time machine" to observe the evolution of data and logic states. This macro-level debugging experience is difficult to achieve with traditional breakpoint debugging.
[0078] It is understood that this invention visualizes the running status, time consumption, data flow and device interaction in real time and synchronously through multiple dimensions such as process running view, stage view, timeline view and device data view. It also introduces a two-way linkage mechanism of time cursor, which enables the above views to be linked and positioned. In addition, in playback mode, users can perform non-linear backtracking debugging based on the recorded timestamp data, intuitively observe the evolution of historical status, and deeply integrate static process design diagrams with dynamic running history data.
[0079] In addition, such as Figure 6 As shown, another embodiment of the present invention also provides a test process orchestration system based on hierarchical control domains, preferably employing the test process orchestration method based on hierarchical control domains as described above, including:
[0080] The process node generation module is used to drag multiple components from the built-in components and preset component libraries onto the canvas based on the test logic of the test process, forming multiple process nodes and generating connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port.
[0081] The control domain generation module is used to generate a hierarchical recursive control domain based on the control node. Here, the control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The number of input ports and output ports of the control domain is one.
[0082] The bounding box generation module is used to generate bounding boxes based on the regional extent of the control domain, so as to surround all nodes within each control domain and generate a hierarchical process orchestration diagram.
[0083] It is understood that the test flow orchestration system based on hierarchical control domains in this embodiment facilitates the introduction of complex control flows such as branches, loops, parallelism, and events by setting control nodes. It generates hierarchical recursive control domains based on the control nodes, and then generates bounding boxes based on the area of each control domain. This results in a simple sequential structure in the overall flow orchestration diagram, with one node connecting to another or bounding boxes. Each bounding box contains a tree-like branching structure, accurately and clearly representing complex control flows such as branches, loops, parallelism, and events. Furthermore, all control flows within a control domain flow uniformly out from the output port of the bounding box. Subsequent nodes only need to be connected to the output port of the bounding box by a single line, greatly reducing the number of connecting lines in the flow orchestration diagram. This not only simplifies the overall structure but also makes the test flow logic clearer, making the flow orchestration diagram easier to understand and maintain.
[0084] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0085] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for test process orchestration based on a hierarchical control domain, wherein the computer program executes the steps of the method described above when run on a computer.
[0086] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for execution by a machine, and includes digital or analog carrier communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.
[0087] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0088] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0089] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0090] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0091] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0092] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0093] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A test flow orchestration method based on hierarchical control domains, characterized in that, Includes the following: The test logic based on the test process drags multiple components from the built-in components and the preset component library onto the canvas to form multiple process nodes and generate connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port. A hierarchical recursive control domain is generated based on the control node. The control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The control domain has one input port and one output port. Bounding boxes are generated based on the region extent of each control domain to enclose all nodes within each control domain, thus generating a hierarchical process orchestration diagram. The process of generating a hierarchical recursive control domain based on control nodes includes the following: Starting from the control node, the subsequent process nodes connected to its output port are accessed according to the breadth-first principle. If the subsequent process node is a normal node, it is directly assigned to the control domain of the control node. If the subsequent process node is a control node, a new sub-control domain is generated. The process nodes contained in the sub-control domain are determined according to the recursive principle, and the sub-control domain is assigned to the control domain of the control node. Then, the subsequent process nodes connected to the output port of the sub-control domain are accessed. This process is repeated until there are no more accessible subsequent process nodes, thus generating a control domain with a hierarchical recursive structure. The process of generating bounding boxes based on the region extent of the control domain includes the following: Create an empty parent coordinate list. Traverse all process nodes within the control domain using a breadth-first search approach. If a process node is a regular node, directly add the coordinates of the four corners of the graphic it represents to the parent coordinate list. If a process node is a control node, recursively calculate the child coordinate lists of its child control domains, calculate the convex hull of the child coordinate lists, and the polygon corresponding to the convex hull of the child coordinate lists is the bounding box shape of the child control domain. Add the child coordinate lists to the parent coordinate list. After completing the traversal, calculate the convex hull of the parent coordinate list again. The polygon corresponding to the convex hull of the parent coordinate list is the bounding box shape of the parent control domain.
2. The test flow orchestration method based on hierarchical control domains as described in claim 1, characterized in that, Each control domain has a data area. The lifecycle and accessibility of the data area are limited to all nodes within the current control domain and its sub-control domains.
3. The test flow orchestration method based on hierarchical control domains as described in claim 1, characterized in that, After generating the flowchart, the following content is also included: Automatically layout and format the flowchart.
4. The test flow orchestration method based on hierarchical control domains as described in claim 3, characterized in that, The process of automatically formatting and laying out the flowchart includes the following: First, set the horizontal and vertical spacing of the layout. Then, obtain the subsequent traversal list of the process diagram. For all process nodes in the subsequent traversal list, use the output port position of the parent node or the input port position of the current node as the origin of the coordinates to calculate their relative coordinates and collision areas. After completing the subsequent traversal calculation of all process nodes, the automatic layout of the process diagram is realized.
5. The test flow orchestration method based on hierarchical control domain as described in claim 1, characterized in that, After generating the flowchart, the following content is also included: Set the thumbnail level of the flowchart. If the level of a bounding box is greater than the thumbnail level, it will be displayed as a thumbnail; otherwise, it will be displayed in detail.
6. A test flow orchestration system based on hierarchical control domains, employing the test flow orchestration method based on hierarchical control domains as described in any one of claims 1 to 5, characterized in that, include: The process node generation module is used to drag multiple components from the built-in components and preset component libraries onto the canvas based on the test logic of the test process, forming multiple process nodes and generating connection lines between different process nodes. The process nodes include ordinary nodes and control nodes. Ordinary nodes have a maximum of one input port and one output port, while control nodes have a maximum of one input port and at least one output port. The control domain generation module is used to generate a hierarchical recursive control domain based on the control node. Here, the control domain refers to the set of all nodes that are directly or indirectly connected to the output port of the control node. The number of input ports and output ports of the control domain is one. The bounding box generation module is used to generate bounding boxes based on the regional extent of the control domain, so as to surround all nodes within each control domain and generate a hierarchical process orchestration diagram.
7. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method as described in any one of claims 1 to 5 by calling the computer program stored in the memory.
8. A computer-readable storage medium for storing a computer program for test process orchestration based on hierarchical control domains, characterized in that, The computer program, when run on a computer, performs the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Process visualization design method based on code-free interaction
CN118939252A
Visual control method for simulation test process
CN119862686A