Business process testing method and device, medium and electronic equipment

By converting structured data into graph data format and performing random adjustments and verification, combined with automated testing using headless browsers and dynamic scripting languages, the problems of low efficiency and high cost in business process testing are solved, achieving an efficient and low-cost testing solution.

CN115701591BActive Publication Date: 2026-07-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-08-02
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency and high cost in business process testing, and manual testing is difficult to cover all scenarios, resulting in both low efficiency and high cost.

Method used

By converting business process data based on structured data storage format to generate business process diagrams in graph data format, and randomly adjusting some process nodes for verification, the data is then converted back to structured data storage format for global verification. Automated testing is performed using a headless browser and dynamic scripting language.

Benefits of technology

It enables the automated generation of test scenarios for diverse business processes, improving testing efficiency, reducing testing costs, enhancing test quality, and adapting to complex and ever-changing business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115701591B_ABST
    Figure CN115701591B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computers, and particularly relates to a business process testing method, a business process testing device, a computer readable medium and an electronic device. The method comprises the following steps: performing format conversion on business process data based on a structured data storage format to obtain a business process graph based on a graph data format, wherein the business process graph comprises a plurality of process nodes; randomly adjusting part of the process nodes in the business process graph according to preset configuration parameters to obtain an adjusted to-be-tested process graph; performing verification on the part of the adjusted process nodes to obtain a verification result of the process nodes; when the verification result of the process nodes is verified to be passed, performing format conversion on the to-be-tested process graph to obtain to-be-tested process data based on the structured data storage format; and performing verification on the to-be-tested process data to obtain a verification result of the business process. The method can improve the testing efficiency and testing quality of the business process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, specifically relating to a business process testing method, a business process testing device, a computer-readable medium, and an electronic device. Background Technology

[0002] With the development of computer and network technologies, various business processes can be realized based on network communication, such as approval processes within enterprises and transaction processes between enterprises.

[0003] In different business scenarios, users can edit and adjust business processes according to their needs, which leads to the complexity and variability of these processes. To ensure the stability of these processes, performance testing is necessary. However, manual testing methods are difficult to cover all business scenarios and generally suffer from technical problems such as low testing efficiency and high testing costs. Summary of the Invention

[0004] The purpose of this application is to provide a business process testing method, a business process testing device, a computer-readable medium, and an electronic device, which at least to some extent overcome the technical problems of low testing efficiency and high testing cost in related technologies.

[0005] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.

[0006] According to one aspect of the embodiments of this application, a business process testing method is provided. The method includes: converting business process data based on a structured data storage format to obtain a business process diagram based on a graph data format, the business process diagram including multiple process nodes; randomly adjusting some process nodes in the business process diagram according to preset configuration parameters to obtain an adjusted process diagram to be tested; verifying the adjusted process nodes to obtain verification results; when the verification result of the process node is a pass, converting the process diagram to be tested to obtain test process data based on a structured data storage format; and verifying the test process data to obtain a verification result of the business process.

[0007] According to one aspect of the embodiments of this application, a business process testing apparatus is provided. The apparatus includes: a first conversion module configured to convert business process data based on a structured data storage format to obtain a business process diagram based on a graph data format, the business process diagram including multiple process nodes; an adjustment module configured to randomly adjust some process nodes in the business process diagram according to preset configuration parameters to obtain an adjusted process diagram to be tested; a first verification module configured to verify the adjusted partial process nodes to obtain a verification result of the process nodes; a second conversion module configured to convert the format of the process diagram to be tested when the verification result of the process node is a pass, to obtain test process data based on a structured data storage format; and a second verification module configured to verify the test process data to obtain a verification result of the business process.

[0008] In some embodiments of this application, based on the above technical solutions, the adjustment module includes: a process loading module, configured to launch multiple browser instances through a headless browser, and load the business process diagram in the command line interface of each browser instance respectively; a strategy generation module, configured to randomly generate a process adjustment strategy corresponding to each browser instance according to preset configuration parameters; and a process adjustment module, configured to adjust some process nodes of the business process diagram loaded in the browser instance according to the process adjustment strategy.

[0009] In some embodiments of this application, based on the above technical solutions, the configuration parameters include a node adjustment ratio and a node adjustment type. The node adjustment ratio represents the proportion of the partial process nodes to be adjusted in the total number of process nodes in the business process diagram. The node adjustment type includes various adjustment operations to be performed on the partial process nodes to be adjusted. The strategy generation module includes: a node identification module, configured to identify all process nodes in the business process diagram, and classify all process nodes into adjustable nodes and non-adjustable nodes according to the identification results; a node selection module, configured to randomly select partial process nodes to be adjusted from the adjustable nodes according to the node adjustment ratio; and a node operation selection module, configured to randomly select adjustment operations to be performed on each process node to be adjusted from the node adjustment types, so as to generate a process adjustment strategy corresponding to the browser instance.

