Task system testing method and device and storage medium

By building the link model of the task system and orchestrating automated test cases, the problem of low manual testing efficiency in the existing technology is solved, and the automated testing and cost reduction of complex task systems are achieved.

CN119537196APending Publication Date: 2025-02-28MEIPING MEIWU (SHANGHAI) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311064113.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art relies on manual testing, which is inefficient and difficult to effectively test the links of complex task systems.

Method used

By building a link model of the task system, determine the link nodes to be tested, obtain test cases from the test case library according to the mapping relationship between the nodes and the test cases, and orchestrate the test case combination to realize automatic testing of complex task systems.

Benefits of technology

Automatic testing of complex task systems is realized, reducing testing costs and the efficiency of manual testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537196A_ABST
    Figure CN119537196A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task system testing method and device and a storage medium. When the task system is tested, a link model of a target task system is determined, and a link node to be tested is determined from the link model. According to the mapping relation between the link node and the test case, obtaining the test case corresponding to the link node to be tested from a test case library; according to the task processing logic of the to-be-tested link node, arranging a test case corresponding to the to-be-tested link node to obtain a test case combination; and executing the test cases in the test case combination to test the link node to be tested. In this way, the task module to be tested in the task system can be visually determined based on the link model of the task system. According to the mapping relation between the link node and the test case, the test case can be determined and executed, so that automatic testing of a complex task system comprising a plurality of task modules is realized, and the test cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a task system testing method, device and storage medium. Background Art

[0002] With the continuous development of computer application technology, more and more complex application systems are being used in different application scenarios to provide more comprehensive computer services. In a typical application scenario, task services can be provided to users based on a waterfall task system. Generally, a waterfall task system includes multiple task links, and multiple task links are executed step by step in sequence. For example, in the home decoration task scenario, in the design link, the home decoration designer can design product customization solutions based on the whole house customization system, such as customization solutions for products such as wardrobes and cabinets, and provide the product customization solutions to the corresponding product customization stores. In the store interaction link, after the product customization store obtains the product customization solution, it can determine the processing information based on the whole house customization system according to the product customization solution and the user's consumption needs, and provide the processing information to the customization factory. In the processing link, the customization factory can perform customized processing based on the whole house customization system according to the customization solution, obtain customized products and deliver customized products. In order to ensure that the task system has high availability, the task link needs to be tested.

[0003] In an existing testing method, different links of the task system are tested manually, but this testing method is inefficient. Therefore, a new solution is needed. Summary of the invention

[0004] Multiple aspects of the present application provide a task system testing method, device and storage medium, which realize automatic testing of a complex task system including multiple task modules and reduce testing costs.

[0005] An embodiment of the present application provides a task system testing method, comprising: responding to a test event of a target task system, determining a link model of the target task system; determining at least one link node to be tested from the link model; obtaining, from a test case library, test cases corresponding to each of the at least one link node to be tested according to a mapping relationship between link nodes and test cases; arranging the test cases corresponding to each of the at least one link node to be tested according to the task processing logic of the at least one link node to be tested to obtain a test case combination; and executing the test cases in the test case combination to test the at least one link node to be tested.

[0006] Optionally, before determining the link model of the target task system, it also includes: determining multiple task modules included in the target task system and the task interaction relationship between the multiple task modules; constructing the link model of the target task system according to the multiple task modules and the task interaction relationship between the multiple task modules; wherein the link model includes multiple link nodes, the multiple link nodes correspond one-to-one to the multiple task modules, and the relationship between the multiple link nodes corresponds to the task interaction relationship between the multiple task modules.

[0007] Optionally, a link model of the target task system is constructed based on the multiple task modules and the task interaction relationship between the multiple task modules, including: for any task module among the multiple task modules, determining the adjacent task modules of the task module based on the task interaction relationship between the multiple task modules; storing the node addresses of the adjacent task modules of the task module in the link node corresponding to the task module; determining at least one sub-task module contained in the task module; and creating a sub-link node corresponding to the at least one sub-task module in the link node corresponding to the task module.

