Test method, device, readable medium and electronic equipment for task flow

By receiving task editing instructions to establish task flow nodes and integrating unit test scripts into the automated testing framework, the problem of low efficiency in task story testing in game applications is solved, enabling rapid verification of the completeness and correctness of the task flow.

CN114564402BActive Publication Date: 2026-01-02BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210204885.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2026-01-02
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

Testing the mission storyline in game applications is inefficient and difficult to guarantee accuracy, especially when the storyline is incomplete or disjointed.

Method used

By receiving task editing instructions, task flow nodes are established and attribute information is configured. This information is then converted into resource data in a preset format. Unit test scripts are integrated into the automated testing framework, which is then invoked to generate and execute test projects to verify the completeness and correctness of the task flow.

Benefits of technology

It has enabled automated testing of task processes, which can quickly verify the completeness and correctness of task processes, improving testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114564402B_ABST
    Figure CN114564402B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a task flow testing method and device, readable medium and electronic equipment, and relates to the technical field of electronic information processing. The method comprises: receiving a task editing instruction, parsing the task editing instruction to establish a plurality of task flow nodes in a specified order, and configuring attribute information of each task flow node. Each task flow node is converted into resource data in a preset format, and the resource data is exported to a preset engine. Each task flow node corresponds to a unit test script, and a total test script is integrated into an automated test framework of the preset engine. The automated test framework in the preset engine is called to generate and execute a test project. The test project is used to determine the task flow node corresponding to the task flow when each task flow runs, and to call the unit test script corresponding to the task flow node. The present disclosure can quickly verify the integrity and correctness of the task flow.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of electronic information processing, and in particular, to a task flow testing method and device, readable medium and electronic equipment. BACKGROUND

[0002] With the continuous development of electronic information technology, various game applications have appeared in the application market. For the plot type game application, the key lies in the experience of the players on the task plot. If the task plot is incomplete and not smooth, it will seriously affect the quality of the game application. During development, the task plot of the game application is usually complex, for example, the main plot includes dozens of plot tasks, and also includes many branch plot tasks, level tasks, achievement tasks, daily tasks, etc. The tester needs to spend a lot of time to test whether the game application is complete and smooth, and the efficiency and accuracy are difficult to guarantee. SUMMARY

[0003] This summary is provided to introduce a selection of concepts, which are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used in limiting the scope of the claimed subject matter.

[0004] In a first aspect, the present disclosure provides a task flow testing method, the method comprising:

[0005] receiving a task editing instruction, parsing the task editing instruction to establish a plurality of task flow nodes in a specified order, and configuring attribute information of each task flow node, each task flow node corresponding to a task flow;

[0006] converting each task flow node into resource data in a preset format, and exporting the resource data to a preset engine, the resource data including attribute information and order of the task flow node;

[0007] integrating a unit test script corresponding to each task flow node and a total test script into an automated test framework of the preset engine, the total test script being used to maintain a plurality of unit test scripts, and the unit test script being used to verify the corresponding task flow;

[0008] calling the automated test framework in the preset engine to generate and execute a test project, the test project being used to determine the task flow node corresponding to the task flow when each task flow is running, and call the unit test script corresponding to the task flow node.

[0009] In a second aspect, the present disclosure provides a testing device for a task flow, the device comprising:

[0010] an editing module configured to receive a task editing instruction, parse the task editing instruction to establish a plurality of task flow nodes in a specified order, and configure attribute information of each of the task flow nodes, each of the task flow nodes corresponding to a task flow;

[0011] an exporting module configured to convert each of the task flow nodes into resource data in a preset format, and export the resource data to a preset engine, the resource data comprising attribute information and an order of the task flow node;

[0012] an integrating module configured to integrate a unit test script corresponding to each of the task flow nodes and a total test script into an automated test framework of the preset engine, the total test script being used to maintain a plurality of the unit test scripts, and the unit test script being used to verify the corresponding task flow;

[0013] a testing module configured to call the automated test framework in the preset engine, generate and execute a test project, the test project being used to determine a task flow node corresponding to a task flow according to the resource data when the task flow is running, and call the unit test script corresponding to the task flow node.

[0014] In a third aspect, the present disclosure provides a computer readable medium having a computer program stored thereon, the program being executed by a processing device to implement the steps of the method of the first aspect of the present disclosure.

[0015] In a fourth aspect, the present disclosure provides an electronic device comprising:

[0016] a storage device having a computer program stored thereon;

[0017] a processing device configured to execute the computer program in the storage device to implement the steps of the method of the first aspect of the present disclosure.

[0018] According to the technical solution, the task editing instruction is first received to establish a plurality of task flow nodes in a specified order according to the task editing instruction and configure corresponding attribute information, wherein each task flow node corresponds to a task flow. Then, each task flow node is converted into resource data in a preset format and exported to a preset engine. Each unit test script corresponding to each task flow node and a total test script set for maintaining a plurality of unit test scripts are integrated into an automated test framework. Finally, the automated test framework in the preset engine is called to generate and execute a test project to call the unit test script corresponding to the task flow when each task flow is running. The disclosure establishes the task flow node and the association between the task flow node and the unit test script to obtain the test project, realizes the automated test of the task flow, and can quickly verify the integrity and correctness of the task flow.

[0019] Other features and advantages of the present disclosure will be described in detail in the following detailed description section. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0021] Figure 1 is a flowchart of a test method of a task flow according to an exemplary embodiment;

[0022] Figure 2 is a schematic diagram of a task editor according to an exemplary embodiment;

[0023] Figure 3 is a flowchart of another test method of a task flow according to an exemplary embodiment;

