CN111176992B - Flow engine testing method and device, computer equipment and storage medium - Google Patents

Flow engine testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111176992B
CN111176992B CN201911346887.9A CN201911346887A CN111176992B CN 111176992 B CN111176992 B CN 111176992B CN 201911346887 A CN201911346887 A CN 201911346887A CN 111176992 B CN111176992 B CN 111176992B
Authority
CN
China
Prior art keywords
node
flow
path
link
double
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911346887.9A
Other languages
Chinese (zh)
Other versions
CN111176992A (en
Inventor
艾可德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN201911346887.9A priority Critical patent/CN111176992B/en
Publication of CN111176992A publication Critical patent/CN111176992A/en
Application granted granted Critical
Publication of CN111176992B publication Critical patent/CN111176992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Abstract

The embodiment of the application belongs to the technical field of flow engine testing, and relates to a testing method of a flow engine. The application also provides a testing device of the flow engine, computer equipment and a storage medium. According to the method, directed element paths among all nodes in the path engine are separated, all the nodes are combined into double-node combinations with flow directions according to the running direction of the flow, the double-node combinations are used as basic units for traversing the flow links in the flow engine, summarizing the flow links of each group of double-node combinations to obtain all the flow links related to the group of double-node combinations, traversing all the double-node combinations, determining the flow links related to each double-node combination, summarizing all the flow links related to the flow engine to obtain all the flow links required to be tested, testing the flow links, and realizing complete and non-legacy testing work of the flow engine.

Description

Flow engine testing method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of flow engine testing technologies, and in particular, to a testing method and apparatus for a flow engine, a computer device, and a storage medium.
Background
With the annual improvement of the hardware performance of computers, the application derived from technologies such as big data, artificial intelligence and the like is rapidly spread, the number of computer program projects is rapidly increased, and compared with the early-stage regulation, a project system is more complex, and integration among a plurality of existing systems and new development functions is generally required, which presents a great challenge for the work of program testing. For efficient management of computer program projects, there are considerable technologies in the industry for project management and project control, where a process engine system facilitates the management of an entire project because the entire project can be extracted and broken down into a process between nodes and projects. However, after the technology is applied, the pressure of testing work is extremely high facing to computer program items with high complexity, the conventional scheme for manually testing is to select key processes among key nodes for performing key tests, and to assist in detecting the whole item by using a conventional black box test, so that the efficiency of the detection mode is extremely low, and the fact that once the item is updated daily, the test needs to be performed again is considered, so that the current testing method cannot meet the testing requirement of a process engine system.
Disclosure of Invention
The embodiment of the application aims to provide a testing method of a flow engine, which can rapidly and completely plan and realize the testing work of the flow engine.
In order to solve the above technical problems, the embodiments of the present application provide a testing method for a flow engine, which adopts the following technical scheme:
a testing method of a flow engine comprises the following steps:
extracting nodes in the system and directed element paths in the nodes according to the adjacent relation of the system;
the nodes in the system are combined pairwise in a directed mode to form a double-node combination;
determining at least one group of flow links corresponding to each group of double-node combinations according to directed element paths in the system;
and testing all the flow links to obtain a test result.
Further, the flow link includes a first flow link; the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
and extracting the first flow links in all the double-node combinations by taking the element paths in the double-node combinations, which are directly pointed to the merging nodes by the starting nodes, as the first flow links in the double-node combinations.
Further, when an intermediate node exists between the flow links corresponding to the dual-node combination, the flow links further comprise a second flow link; the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
taking a starting node in the double-node combination as a starting point, taking an intermediate node directly pointed by the starting node through a meta-path as a first intermediate node, taking a homing node as an ending point, and taking the intermediate node directly pointed to the homing node through the meta-path as a second intermediate node;
and determining a meta-path pointing to the homing node through the target node by taking the departure node in the double-node combination as a starting point as a second flow link, and extracting the second flow links in all the double-node combinations, wherein the target node is an intermediate node serving as a first intermediate node and a second intermediate node at the same time.
Further, the flow link further includes a third flow link; the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
and determining a combination of the element paths from the second intermediate node to the homing node as a third flow link according to the element paths from the departure node to the first intermediate node and the element paths from the first intermediate node to the second intermediate node, and extracting the third flow link in all the double-node combinations.
Further, after the step of determining the third flow link, the method further includes pruning the third flow link so that the third flow link is a non-cyclic link according to the element path from the start node to the first intermediate node, the element path from the first intermediate node to any second intermediate node, and the element path from the second intermediate node to the summary node, where the step of determining the third flow link includes:
traversing each element path in the third flow link to confirm whether a circulating element path exists;
when the circulating element path appears, pruning the circulating path in the third flow path link to be a non-circulating path.
Further, the step of pruning the circulation path in the third flow path to be a non-circulation path specifically includes:
segmenting the third flow link with one or a set of component paths occurring in a loop as a marker;
extracting said segments between a first set and a last set of said cyclically occurring one or more component paths;
the extracted segments are deleted and only one set of the one or one set of circularly occurring meta-paths is reserved to treat the circular paths in the third flow link as non-circular paths.
Further, after the step of testing all the flow links to obtain a test result, the method further includes:
if the test result does not pass, analyzing a flow link through which the test result does not pass;
and determining the problem node according to the data flow direction of the meta-path in the flow link.
In order to solve the above technical problems, the embodiment of the present application further provides a testing device for a flow engine, which adopts the following technical scheme:
the extraction module is used for extracting nodes in the system and directed element paths in the nodes according to the adjacent relation of the system;
the combination module is used for combining the nodes in the system into a double-node combination in a pairwise and directional way;
the flow link module is used for determining at least one group of flow links corresponding to each group of double-node combinations according to the directed element paths in the system; a kind of electronic device with high-pressure air-conditioning system
And the test module is used for testing all the flow links to obtain a test result.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the testing method of a flow engine when executing the computer program.
In order to solve the above technical problem, the embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the steps of a testing method of a flow engine as described above.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
the method comprises the steps of separating directed element paths among all nodes in a path engine, combining each node into double-node combinations with flow directions according to the running direction of a flow, taking the double-node combinations as basic units of traversing the flow links in the path engine, summarizing the flow links of each group of double-node combinations to obtain all the flow links related to one group of double-node combinations, traversing all the double-node combinations, determining the flow links related to each double-node combination, summarizing the flow links to obtain all the flow links related to the path engine and needing to be tested, testing the flow links, and realizing the complete and non-legacy testing work of the path engine.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow chart of one embodiment of a method of testing a flow engine according to the present application;
FIG. 2 is a flow chart of one embodiment of step S300 of FIG. 1;
FIG. 3 is a flow chart of one embodiment of step S305 of FIG. 2;
FIG. 4 is a topology diagram of one implementation of a test method of a flow engine according to the present application;
FIG. 5 is a schematic diagram of one embodiment of a test setup of a flow engine according to the present application;
FIG. 6 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
With continued reference to FIG. 1, a flow chart of one embodiment of a method of testing a flow engine according to the present application is shown. The testing method of the flow engine comprises the following steps:
step S100, extracting nodes in the system and directed element paths in the nodes according to the adjacent relation of the system.
Specifically, the system is split according to the service flow, single nodes which cannot be subdivided are split, each node is traversed, the current node which is traversed is taken as a starting node, the flow which is directly connected to the next node is extracted to be taken as a meta-path, the meta-path is taken as the flow which cannot be subdivided, the actual service flow is realized through the combination of one or more meta-paths, and the meta-path direction is clear. The flow engine has obvious modularization and structuring characteristics, can insert any execution and intervention in the automatic business process, ensures that the work of managing the working flow is executed by expected personnel at the correct time, and is convenient for flexibly changing the business structure when the business is changed. Therefore, for the structured flow engine, a plurality of nodes can be split according to modularization and structured segmentation, perfect codes are packaged in the nodes, and related business logic can be effectively realized. Business logic relations exist among the nodes, and the business logic relations among the nodes form directed meta-paths which are test items which can be aimed at in the testing process of the flow engine and cannot be subdivided.
According to the business logic relation among nodes in the system, all element paths related to one node are determined, the element paths and the nodes form topology in the abstract sense of the flow engine, and all flow links which can be generated in the topology are required to be tested, so that the test of the whole flow engine can be realized, and the business logic of the business engine starting from any node can be accurately executed.
Step S200, combining the two nodes in the system in a two-by-two direction mode into a double-node combination.
According to the split non-subdividable nodes, directed combination is carried out between every two nodes, and the business flow and data flow between the nodes are realized through one or more directed element paths, so that the relation on the paths between the nodes is directed, and all the nodes can generate count=n (n-1) combinations in an ordered way. Wherein n is the number of nodes, and the sum of the service flows contained in the count double-node combination is all possible service flows in the system, and contains all data flows which can be generated in the system.
Any two nodes in the system may or may not be adjacent to each other, but two nodes in the same system may be connected by a flow link formed by a directed meta-path, so that all the flow links involved in all the dual-node combination can be summarized, and all the flow links in the system can be determined and comprehensively tested.
Because the meta-paths, and the flow links that the meta-paths make, are directional, there are also directions for the dual-node combination, specifically the dual-node combination of node a and node b, including two, where (a, b) the dual-node combination represents a departure node that starts with a as the flow link and a destination node that ends with b as the flow link, whereas (b, a) represents a departure node that starts with b as the flow link and a destination node that ends with a as the flow link.
Step S300, determining at least one group of flow links corresponding to each group of double-node combination according to the directed element paths in the system.
In this embodiment, for better description, only a set of dual node combinations (a, b) are illustrated, where a is taken as a departure node, b is taken as a attribution node, and the flow links start from point a to point b, and all flow links meeting the condition are extracted as all flow links included in the dual node combinations. It should be understood that in other implementations, other dual node combined flow link extraction schemes are also within the scope of the present application.
And step S400, testing all the flow links to obtain a test result.
And respectively summarizing all the double-node combinations, summarizing the related flow links, and testing the flow links. So as to realize the automatic test of the whole system.
By combining the nodes into the double-node combination, traversing the flow links of all the double-node combination, checking out all the flow links in the flow engine system, and testing, the scheme can rapidly and effectively extract all the test items, and test the generated use cases, so as to efficiently realize the test of the flow engine.
Wherein, in some embodiments, as shown in fig. 2, at least one set of flow links includes a first flow link, a second flow link, and a third flow link; step S300, the step of determining at least one set of flow links corresponding to each set of dual-node combination according to the directed element paths in the system specifically includes:
step S301: and extracting the first flow links in all the double-node combinations by taking the element paths in the double-node combinations, which are directly pointed to the merging nodes by the starting nodes, as the first flow links in the double-node combinations.
In this embodiment, the first flow link is the most basic flow link of a dual node combination, in which the departure node and the destination node are adjacent, and in this state, there is a single element path between the departure node and the destination node directly determined, and each dual node combination includes at most one set of first flow links. In such a dual-node combination, other kinds of flow links are possible, but the first flow link can obviously only exist in one dual-node combination.
Step S302: taking a starting node in the double-node combination as a starting point, taking an intermediate node directly pointed by the starting node through a meta-path as a first intermediate node, taking a homing node as an ending point, and taking the intermediate node directly pointed to the homing node through the meta-path as a second intermediate node;
in this embodiment, the departure node and the homing node in the dual-node combination are not adjacent, or the departure node and the homing node are adjacent, but are adjacent to other nodes, so that an intermediate node exists between the dual nodes, the dual nodes form a business logic relationship through the connection of one or more intermediate nodes, wherein the departure node and the homing node respectively have a determined meta-path with the adjacent nodes to form the business logic relationship, the intermediate node adjacent to the departure node is defined as a first intermediate node, the intermediate node adjacent to the homing node is defined as a second intermediate node, and the meta-paths or the combination modes of the meta-paths between the first intermediate node and the second intermediate node have multiple types. By superimposing the meta-paths between the first intermediate node and the second intermediate node with the meta-paths between the first intermediate node and the departure node and with the meta-paths between the second intermediate node and the homing node, a complete flow link can be formed.
Step S303: and determining a meta-path pointing to the homing node through the target node by taking the departure node in the double-node combination as a starting point as a second flow link, and extracting the second flow links in all the double-node combinations, wherein the target node is an intermediate node serving as a first intermediate node and a second intermediate node at the same time.
In this embodiment, a first intermediate node and a second intermediate node are combined in such a way that an intermediate node is defined as a first intermediate node and a second intermediate node, respectively, such an intermediate node being defined as a target node, i.e. the departure node is connected to the target node via a defined meta-path, and the target node is connected to the destination node via a defined meta-path. Since the target node can be connected to the departure node and the destination node via fixed meta-paths, respectively, a target node can uniquely define a second flow link.
Step S304: the method comprises the steps that a starting node in a double-node combination is taken as a starting point, according to a meta-path from the starting node to a first intermediate node, the meta-path from the first intermediate node to a second intermediate node passes through, the combination of the meta-paths from the second intermediate node to a homing node is determined to be a third flow link, and the third flow links in all the double-node combinations are extracted;
In this embodiment, after the first intermediate node and the second intermediate node are not coincident, or after the determination of the first flow link and the second flow link is completed by the combination of the two nodes, by reading the topology formed by each node and the element path, there is another directed element path or a combination of directed element paths, a group of first intermediate nodes and second intermediate nodes can be connected, in this environment, a new flow link can be determined by combining paths between the first intermediate node and the second intermediate node, the flow link points from the first intermediate node to the second intermediate node, on the basis of which the determined element path between the first intermediate node and the departure node and the element path between the second intermediate node and the destination node are overlapped, a complete intermediate link from the departure node to the destination node can be obtained, and is defined as a third flow link.
It should be noted that the traversing operations of the first, second and third flow links for the dual-node assembly are performed independently of each other, and may be performed simultaneously or sequentially according to a predetermined sequence.
A plurality of third flow links may be formed between a set of first intermediate nodes and a second intermediate node. And traversing the first intermediate node by taking the first intermediate node as a reference to obtain all third flow links passing through the first intermediate node, wherein the third flow links passing through the second intermediate node in the double-node combination are also finally traversed. There may be one to multiple sets of first intermediate nodes in each dual node combination, and traversing all intermediate nodes can determine all relevant flow links. Similarly, by traversing the second intermediate node with the second intermediate node as a reference, a third flow link passing through all the first intermediate node and the second intermediate node can be obtained.
In this embodiment, all the dual nodes in the flow engine are combined and traversed respectively, and the first flow link and/or the second flow link and/or the third flow link corresponding to the dual nodes are extracted, so that all the flow links to be tested in the flow engine are listed respectively.
In other embodiments, the at least one set of flow links may also be any one of, or a combination of, the first flow link, the second flow link, the third flow link.
Referring to fig. 2, step S304 includes, after determining the third flow link according to the starting point of the starting node in the dual-node combination and the meta-path from the starting node to the first intermediate node, the meta-path from the first intermediate node to any second intermediate node, and the combination of the meta-paths from the second intermediate node to the homing node, the steps further include:
step S305: pruning the third flow link so that the third flow link is an acyclic link.
Referring to fig. 3, step S305 specifically includes:
step S3051: each meta-path in the third flow link is traversed to confirm whether a looped meta-path exists.
In generating the third flow path, branching, looping, and nesting of the business processes may occur in the business processes. The business flow of the branch class is gradually increased from the intermediate node to the intermediate node, and is directly generated into two third flow paths in the process of generating the third flow paths. Similarly, in nested business processes, portions of the branching structure are filtered during the generation of the third flow path. Therefore, among the three business processes of sequence, branch and cycle, and the business processes of nesting the three business processes, the factors which can cause the redundancy of the test process and slow operation are only the business processes of the cycle type.
The combination of the nodes and the meta paths involved in the third flow link is uncertain, so that a loop link may be caused, and in the process of software testing, the loop link is usually tested by an additional use case alone instead of being tested in a main flow, so that inaccuracy of a test result is prevented, and when the loop link appears in the third flow link, the loop link needs to be removed.
The flag of the flow in which the loop occurs in the flow link is that one element link, or a group of element links consisting of a plurality of element links occurs a plurality of times, because a part of the links occurs at least twice on two nodes through one or a group of element links, and is expressed as a loop in the execution of the program. It is necessary to reject from the main process and perform a separate loop-related test.
Step S3052: when the circulating element path appears, pruning the circulating path in the third flow path link to be a non-circulating path.
When the circulation element path appears, the circulation element paths are grouped according to the circulation times. The business processes between the first group of continuous paths and the last group of continuous paths are one or more circulating business processes. After the first group of continuous paths are eliminated to the last group of continuous paths, and only one group of continuous element paths are reserved, only a part of the sequential execution of the business flow is remained, and the eliminated part can be embodied in the process of acquiring the flow links of the related double-node combination.
Specifically, the third flow link is segmented by taking one or a group of element paths which appear in a circulating way as marks; extracting said segments between a first set and a last set of said cyclically occurring one or more component paths; the extracted segments are deleted and only one set of the one or one set of circularly occurring meta-paths is reserved to treat the circular paths in the third flow link as non-circular paths.
The path of the one or a group of loops is used as a mark, a segmented separator is arranged before or after the path of the one or a group of loops, and a third flow link is segmented. Taking the example that the separator is arranged before the element path which appears in one or a group of loops, the process of implementing segmentation and pruning on the whole third flow link is described as follows: traversing the third flow link, setting n separators corresponding to the circularly occurring element paths in number, dividing the third flow link into n+1 sections, wherein the first section and the last section are non-circularly parts, reserving the first section and the last section, the second section to the nth section are circularly parts, deleting the second section to the nth section, at this time, because the separators are arranged in front of the circularly occurring element paths, the circularly occurring element paths of the first group 1 are deleted, the circularly occurring element paths of the nth group are reserved in the last section, so that the circularly occurring part in the third flow link is completely removed, and only one circularly occurring element path or paths are reserved, thereby realizing pruning treatment.
By pruning, the problems that dead circulation occurs in the process of testing the flow link or the testing flow is severely limited can be effectively avoided.
Wherein, in some embodiments, after the testing is performed on all the flow links to complete the testing step on the system, the method further includes:
if the test result does not pass, analyzing a flow link through which the test result does not pass;
and determining the problem node according to the data flow direction of the meta-path in the flow link. .
Specifically, if a fault occurs in the process of testing a flow link, a breakpoint will be generated, and because the meta-path is the smallest test unit which cannot be subdivided in the process of testing a flow engine, the breakpoint in the process of testing can determine an operational error occurring in one meta-path, determine the position of the error specifically occurring in the meta-path and the specific cause of the error according to the display of the test tool, determine the relevant problem node according to the data flow direction of the meta-path in the flow link, and then, can efficiently solve the corresponding fault by checking and modifying codes in the problem node.
And checking and modifying the service codes to enable the service codes to meet the requirements of the flow engine, and re-performing relevant tests.
In some embodiments, the directed element path corresponding to the single node is automatically parsed and formed into topology by the interface of the system. The meta-path and the nodes are determined by using the mechanism of the flow engine, so that the difficulty of acquiring the nodes and the meta-path can be effectively reduced.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
Referring to fig. 4, a specific implementation procedure is given according to the present embodiment, where a to h are a plurality of nodes appearing in the system, 1 to 10 are a plurality of element paths appearing in the system, and the present embodiment uses an ordered dual-node directed dual-node combination [ a, e ] as an example to traverse its flow links, where element path 1 uniquely determines the data flow between [ a, e ] and is the first flow link; node b is used as a first intermediate node corresponding to a departure node and a second intermediate node corresponding to a homing node at the same time, so that the node b is determined as a target node, and a data flow passing through the target node b in [ a, e ] can be uniquely determined through the combination of a meta-path 2 pointing to the target node by the departure node and a meta-path 3 pointing to the homing node by the target node, and is a second flow link; because for the directed dual node, the target nodes comprise 0 to a plurality, and each target node corresponds to one second flow link, the number of the second flow links is determined by the number of the target nodes; in this embodiment, a third flow link can be determined through the meta path 4→5→10→9→8→7→5→6, where the meta path 5 appears twice, so that a loop link is formed between the nodes c, d, h, g, f, c, at this time, the links in the meta path 5→10→9→8→7→5 are removed, and only the meta path 5 appears once is reserved, and the modified business flow is: 4- & gt 5- & gt 6, wherein the link is a sequentially executed link, so that the problem of reduced test efficiency caused by cyclic test can be effectively avoided. When the redundant loop links are pruned, the business process may be repeated with other business processes, and at this time, only one set of the process links is tested, and the redundant process links are deleted.
With further reference to fig. 5, as an implementation of the method shown in fig. 1, the present application provides an embodiment of a testing apparatus of a flow engine, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 1, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, a testing apparatus of a flow engine according to this embodiment includes: the system comprises an extraction module 51, a combination module 52, a flow link module 53 and a test module 54.
An extracting module 51, configured to extract nodes in the system and directed element paths in the nodes according to the proximity relation of the system;
the combination module 52 is configured to combine the two nodes in the system into a dual-node combination in a pairwise direction;
a flow link module 53, configured to determine at least one set of flow links corresponding to each set of the dual-node combinations according to the directed element paths in the system; a kind of electronic device with high-pressure air-conditioning system
And the test module 54 is configured to test all the flow links to complete the test of the system.
In this embodiment, specifically, the system is split according to the service flow, a single node which is not repartitionable is split, each node is traversed, the flow directly connected to the next node from the node is taken as a departure node, the flow is extracted as a meta-path, the meta-path is taken as the flow and is not repartitionable, the actual service flow is realized through the combination of one or more meta-paths, and the meta-path direction is clear. The flow engine has obvious modularization and structuring characteristics, can insert any execution and intervention in the automatic business process, ensures that the work of managing the working flow is executed by expected personnel at the correct time, and is convenient for flexibly changing the business structure when the business is changed. Therefore, for the structured flow engine, a plurality of nodes can be split according to modularization and structured segmentation, perfect codes are packaged in the nodes, and related business logic can be effectively realized. Business logic relations exist among the nodes, and the business logic relations among the nodes form directed meta-paths which are atomic test items aimed at in the testing process of the flow engine.
According to the business logic relation among nodes in the system, all element paths related to one node are determined, the element paths and the nodes form topology in the abstract sense of the flow engine, and all flow links which can be generated in the topology are required to be tested, so that the test of the whole flow engine can be realized, and the business logic of the business engine starting from any node can be accurately executed.
In some optional implementations of this embodiment, the foregoing flow link module includes a first flow link extraction module configured to use a meta-path in the dual-node combination that is directly pointed to the summary node by the departure node as the first flow link in the dual-node combination.
In some optional implementations of this embodiment, the above flow link module further includes a second flow link extraction module, configured to use a starting node in the dual-node combination as a starting point, an intermediate node directly pointed by the starting node through a meta path as a first intermediate node, and a summary node as an ending point, and directly point to the intermediate node through the meta path as a second intermediate node;
and determining a meta-path pointing to the homing node through the target node by taking the departure node in the double-node combination as a starting point as a second flow link, wherein the target node is an intermediate node overlapped with the first intermediate node and the second intermediate node.
In some optional implementations of this embodiment, the above flow link module further includes a third flow link extraction module, configured to determine, with a starting node in the dual-node combination as a starting point, a third flow link according to a meta path from the starting node to the first intermediate node, a meta path traversed by the first intermediate node to any second intermediate node, and a combination of meta paths from the second intermediate node to the homing node;
traversing a third flow link on the first intermediate node until all the first intermediate nodes are traversed;
each set of dual-node combinations is traversed until the first, second, and third flow link extractions are completed in all dual-node combinations.
In some optional implementations of this embodiment, the foregoing flow link module is further configured to: pruning the third flow link so that the third flow link is an acyclic link. And the flow link module also comprises a circulation path scanning module and a pruning module.
The circulation path scanning module is used for: each meta-path in the third flow link is traversed to confirm whether a looped meta-path exists.
The pruning module is used for: when the circulating element path appears, pruning the circulating path in the third flow path link to be a non-circulating path.
Referring to fig. 5, a schematic structural diagram of an embodiment of a pruning module is shown, where the pruning module includes a segmentation sub-module, a path extraction sub-module, and a deletion sub-module. Wherein the segmentation submodule is configured to segment the third flow link with a recurring one or a set of element paths as markers. The path extraction submodule is used for extracting paths between the first group and the last group of one or a group of element paths of the circulation occurrence. The deletion submodule is used for deleting the rest paths in the extraction paths so that only one or one group of element paths in which the circulation appears in a group of paths are reserved, and the circulation paths in the third flow link are processed into non-circulation paths.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 6, fig. 6 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 6 comprises a memory 61, a processor 62, a network interface 63 communicatively connected to each other via a system bus. It is noted that only computer device 6 having components 61-63 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 61 includes at least one type of readable storage media including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 61 may be an internal storage unit of the computer device 6, such as a hard disk or a memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard) or the like, which are provided on the computer device 6. Of course, the memory 61 may also comprise both an internal memory unit of the computer device 6 and an external memory device. In this embodiment, the memory 61 is generally used to store an operating system and various application software installed on the computer device 6, such as program codes of a testing method of a flow engine. Further, the memory 61 may be used to temporarily store various types of data that have been output or are to be output.
The processor 62 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is configured to execute the program code stored in the memory 61 or process data, such as the program code for executing the X method.
The network interface 63 may comprise a wireless network interface or a wired network interface, which network interface 63 is typically used for establishing a communication connection between the computer device 6 and other electronic devices.
The present application also provides another embodiment, namely, a computer readable storage medium storing a test program of a flow engine, where the test program of the flow engine is executable by at least one processor, so that the at least one processor performs the steps of the test method of the flow engine as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (8)