[0008] Optionally, according to the mapping relationship between link nodes and test cases, before obtaining the test cases corresponding to each of the at least one link node to be tested from the test case library, it also includes: determining the test content of the target subtask module for any target subtask module in the at least one subtask module; determining the target test case adapted to the target subtask module according to the test content of the target subtask module; storing the mapping relationship between the target subtask module and the target test case in the sub-link node corresponding to the target subtask module; wherein the target test case includes: at least one of: user interface automation test cases, interface automation test cases and other script-encapsulated test cases.

[0009] Optionally, determining at least one link node to be tested from the link model includes: calculating a target impact range of the test event based on the type of the test event; and determining, in the link model, link nodes within the target impact range to obtain the at least one link node to be tested.

[0010] Optionally, based on the type of the test event, the target impact range of the test event is calculated, including: if the test event is a task change event of any link node, determining the target impact range as a local link range associated with the link node; the local link range includes the k-order neighbor nodes of the link node; or, if the test event is a full-link test event, determining the target impact range of the test event as the full-link range; the full-link test event is triggered according to a fixed period or triggered by user operation.

[0011] Optionally, executing the test cases in the test case combination to test at least one link node to be tested includes: in the process of executing any test case in the test case combination, determining the target link node corresponding to the test case; inputting the benchmark input data corresponding to the target link node into the test case, and executing the test case on the target task module to obtain the test output data of the target task module; comparing the test output data with the benchmark output data of the target task module to obtain the test result of the target link node.

[0012] Optionally, after executing the test cases in the test case combination to test at least one link node to be tested, it also includes: outputting a test report in a visual manner based on the test results of each of the at least one link node to be tested; in the test report, highlighting the link nodes that failed the test and the corresponding test detail data.

[0013] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the method provided in the embodiment of the present application.

[0014] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which can implement the steps in the method provided in the embodiment of the present application when the computer program is executed by a processor.

[0015] In the task system testing method provided by the embodiment of the present application, when testing the task system, the link model of the target task system is determined, and the link node to be tested is determined from the link model. According to the mapping relationship between the link node and the test case, the test case corresponding to the link node to be tested can be obtained from the test case library; according to the task processing logic of the link node to be tested, the test case corresponding to the link node to be tested is arranged to obtain a test case combination; the test case in the test case combination is executed to test the link node to be tested. In this embodiment, based on the link model of the task system, the task module to be tested in the task system can be intuitively determined. According to the mapping relationship between the link node and the test case, the test case can be determined and executed, thereby realizing the automatic testing of a complex task system containing multiple task modules and reducing the testing cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 A flowchart of a task system testing method provided by an exemplary embodiment of the present application;

[0018] Figure 2 A schematic diagram of a waterfall task system provided for an exemplary embodiment of the present application;

[0019] Figure 3 A schematic diagram of a link model of a task system provided by an exemplary embodiment of the present application;

[0020] Figure 4 A schematic diagram of a test case arrangement process provided by an exemplary embodiment of the present application;

[0021] Figure 5 A schematic diagram of a visual test report provided for an exemplary embodiment of the present application;

[0022] Figure 6 A flowchart of a task system testing method provided by an exemplary embodiment of the present application;

[0023] Figure 7 A schematic diagram of the structure of a server provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0025] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

[0026] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0027] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0028] In order to solve the technical problem that the prior art relies on manual testing of different links of the task system and thus has low efficiency, a solution is provided in some embodiments of the present application. The technical solutions provided in each embodiment of the present application are described in detail below in conjunction with the accompanying drawings.

[0029] Figure 1 is a flowchart of a task system testing method provided by an exemplary embodiment of the present application, the method may include: Figure 1 Steps shown:

[0030] Step 101: respond to a test event of a target task system and determine a link model of the target task system.

[0031] Step 102: Determine at least one link node to be tested from the link model.

[0032] Step 103: According to the mapping relationship between the link nodes and the test cases, the test cases corresponding to the at least one link node to be tested are obtained from the test case library.