[0024] Figure 4 is a flowchart of another test method of a task flow according to an exemplary embodiment;

[0025] Figure 5 is a flowchart of another test method of a task flow according to an exemplary embodiment;

[0026] Figure 6 is a schematic diagram of a test method of a task flow according to an exemplary embodiment;

[0027] Figure 7 is a schematic diagram of a task editor according to an exemplary embodiment;

[0028] Figure 8 is a block diagram of a test apparatus for a task flow according to an example embodiment;

[0029] Figure 9 is a block diagram of a test apparatus for a task flow according to an example embodiment;

[0030] Figure 10 is a block diagram of a test apparatus for a task flow according to an example embodiment;

[0031] Figure 11 is a block diagram of a test apparatus for a task flow according to an example embodiment;

[0032] Figure 12 is a block diagram of an electronic device according to an example embodiment. DETAILED DESCRIPTION

[0033] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of the present disclosure.

[0034] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.

[0035] The term “comprising” and variations thereof as used herein are used inclusively, i.e., “comprising, but not limited to.” The term “based on” means “based, at least in part, on.” The term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments.” Related terms are defined in the description that follows.

[0036] It should be noted that the terms “first”, “second”, and the like used in the present disclosure are merely used to distinguish different devices, modules, or units, and do not imply the order or interdependence of the functions performed by these devices, modules, or units.

[0037] It should be noted that the terms “one”, “multiple”, and the like used in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that, unless otherwise explicitly stated in the context, it should be understood as “one or more”.

[0038] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0039] All actions of obtaining signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection regulations and policies of the country where the device is located, and with the authorization given by the owner of the corresponding device.

[0040] Before introducing the test method, device, readable medium and electronic equipment of the task flow provided by the present disclosure, first introduce the application scenario involved in each embodiment of the present disclosure, which can be editing the task plot in the game application through the task editor, wherein the task plot can include a plurality of task flows, one task flow can be understood as one task, such as plot task, branch plot task, level task, achievement task, daily task, etc. The task flow can also be understood as a subtask, such as plot subtask, level subtask, achievement subtask, etc. The task flow can also be understood as a behavior, such as browsing dialogue behavior, interaction behavior, movement behavior, etc. The game application is developed based on a preset engine, which can be, for example, Unity engine, UnrealEngine engine, Frostbite engine, Source engine, Cocos engine, etc. The present disclosure does not limit this. The task editor is embedded in the preset engine and can directly interact with the preset engine.

[0041] Figure 1 is a flowchart of a test method of a task flow according to an exemplary embodiment, as shown in Figure 1 The method includes the following steps:

[0042] Step 101, receiving a task editing instruction, parsing the task editing instruction to establish a plurality of task flow nodes in a specified order, and configuring the attribute information of each task flow node, each task flow node corresponding to a task flow.

[0043] For example, the task editing instruction can be received through the task editor, and the task editor can be provided with a corresponding UI (English: User Interface, Chinese: user interface), such as Figure 2As shown, the planner can trigger a task editing instruction in the UI interface by dragging, clicking, entering, etc. The task editing instruction can include the information of each task flow, the task type, and the specified order between multiple task flows. After receiving the task editing instruction, the task editor can parse the task editing instruction to extract the information of each task flow, the task type, and the specified order. Then, for each task flow, the corresponding task flow node is established, and the attribute information of the task flow node is configured according to the information of each task flow. Finally, the multiple task flow nodes are arranged and connected in the specified order, so that the task flow node corresponding to the task flow executed first points to the task flow node corresponding to the task flow executed later. For example, the pointing relationship can be represented by a one-way arrow, or the pointing relationship can be represented by the parent node and the child node in the tree structure, or the pointing relationship can be represented by a pointer, and the present disclosure does not make specific limitations. As shown in the display area on the left side of the figure, there are four task flow nodes, and the specified order is represented by a one-way arrow, i.e., "Start"→"Action: talk to Dr. Angelo"→"Action: talk to the friend of the coma patient"→"Action: go to the home". Figure 2

[0044] In step 102, each task flow node is converted into resource data in a preset format, and the resource data is exported to a preset engine. The resource data includes the attribute information and the order of the task flow node.

[0045] For example, the task editor can display each task flow node and the connection relationship (i.e., the specified order) between the task flow nodes, so as to facilitate the planner to view, edit, and check each task flow. In order to facilitate the preset engine or other platforms to also obtain the related information of each task flow, each task flow node can be serialized to convert into resource data in a preset format commonly used in the preset engine, and the resource data is exported to the preset engine. Specifically, the resource data can include the attribute information and the order of each task flow node, that is, the resource data can describe the task flow node and the connection relationship between the task flow node and other task flow nodes. The resource data can also be understood as an abstract processing of the task flow node. Taking the preset engine UnrealEngine4 as an example, the preset format can be DataAsset format. Each task flow node can be converted into a DataAsset type resource, and then multiple DataAsset type resources can be exported to UnrealEngine4 for serialization to obtain Json format data, so as to achieve the purpose of abstract processing of the task flow node, so that the preset engine or other platforms can read the resource data. ​

[0046] Step 103, integrating each unit test script corresponding to each task flow node and a total test script into an automatic test framework of a preset engine, the total test script being used for maintaining a plurality of unit test scripts, and the unit test script being used for verifying the corresponding task flow.

[0047] Step 104, calling the automatic test framework in the preset engine to generate and execute a test project, the test project being used for determining a task flow node corresponding to a task flow according to resource data when the task flow is running, and calling a unit test script corresponding to the task flow node.