[0010] In some embodiments of this application, based on the above technical solutions, the node operation selection module includes: a first weight acquisition module, configured to acquire operation weights corresponding to various adjustment operations in the node adjustment type; a first probability prediction module, configured to predict the selection probability of the various adjustment operations based on the operation weights; and a first operation selection module, configured to randomly select adjustment operations to be performed on each process node to be adjusted based on the selection probability.

[0011] In some embodiments of this application, based on the above technical solutions, the node adjustment type includes at least one of adding a node, deleting a node, moving a node, copying a node, or modifying node data.

[0012] In some embodiments of this application, based on the above technical solutions, the configuration parameters include a branch adjustment ratio and a branch adjustment type. The branch adjustment ratio represents the proportion of process branches connected to the process nodes to be adjusted in the total number of process branches in the business process diagram. The branch adjustment type includes various adjustment operations performed on process branches connected to the process nodes to be adjusted. The strategy generation module includes: a branch identification module configured to identify all process branches in the business process diagram and classify them into adjustable branches and non-adjustable branches based on the identification results; a branch selection module configured to randomly select process branches connected to the process nodes to be adjusted from the adjustable branches according to the branch adjustment ratio; and a branch operation selection module configured to randomly select adjustment operations from the branch adjustment types to be performed on each process branch to be adjusted, thereby generating a process adjustment strategy corresponding to the browser instance.

[0013] In some embodiments of this application, based on the above technical solutions, the branch operation selection module includes: a second weight acquisition module, configured to acquire operation weights corresponding to various adjustment operations in the branch adjustment type; a second probability prediction module, configured to predict the selection probability of the various adjustment operations based on the operation weights; and a second operation selection module, configured to randomly select adjustment operations to be performed on the connection branches between the process nodes to be adjusted based on the selection probability.

[0014] In some embodiments of this application, based on the above technical solutions, the branch adjustment type includes at least one of adding a branch, deleting a branch, or modifying the branch priority.

[0015] In some embodiments of this application, based on the above technical solutions, the first verification module includes: a page loading module, configured to load a web page containing the business process diagram in the command-line interface of a browser instance; an associated node acquisition module, configured to acquire associated nodes that have a connection relationship with the adjusted partial process nodes within the web page; and a node verification module, configured to verify the adjusted partial process nodes and the associated nodes.

[0016] In some embodiments of this application, based on the above technical solutions, the node verification module is further configured to: perform legality verification on the node relationships between the adjusted partial process nodes and the associated nodes to determine whether the node relationships of each node conform to the verification rules; and perform legality verification on the node attributes of the adjusted partial process nodes and the associated nodes to determine whether the node attributes of each node conform to the verification rules.

[0017] In some embodiments of this application, based on the above technical solutions, the second verification module is further configured to: send an asynchronous network request to the server based on a dynamic scripting language, so that the server performs connectivity verification and / or reachability verification on the process data to be tested according to the asynchronous network request.

[0018] In some embodiments of this application, based on the above technical solutions, the device further includes: an operation recording module, configured to acquire an operation path that adjusts some process nodes in the business process diagram, and record a webpage snapshot of the original process diagram associated with the operation path, wherein the original process diagram is the business process diagram before the operation path is executed.

[0019] According to one aspect of the embodiments of this application, a computer-readable medium is provided, on which a computer program is stored, which, when executed by a processor, implements the business process testing method as described in the above technical solutions.

[0020] According to one aspect of the embodiments of this application, an electronic device is provided, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the business process testing method as described above by executing the executable instructions.

[0021] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the business process testing method as described in the above technical solutions.

[0022] In the technical solution provided in this application embodiment, a portion of process nodes are randomly selected from the business process diagram based on graph data format and adjusted and verified. After verifying and testing the adjusted portion of process nodes, the complete business process is then verified and tested using business process data based on structured data storage format. This application embodiment, by adjusting various process nodes in the business process diagram, can automatically generate various different business process test scenarios, adapting to the complex and ever-changing business processes in actual use. This application embodiment performs local testing on the adjusted portion of process nodes based on the business process diagram, while simultaneously performing global testing on the complete business process based on the business process data. Through asynchronous testing under two data formats, the overall testing efficiency of the business process can be improved. Without manual intervention, the testing cost of the business process can be reduced, and the testing quality of the business process can be improved.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0025] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.

[0026] Figure 2 A business process testing method in one embodiment of this application is illustrated schematically.

[0027] Figure 3 This illustration shows the effect of format conversion of business process data in one embodiment of this application.

[0028] Figure 4 A flowchart illustrating the steps of adjusting process nodes is shown in one embodiment of this application.

[0029] Figure 5 This illustration schematically depicts an application scenario of running an automated testing process based on a headless browser in one embodiment of this application.

[0030] Figure 6 A flowchart illustrating the steps of generating a process adjustment strategy for a process node is shown in one embodiment of this application.

[0031] Figure 7 A flowchart illustrating the steps of generating a process adjustment strategy for process branches is shown in one embodiment of this application.

[0032] Figure 8 The diagram illustrates an interactive flowchart of a business process test in an application scenario, according to an embodiment of this application.