[0033] Step 104: Arrange the test cases corresponding to the at least one link node to be tested according to the task processing logic of the at least one link node to be tested to obtain a test case combination.

[0034] Step 105: Execute the test cases in the test case combination to test the at least one link node to be tested.

[0035] The implementation of this application can be applied to test task systems in various scenarios. For example, in the home improvement task scenario, the whole house customization system including product design, store interaction, and processing can be tested. For another example, in the logistics task scenario, the logistics system including shipping, transportation, transit, and distribution can be tested.

[0036] The task system described in this embodiment usually includes multiple links, and there is a certain correlation between the input and output of adjacent links, that is, multiple links in the task system form a link with a specific structure. According to the characteristics of such a task system, a link model of such a task system can be abstracted. The link model is used to describe the structure and content of the task system using a structured data description method. Among them, the link model includes multiple link nodes, and any link node corresponds to a task module in the task system.

[0037] Among them, a task module refers to a functional module used to execute task processing logic in a certain task link. For example, taking the home improvement task scenario as an example, the task modules included in the whole house customization system may include a designer task module, a merchant task module, and a factory task module. Among them, any task module can be implemented as a client program running on the user terminal. For example, the designer task module can be implemented as a designer client running on the terminal device; the merchant task module can be implemented as a merchant client running on the terminal device; the factory task module can be implemented as a factory client running on the terminal device.

[0038] The target task system may be any task system to be tested. In step 101, the link model of the target task system may be determined in response to the test event of the target task system. The test event of the target task system may be a user event or a system event. The user event includes: a test event triggered by a user's test operation or a test event triggered by a user's update operation on the task system. The system event may be a test cycle arrival event, which is used to periodically and automatically test the task system.

[0039] The link model of the task system can be constructed in advance based on the task modules and task interaction relationships of the task system. Optionally, during the construction process, multiple task modules included in the target task system and the task interaction relationships between the multiple task modules can be determined. The task interaction relationships between the task modules can be expressed as the transmission relationship of instructions, signals or task data flows between the task modules. Figure 2 As shown, it can be determined that the task modules of a certain task system include: task module A, task module B, ..., task module N. There is a data interaction relationship between adjacent task modules, and the output data of the previous task module is the input data of the next task module. Figure 2 As shown, task module A is the upstream task module of task module B, and the data D1 output by task module A is the input data of task module B. The data D2 output by task module B is the input data of the downstream task module. The input data of task module N is the data DN output by its upstream task module. Among them, the formats of data D1, data D2 and data D3 can be different, such as Figure 2 As shown, the format of data D1 is F1, the format of data D2 is F2, and the format of data DN is FN.

[0040] According to multiple task modules and the task interaction relationship between the multiple task modules, a link model of the target task system can be constructed; wherein the link model includes multiple link nodes, the multiple link nodes correspond to the multiple task modules one by one, and the relationship between the multiple link nodes corresponds to the task interaction relationship between the multiple task modules. Among them, the relationship between the link nodes includes the upstream / downstream neighbor relationship between the link nodes.

[0041] In some optional embodiments, the link model of the task system can be represented by a two-way linked list. Wherein, a two-way linked list is a data storage structure, and a two-way linked list is composed of a plurality of link nodes. In this embodiment, the relevant data of the task module can be stored in the link nodes of the two-way linked list, and the relationship between the link nodes is determined according to the task interaction relationship between the task modules.

[0042] Taking any task module as an example, when constructing a bidirectional linked list, the adjacent task modules of the task module can be determined according to the task interaction relationship between the task modules, and the node address of the adjacent task module of the task module can be stored in the link node corresponding to the task module. In some optional embodiments, the task content of the task module can be further stored in the link node of the task module, and the task content may include information such as the application scenario and main functions of the task module. The above information can be used to analyze the impact of the failed test result at the task level after obtaining the failed test result. In this embodiment, in the bidirectional linked list, any link node includes three parts, the first part is used to store the address of the upstream neighbor node, the second part is used to store the address of the downstream neighbor node, and the third part is used to store the task content and other test related data of this link node.

[0043] In some scenarios, a task module may include one or more subtask modules. When constructing a link model, the subtask modules of the task module may be obtained, and sublink nodes may be added to the bidirectional linked list according to the subtask modules. For example, in a home decoration task scenario, a designer task module may include a drawing submodule, a house type library submodule, a rendering submodule, a material library submodule, etc.

[0044] Taking any task module as an example, it is optional to determine whether the task module has atomicity. Herein, atomicity refers to the indivisible property of the task module. If the task module includes a subtask module, the task module does not have atomicity. If the task module does not have atomicity, at least one subtask module included in the task module can be determined, and a sub-link node corresponding to the at least one subtask module can be created in the link node corresponding to the task module.

[0045] In some exemplary embodiments, the mapping relationship between the subtask module and the test case can be further determined, and the mapping relationship can be stored in the sub-link node corresponding to the subtask module. Optionally, taking any target subtask module in the task module as an example, the test content of the target subtask module can be determined. Among them, the test content can be configured by the user, or the functional keywords of the subtask module can be matched and determined. For example, in some embodiments, the function of the subtask module is: to provide image cropping services based on an open calling interface. Among them, the functional keyword is "calling interface", then it can be determined that the test content of the target submodule is interface testing.

[0046] According to the test content of the target subtask module, the target test case adapted to the target subtask module can be determined, and the mapping relationship between the target subtask module and the target test case can be stored in the sublink node corresponding to the target subtask module. Then, during the test process, the mapping relationship can be read, and the test case can be read from the test case library according to the mapping relationship.

[0047] Optionally, the target test case includes: at least one of a user interface (UI) automation test case, an interface automation test case, and other script-encapsulated test cases.

[0048] In some exemplary embodiments, the sub-link node corresponding to the sub-task module may also store test data corresponding to the sub-task module. The test data includes: benchmark input data of the task module and corresponding benchmark output data. The benchmark input data is input data used for functional testing of the task module. The benchmark output data refers to the data output by the task module under normal operation. Continuing with the above example, the function of the sub-task module is to provide image cropping service based on an open calling interface, then the corresponding benchmark input data is an image, and the benchmark output data is the image obtained after the image is cropped at a specified cropping size.

[0049] After determining the link model of the target task system, the link nodes to be tested can be determined from the link model by executing step 102. The link nodes to be tested can be all link nodes in the link model or some link nodes in the link model, which is not limited in this embodiment.

[0050] In some exemplary embodiments, under the triggering of different types of test events, the link nodes to be tested may be different. Optionally, according to the type of the test event, the target impact range of the test event is calculated. Among them, the target impact range is used to describe the number of link nodes that need to be tested under the triggering of the test event and the address of the link nodes and other information. After determining the target impact range, the link nodes within the target impact range can be determined in the link model to obtain the link nodes to be tested.

[0051] Optionally, the type of the test event may include at least a task change event or a full-link test event.

[0052] Optionally, if the test event is a task change event of any link node, the target impact range is determined to be the local link range associated with the link node. Wherein, the task change event may include: a code update event corresponding to the task module, a new function release event corresponding to the task module, or an abnormal event corresponding to the task module (such as a response timeout), etc., and this embodiment includes but is not limited to this. Wherein, the local link range may include the k-order neighbor node of the link node. Wherein, the k-order neighbor node of the link node may include the k-order upstream neighbor node of the link node, or the k-order downstream neighbor node, or may also include the k-order upstream and downstream neighbor nodes. Wherein, k is a positive integer. Wherein, the value of k may be a fixed value, which may be determined according to the strength of the association relationship between the input data of the link node and the output data of the upstream node, or may be determined according to the strength of the association relationship between the output data of the link node and the input data of the upstream node. For example, if the input data of a node has a strong association relationship with the output data of the upstream 2nd-order neighbor node, k=2 may be taken. Optionally, the value of k may also change dynamically according to the test results. For example, when k=1, if the first-order neighbor node fails the test, k=2 can be used, and so on, until the k-order neighbor node passes the test. Based on this method, the problem node can be located by gradually expanding the test range, and the calculation area can be reduced as much as possible while the problem is found.

[0053] In this implementation, when a task change event occurs at a link node, the local link range where the link node is located can be tested, which reduces the test range, improves test efficiency, and helps reduce the impact of the test operation on the task.

[0054] Optionally, if the test event is a full-link test event, the target impact range of the test event can be determined to be the full-link range; wherein the full-link test event includes: a test event triggered according to a fixed period or a test event triggered under user operation. In this implementation, all link nodes in the link model can be used as link nodes to be tested, thereby achieving full-link testing.

[0055] After determining the test cases to be tested based on the above implementation, the test cases corresponding to the link nodes to be tested can be obtained from the test case library according to the mapping relationship between the link nodes and the test cases through step 103. Among them, the mapping relationship between the link nodes and the test cases can be represented by a hash table. The hash table can store the mapping relationship between the identifiers of the link nodes and the identifiers of the test cases. In the hash table, one link node can correspond to multiple test cases. One test case can correspond to multiple link nodes. After determining the link node to be tested, the hash table can be queried according to the identifier of the link node to be tested to obtain the identifier of the test case corresponding to the link node to be tested. According to the identifier of the test case, the corresponding test case can be read from the test case library.

[0056] In step 104, after obtaining the test cases, the test cases corresponding to the link nodes to be tested can be arranged according to the task processing logic of the link nodes to be tested to obtain a test case combination. The task processing logic of the link nodes to be tested may include: signaling or data transmission logic between sub-link nodes within any link node, and signaling or data transmission logic between link nodes. Arranging the test cases includes: arranging the execution order of the test cases according to the transmission path of the signaling or data flow corresponding to the task processing logic of the link nodes to be tested.

[0057] For example, the link nodes to be tested include link node A1, link node A2 and link node A3. Among them, after receiving the trigger operation of button B1, sub-link node A11 in link node A1 generates instruction C0 and transmits instruction C0 to sub-link node A12 in link node A1. Sub-link node A12 calls the specified interface of link node A2 according to instruction C0 and sends instruction C1 to link node A2. After receiving the trigger operation of button B2, link node A2 calls the specified interface of link node A3 to perform data processing operations on data D1. According to the above-mentioned task processing logic, the test cases of link node A1, link node A2 and link node A3 can be arranged, and the obtained test case combination is: UI test case of sub-link node A11, interface test case of sub-link node A12, UI test case of link node A2, interface test case of link node A2, test case of data processing function of link node A3. Among them, the test case of the data processing function is a test case encapsulated by a script. As Figure 4 As shown, 2 interface automation test cases, 2 UI automation test cases, and 1 other script test case can be extracted from the test case library. The above test cases are arranged according to the task sequence of the link nodes under test to obtain an automation test sub-link.

[0058] After determining the test case combination based on the above steps, the test cases in the test case combination can be executed through step 105 to test the link node to be tested. Optionally, in the process of executing any test case in the test case combination, the target link node corresponding to the test case can be determined, and the benchmark input data corresponding to the target link node can be input into the target task module corresponding to the target link node, and the test case is executed on the target task module to obtain the test output data of the target task module. The test output data is compared with the benchmark output data of the target task module to obtain the test result of the target link node.

[0059] For example, the above example is continued for explanation. Link node A3 is used to perform data processing operations on input data D1. When there is no abnormality in link node A3, the expected output data of link node A3 is data D2. D2 may have a specified format or a specified numerical range, etc. Among them, data D1 is the reference input data, and D2 is the reference output data. During the test, the processing result of link node A3 on data D1 is the test output data D3. If data D2 and data D3 are consistent, it can be considered that there is no abnormality in link node A3 and link node A3 has passed the test. On the contrary, if data D2 and data D3 are inconsistent, it can be considered that there is an abnormality in link node A3 and link node A3 has failed the test.

[0060] It is worth noting that in some exemplary embodiments, after testing the link nodes to be tested, a test report can be automatically output to display the test results. Optionally, the test report can be output in a visual manner based on the test results of each link node to be tested. The visual method refers to converting the test results into visual elements to make the test results more intuitive and easier for users to understand. For example, in this embodiment, the test report can be displayed in a graphical manner. Alternatively, the test report can be displayed by visualizing a bidirectional linked list structure and adding test results to the bidirectional linked list. In the test report, the link nodes that failed the test and the corresponding test details data can be highlighted, such as Figure 5 As shown. For example, different colors may be used to mark link nodes that have passed the test and link nodes that have not passed the test. Alternatively, a text mark indicating that the link nodes have not passed the test may be added to the link nodes that have not passed the test, which is not limited in this embodiment. Among them, the test details data may include the test items corresponding to the link node. For example, the test items of link node A2 include: page button test and interface test, etc.

[0061] Based on this implementation, the test results can be displayed more intuitively in a visual way, further lowering the threshold for analyzing the test results.

[0062] The following will be combined Figure 6, the task system testing method provided in the embodiment of the present application is further illustrated. Figure 6 As shown, the test method includes a system initialization phase. The system initialization includes: link initialization, test case library initialization, test data initialization, and test case arrangement initialization.

[0063] In the link initialization stage, the task links of the task system can be sorted out to obtain a waterfall-type link model. In the link model, the neighbor node information and child node information of each task module are input to obtain a customized task bidirectional linked list. The bidirectional linked list can be displayed on the front end.

[0064] In the initialization phase of the test case library, the corresponding automated test code module can be constructed according to the test content and stored in the test case library in the form of a test case module. For the link nodes with atomic characteristics in the link model, a mapping relationship between the link nodes and the test case modules can be established.

[0065] In the test data initialization phase, the test data of each link node with atomic characteristics may be determined, including reference input data and reference output data.

[0066] In the test case arrangement initialization stage, the corresponding test case module can be imported according to the mapping relationship between the link node and the test case module in the link model, and the mapping relationship between the link node and the test case module can be established using a hash table.

[0067] like Figure 6 As shown, after initialization is completed, the task changes of the task system can be monitored. Specifically, the code changes associated with the task can be monitored. If no task changes are monitored, the full link test can be performed regularly. If task changes are monitored, the impact range of the task changes can be calculated, and the test cases of the task nodes within the impact range can be loaded. When calculating the impact range, the nodes affected by the change can be determined based on the task nodes that have a strong correlation with the link nodes that have changed. Figure 6 As shown, after the impact range is determined, the test cases of the task nodes within the impact range can be loaded.

[0068] After determining the link nodes within the affected range, the affected sub-links can be located in the link model, the test case modules in the link nodes in the sub-links can be read, and the corresponding automated test cases can be executed in the linked list order, such as Figure 6 As shown. For each link node, its output data and benchmark output data during the test process can be verified and the results can be recorded. If the output data of the link node passes the verification, a test report indicating a successful test is output. On the contrary, if the output data of the link node fails the verification, a test report indicating a failed test is output.

[0069] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 101 to 104 can be device A; for another example, the execution subject of steps 101 and 102 can be device A, and the execution subject of step 103 can be device B; and so on.

[0070] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0071] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0072] Figure 7 The structure diagram of an electronic device provided by an exemplary embodiment of the present application is shown, and the electronic device is applicable to the task system testing method provided by the above embodiment. Figure 7 As shown, the electronic device includes: a memory 701 and a processor 702.

[0073] The memory 701 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.

[0074] The processor 702 is coupled to the memory 701 and is used to execute the computer program in the memory 701, so as to: respond to the test event of the target task system and determine the link model of the target task system; determine at least one link node to be tested from the link model; obtain the test cases corresponding to the at least one link node to be tested from the test case library according to the mapping relationship between the link node and the test case; arrange the test cases corresponding to the at least one link node to be tested according to the task processing logic of the at least one link node to be tested to obtain a test case combination; and execute the test cases in the test case combination to test the at least one link node to be tested.

[0075] Optionally, before determining the link model of the target task system, the processor 702 further includes: determining multiple task modules included in the target task system and the task interaction relationship between the multiple task modules; constructing the link model of the target task system according to the multiple task modules and the task interaction relationship between the multiple task modules; wherein the link model includes multiple link nodes, the multiple link nodes correspond one-to-one to the multiple task modules, and the relationship between the multiple link nodes corresponds to the task interaction relationship between the multiple task modules.

[0076] Optionally, when the processor 702 constructs the link model of the target task system based on the multiple task modules and the task interaction relationship between the multiple task modules, it is specifically used to: for any task module among the multiple task modules, determine the adjacent task module of the task module according to the task interaction relationship between the multiple task modules; store the node address of the adjacent task module of the task module in the link node corresponding to the task module; determine at least one sub-task module contained in the task module; and create a sub-link node corresponding to the at least one sub-task module in the link node corresponding to the task module.

[0077] Optionally, before obtaining the test cases corresponding to each of the at least one link node to be tested from the test case library according to the mapping relationship between the link node and the test case, the processor 702 is also used to: determine the test content of the target subtask module for any target subtask module in the at least one subtask module; determine the target test case adapted to the target subtask module according to the test content of the target subtask module; store the mapping relationship between the target subtask module and the target test case in the sub-link node corresponding to the target subtask module; wherein the target test case includes: at least one of: user interface automation test cases, interface automation test cases, and other script-encapsulated test cases.

[0078] Optionally, when the processor 702 determines at least one link node to be tested from the link model, it is specifically used to: calculate the target impact range of the test event according to the type of the test event; determine the link nodes within the target impact range in the link model to obtain the at least one link node to be tested.

[0079] Optionally, when the processor 702 calculates the target impact range of the test event according to the type of the test event, it is specifically used to: if the test event is a task change event of any link node, determine the target impact range as a local link range associated with the link node; the local link range includes the k-order neighbor nodes of the link node; or, if the test event is a full-link test event, determine the target impact range of the test event as the full-link range; the full-link test event is triggered according to a fixed period or triggered under user operation.

[0080] Optionally, when the processor 702 executes the test case in the test case combination to test at least one link node to be tested, it is specifically used to: determine the target link node corresponding to the test case in the process of executing any test case in the test case combination; input the benchmark input data corresponding to the target link node into the test case, and execute the test case on the target task module to obtain the test output data of the target task module; compare the test output data with the benchmark output data of the target task module to obtain the test result of the target link node.

[0081] Optionally, after executing the test cases in the test case combination to test at least one link node to be tested, the processor 702 is also used to: output a test report in a visual manner based on the test results of each of the at least one link node to be tested; in the test report, highlight the link nodes that failed the test and the corresponding test detail data.

[0082] Further, if Figure 7 As shown, the electronic device also includes: a communication component 703, a power component 704, a display component 705, an audio component 706 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.

[0083] Among them, the memory 701 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0084] The communication component 703 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as Wi-Fi (wireless network communication technology), 2G (such as Global System for Mobile Communications (GSM)), 3G (such as Wideband Code Division Multiple Access (WCDMA), 4G (such as Long Term Evolution (LTE)), 4G+ (such as upgraded Long Term Evolution (LTE-Advanced, LTE-A)) or 5G (5th Generation Mobile Communication Technology), or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

[0085] The power supply component 704 is used to provide power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing and distributing power to the device where the power supply component is located.

[0086] Among them, the display component 705 includes a screen, and the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch panel, TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0087] Among them, the audio component 706 can be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0088] In this embodiment, when testing the task system, the link model of the target task system is determined, and the link node to be tested is determined from the link model. According to the mapping relationship between the link node and the test case, the test case corresponding to the link node to be tested can be obtained from the test case library; according to the task processing logic of the link node to be tested, the test case corresponding to the link node to be tested is arranged to obtain a test case combination; the test case in the test case combination is executed to test the link node to be tested. In this embodiment, based on the link model of the task system, the task module to be tested in the task system can be intuitively determined. According to the mapping relationship between the link node and the test case, the test case can be determined and executed, thereby realizing the automatic testing of a complex task system containing multiple task modules and reducing the testing cost.

[0089] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by an electronic device in the above method embodiment.

[0090] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM (Compact Disc Read-Only Memory, read-only optical disc read-only memory), optical storage, etc.) containing computer-usable program codes.

[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0094] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0095] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0096] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, Parallel Random Access Machine (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, Digital Video Disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0097] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0098] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A task system testing method, characterized in that: include: In response to a test event of a target task system, determining a link model of the target task system; Determining at least one link node to be tested from the link model; According to the mapping relationship between the link nodes and the test cases, obtaining the test cases corresponding to the at least one link node to be tested from the test case library; Arranging test cases corresponding to the at least one link node to be tested according to the task processing logic of the at least one link node to be tested to obtain a test case combination; The test cases in the test case combination are executed to test the at least one link node to be tested.

2. The method according to claim 1, characterized in that: Before determining the link model of the target task system, the method further includes: Determining a plurality of task modules included in the target task system and a task interaction relationship between the plurality of task modules; Constructing a link model of the target task system according to the multiple task modules and the task interaction relationship between the multiple task modules; Among them, the link model includes multiple link nodes, the multiple link nodes correspond one-to-one to the multiple task modules, and the relationship between the multiple link nodes corresponds to the task interaction relationship between the multiple task modules.

3. The method according to claim 2, characterized in that According to the multiple task modules and the task interaction relationships between the multiple task modules, a link model of the target task system is constructed, including: For any task module among the multiple task modules, determining an adjacent task module of the task module according to the task interaction relationship between the multiple task modules; In the link node corresponding to the task module, the node address of the adjacent task module of the task module is stored; Determine at least one subtask module included in the task module; In the link node corresponding to the task module, a sub-link node corresponding to the at least one sub-task module is created.

4. The method according to claim 3, characterized in that According to the mapping relationship between the link nodes and the test cases, before obtaining the test cases corresponding to the at least one link node to be tested from the test case library, the method further includes: For any target subtask module among the at least one subtask module, determining the test content of the target subtask module; Determine a target test case adapted to the target subtask module according to the test content of the target subtask module; Storing a mapping relationship between the target subtask module and the target test case in a sub-link node corresponding to the target subtask module; The target test cases include: at least one of user interface automation test cases, interface automation test cases and other script-encapsulated test cases.

5. The method according to claim 1, characterized in that Determining at least one link node to be tested from the link model includes: Calculating the target impact range of the test event according to the type of the test event; In the link model, link nodes located within the target influence range are determined to obtain the at least one link node to be tested.

6. The method according to claim 5, characterized in that Calculating the target impact range of the test event according to the type of the test event includes: If the test event is a task change event of any link node, the target impact range is determined to be a local link range associated with the link node; the local link range includes k-order neighbor nodes of the link node; or, If the test event is a full-link test event, determine that the target impact scope of the test event is the full-link scope; the full-link test event is triggered according to a fixed period or under user operation.

7. The method according to claim 1, characterized in that Executing the test cases in the test case combination to test at least one link node to be tested includes: In the process of executing any test case in the test case combination, determining a target link node corresponding to the test case; Inputting the benchmark input data corresponding to the target link node into the test case, and executing the test case on the target task module to obtain the test output data of the target task module; The test output data is compared with the benchmark output data of the target task module to obtain the test result of the target link node.

8. The method according to any one of claims 1 to 7, characterized in that: After executing the test cases in the test case combination to test at least one link node to be tested, the method further includes: Outputting a test report in a visual manner according to the test result of each of the at least one link node to be tested; In the test report, the link nodes that failed the test and the corresponding test detail data are highlighted.

9. An electronic device, characterized in that: include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to: perform the steps in the method according to any one of claims 1-8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement the task system testing method described in any one of claims 1 to 8.