[0048] For example, a unit test script corresponding to each task flow node can be established, the unit test script being used for verifying the corresponding task flow. For example, the unit test script can be used for testing whether the corresponding task flow can enter normally, can be used for testing whether the corresponding task flow can end normally, and can be used for testing whether the order of the task flow is correct. Meanwhile, a total test script for all task flows can also be established, the total test script being able to maintain a plurality of unit test scripts, for example, each unit test script can be called in turn according to a specified order, and the execution result of each unit test script can be recorded. The correspondence between the unit test script and the task flow node can be determined according to a task identifier, or a relationship table can be established to store the correspondence between each unit test script and the corresponding task flow node. The unit test script corresponding to each task flow node and the total test script can be integrated into the preset engine, so that all unit test scripts and the total test script are integrated into the automatic test framework of the preset engine. Finally, the automatic test framework in the preset engine can be called by a continuous integration tool, so as to generate a test project. Taking UnrealEngine 4 as the preset engine, UnrealEngine 4 can integrate all unit test scripts and the total test script into the automatic test framework through the Commandlet command line or the Gauntlet automatic test tool. Correspondingly, the continuous integration tool can call the automatic test framework through batch processing. The continuous integration tool can be Teamcity, Jenkins, etc., which is not limited in the present disclosure. Further, the continuous integration tool can execute the test project to verify all task flows. The test project can obtain resource data from the preset engine when detecting that any task flow is running, determine a task flow node corresponding to the task flow according to the resource data, further call a unit test script corresponding to the task flow node, and thus verify the task flow. In this way, by establishing the task flow node and the association between the task flow node and the unit test script, the test project is obtained, the automatic test of the task flow is realized, and the integrity and correctness of the task flow can be quickly verified.

[0049] Figure 3 is a flowchart of another test method of a task flow according to an exemplary embodiment, as Figure 3 As shown, the task editing instruction can include a type editing instruction, a sequence editing instruction and an information editing instruction, and correspondingly, step 101 can be implemented by the following steps:

[0050] Step 1011, parsing the type editing instruction to obtain the task type corresponding to each task flow, and establishing the task flow node corresponding to the task flow according to the corresponding task type.

[0051] Step 1012, parsing the sequence editing instruction to obtain the specified sequence, and connecting the plurality of task flow nodes according to the specified sequence.

[0052] Step 1013, parsing the information editing instruction to obtain the information of each task flow, and configuring the attribute information of the task flow node corresponding to the task flow according to the information of the task flow, the attribute information including at least one of task identification, task type, task description and completion condition.

[0053] For example, after receiving the task editing instruction, the task editor can parse the task editing instruction to obtain the specified sequence, the task type corresponding to each task flow and the information of each task flow. Specifically, the task editing instruction can include three types of type editing instruction, sequence editing instruction and information editing instruction. For the type editing instruction, the task editor parses the type editing instruction to obtain the task type corresponding to each task flow, and then establishes the task flow node corresponding to the task flow according to the task type corresponding to each task flow. The task type may, for example, be an interactive type, a display type, an action type, etc. A corresponding task flow node template can be established in advance for each task type, and then the task flow node template corresponding to the task flow is determined according to the task type corresponding to each task flow, and the corresponding task flow node is established accordingly.

[0054] For the sequence editing instruction, the task editor parses the sequence editing instruction to obtain the specified sequence, and then connects the plurality of task flow nodes in sequence according to the specified sequence, with the task flow corresponding to the task flow node at the starting point of the one-way arrow being executed earlier than the task flow corresponding to the task flow node at the ending point of the one-way arrow, i.e. the task flow corresponding to the task flow node at the starting point of the one-way arrow is executed earlier than the task flow corresponding to the task flow node at the ending point of the one-way arrow.

[0055] Further, the task editor parses the information editing instruction to obtain the specified order and information of each task flow, and then configures attribute information of a task flow node corresponding to each task flow according to the information of each task flow, where the attribute information can include at least one of a task identifier, a task type, a task description, and a completion condition, and can further include a completion reward, a task name, a node type, an entry condition, a completion condition, a previous task identifier (a task identifier of a previous task flow), a next task identifier (a task identifier of a next task flow), a main task identifier (a task identifier of a task flow to which the task flow belongs), a level identifier, and the like. The attribute information of the task flow node can be configured in an attribute area on the right side of the task flow node in FIG. 13, for example. The attribute information of the task flow node "Go to Home" can include a main task identifier (indicated as Parent Mission Id): 10104, a task identifier (indicated as Id): 1010403, a task type (indicated as Mission Type): a main plot type, a node type (indicated as Action NodeType): an Action base node type, a previous task identifier (indicated as Pre Mission Id): 1010402, a next task identifier (indicated as Post Mission Id): 1010404, an entry condition (indicated as Accept Conditions): 0Array elements, a completion condition (indicated as Complete Conditions): 1Array elements, a task name (indicated as Name): "Go to Home", a level identifier (indicated as Level Id): null, a task description (indicated as Mission Obj): "Return home and learn more information from the sound system", an entry condition description (indicated as Mission Accept Desc): null, and a completion condition description (indicated as Mission Complete Desc): null. Figure 2

[0056] Figure 4 is a flowchart of another test method of a task flow according to an example embodiment, as shown in FIG. 13, step 102 can include: Figure 4

[0057] Step 1021, converting each task flow node according to a preset format to obtain resource data corresponding to the task flow node.

[0058] Step 1022, grouping the resource data corresponding to each task flow node into a resource data file according to the specified order, and exporting the resource data file to a preset engine.