1. A method for testing a flow engine, comprising the steps of:
extracting nodes in the system and directed element paths in the nodes according to the adjacent relation of the system;
the nodes in the system are combined pairwise in a directed mode to form a double-node combination;
determining at least one group of flow links corresponding to each group of double-node combinations according to directed element paths in the system;
Testing all the flow links to obtain a test result;
wherein the flow link comprises a first flow link;
the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
taking a meta path which is directly pointed to a homing node by a departure node in a double-node combination as a first flow link in the double-node combination, and extracting the first flow links in all the double-node combination;
when the flow link corresponding to the double-node combination has an intermediate node, the flow link further comprises a second flow link;
the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
taking a starting node in the double-node combination as a starting point, taking an intermediate node directly pointed by the starting node through a meta-path as a first intermediate node, taking a homing node as an ending point, and taking the intermediate node directly pointed to the homing node through the meta-path as a second intermediate node;
and determining a meta-path pointing to the homing node through the target node by taking the departure node in the double-node combination as a starting point as a second flow link, and extracting the second flow links in all the double-node combinations, wherein the target node is an intermediate node serving as a first intermediate node and a second intermediate node at the same time.
2. The method of testing a process engine of claim 1, wherein the process link further comprises a third process link;
the step of determining at least one set of flow links corresponding to each set of the dual-node combination according to the directed element path in the system specifically comprises the following steps:
and determining a combination of the element paths from the second intermediate node to the homing node as a third flow link according to the element paths from the departure node to the first intermediate node and the element paths from the first intermediate node to the second intermediate node, and extracting the third flow link in all the double-node combinations.
3. The method for testing a flow engine according to claim 2, wherein after the step of determining a third flow link by using a starting node in the dual node combination as a starting point and according to a meta path from the starting node to a first intermediate node, a meta path from the first intermediate node to any second intermediate node, and a meta path from the second intermediate node to a summary node, pruning the third flow link so that the third flow link is an acyclic link, the method specifically comprises:
Traversing each element path in the third flow link to confirm whether a circulating element path exists;
when the circulating element path appears, pruning the circulating path in the third flow path link to be a non-circulating path.
4. A method for testing a flow engine according to claim 3, wherein the step of pruning the circulation path in the third flow link to be a non-circulation path specifically comprises:
segmenting the third flow link with one or a set of component paths occurring in a loop as a marker;
extracting said segments between a first set and a last set of said cyclically occurring one or more component paths;
the extracted segments are deleted and only one set of the one or one set of circularly occurring meta-paths is reserved to treat the circular paths in the third flow link as non-circular paths.
5. The method for testing a flow engine according to claim 1, wherein after said step of testing all of said flow links to obtain test results, the method further comprises:
if the test result does not pass, analyzing a flow link through which the test result does not pass;
And determining the problem node according to the data flow direction of the meta-path in the flow link.
6. A test device for a process engine, comprising:
the extraction module is used for extracting nodes in the system and directed element paths in the nodes according to the adjacent relation of the system;
the combination module is used for combining the nodes in the system into a double-node combination in a pairwise and directional way;
the flow link module is used for determining at least one group of flow links corresponding to each group of double-node combinations according to the directed element paths in the system; a kind of electronic device with high-pressure air-conditioning system
The testing module is used for testing all the flow links to obtain a testing result;
the flow link module comprises a first flow link extraction module, a second flow link extraction module and a first processing module, wherein the first flow link extraction module is used for extracting first flow links in all the double-node combinations by taking a meta path which is directly pointed to a homing node from a departure node in the double-node combination as a first flow link in the double-node combination;
the flow link module further comprises a second flow link extraction module, which is used for taking a starting node in the double-node combination as a starting point, taking an intermediate node directly pointed by the starting node through a meta-path as a first intermediate node, taking a summary node as an ending point, and directly pointing to the intermediate node through the meta-path as a second intermediate node;
And determining a meta-path pointing to the homing node through the target node by taking the departure node in the double-node combination as a starting point as a second flow link, wherein the target node is an intermediate node overlapped with the first intermediate node and the second intermediate node.
7. A computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor, when executing the computer program, implementing the steps of a method of testing a flow engine according to any of claims 1 to 5.
8. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of a method of testing a flow engine according to any of claims 1 to 5.
CN201911346887.9A 2019-12-24 2019-12-24 Flow engine testing method and device, computer equipment and storage medium Active CN111176992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911346887.9A CN111176992B (en) 2019-12-24 2019-12-24 Flow engine testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911346887.9A CN111176992B (en) 2019-12-24 2019-12-24 Flow engine testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111176992A CN111176992A (en) 2020-05-19
CN111176992B true CN111176992B (en) 2023-06-06