[0033] Figure 9 A schematic block diagram of the business process testing apparatus provided in an embodiment of this application is shown.

[0034] Figure 10 A schematic diagram of a computer system architecture suitable for implementing the embodiments of this application is shown. Detailed Implementation

[0035] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0036] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0037] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0038] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0039] Figure 1 An exemplary system architecture block diagram illustrating the application of the technical solution of this application is shown schematically.

[0040] like Figure 1 As shown, the system architecture 100 may include terminal device 110, network 120, and server 130. Terminal device 110 may include various electronic devices such as smartphones, tablets, laptops, and desktop computers. Server 130 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, such as a wired communication link or a wireless communication link.

[0041] Depending on the implementation requirements, the system architecture in this application embodiment can have any number of terminal devices, networks, and servers. For example, server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided in this application embodiment can be applied to terminal device 110, or to server 130, or can be implemented jointly by terminal device 110 and server 130. This application does not impose any special limitations on this.

[0042] The following detailed description of the business process testing method, business process testing apparatus, computer-readable medium, and electronic device provided in this application, with reference to specific embodiments, provides a detailed explanation.

[0043] Figure 2 The illustration schematically depicts a business process testing method in one embodiment of this application, which can be performed by... Figure 1 The terminal device 110 and / or server 130 shown are used to execute the service process testing method. This embodiment of the application uses a service process testing method jointly executed by the terminal device 110 and server 130 as an example for illustration. For example... Figure 2 As shown, the business process testing method can mainly include the following steps S210 to S250.

[0044] Step S210: Convert the business process data based on the structured data storage format to obtain a business process diagram based on the graph data format. The business process diagram includes multiple process nodes.

[0045] Step S220: Randomly adjust some process nodes in the business process diagram according to the preset configuration parameters to obtain the adjusted process diagram to be tested.

[0046] Step S230: Verify the adjusted process nodes to obtain the verification results of the process nodes.

[0047] Step S240: When the verification result of the process node is that the verification is passed, the format of the flowchart to be tested is converted to obtain the process data to be tested based on the structured data storage format.

[0048] Step S250: Verify the data of the process to be tested to obtain the verification result of the business process.

[0049] In the business process testing method provided in this application embodiment, a portion of process nodes are randomly selected from the business process diagram based on graph data format and adjusted and verified. After verifying and testing the adjusted portion of process nodes, the complete business process is then verified and tested using business process data based on structured data storage format. This application embodiment, by adjusting various process nodes in the business process diagram, can automatically generate various different business process test scenarios to adapt to the complex and ever-changing business processes in actual use. This application embodiment performs local testing on the adjusted portion of process nodes based on the business process diagram, while simultaneously performing global testing on the complete business process based on the business process data. Through asynchronous testing under two data formats, the overall business process testing efficiency can be improved, and the testing cost and quality of the business process can be reduced without manual intervention.

[0050] The following section provides a detailed explanation of each method step in the business process testing method described in this application embodiment, using application scenarios as examples.

[0051] In step S210, the business process data based on the structured data storage format is converted to obtain a business process diagram based on the graph data format. The business process diagram includes multiple process nodes.

[0052] Business process data based on structured data storage format can be stored in a structured database. When it is necessary to view, test, or run the corresponding business process, it can be converted into a business process diagram based on graph data format. A business process can generally include multiple process nodes, and tasks flow between each process node according to the execution order of the business process. When the flow reaches the last process node, the execution result of the business process can be output.

[0053] Business process data based on structured data storage formats can include various data such as node identifiers, node attributes, and node relationships for each process node. Node identifiers are used to distinguish each process node; they can be node names or node numbers. Node attributes indicate the process operations performed by the process node and the operation parameters used during execution. Node relationships indicate the connection relationships between each process node and other process nodes.

[0054] A business process diagram based on graph data format consists of nodes and edges, where nodes represent the various process nodes of the business process, and edges represent the process branches that facilitate task flow between the various process nodes.

[0055] Figure 3 This illustration schematically shows the effect of format conversion of business process data in one embodiment of this application. For example... Figure 3 As shown, business process data 310 is structured data stored in tabular form, including multiple data rows and columns. Data rows may include, for example, corresponding node identifiers, node attributes, and node relationships, while data columns represent the values ​​corresponding to each data item. Business process diagram 320 is stored in graph data format, including points corresponding to each process node in the business process and edges used to represent the flow of process tasks.

[0056] In one embodiment of this application, the business process data 310 can be stored in a structured database. During business process testing, the corresponding business data is first read from the structured database, and then its format is converted to form a business process diagram 320.

[0057] In one embodiment of this application, the business process data 310 may be data based on the Protobuf (ProtocolBuffers) protocol format. Protobuf is a data serialization protocol provided by Google. ProtocolBuffers is a lightweight and efficient structured data storage format that can be used for structured data serialization and is well-suited for data storage or RPC (Remote Procedure Call) data exchange. Protobuf is a language-independent, platform-independent, and scalable serialized structured data format that can be used in communication protocols, data storage, and other fields.