[0059] ​​For example, in order to enable the relevant information of each task flow to be used across platforms, each task flow node can be serialized to convert into a preset format of resource data that is common in the preset engine. Each task flow node corresponds to a resource data. Then, the resource data corresponding to each task flow node is combined into a resource data file in a specified order, and the resource data file is exported to the preset engine. That is, the resource data file integrates the resource data corresponding to all the task flow nodes, and also includes the order (i.e., the specified order) between the resource data. In this way, the preset engine can directly obtain the relevant information of the task flow nodes, and other platforms (e.g., a continuous integration tool) can also obtain the relevant information of the task flow nodes from the preset engine. Specifically, since the resource data can describe the task flow node and the connection relationship between the task flow node and other task flow nodes, the resource data file can describe the entire task flow as a whole. Taking the preset engine as UnrealEngine 4 as an example, the preset format can be DataAsset format, and each task flow node can be converted into a DataAsset type resource as resource data. Then, multiple resource data can be integrated into a resource data file in Json format, and the resource data file is exported to UnrealEngine 4.

[0060] Figure 5 is a flowchart of another test method of a task flow according to an example embodiment, as shown in Figure 5 The implementation of step 104 can include the following steps:

[0061] In step 1041, the continuous integration tool invokes the total test script and the unit test script corresponding to each task flow node from the automation test framework in a batch manner to generate a test project.

[0062] In step 1042, the test project is executed according to a preset trigger mode, and the trigger mode includes a trigger period and / or a trigger condition.

[0063] For example, the continuous integration tool can invoke the total test script and the unit test script corresponding to each task flow node in batch mode from the automated test framework, thereby constructing a test project including the total test script and all the unit test scripts. Specifically, the continuous integration tool can be Teamcity, Jenkins, etc., and the present disclosure does not make a specific limitation thereon. Further, a trigger mode can be set by the continuous integration tool to control the execution of the test project. The trigger mode can include a trigger period and / or a trigger condition. The trigger period can be understood as a timing period for periodically executing the test project. For example, the trigger period can be 24 hours, and the continuous integration tool can execute the test project once every 24 hours. The trigger condition can be understood as executing the test project when the trigger condition is met. For example, the trigger condition can be that any running logic (which can be understood as running code) corresponding to a task flow is changed, and the continuous integration tool can detect whether the running logic corresponding to each task flow is changed in real time. If a change is detected, the test project is executed once.

[0064] In an implementation manner, step 1042 can include:

[0065] Step 1) invoking the total test script by the test project.

[0066] Step 2) determining a target task flow node corresponding to a target task flow currently executed according to the resource data by the total test script, and invoking a target unit test script corresponding to the target task flow node to verify the target task flow.

[0067] Step 3) repeating step 2) until the test project is interrupted or the test project is executed completely.

[0068] Step 4) outputting the test result.

[0069] The specific execution process of the test project is specifically described as follows:

[0070] The test project can first call the total test script, the total test script can know the target task flow currently executed, and then can determine the target task flow node corresponding to the target task flow and the task identifier of the target task flow node from the resource data file, and further can determine the corresponding target unit test script according to the task identifier of the target task flow node. Then, the total test script can call the target unit test script to verify whether the target task flow is executed correctly. The above process is repeatedly executed until the test project is interrupted or the test project is executed, and finally the test result is output. The test project interruption can be understood as that a unit test script is interrupted, that is, the task flow corresponding to the unit test script is not completed. The test project execution completion can be understood as that all task flows are executed. The test result can include various information: whether there is interruption, the task identifier corresponding to the unit test script that is interrupted, the log generated by the unit test script that is interrupted, and the like. The output test result can be that the test result is generated into a test report, and then the test report is stored in a specified location, or the test report is sent to a terminal device bound to the test project in the form of an email, a short message and the like, and the present disclosure does not make specific limitation on this.

[0071] The execution process of the task flow test method can be as shown in Figure 6 The task editor receives a task editing instruction, establishes N task flow nodes by analyzing the task editing instruction, and then obtains resource data through format conversion and exports to a preset engine. At the same time, the unit test script 1, the unit test script 2 to the unit test script N corresponding to the N task flow nodes, and the total test script (not shown in Figure 6 The continuous integration tool generates a test project by calling the automation test framework, and executes the test project. In the execution process of the test project, the unit test script corresponding to the currently running task flow is determined and called by reading the resource data, and finally the test result is output.

[0072] In another implementation manner, the implementation manner of step 2) can include:

[0073] Step A, receiving the indication information sent by the server through the total test script, and analyzing the task identifier of the target task flow included in the indication information.

[0074] Step B, determining the target task flow node in the resource data according to the task identifier of the target task flow through the total test script, and determining the target unit test script according to the target task flow node.

[0075] Step C, calling the target unit test script through the total test script to verify the target task flow.

[0076] Taking a network game application as an example, the network game application includes a plurality of task flows, the network game application is run on a terminal device, and a server controls execution of each task flow in the network game application through instruction information. The continuous integration tool can perform data transmission with the server and the terminal device. The server sends instruction information to the terminal device, the instruction information includes a task identifier of a target task flow currently required to be executed, and the terminal device parses the instruction information to execute the target task flow. Meanwhile, a total test script in test engineering can also acquire the instruction information and parse the task identifier of the target task flow included in the instruction information. Then, the total test script determines a target task flow node from the resource data file according to the task identifier of the target task flow, and determines a target unit test script corresponding to the target task flow node. Finally, the total test script calls the target unit test script to verify whether the target task flow is executed correctly.

[0077] In yet another implementation manner, step C can include:

[0078] Step C1, listening to running data generated in a target task flow execution process through a total test script, the running data including: starting running data generated when entering the target task flow, and / or ending running data generated when completing the target task flow.

[0079] Step C2, calling a target unit test script through the total test script to make the target unit test script verify whether the running data matches the target task flow node.