Family

ID=70655548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911346887.9A Active CN111176992B (en) 2019-12-24 2019-12-24 Flow engine testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111176992B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732564A (en) * 2020-12-30 2021-04-30 武汉海昌信息技术有限公司 Method and device for realizing process engine of business system
CN112882910A (en) * 2021-01-22 2021-06-01 中国建设银行股份有限公司 Interface pressure testing method and device of workflow engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255707A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Development roles creation method, device, equipment and the storage medium of test case
CN109144618A (en) * 2018-09-10 2019-01-04 中铝视拓智能科技有限公司 A kind of service flow execution method and relevant apparatus
CN109460662A (en) * 2018-11-05 2019-03-12 杭州安恒信息技术股份有限公司 A kind of Javascript engine fuzz testing method and apparatus based on path feedback
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255707A (en) * 2017-11-30 2018-07-06 平安科技(深圳)有限公司 Development roles creation method, device, equipment and the storage medium of test case
CN109144618A (en) * 2018-09-10 2019-01-04 中铝视拓智能科技有限公司 A kind of service flow execution method and relevant apparatus
CN109460662A (en) * 2018-11-05 2019-03-12 杭州安恒信息技术股份有限公司 A kind of Javascript engine fuzz testing method and apparatus based on path feedback
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Also Published As