[0058] In one embodiment of this application, the business process diagram 320 can be, for example, data based on a DAG (Directed Acyclic Graph) format. A DAG is a directed graph without loops, and it is an effective tool for describing the process of a project or system. Except for the simplest case, almost all projects can be divided into several sub-projects called activities, which are usually subject to certain constraints, such as the start of some sub-projects requiring the completion of others. For the entire project and system, two main concerns are: whether the project can proceed smoothly, and estimating the shortest time required to complete the entire project. Both of these problems can be solved by performing topological sorting and critical path operations on the directed graph.

[0059] In one embodiment of this application, business process data 310 is stored in a backend server. When testing is required, the backend server sends it to the terminal device running the frontend test program. The terminal device converts the data to a new format to obtain a business process diagram 320 used for verification testing.

[0060] In step S220, some process nodes in the business process diagram are randomly adjusted according to preset configuration parameters to obtain the adjusted process diagram to be tested.

[0061] Figure 4 A flowchart illustrating the steps of adjusting process nodes is shown in one embodiment of this application. Figure 4 As shown, based on the above embodiments, step S220, which involves randomly adjusting some process nodes in the business process diagram according to preset configuration parameters, may include steps S410 to S430.

[0062] Step S410: Start multiple browser instances using a headless browser, and load the business process diagram in the command line interface of each browser instance.

[0063] A headless browser is a browser without a recognizable graphical interface. Unlike testing sites or performing common operations using graphical elements, browser instances generated based on headless browsers can automatically run test cases using a command-line interface.

[0064] Figure 5 This illustration schematically depicts an application scenario of running an automated testing process based on a headless browser, as shown in one embodiment of this application. Figure 5 As shown, the headless browser in this embodiment is Puppeteer, and the corresponding generated browser instance can be a Chromium instance developed by Google. Using the methods provided by Puppeteer for manipulating the browser, multiple Chromium instances can be launched simultaneously, and automated business process testing can be performed in each Chromium instance.

[0065] Puppeteer is a Node library that provides a high-level API (Application Programming Interface) to control Chromium or Chrome via the DevTools protocol. Chromium is a free and open-source software project launched by Google to develop the Google Chrome browser, and it is released and open-sourced under several licenses, including the BSD license. Chromium shares most of its code and functionality with Google Chrome, but there are some subtle differences in features.

[0066] Step S420: Randomly generate process adjustment strategies corresponding to each browser instance according to preset configuration parameters.

[0067] In one embodiment of this application, the configuration parameters include a node adjustment ratio and a node adjustment type. The node adjustment ratio represents the proportion of the process nodes to be adjusted in the total number of process nodes in the business process diagram. The node adjustment type includes various adjustment operations to be performed on the process nodes to be adjusted. For example, the node adjustment type may include at least one of adding a node, deleting a node, moving a node, copying a node, or modifying node data.

[0068] In one embodiment of this application, the configuration parameters include a branch adjustment ratio and a branch adjustment type. The branch adjustment ratio is used to represent the proportion of process branches connected to the process nodes to be adjusted in the total number of process branches in the business process diagram. The branch adjustment type includes a variety of adjustment operations to be performed on the process branches connected to the process nodes to be adjusted.

[0069] In the business process diagram, operable process nodes can be randomly selected. During testing, corresponding API methods provided by the front end can be called to add, delete, and modify flowchart node data and the flowchart structure. To better simulate real user operations, random operations on process nodes can be performed by modifying the proportion parameters of specific nodes or operations. Automated operations based on existing network process data are also supported.

[0070] Table 1 shows the names of the APIs available for invocation and their corresponding functions in the embodiments of this application. Each API corresponds to a node adjustment type or a branch adjustment type.

[0071] Table 1

[0072] Related APIs Function AddNode Add node DeleteNode Delete node AddBranch Add a branch DeleteBranch Delete branch MoveUpNode / MoveDownNode Mobile Node GetPbDataFromDAG Flowchart to PB data GetDAGFromPB Convert PB data to flowchart data CopyNode Replicated Nodes ChangePriority Modify branch priority nodeMap Process node object

[0073] In one embodiment of this application, a corresponding adjustment strategy can be randomly generated according to a pre-set node adjustment ratio and branch adjustment ratio to adjust and verify some process nodes and process branches between process nodes in the business process diagram.

[0074] Figure 6 A flowchart illustrating the steps of generating a process adjustment strategy for a process node is shown in one embodiment of this application. Figure 6 As shown, based on the above embodiments, the process adjustment strategy corresponding to each browser instance is randomly generated according to the preset configuration parameters in step S420, which may include the following steps S610 to S630.

[0075] Step S610: Identify all process nodes in the business process diagram, and classify all process nodes into adjustable nodes and non-adjustable nodes based on the identification results.

[0076] In order to limit business process testing to an effective and controllable range, embodiments of this application can classify all process nodes in the business process diagram into adjustable nodes and non-adjustable nodes according to the different types of process operations. Adjustable nodes are nodes that can be adjusted during the test process, while non-adjustable nodes are nodes that need to remain fixed during the test process.

[0077] Step S620: According to the node adjustment ratio, randomly select some process nodes to be adjusted from the adjustable nodes.

[0078] The node adjustment ratio controls the proportion of the adjusted process node among all process nodes, thus controlling the extent of adjustments to the business process diagram. For example, if a business process includes 10 process nodes and the node adjustment ratio is configured to 30%, it means that a maximum of 3 process nodes can be selected for adjustment during the current testing phase.

[0079] In one embodiment of this application, the node adjustment ratio is used to control the upper limit of the number of selected process nodes to be adjusted. For example, if the number of adjustable nodes exceeds three, three process nodes to be adjusted can be randomly selected. If the number of adjustable nodes is less than three, all adjustable nodes are selected as process nodes to be adjusted.

[0080] Step S630: Randomly select adjustment operations from the node adjustment types to be performed on each process node to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance.

[0081] In one embodiment of this application, operation weights can be pre-configured for various adjustment operations according to testing needs. These operation weights control the proportion of occurrence of each adjustment operation. Based on this, a method for randomly selecting process nodes to be adjusted from the adjustable nodes may include: obtaining the operation weights corresponding to various adjustment operations in the node adjustment type; predicting the selection probability of each adjustment operation based on the operation weights; and randomly selecting adjustment operations to be performed on each process node to be adjusted based on the selection probability.

[0082] Figure 7 A flowchart illustrating the steps of generating a process adjustment strategy for process branches is shown in one embodiment of this application. Figure 7As shown, based on the above embodiments, the process adjustment strategy corresponding to each browser instance is randomly generated according to the preset configuration parameters in step S420, which may include the following steps S710 to S730.

[0083] Step S710: Identify all process branches in the business process diagram, and classify all process branches into adjustable branches and non-adjustable branches based on the identification results.

[0084] In order to limit business process testing to an effective and controllable range, embodiments of this application can classify all process nodes in the business process diagram into adjustable nodes and non-adjustable nodes according to the different types of process operations. Adjustable nodes are nodes that can be adjusted during the test process, while non-adjustable nodes are nodes that need to remain fixed during the test process.

[0085] Step S720: According to the branch adjustment ratio, randomly select process branches that are connected to some process nodes from the adjustable branches to be adjusted.

[0086] The node adjustment ratio controls the proportion of the adjusted process node among all process nodes, thus controlling the extent of adjustments to the business process diagram. For example, if a business process includes 10 process nodes and the node adjustment ratio is configured to 30%, it means that a maximum of 3 process nodes can be selected for adjustment during the current testing phase.

[0087] In one embodiment of this application, the node adjustment ratio is used to control the upper limit of the number of selected process nodes to be adjusted. For example, if the number of adjustable nodes exceeds three, three process nodes to be adjusted can be randomly selected. If the number of adjustable nodes is less than three, all adjustable nodes are selected as process nodes to be adjusted.

[0088] Step S730: Randomly select adjustment operations from the branch adjustment types to be performed on each process branch to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance.

[0089] In one embodiment of this application, operation weights can be pre-configured for various adjustment operations according to testing needs. These operation weights control the occurrence ratio of each adjustment operation. Based on this, a method for randomly selecting adjustment operations from branch adjustment types for execution on connection branches between process nodes to be adjusted may include: obtaining operation weights corresponding to various adjustment operations in the branch adjustment type; predicting the selection probability of each adjustment operation based on the operation weights; and randomly selecting adjustment operations for execution on connection branches between process nodes to be adjusted based on the selection probability.

[0090] Step S430: Adjust some process nodes of the business process diagram loaded in the browser instance according to the process adjustment strategy.

[0091] Based on the randomly generated process adjustment strategy, some process nodes of the business process diagram loaded in each browser instance can be adjusted accordingly. Each browser instance can execute different process adjustment strategies, thereby multiplying the number of test scenarios.

[0092] In step S230, the adjusted process nodes are verified to obtain the verification results of the process nodes.

[0093] In one embodiment of this application, the method for verifying the adjusted partial process nodes may include: loading a web page containing a business process diagram in the command-line interface of a browser instance; obtaining associated nodes that have a connection relationship with the adjusted partial process nodes within the web page; and verifying the adjusted partial process nodes and associated nodes.

[0094] In one embodiment of this application, the method for verifying the adjusted partial process nodes and associated nodes may include: performing a legality verification on the node relationships between the adjusted partial process nodes and associated nodes to determine whether the node relationships of each node conform to the verification rules; and performing a legality verification on the node attributes of the adjusted partial process nodes and associated nodes to determine whether the node attributes of each node conform to the verification rules.

[0095] In one embodiment of this application, while performing process node verification, the operation path for adjusting some process nodes in the business process diagram can be obtained, and a webpage snapshot of the original flowchart associated with the operation path can be recorded. The original flowchart is the business process diagram before the operation path is executed. Recording the process facilitates the playback and reproduction of problems. At each step of the operation, the node information of the current operation is recorded. When an exception occurs during the process setting verification, all operation logs from page loading to the time of the error are output to a file. When locating a problem, the problem can be reproduced by sequentially operating according to the log data.

[0096] In step S240, when the verification result of the process node is that the verification is passed, the format of the flowchart to be tested is converted to obtain the process data to be tested based on the structured data storage format.

[0097] After completing the verification test of the process nodes, the embodiments of this application can convert the format of the adjusted flowchart to be tested and restore it to the process data to be tested based on the structured data storage format.

[0098] In step S250, the data of the process to be tested is verified to obtain the verification result of the business process.

[0099] In one embodiment of this application, the terminal device can send an asynchronous network request to the server based on a dynamic scripting language, so that the server can perform connectivity and / or reachability checks on the process data to be tested according to the asynchronous network request. The asynchronous network request sent by the terminal device to the server carries the process data to be tested based on a structured data storage format.

[0100] Connectivity verification is used to test the connectivity between various process nodes in a business process. Methods for connectivity verification can include disjoint-set data structure, depth-first search (DFS), breadth-first search (BFS), warshall, etc.

[0101] Reachability checks are used to test how easy it is to get from one process node to another in a business process.

[0102] Figure 8 This illustration schematically depicts an interactive flowchart of a business process test in an application scenario, based on an embodiment of this application. For example... Figure 8 As shown, in this application scenario, the method for testing the business process is jointly executed by a terminal device configured with automated scripts and a corresponding backend server. This business process testing method includes the following steps S810 to S870.

[0103] Step S810: The backend server sends business process data based on PB (Protocol Buffers) data format to the frontend terminal device.

[0104] Step S820: The front-end terminal device converts the business process data into a business process diagram based on DAG (Directed acyclic graph) data format.

[0105] Step S830: The front-end terminal device edits and adjusts the business process diagram by running an automated script. The adjustment method may include adding, deleting, modifying and moving process nodes and branches in the business process diagram.

[0106] Step S840: The front-end terminal device records the adjustment operation of the business process diagram and adds the original data and adjustment path to the operation record.

[0107] Step S850: The front-end terminal device verifies the adjusted process nodes and corresponding process branches on the Web page. The specific verification content may include node attributes and node relationships.

[0108] Step S860: The front-end terminal device converts the verified business process diagram into PB data and sends the PB data to the back-end server.

[0109] Step S870: The backend server performs connectivity or reachability checks on the adjusted complete business process data.

[0110] The testing scheme provided in this application can effectively avoid oversights caused by human factors of testers. In systems with very high reliability requirements, this application, as a practice of automated testing, frees up the time and energy of testers, improves the efficiency and stability of complex process testing, and completes tasks such as ultra-large data performance testing and anomaly replay that are difficult to perform manually, thus ensuring the quality of continuous project iteration.

[0111] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0112] The following describes an embodiment of the apparatus of this application, which can be used to execute the business process testing method described in the above embodiments of this application.

[0113] Figure 9 A schematic block diagram of the business process testing apparatus provided in an embodiment of this application is shown. Figure 9 As shown, the business process testing device 900 includes: a first conversion module 910, configured to convert business process data based on a structured data storage format to obtain a business process diagram based on a graph data format, the business process diagram including multiple process nodes; an adjustment module 920, configured to randomly adjust some process nodes in the business process diagram according to preset configuration parameters to obtain an adjusted process diagram to be tested; a first verification module 930, configured to verify the adjusted partial process nodes to obtain verification results for the process nodes; a second conversion module 940, configured to convert the process diagram to be tested to obtain test process data based on a structured data storage format when the verification result of the process node is a pass, and a second verification module 950, configured to verify the test process data to obtain a verification result for the business process.

[0114] In some embodiments of this application, based on the above embodiments, the adjustment module 920 includes: a process loading module, configured to launch multiple browser instances through a headless browser, and load the business process diagram in the command line interface of each browser instance respectively; a strategy generation module, configured to randomly generate a process adjustment strategy corresponding to each browser instance according to preset configuration parameters; and a process adjustment module, configured to adjust some process nodes of the business process diagram loaded in the browser instance according to the process adjustment strategy.

[0115] In some embodiments of this application, based on the above embodiments, the configuration parameters include a node adjustment ratio and a node adjustment type. The node adjustment ratio represents the proportion of the partial process nodes to be adjusted in the total number of process nodes in the business process diagram. The node adjustment type includes various adjustment operations to be performed on the partial process nodes to be adjusted. The strategy generation module includes: a node identification module configured to identify all process nodes in the business process diagram and classify all process nodes into adjustable nodes and non-adjustable nodes based on the identification results; a node selection module configured to randomly select partial process nodes to be adjusted from the adjustable nodes according to the node adjustment ratio; and a node operation selection module configured to randomly select adjustment operations to be performed on each process node to be adjusted from the node adjustment types to generate a process adjustment strategy corresponding to the browser instance.

[0116] In some embodiments of this application, based on the above embodiments, the node operation selection module includes: a first weight acquisition module, configured to acquire operation weights corresponding to various adjustment operations in the node adjustment type; a first probability prediction module, configured to predict the selection probability of the various adjustment operations based on the operation weights; and a first operation selection module, configured to randomly select adjustment operations to be performed on each process node to be adjusted based on the selection probability.

[0117] In some embodiments of this application, based on the above embodiments, the node adjustment type includes at least one of adding a node, deleting a node, moving a node, copying a node, or modifying node data.

[0118] In some embodiments of this application, based on the above embodiments, the configuration parameters include a branch adjustment ratio and a branch adjustment type. The branch adjustment ratio represents the proportion of process branches connected to the process nodes to be adjusted in the total number of process branches in the business process diagram. The branch adjustment type includes various adjustment operations performed on process branches connected to the process nodes to be adjusted. The strategy generation module includes: a branch identification module configured to identify all process branches in the business process diagram and classify all process branches into adjustable branches and non-adjustable branches based on the identification results; a branch selection module configured to randomly select process branches connected to the process nodes to be adjusted from the adjustable branches according to the branch adjustment ratio; and a branch operation selection module configured to randomly select adjustment operations from the branch adjustment types to be performed on each process branch to be adjusted, thereby generating a process adjustment strategy corresponding to the browser instance.

[0119] In some embodiments of this application, based on the above embodiments, the branch operation selection module includes: a second weight acquisition module, configured to acquire operation weights corresponding to various adjustment operations in the branch adjustment type; a second probability prediction module, configured to predict the selection probability of the various adjustment operations based on the operation weights; and a second operation selection module, configured to randomly select adjustment operations to be performed on the connection branches between the various process nodes to be adjusted based on the selection probability.

[0120] In some embodiments of this application, based on the above embodiments, the branch adjustment type includes at least one of adding a branch, deleting a branch, or modifying the branch priority.

[0121] In some embodiments of this application, based on the above embodiments, the first verification module 930 includes: a page loading module, configured to load a web page containing the business process diagram in the command line interface of a browser instance; an associated node acquisition module, configured to acquire associated nodes that have a connection relationship with the adjusted partial process nodes within the web page; and a node verification module, configured to verify the adjusted partial process nodes and the associated nodes.

[0122] In some embodiments of this application, based on the above embodiments, the node verification module is further configured to: perform legality verification on the node relationships between the adjusted partial process nodes and the associated nodes to determine whether the node relationships of each node conform to the verification rules; and perform legality verification on the node attributes of the adjusted partial process nodes and the associated nodes to determine whether the node attributes of each node conform to the verification rules.

[0123] In some embodiments of this application, based on the above embodiments, the second verification module 950 is further configured to: send an asynchronous network request to the server based on a dynamic scripting language, so that the server performs connectivity verification and / or reachability verification on the process data to be tested according to the asynchronous network request.

[0124] In some embodiments of this application, based on the above embodiments, the apparatus further includes: an operation recording module, configured to acquire an operation path that adjusts some process nodes in the business process diagram, and record a webpage snapshot of the original process diagram associated with the operation path, wherein the original process diagram is the business process diagram before the operation path is executed.

[0125] The specific details of the business process testing apparatus provided in the various embodiments of this application have been described in detail in the corresponding method embodiments, and will not be repeated here.

[0126] Figure 10 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0127] It should be noted that, Figure 10 The computer system 1000 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0128] like Figure 10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage section 1008 into random access memory (RAM). The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output interface 1005 (I / O interface) is also connected to the bus 1004.

[0129] The following components are connected to the input / output interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a local area network card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.

[0130] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit 1001, it performs various functions defined in the system of this application.

[0131] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0133] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0134] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0135] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0136] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A business process testing method, characterized in that, include: Business process data based on structured data storage format is converted to obtain a business process diagram based on graph data format, the business process diagram including multiple process nodes; Multiple browser instances are launched using a headless browser, and the business process diagram is loaded in the command-line interface of each browser instance. All process nodes in the business process diagram are identified, and based on the identification results, all process nodes are classified into adjustable nodes and non-adjustable nodes. According to the node adjustment ratio, a portion of process nodes to be adjusted are randomly selected from the adjustable nodes. The node adjustment ratio is used to represent the proportion of the portion of process nodes to be adjusted in all process nodes of the business process diagram. Randomly select adjustment operations from the node adjustment types to be performed on each process node to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance. The node adjustment types include a variety of adjustment operations to be performed on some process nodes to be adjusted. All process branches in the business process diagram are identified, and the identified branches are classified into adjustable branches and non-adjustable branches. According to the branch adjustment ratio, process branches connected to some process nodes are randomly selected from the adjustable branches to be adjusted. The branch adjustment ratio is used to represent the proportion of process branches connected to some process nodes to be adjusted in all process branches of the business process diagram. Randomly select adjustment operations from the branch adjustment types to be performed on each process branch to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance. The branch adjustment types include a variety of adjustment operations to be performed on process branches connected to the process nodes to be adjusted. According to the process adjustment strategy, some process nodes of the business process diagram loaded in the browser instance are adjusted to obtain the adjusted process diagram to be tested. The adjusted process nodes are verified to obtain the verification results of the process nodes; When the verification result of the process node is that the verification is passed, the format of the process diagram to be tested is converted to obtain the process data to be tested based on the structured data storage format. The data of the process to be tested is verified to obtain the verification result of the business process.

2. The business process testing method according to claim 1, characterized in that, Randomly select adjustment operations from the node adjustment types to be performed on each process node to be adjusted, including: Obtain the operation weights corresponding to each adjustment operation in the node adjustment type; The probability of selecting each adjustment operation is predicted based on the operation weights. The adjustment operation to be performed on each process node to be adjusted is randomly selected based on the selection probability.

3. The business process testing method according to claim 1, characterized in that, The node adjustment types include at least one of adding a node, deleting a node, moving a node, copying a node, or modifying node data.

4. The business process testing method according to claim 1, characterized in that, The adjustment operation is randomly selected from the branch adjustment types to be performed on the connection branches between the various process nodes to be adjusted, including: Obtain the operation weights corresponding to each adjustment operation in the branch adjustment type; The probability of selecting each adjustment operation is predicted based on the operation weights. The adjustment operation is randomly selected based on the selection probability to be performed on the connection branch between the process nodes to be adjusted.

5. The business process testing method according to claim 4, characterized in that, The branch adjustment types include at least one of adding a branch, deleting a branch, or modifying the branch priority.

6. The business process testing method according to any one of claims 1 to 5, characterized in that, The adjusted process nodes are validated, including: Load the web page containing the business process diagram in the command-line interface of the browser instance; Within the web page, obtain and adjust the associated nodes that have a connection relationship with the partial process nodes; The adjusted process nodes and associated nodes are verified.

7. The business process testing method according to claim 6, characterized in that, The adjusted process nodes and associated nodes are validated, including: The adjusted process nodes and the node relationships between the associated nodes are validated to determine whether the node relationships of each node conform to the validation rules. The node attributes of the adjusted process nodes and the associated nodes are validated to determine whether the node attributes of each node conform to the validation rules.

8. The business process testing method according to any one of claims 1 to 5, characterized in that, The data of the process to be tested is validated, including: An asynchronous network request is sent to the server using a dynamic scripting language, so that the server performs connectivity and / or reachability checks on the process data to be tested based on the asynchronous network request.

9. The business process testing method according to any one of claims 1 to 5, characterized in that, After randomly adjusting some process nodes in the business process diagram according to preset configuration parameters, the method further includes: Obtain the operation path that adjusts some process nodes in the business process diagram, and record the webpage snapshot of the original process diagram associated with the operation path. The original process diagram is the business process diagram before the operation path is executed.

10. A business process testing device, characterized in that, include: The first conversion module is configured to convert the business process data based on the structured data storage format to obtain a business process diagram based on the graph data format, wherein the business process diagram includes multiple process nodes; The adjustment module is configured to launch multiple browser instances via a headless browser and load the business process diagram in the command-line interface of each browser instance; identify all process nodes in the business process diagram and classify them into adjustable nodes and non-adjustable nodes based on the identification results. According to the node adjustment ratio, a portion of process nodes to be adjusted are randomly selected from the adjustable nodes. The node adjustment ratio is used to represent the proportion of the portion of process nodes to be adjusted in all process nodes of the business process diagram. Randomly select adjustment operations from the node adjustment types to be performed on each process node to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance. The node adjustment types include a variety of adjustment operations to be performed on some process nodes to be adjusted. Identify all process branches in the business process diagram, and classify all process branches into adjustable branches and non-adjustable branches according to the identification results. According to the branch adjustment ratio, process branches connected to some process nodes are randomly selected from the adjustable branches to be adjusted. The branch adjustment ratio is used to represent the proportion of process branches connected to some process nodes to be adjusted in all process branches of the business process diagram. Randomly select adjustment operations from the branch adjustment types to be performed on each process branch to be adjusted, so as to generate a process adjustment strategy corresponding to the browser instance. The branch adjustment types include a variety of adjustment operations to be performed on process branches connected to the partial process nodes to be adjusted. Adjust some process nodes of the business process diagram loaded in the browser instance according to the process adjustment strategy to obtain the adjusted process diagram to be tested. The first verification module is configured to verify the adjusted partial process nodes and obtain the verification results of the process nodes. The second conversion module is configured to convert the format of the flowchart to be tested when the verification result of the process node is that the verification is passed, so as to obtain the process data to be tested based on the structured data storage format. The second verification module is configured to verify the data of the process to be tested and obtain the verification result of the business process.

11. A computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the business process testing method according to any one of claims 1 to 9.

12. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the business process testing method according to any one of claims 1 to 9 by executing the executable instructions.

13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the business process testing method as described in any one of claims 1 to 9.