[0080] For example, the specific implementation of verifying whether the target task flow is executed correctly can be listening to running data generated in a target task flow execution process of a terminal device through a total test script. The running data can include starting running data generated when entering the target task flow, intermediate running data generated when executing the target task flow, and / or ending running data generated when completing the target task flow. Specifically, the starting running data can include, for example, entering information displayed on a display control when entering the target task flow, a starting state (for example, a level, a blood volume, money, a gem, etc.) of a player when entering the target task flow, a completed task list when entering the target task flow, etc. The intermediate running data can include, for example, a motion track of the player when executing the target task flow (for example, moving from point A to point B, and then moving from point B to point C), and an operation record of the player when executing the target task flow (for example, releasing a skill a, using a prop b, etc.). The ending running data can include, for example, completion information displayed on a display control when completing the target task flow, a completion state of the player when completing the target task flow, and a prop list (or a reward list) of the player when completing the target task flow.

[0081] The main test script can then call the target unit test script using the runtime data as input parameters, allowing the target unit test script to verify whether the runtime data matches the target task flow nodes. Specifically, this can be done by verifying whether the runtime data matches the attribute information of the target task flow nodes. For example, it can verify whether the entry information displayed on the control when entering the target task flow matches the task name and task description of the target task flow node; it can also verify whether the player's item list when completing the target task flow matches the completion reward of the target task flow node. Specifically, when a user enters a level, it can verify whether the level's ID is correct, whether the type of the task flow node corresponding to that level is a level-type node, whether the star-level task description for that level is displayed correctly, and whether the prerequisite tasks for entering that level have been completed. Similarly, when a user completes a level, it can verify whether the prerequisite tasks for ending that level have been completed, whether the level's reward has been correctly issued, whether the star-level task description for that level is displayed correctly, whether the star-level task for that level has been completed, and whether the ID of the next level can be obtained.

[0082] by Figure 7 Taking the task editor as an example, the multiple task flow nodes shown include two sets of task flow node sequences. One set is: "Level Completion Star Root Node" → "Task: Star 1" → "Task: Star 2" → "Task: Star 3". The other set is: "Star Reward Root Node" → "Task_Level Reward (First Time): First Completion Reward" → "Task_Level Reward: One Star Reward" → "Task_Level Reward: Two Star Reward" → "Task_Level Reward: Three Star Reward".

[0083] Taking the currently executing task flow corresponding to "Task: Star Rating Two" as an example, the task name in the attribute information of "Task: Star Rating Two" is "Star Rating Two," and the task description is "Arrive at the convenience store within 10 minutes." The main test script can listen for the entry information displayed on the control when entering this task flow; the entry information is "Star Rating Two: Arrive at the convenience store within 10 minutes." The main test script can use "Star Rating Two: Arrive at the convenience store within 10 minutes" as input parameter to call the unit test script corresponding to "Task: Star Rating Two." This unit test script determines that "Star Rating Two: Arrive at the convenience store within 10 minutes" displays both "Star Rating Two" and "Arrive at the convenience store within 10 minutes," thus confirming that the entry information matches the task name and task description.

[0084] For another example, the current task flow being executed is the task flow corresponding to "task_level_reward: one star one star reward", and the completion reward of "task_level_reward: one star one star reward" in the attribute information of the task flow is "1 X prop". The total test script can listen to the reward list of the player when the task flow is completed. The total test script can call the unit test script corresponding to "task_level_reward: one star one star reward" by taking the reward list as a parameter. The unit test script determines whether the number of "X props" in the reward list is increased by 1. If the number of "X props" in the reward list is increased by 1, it is determined that the reward list matches the completion reward. If the number of "X props" in the reward list is not increased by 1, it is determined that the reward list does not match the completion reward.

[0085] To sum up, first, a task editing instruction is received to establish a plurality of task flow nodes in a specified order according to the task editing instruction and configure corresponding attribute information, wherein each task flow node corresponds to a task flow. Then, each task flow node is converted into resource data in a preset format and exported to a preset engine. Each unit test script corresponding to each task flow node and a total test script for maintaining a plurality of unit test scripts are integrated into an automated test framework. Finally, the automated test framework in the preset engine is called to generate and execute a test project to call the unit test script corresponding to the task flow when each task flow is running. The disclosure establishes a task flow node and an association between the task flow node and the unit test script to obtain a test project, realizes automated testing of the task flow, and can quickly verify the integrity and correctness of the task flow.

[0086] Figure 8 is a block diagram of a test device for a task flow according to an example embodiment, as shown in Figure 8 The device 200 can include:

[0087] The editing module 201 is configured to receive a task editing instruction, parse the task editing instruction to establish a plurality of task flow nodes in a specified order, and configure attribute information of each task flow node, wherein each task flow node corresponds to a task flow.

[0088] The exporting module 202 is configured to convert each task flow node into resource data in a preset format and export the resource data to a preset engine, wherein the resource data includes attribute information and an order of the task flow node.

[0089] The integration module 203 is configured to integrate each unit test script corresponding to each task flow node and a total test script into an automated test framework of a preset engine, wherein the total test script is used to maintain a plurality of unit test scripts, and the unit test script is used to verify a corresponding task flow.

[0090] The test module 204 is configured to invoke an automated test framework in the preset engine, and generate and execute a test project, the test project being configured to determine a task flow node corresponding to each task flow according to resource data when the task flow is running, and invoke a unit test script corresponding to the task flow node.

[0091] Figure 9 is a block diagram of another test device for a task flow according to an example embodiment, as shown in Figure 9 The task editing instruction includes a type editing instruction, a sequence editing instruction and an information editing instruction, and the editing module 201 can include:

[0092] The first analysis submodule 2011 is configured to analyze the type editing instruction to obtain a task type corresponding to each task flow, and establish a task flow node corresponding to the task flow according to the task type.

[0093] The second analysis submodule 2012 is configured to analyze the sequence editing instruction to obtain a specified sequence, and connect a plurality of task flow nodes according to the specified sequence.

[0094] The third analysis submodule 2013 is configured to analyze the information editing instruction to obtain information of each task flow, and configure attribute information of the task flow node corresponding to the task flow according to the information of the task flow, the attribute information including at least one of a task identifier, a task type, a task description and a completion condition.

[0095] Figure 10 is a block diagram of another test device for a task flow according to an example embodiment, as shown in Figure 10 The export module 202 can include:

[0096] The conversion submodule 2021 is configured to convert each task flow node according to a preset format to obtain resource data corresponding to the task flow node.

[0097] The export submodule 2022 is configured to group the resource data corresponding to each task flow node into a resource data file according to a specified sequence, and export the resource data file to a preset engine.

[0098] Figure 11 is a block diagram of another test device for a task flow according to an example embodiment, as shown in Figure 11 The test module 204 can include:

[0099] The generation submodule 2041 is configured to invoke a total test script and a unit test script corresponding to each task flow node from the automated test framework in a batch manner through a continuous integration tool to generate a test project.

[0100] The execution submodule 2042 is configured to execute the test project according to a preset trigger mode, and the trigger mode includes a trigger period and / or a trigger condition.

[0101] In an implementation manner, the execution submodule 2042 can be configured to execute the following steps:

[0102] Step 1) calling a total test script by the test project.

[0103] Step 2) determining, by the total test script, a target task flow node corresponding to a target task flow currently executed according to resource data, and calling a target unit test script corresponding to the target task flow node to verify the target task flow.

[0104] Step 3) repeating the step 2) until the test project is interrupted or the test project is executed completely.

[0105] Step 4) outputting a test result.

[0106] In another implementation manner, the step 2) can include:

[0107] Step A, receiving, by the total test script, indication information sent by a server, and parsing a task identifier of a target task flow included in the indication information.

[0108] Step B, determining, by the total test script, the target task flow node in the resource data according to the task identifier of the target task flow, and determining the target unit test script according to the target task flow node.

[0109] Step C, calling, by the total test script, the target unit test script to verify the target task flow.

[0110] In yet another implementation manner, the step C can include:

[0111] Step C1, listening, by the total test script, to running data generated in a target task flow execution process, and the running data includes starting running data generated when entering the target task flow and / or ending running data generated when completing the target task flow.

[0112] Step C2, calling, by the total test script, the target unit test script to make the target unit test script verify whether the running data matches the target task flow node.

[0113] As to the apparatus in the above-mentioned embodiments, the specific manners in which various modules perform operations have been described in details in the embodiments of the method, and will not be described in details here.

[0114] To sum up, the present disclosure first receives a task editing instruction to establish a plurality of task flow nodes in a specified order according to the task editing instruction and configure corresponding attribute information, wherein each task flow node corresponds to a task flow. Then, each task flow node is converted into resource data in a preset format and exported to a preset engine. Each unit test script corresponding to each task flow node and a total test script set for maintaining a plurality of unit test scripts are integrated into an automated test framework. Finally, the automated test framework in the preset engine is invoked to generate and execute a test project to invoke the unit test script corresponding to the task flow when each task flow is running. The present disclosure establishes the task flow node and the association between the task flow node and the unit test script to obtain the test project, realizes the automated test of the task flow, and can quickly verify the integrity and correctness of the task flow.

[0115] Reference will now be made to Figure 12 which shows a structural schematic diagram of an electronic device (which can be understood as an execution subject of the embodiments of the present disclosure) 300 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 12 The electronic device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present disclosure.

[0116] As Figure 12 shown, the electronic device 300 can include a processing device (such as a central processor, a graphics processor, etc.) 301, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 302 or loaded into a random access memory (RAM) 303 from a storage device 308. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0117] Generally, the following devices can be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; a storage device 308 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 309. The communication device 309 can allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although not shown, the electronic device 300 can further include a power supply device for supplying power to the above-mentioned components.Figure 12 The electronic device 300 is illustrated with various means, but it is understood that not all of the illustrated means need be present in every embodiment. A greater or lesser number of means can alternatively be implemented.

[0118] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0119] It should be noted that the computer-readable medium described above in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used or used in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that 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 in the computer-readable medium can be transmitted by any suitable medium, including but not limited to a wire, cable, optical fiber, RF (radio frequency), or the like, or any suitable combination thereof.

[0120] In some embodiments, the terminal device and the server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication of any form or medium (e.g., a communication network). Examples of the communication network include a local area network ("LAN"), a wide area network ("WAN"), an internetwork (e.g., the Internet), and an end-to-end network (e.g., an ad hoc end-to-end network), as well as any currently known or future developed network.

[0121] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled into the electronic device.

[0122] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to: receive a task editing instruction, parse the task editing instruction to establish a plurality of task flow nodes in a specified order, and configure attribute information of each of the task flow nodes, each of the task flow nodes corresponding to a task flow; convert each of the task flow nodes into resource data in a preset format, and export the resource data to a preset engine, the resource data including the attribute information and the order of the task flow node; integrate a unit test script corresponding to each of the task flow nodes and a total test script to an automated test framework of the preset engine, the total test script being used to maintain a plurality of the unit test scripts, and the unit test script being used to verify the corresponding task flow; invoke the automated test framework in the preset engine to generate and execute a test project, the test project being used to determine the task flow node corresponding to the task flow when each of the task flows is running, and invoke the unit test script corresponding to the task flow node.

[0123] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0124] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0125] The modules involved in the embodiments of the present disclosure can be implemented in the manner of software or hardware. Among them, the name of the module does not constitute the limitation of the module itself in some cases. For example, the editing module can also be described as a module of establishing a task flow node and configuring attribute information.

[0126] The functions described in the foregoing description can be performed at least in part by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0127] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0128] According to one or more embodiments of the present disclosure, example 1 provides a test method of a task flow, comprising: receiving a task editing instruction, parsing the task editing instruction to establish a plurality of task flow nodes in a specified order, and configuring attribute information of each of the task flow nodes, each of the task flow nodes corresponding to a task flow; converting each of the task flow nodes into resource data in a preset format, and exporting the resource data to a preset engine, the resource data including attribute information and an order of the task flow node; integrating a unit test script corresponding to each of the task flow nodes and a total test script to an automated test framework of the preset engine, the total test script being used to maintain a plurality of the unit test scripts, and the unit test script being used to verify the corresponding task flow; calling the automated test framework in the preset engine to generate and execute a test project, the test project being used to determine a task flow node corresponding to the task flow when each of the task flows is running, and to call the unit test script corresponding to the task flow node.

[0129] According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the task editing instructions include type editing instructions, sequence editing instructions, and information editing instructions; the receiving task editing instructions and parsing the task editing instructions to establish a plurality of task process nodes in a specified order and configure attribute information of each task process node include: parsing the type editing instructions to obtain a task type corresponding to each task process, and establishing the task process node corresponding to the task process according to the corresponding task type; parsing the sequence editing instructions to obtain the specified order, and connecting a plurality of task process nodes in the specified order; and parsing the information editing instructions to obtain information of each task process, and configuring attribute information of the task process node corresponding to the task process according to the information of the task process, the attribute information including at least one of a task identifier, a task type, a task description, and a completion condition.

[0130] According to one or more embodiments of the present disclosure, example 3 provides the method of example 1, wherein the converting each task process node into resource data in a preset format through the task editor and exporting the resource data to a preset engine includes: converting each task process node into the resource data corresponding to the task process node according to the preset format; and grouping the resource data corresponding to each task process node into a resource data file according to the specified order, and exporting the resource data file to the preset engine.

[0131] According to one or more embodiments of the present disclosure, example 4 provides the method of example 1, wherein the invoking the automated test framework in the preset engine through a continuous integration tool to generate and execute a test project includes: invoking the total test script and each unit test script corresponding to each task process node from the automated test framework in a batch manner through a continuous integration tool to generate the test project; and executing the test project according to a preset trigger mode, the trigger mode including a trigger period and / or a trigger condition.

[0132] According to one or more embodiments of the present disclosure, example 5 provides the method of example 4, wherein the executing the test project includes: invoking the total test script through the test project; determining a target task process node corresponding to a target task process currently executed according to the resource data through the total test script, and invoking a target unit test script corresponding to the target task process node to verify the target task process; repeating the steps of determining a target task process node corresponding to a target task process currently executed according to the resource data through the total test script, and invoking a target unit test script corresponding to the target task process node until the test project is interrupted or the test project is executed completely; and outputting a test result.

[0133] According to one or more embodiments of the present disclosure, example 6 provides the method of example 5, and the target task flow node corresponding to the target task flow is determined according to the resource data by the total test script, and the target unit test script corresponding to the target task flow node is called, comprising: receiving the indication information sent by the server through the total test script, and parsing the task identifier of the target task flow included in the indication information; determining the target task flow node in the resource data according to the task identifier of the target task flow through the total test script, and determining the target unit test script according to the target task flow node; calling the target unit test script through the total test script to verify the target task flow.

[0134] According to one or more embodiments of the present disclosure, example 7 provides the method of example 6, and the target unit test script is called through the total test script to verify the target task flow, comprising: listening to the running data generated in the execution process of the target task flow through the total test script, the running data comprising: starting running data generated when entering the target task flow, and / or ending running data generated when completing the target task flow; calling the target unit test script through the total test script to make the target unit test script verify whether the running data matches the target task flow node.

[0135] According to one or more embodiments of the present disclosure, example 8 provides a task flow testing device, comprising: an editing module configured to receive a task editing instruction, parse the task editing instruction to establish a plurality of task flow nodes in a specified order, and configure attribute information of each task flow node, each task flow node corresponding to a task flow; an export module configured to convert each task flow node into resource data in a predetermined format, and export the resource data to a predetermined engine, the resource data comprising attribute information and order of the task flow node; an integration module configured to integrate a unit test script corresponding to each task flow node and a total test script into an automated test framework of the predetermined engine, the total test script being used to maintain a plurality of unit test scripts, and the unit test script being used to verify the corresponding task flow; a testing module configured to call the automated test framework in the predetermined engine, generate and execute a test project, the test project being used to determine a task flow node corresponding to a task flow when the task flow is running according to the resource data, and call the unit test script corresponding to the task flow node.

[0136] According to one or more embodiments of the present disclosure, example 9 provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, implements the steps of the method of any one of examples 1 to 7.

[0137] According to one or more embodiments of the present disclosure, example 10 provides an electronic device comprising: a storage apparatus having stored thereon a computer program; and a processing apparatus configured to execute the computer program in the storage apparatus to implement the steps of the method of any one of examples 1 to 7.

[0138] The above description merely provides preferred embodiments of the present disclosure and a principle of applied technology. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or equivalent features thereof without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions.

[0139] Further, while operations are depicted in a particular, chronological sequence in this disclosure, this should not be understood as requiring that such operations be performed in the order shown or that they be performed sequentially. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, while specific implementations are discussed above, this should not be understood as suggesting that the scope of the present disclosure in any way limited to these particular implementations. Rather, the scope of the present disclosure is to be advised by the appended claims and their equivalents. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in subcombination or in a plurality of embodiments.

[0140] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With respect to the devices in the above-described embodiments, the specific manner in which the various modules perform operations has been described in detail in the embodiments related to the method, and will not be described here in detail.

Claims

1. A method of testing a task flow, characterized by, The method comprises: receiving a task editing instruction, parsing the task editing instruction to establish a plurality of task flow nodes in a specified order, and configuring attribute information of each task flow node, each task flow node corresponding to a task flow; converting each task flow node into resource data in a preset format common to a preset engine, and exporting the resource data to the preset engine, the resource data including attribute information and an order of the task flow node; integrating a unit test script corresponding to each task flow node and a total test script into an automated test framework of the preset engine, the total test script being used to maintain a plurality of unit test scripts, the unit test scripts being used to verify the corresponding task flow, and the total test script being used to sequentially call each unit test script in the specified order and record an execution result of each unit test script; calling the automated test framework in the preset engine to generate and execute a test project, the test project being used to determine a task flow node corresponding to a task flow when each task flow is running according to the resource data, and call the unit test script corresponding to the task flow node; wherein the conversion of each task flow node into resource data in a preset format common to a preset engine and the exporting of the resource data to the preset engine comprise: converting each task flow node according to the preset format to obtain the resource data corresponding to the task flow node; composing the resource data corresponding to each task flow node into a resource data file in the specified order, and exporting the resource data file to the preset engine.

2. The method of claim 1, wherein, The task editing instruction includes a type editing instruction, a sequence editing instruction, and an information editing instruction; the receiving of the task editing instruction and the parsing of the task editing instruction to establish a plurality of task flow nodes in a specified order and configure attribute information of each task flow node comprise: parsing the type editing instruction to obtain a task type corresponding to each task flow, and establishing the task flow node corresponding to the task flow according to the corresponding task type; parsing the sequence editing instruction to obtain the specified order, and connecting a plurality of task flow nodes in the specified order; parsing the information editing instruction to obtain information of each task flow, and configuring attribute information of the task flow node corresponding to the task flow according to the information of the task flow, the attribute information including at least one of a task identifier, a task type, a task description, and a completion condition.

3. The method of claim 1, wherein, The calling of the automated test framework in the preset engine to generate and execute a test project comprises: generating the test project by continuously integrating tools in a batch mode from the automated test framework to call the total test script and the unit test script corresponding to each task flow node; executing the test project according to a preset trigger mode, the trigger mode including a trigger period and / or a trigger condition.

4. The method of claim 3, wherein, The execution of the test project comprises: The total test script is invoked by the test project; A target task flow node corresponding to a target task flow currently executed is determined according to the resource data by the total test script, and a target unit test script corresponding to the target task flow node is invoked to verify the target task flow; The step of determining the target task flow node corresponding to the target task flow currently executed according to the resource data by the total test script and invoking the target unit test script is repeated until the test project is interrupted or the test project is executed completely; A test result is output.

5. The method of claim 4, wherein, The step of determining the target task flow node corresponding to the target task flow currently executed according to the resource data by the total test script and invoking the target unit test script includes: An indication information sent by a server is received by the total test script, and a task identifier of the target task flow included in the indication information is parsed; The target task flow node is determined in the resource data according to the task identifier of the target task flow by the total test script, and the target unit test script is determined according to the target task flow node by the total test script; The target unit test script is invoked by the total test script to verify the target task flow.

6. The method of claim 5, wherein, The step of invoking the target unit test script by the total test script to verify the target task flow includes: Running data generated in a process of executing the target task flow is listened to by the total test script, the running data including starting running data generated when the target task flow is entered and / or ending running data generated when the target task flow is completed; The target unit test script is invoked by the total test script to make the target unit test script verify whether the running data matches the target task flow node.

7. A test apparatus for a task flow, characterized by The device includes: An editing module is configured to receive a task editing instruction, parse the task editing instruction to establish a plurality of task flow nodes in a specified order, and configure attribute information of each task flow node, each task flow node corresponding to a task flow; An exporting module is configured to convert each task flow node into resource data in a preset format common to a preset engine, and export the resource data to the preset engine, the resource data including attribute information and an order of the task flow node; An integrating module is configured to integrate a unit test script corresponding to each task flow node and a total test script into an automated test framework of the preset engine, the total test script being used to maintain a plurality of unit test scripts, the unit test scripts being used to verify corresponding task flows, and the total test script being used to sequentially invoke each unit test script in a specified order and record an execution result of each unit test script. The test module is configured to invoke the automatic test framework in the preset engine, generate and execute a test project, and determine a task flow node corresponding to each task flow according to the resource data and invoke a unit test script corresponding to the task flow node when each task flow is running. The export module includes: The conversion submodule is configured to convert each task flow node according to a preset format to obtain resource data corresponding to the task flow node. The export submodule is configured to group the resource data corresponding to each task flow node into a resource data file according to a specified order, and export the resource data file to the preset engine.

8. A computer readable medium having stored thereon a computer program, characterized in that, The program is executed by the processing device to implement the steps of the method of any one of claims 1-6.

9. An electronic device, comprising: The program is executed by the processing device to implement the steps of the method of any one of claims 1-6. The program is executed by the processing device to implement the steps of the method of any one of claims 1-6. ​

Citation Information

Patent Citations

  • Ansible-based disaster recovery backup switching system

    CN113722159A