Publication number Publication date
CN111176992A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
CN111176992B (en) Flow engine testing method and device, computer equipment and storage medium
CN109240665A (en) Log recording method, device and electronic equipment
CN105159809B (en) Based on state machine faults localization method and device
CN106354817B (en) Log processing method and device
CN111274202B (en) Electronic contract generation method, device, computer equipment and storage medium
CN112037003A (en) File account checking processing method and device
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
US10055341B2 (en) To-be-stubbed target determining apparatus, to-be-stubbed target determining method and non-transitory recording medium storing to-be-stubbed target determining program
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN116009889A (en) Deep learning model deployment method and device, electronic equipment and storage medium
CN113238748B (en) Direct current control and protection program page modification and verification method, device, terminal and medium
CN110737438A (en) data processing method and device
CN104536897A (en) Automatic testing method and system based on keyword
CN111880803B (en) Software construction method and device applied to multiple platforms
CN109189672A (en) Automatic test approach, server and the computer readable storage medium of micro services
CN113805861A (en) Code generation method based on machine learning, code editing system and storage medium
CN112015633B (en) Test excitation multi-platform multiplexing method, device, equipment and storage medium
CN113342647A (en) Test data generation method and device
CN112363814A (en) Task scheduling method and device, computer equipment and storage medium
CN112416648A (en) Data verification method and device
CN110263303A (en) The retroactive method and device of text modification history
CN103678117A (en) Data transition tracing apparatus and data transition tracing method
CN110737429A (en) modular compiling method and device utilizing Makefile self-dependent relationship
JP7320156B1 (en) Event tree simplification method, event tree simplification device and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant