A test case generation method, device, equipment, storage medium and product

By analyzing user operation data to identify business processing paths, the method addresses the challenge of complex software testing, ensuring precise and extensive test case generation that reflects diverse user behaviors.

CN114490408BActive Publication Date: 2025-07-15AGRICULTURAL BANK OF CHINA
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210125236.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-10
Publication Date
2025-07-15
Estimated Expiration
2042-02-10

AI Technical Summary

Technical Problem

In software testing, it is difficult to ensure the compatibility of test case design quality and actual business scenarios, especially in complex multi-business processes, and it is impossible to consider the impact of user behaviors of different users on test cases from multiple aspects.

Method used

By obtaining the operational behavior data information of users when handling online functional services, determining the business processing path, and generating test cases based on these paths, including building a business processing tree and determining branch weights, generating regression processes and exploring process test cases.

Benefits of technology

It realizes a software system that provides more comprehensive test cases during testing, can consider the user behavior impact of different users from many aspects, improves the accuracy and breadth of test cases, and adapts to complex business processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490408B_ABST
    Figure CN114490408B_ABST
Patent Text Reader

Abstract

The present invention discloses a test case generation method, device, equipment, storage medium and product. The method includes: obtaining operation behavior data information when a set number of users handle online function services; determining at least one service handling path corresponding to the online function service according to each piece of the operation behavior data information; and generating test cases for testing the online function service according to each of the service handling paths. Through the technical solution of the present invention, more comprehensive test cases for online function services are provided during testing, and the influence of user behaviors of different users on test cases can be considered from multiple aspects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of computer testing, and in particular, to a test case generation method, apparatus, device, storage medium, and product. Background Art

[0002] Before the functions of a customer-oriented software system are put into production, software testing is required. The core of software testing is test design, mainly referring to test case design. The purpose of software testing is to discover more defects within a limited time. The main test design methods include equivalence class partitioning, boundary value analysis, error guessing, cause-and-effect graph, and scenario method, etc.

[0003] Currently, most enterprises use the scenario method for test design. The scenario method is to test the combined use of multiple functions by simulating the scenarios when users operate the software.

[0004] However, the scenario method depends on testers' in-depth understanding of software business and requirements. In the case where there are more and more single software functions and the business processes are becoming more and more complex, it is difficult to ensure the fit between the quality of test case design and the actual business scenarios. Summary of the Invention

[0005] The embodiments of the present invention provide a test case generation method, apparatus, device, storage medium, and product, which achieve the accuracy and comprehensiveness of test cases during online functional business testing.

[0006] In a first aspect, the embodiments of the present invention provide a test case generation method, including:

[0007] Obtaining operation behavior data information of a set number of users when handling online functional business;

[0008] Determining at least one business handling path corresponding to the online functional business according to each of the operation behavior data information;

[0009] Generating test cases for testing the online functional business according to each of the business handling paths.

[0010] In a second aspect, the embodiments of the present invention further provide a test case generation apparatus, which includes:

[0011] An obtaining module, configured to obtain operation behavior data information of a set number of users when handling online functional business;

[0012] A determining module, configured to determine at least one business handling path corresponding to the online functional business according to each of the operation behavior data information;

[0013] A generating module, configured to generate test cases for testing the online functional business according to each of the business handling paths.

[0014] In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the test case generation method according to any embodiment of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the test case generation method according to any embodiment of the present invention is implemented.

[0019] In a fifth aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the test case generation method according to any embodiment of the present invention is implemented.

[0020] The technical solution of the embodiment of the present invention solves the problem that the test system cannot consider the influence of the user behaviors of different users on the test cases from multiple aspects and selectively screen out the service handling paths of the online function service by obtaining the operation behavior data information of a set number of users when handling the online function service, determining at least one service handling path corresponding to the online function service according to each operation behavior data information, and generating test cases for testing the online function service according to each service handling path, realizes providing more comprehensive test cases for the online function service during testing, and can consider the influence of the user behaviors of different users on the test cases from multiple aspects.

[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0023] Figure 1 It is a flowchart of a test case generation method provided in the first embodiment of the present invention;

[0024] Figure 2 It is a flowchart of a test case generation method provided in the second embodiment of the present invention;

[0025] Figure 3 It is a flowchart of a method for constructing a business handling tree provided in the second embodiment of the present invention;

[0026] Figure 4 It is a schematic diagram of a business handling tree provided in the second embodiment of the present invention;

[0027] Figure 5 It is a schematic structural diagram of a test case generation device provided in the third embodiment of the present invention;

[0028] Figure 6 It is a schematic structural diagram of an electronic device provided in the fourth embodiment of the present invention. Detailed implementation manners

[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the sake of description, only parts related to the present invention are shown in the accompanying drawings rather than all the structures.

[0030] Embodiment 1

[0031] Figure 1 It is a flowchart of a test case generation method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of generating required test cases when testing the functional application of a customer-oriented software system. This method can be executed by the test case generation device in the embodiments of the present invention. The device can be implemented in a software and / or hardware manner and is generally integrated in a computer device. Among them, the computer device can be a mobile terminal or a server. The customer-oriented software system can be regarded as a type of software system with the customer as the operation subject. The customer can perform online business handling by operating the customer-oriented software system, and the customer-oriented software system can record the customer's operation behavior and provide business services.

[0032] It should be noted that there is a scheme for testing a software system in the prior art, which generates test cases by obtaining the behavior of users. However, it does not analyze all possible transaction links of the software system. Since it only focuses on the relevant operations of a single user, it cannot consider the impact of the user behaviors of different users from multiple aspects, nor can it specifically screen out the business handling paths of online functional services.

[0033] To solve the above problems, an embodiment of the present invention provides a test case generation method to consider the accuracy and comprehensiveness of test cases.

[0034] As Figure 1 shown, the method specifically includes the following steps:

[0035] S110. Obtain the operation behavior data information when a set number of users handle online function services.

[0036] Among them, the online function service can be regarded as a function service in a software system facing customers. For a software system facing customers for banking services, it can integrate online function services such as deposits, withdrawals, transfers, and inquiries for users to handle banking services online.

[0037] For users, they can handle corresponding online function services by installing application software clients on the corresponding terminals. In this embodiment, the operation behavior data information when users handle online function services can be collected through the method of embedding points. And in order to better generate test cases for online function services, this embodiment needs to collect the operation behavior data information of a certain number of users. Among them, the operation behavior data information of users can include: user identification, access time, access page, access interface, transaction return status and other data information. At the same time, the operation behavior data information obtained in this embodiment can be associated with relevant users and stored in the execution device.

[0038] S120. Determine at least one business handling path corresponding to the online function service according to each operation behavior data information.

[0039] Among them, the business handling path can be understood as the business path passed by users when handling online function services. In this embodiment, after obtaining the operation behavior data information of multiple users, these data information are sorted out. Different users can be distinguished according to the user identification, and different users correspond to different business handling paths. Then, according to the access time corresponding to the user access page, the business handling situation of the user on the time line can be obtained. Specifically, at a certain moment, the user stays on a certain access page, and the user access pages are sorted by the time line to obtain the complete business path of the user when handling online function services. Although one user corresponds to one business handling path, the same path can correspond to multiple different users. Therefore, it is necessary to summarize all the business handling paths corresponding to users and remove duplicate paths to obtain at least one business handling path corresponding to the online function service.

[0040] For users, they only need to operate on the application software client according to their own business handling needs. When switching from one business to another, the business has changed, and the client will record the user's current user identification, access time, accessed page, access interface, transaction return status, etc. The operation behavior data information of each user is stored in the execution device. By searching for the users who handle the online functional business in the operation behavior data information, all users who handle the online functional business can be obtained, and then the business handling path of the user is called, and duplicate paths are removed, so as to obtain at least one business handling path corresponding to the online functional business.

[0041] S130. Generate test cases for testing the online functional business according to each business handling path.

[0042] Among them, the test case for testing the online functional business can be regarded as a business handling path information passing through the online functional business. The operation behavior data information of each user who handles the online functional business can be used as a test case for testing the online functional business. However, there can be multiple business handling paths corresponding to the online functional business, and the same business handling path can correspond to multiple different users. Therefore, it is necessary to select the operation behavior data information of one of the users from all users who meet the business handling path as the test case. As mentioned above, the application software client can obtain all users who handle the online functional business by searching for the users who handle the online functional business in the operation behavior data information, and then generate at least one business handling path corresponding to the online functional business. Then, similarly, the application software client can also do the opposite, through a certain business handling path, find all users under this path, and obtain the operation behavior data information of one of the users as the test case for testing the offline functional business of this business handling path.

[0043] The technical solution of this embodiment obtains the operation behavior data information when a set number of users handle the online functional business, then determines at least one business handling path corresponding to the online functional business according to each operation behavior data information, and finally generates test cases for testing the online functional business according to each business handling path. It can generate multiple handling paths, and corresponding test cases can be generated for each handling path, realizing providing more comprehensive test cases for the online functional business during testing, and being able to consider the influence of different users' behavior on the test cases from multiple aspects.

[0044] Embodiment 2

[0045] Figure 2 It is a schematic flowchart of a test case generation method provided by the second embodiment of the present invention. This embodiment is further optimized based on Embodiment 1, and this method can be executed by a test case generation device. AsFigure 2 As shown in Figure 2 , the test case generation method provided in this embodiment specifically includes the following steps:

[0046] S210, Obtain the operation behavior data information when a set number of users handle online function services.

[0047] Exemplarily, select a certain number of users, and then monitor the operations when a certain number of users handle a service, and the operation behavior data information when a certain number of users handle a service can be obtained.

[0048] S220, Search the handling point association table to obtain the set of business handling points corresponding to the online function service handling.

[0049] Optionally, the set of business handling points includes: the starting point of the online function service handling, the key handling point, the necessary handling point, the non-necessary handling point, and the ending point of the handling.

[0050] Among them, the handling point association table can be understood as the integration of the business handling points of all function services in the software system. When designing the software system, developers predefined multiple function services, preprocessed these function services, and collected and integrated their related information to form the handling point association table. In the process of collecting and integrating the related information, the pages in the actual transaction link of the user except the key handling point and the ending point of the handling are defaulted to non-necessary access points, and the necessary pages in the actual transaction link of the user are set as necessary handling points. There may be several necessary access points that are all necessary pages in the transaction. The key handling point also belongs to the necessary handling point, but the key handling point must be unique in this transaction. To ensure the uniqueness of the key handling point, it is necessary to ensure that it is the farthest step from the completion page among all the necessary access points in the transaction path when at the key handling point, that is, the necessary point closest to the entrance of the transaction path. It can be understood that the first necessary page in the transaction process is used as the key handling point, and the ending point of the handling can also be set in advance by the transaction completion page.

[0051] The handling point association table can include two columns of information. One column is the function service name, and the other column is the set of business handling points corresponding to the function service name. In this embodiment, by querying the handling point association table, the set of business handling points corresponding to the online function service handling can be obtained. In addition, the software system can screen and label each function service. Through screening, the handling points associated with the function service can be obtained, and through labeling, the attributes of each handling point can be obtained to distinguish whether different handling points belong to the starting point of the function service handling, the key handling point, the necessary handling point, the non-necessary handling point, or the ending point of the handling.

[0052] S230, According to each operation behavior data information, combine with the set of business handling points to construct a business handling tree for the online function service.

[0053] Among them, the service handling tree of the online function service can be understood as constructing the service handling points of the online function service in the form of a branch tree. The branch tree consists of nodes and branches. Each node corresponds to a service handling point of the online function service. The previous service handling point of a service handling point serves as a branch of the node. If a service handling point does not have a previous service handling point, the corresponding node has no branch.

[0054] In this embodiment, after obtaining the operation behavior data information and the service handling point set of the online function service, the previous service handling point of each service handling point is obtained, and the service handling tree is constructed.

[0055] Exemplarily, Figure 3 It is a flowchart of a method for constructing a service handling tree provided in the second embodiment of the present invention. According to each operation behavior data information, combined with the service handling point set, construct the service handling tree of the online function service, including:

[0056] S2301, select the handling end point in the service handling point set as the root node, and use the root node as the current node.

[0057] Among them, the root node is unique, that is, the handling end point in the service handling point set, while the current node is not fixed. It can be understood as the node corresponding to the current service handling point, and the previous service handling point of the current service handling point is used as the branch of the current node. In the first step of constructing the service handling tree, the root node needs to be used as the current node, and all previous service handling points of the handling end point need to be found.

[0058] S2302, traverse each operation behavior data information, determine each candidate handling node that has a pre - existing association with the current node, and determine the branch weight of the branch formed by connecting the current node and each candidate handling node.

[0059] Among them, each candidate handling node that has a pre - existing association with the current node can be understood as the branch node of the current node, or it can also be considered as the node corresponding to the previous service handling point of the current service handling point. Each candidate handling node serves as a branch of the current node. The current node can have one or more branches, or it can have no branches. The branch weight refers to the percentage of the number of users corresponding to each candidate handling node in the number of users of the current node.

[0060] In this embodiment, after traversing each operation behavior data information, each candidate handling node that has a pre - existing association with the current node is determined, and at the same time, the branch weight of each candidate handling node is determined.

[0061] Further, traverse each operation behavior data information, determine each candidate processing node that has a pre - associated relationship with the current node, and determine the branch weights of the branches formed by connecting the current node with each candidate processing node, including:

[0062] Traverse each operation behavior data information, and determine the processing node corresponding to the previous jump when each user processes the business and jumps to the current node as the candidate processing node;

[0063] Count the number of users corresponding to each candidate processing node, and use the ratio of each user number to the set number as the branch weight of the branch formed by connecting the corresponding candidate processing node with the current node.

[0064] S2303, Determine whether new candidate processing nodes are determined. If so, execute S2304; if not, execute S2305.

[0065] It should be noted that after determining each candidate processing node of the current node, it is necessary to determine whether new candidate processing nodes are determined. If there are new candidate processing nodes, each candidate processing node is used as a new current node respectively; if there are no new candidate processing nodes, based on each node and branch, a service processing tree of the online functional service is formed.

[0066] S2304, Use each candidate processing node as a new current node respectively, and return to execute S2302.

[0067] When it is determined that there are new candidate processing nodes, each candidate processing node is used as a new current node respectively. It is necessary to further determine whether there are candidate processing nodes for the new current node, and then return to execute step S2302 until there are no new candidate processing nodes, at which point the loop ends and jumps to step S2305.

[0068] S2305, Based on each node and branch, form a service processing tree of the online functional service.

[0069] When it is determined that there are no new candidate processing nodes, based on each node and branch, form a service processing tree of the online functional service.

[0070] It can be understood that after constructing the set of business handling points, in this embodiment, the end handling point in the set of business handling points is used as the root node, and the root node is used as the current node for backtracking. The operation behavior data information in the memory is traversed to find all the previous nodes of the end handling point, and all the previous nodes are used as the branch nodes of the root node. Then, the ratio of the number of users of each branch node in the current node is calculated, and the percentage of the number of users of each branch node to the total number of users in the current node is used as the branch weight of each branch node. Then, each node in the branch node is respectively used as a new current node, and the corresponding previous nodes of the current node are found. Each previous node is used as a new branch node, and the respective percentages of the new branch nodes in the new current node are calculated as the weights of the new branch nodes. Repeat the operation until the determined candidate handling nodes are empty, generate the business handling tree of the online functional service, and obtain the branch ratios of all branch nodes to their previous nodes respectively.

[0071] Figure 4 FIG. 4 is a schematic diagram of a business handling tree provided in Embodiment 2 of the present invention. Taking Figure 4 the provided business handling tree diagram as an example, the previous nodes of the end handling node E are the non-essential handling point N1 and the non-essential handling point N2. The sum of the number of users of the non-essential handling point N1 and N2 is the number of users of the end handling node E. Among them, the branch weight occupied by the non-essential handling point N1 is 85%, and the branch weight occupied by the non-essential handling point N2 is 15%.

[0072] S240. According to the branch weights of each branch on the business handling tree, determine the business handling critical path and the business handling exploration path.

[0073] Exemplarily, according to the branch weights of each branch on the business handling tree, determining the business handling critical path and the business handling exploration path includes:

[0074] According to the branch weights of each branch on the business handling tree and in combination with the label determination conditions, determine the branch labels of each branch;

[0075] Traverse the business handling tree to find that each branch with a branch label of a critical label and passing through a critical handling point constitutes at least one business handling critical path;

[0076] Traverse the business handling tree to find that each branch with a branch label of an exploration label and passing through a critical handling point constitutes at least one business handling exploration path.

[0077] Among them, the key path of business processing refers to the path of business processing that passes through key processing points and the labels of all nodes on the path are key. The processing exploration path refers to the path of business processing that passes through key processing points and there is a label of exploration on the path. Starting from the root node, the branch nodes with a branch weight exceeding 80% in each branch are marked as key. If there are no branches exceeding 80% in a certain layer, the highest and the second-highest branch nodes are selected according to the descending order of the proportion and both are marked as key. Starting from the root node, the branch nodes with a branch weight not exceeding 20% in each branch are marked as exploration. If all branches in a certain layer exceed 20%, the branch node with the lowest proportion is selected and marked as exploration. There can be some cases where the labels of some nodes are both key labels and exploration labels.

[0078] It can be understood that after the business processing tree is constructed in this embodiment, according to the branch weights of each branch on the business processing tree, each branch node is labeled. The path of business processing that passes through key processing points and the labels of all nodes on the path are key is used as the key path of business processing, and the path that passes through key processing points and there is a label of exploration on the path is used as the exploration path of business processing.

[0079] Take Figure 4 Taking the provided business processing tree diagram as an example (some labels are not shown), the branch node of the non-essential processing point N1, the non-essential processing point N3 and the key processing point K. The branch weight of the non-essential processing point N3 is 40%, and the branch weight of the key processing point K is 60%. In the current branch layer, although there are no branches with a weight exceeding 80% and no branches with a weight not exceeding 20%, the highest and the second-highest branch nodes are selected according to the descending order of the proportion, and the non-essential processing point N3 and the key processing point K are marked as key. Then, the branch node with the lowest proportion is selected and marked, and the non-essential processing point N3 is marked as exploration.

[0080] S250, generate regression process test cases for online functional business testing according to each key path of business processing, and / or generate exploration process test cases for online functional business testing according to each exploration path of business processing.

[0081] Among them, after determining the key path of business processing and the exploration path of business processing in this embodiment, one path in the key path is obtained as the regression process test case for online functional business testing, and one path in the exploration path is obtained as the exploration process test case for online functional business testing.

[0082] Take Figure 4Taking the provided business handling tree diagram as an example, the handling starting points S1 / S3 → key handling points K → non-essential handling points N1 → handling end point E are all regression process test cases, while the handling starting point S2 → key handling point K → non-essential handling point N1 → handling end point E is an exploratory process test case. The test cases under the remaining paths are used as discarded test cases.

[0083] In an embodiment of the present invention, by obtaining the operation behavior data information of a set number of users when handling online function services, then determining at least one business handling path corresponding to the online function service according to each operation behavior data information, and finally generating test cases for testing the online function service according to each business handling path. This application makes a differential treatment for the generation of user behavior test cases, clearly differentiates the necessity degree of each operation point, and provides detailed steps for screening link points. The present invention takes the effective paths collected by user behavior as the analysis basis. After the transformation of the transaction path in the software system version update, this method can still be used to generate a new set of key paths, and there is production data as support, which is more credible than empiricism. The present invention takes the effective paths collected by user behavior as the analysis basis, and can effectively exclude the noise data generated by user misoperations under a large amount of data. By sorting out the transaction paths to manually cover the positive and negative regression cases and exploratory cases, the regression cases generated by the key paths are still the main ones in normal testing, and the exploratory cases can be selectively covered according to the situation. The significance of the exploratory paths and cases mainly has two points: one is to help the test team comprehensively cover the test scenarios. It helps the testers to understand the transaction paths of a small number of customers, which is helpful for the design of test cases in the future. At the same time, the exploratory paths and cases can also help the business personnel better understand the transaction paths of all customers, and provide certain reference and help in the product manager's optimization of transaction requirements.

[0084] Embodiment III

[0085] Figure 5 It is a structural schematic diagram of a test case generation device provided by an embodiment of the present invention. This embodiment is applicable to the situation of generating required test cases when testing the functional applications of a software system facing customers. The device can be implemented in a software and / or hardware manner, and the device can be integrated in any device that provides the function of generating test cases, such as Figure 5 As shown, the test case generation device specifically includes:

[0086] An acquisition module 310, configured to acquire the operation behavior data information of a set number of users when handling online function services;

[0087] A determination module 320, configured to determine at least one business handling path corresponding to the online function service according to each operation behavior data information;

[0088] A generation module 330, configured to generate test cases for online functional service testing according to each service handling path.

[0089] Optionally, the determination module 320 may specifically include:

[0090] An acquisition unit, configured to search for a handling point association table and acquire a set of service handling points corresponding to online functional service handling;

[0091] A construction unit, configured to construct a service handling tree of the online functional service according to each operation behavior data information in combination with the set of service handling points;

[0092] A determination unit, configured to determine a service handling critical path and a service handling exploration path according to the branch weights of each branch on the service handling tree.

[0093] Optionally, the construction unit may specifically include:

[0094] A subunit, configured to select an end handling point in the set of service handling points as the root node and use the root node as the current node;

[0095] A determination subunit, configured to traverse each operation behavior data information, determine each candidate handling node that has a pre - associated relationship with the current node, and determine the branch weight of the branch formed by connecting the current node and each candidate handling node;

[0096] Use each candidate handling node as a new current node respectively, and return to continue executing the operation of determining the candidate handling node and the branch weight until the determined candidate handling node is empty to generate a service handling tree of the online functional service.

[0097] Optionally, the determination subunit may specifically be used for:

[0098] Traverse each operation behavior data information, determine the handling node corresponding to the previous jump when each user handles the service and jumps to the current node as the candidate handling node;

[0099] Count the number of users corresponding to each candidate handling node, and use the ratio of each user number to the set number as the branch weight of the branch formed by connecting the corresponding candidate handling node and the current node.

[0100] Optionally, the determination unit may also specifically be used for:

[0101] According to the branch weights of each branch on the service handling tree, in combination with the label determination condition, determine the branch label of each branch;

[0102] Traverse the service handling tree, and find that each branch with a branch label of a key label and passing through a key handling point constitutes at least one service handling critical path;

[0103] Traverse the service handling tree, and find that each branch with a branch label being the exploration label and passing through the key handling points constitutes at least one service handling exploration path.

[0104] Optionally, the generation module 330 is specifically configured to:

[0105] Generate regression process test cases for online function service testing according to each service handling key path; and / or,

[0106] Generate exploration process test cases for online function service testing according to each service handling exploration path.

[0107] The above product can execute the method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0108] In the embodiment of the present invention, the operation behavior data information of a set number of users handling online function services is obtained. According to each piece of the operation behavior data information, at least one service handling path corresponding to the online function service is determined. According to each of the service handling paths, test cases for testing the online function service are generated, which realizes providing more comprehensive test cases for the online function service during testing, and can consider the influence of the user behaviors of different users on the test cases from multiple aspects.

[0109] Embodiment 4

[0110] Figure 6 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0111] Such as Figure 6As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0112] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0113] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, for example, implementing the test case generation method provided in the above embodiments of the present invention:

[0114] Obtain the operation behavior data information of a set number of users when handling online function services;

[0115] Determine at least one service handling path corresponding to the online function service according to each operation behavior data information;

[0116] Generate test cases for testing the online function service according to each service handling path.

[0117] In some embodiments, the test case generation method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the test case generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the test case generation method by any other suitable means (e.g., by means of firmware).

[0118] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0119] The computer program for implementing the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs may be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine, or entirely on the remote machine or server.

[0120] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, 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.

[0121] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0122] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0123] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0124] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0125] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A test case generation method, characterized in that, Including: Obtaining the operation behavior data information of a set number of users when handling online function services; Determining at least one service handling path corresponding to the online function service according to each of the operation behavior data information; Generating test cases for testing the online function service according to each of the service handling paths; Among them, the determining of at least one service handling path corresponding to the online function service according to each of the operation behavior data information includes: Searching the handling point association table to obtain the set of service handling points corresponding to the handling of the online function service; the set of service handling points includes the starting point, key handling points, necessary handling points, non-necessary handling points, and ending point of handling of the online function service; Constructing a service handling tree of the online function service according to each of the operation behavior data information in combination with the set of service handling points; the root node of the service handling tree is the ending point of handling; Determining the service handling key path and the service handling exploration path according to the branch weights of each branch on the service handling tree; the service handling key path is the path where the service handling path passes through the key handling point and the labels of all nodes on the path are key; the service handling exploration path is the path where the service handling path passes through the key handling point and there is a path with the label of exploration on the path; the label is determined according to the branch weights of each branch on the service handling tree in combination with the label determination condition; Among them, the determination method of the branch weight is: traversing each of the operation behavior data information, determining the handling node corresponding to the previous jump when each user handles the service to the current node as the candidate handling node; counting the number of users corresponding to each candidate handling node, and taking the ratio of each of the number of users to the set number as the branch weight of the branch formed by connecting the corresponding candidate handling node and the current node.

2. The method according to claim 1, wherein The key handling point is the first necessary handling point, and the starting point of handling is the non-necessary handling point connected to the key handling point.

3. The method according to claim 1, wherein The constructing of the service handling tree of the online function service according to each of the operation behavior data information in combination with the set of service handling points includes: Selecting the ending point of handling in the set of service handling points as the root node, and taking the root node as the current node; Traversing each of the operation behavior data information, determining each candidate handling node having a pre - associated relationship with the current node, and determining the branch weight of the branch formed by connecting the current node and each of the candidate handling nodes; Taking each of the candidate handling nodes as the new current node respectively, and returning to continue to execute the operation of determining the candidate handling node and the branch weight until the determined candidate handling node is empty to generate the service handling tree of the online function service.

4. The method according to claim 1, wherein The determining of the service handling key path and the service handling exploration path according to the branch weights of each branch on the service handling tree includes: Determining the branch label of each branch according to the branch weights of each branch on the service handling tree in combination with the label determination condition; Traversing the service handling tree, and finding that each branch with the branch label of the key label and passing through the key handling point constitutes at least one service handling key path; Traverse the service handling tree to find each branch whose branch label is the exploration label and passes through the key handling points, and the branches form at least one service handling exploration path.

5. The method according to claim 1, wherein Generating test cases for the online function service test according to each of the service handling paths, including: Generating regression process test cases for the online function service test according to each of the service handling key paths; and / or, Generating exploration process test cases for the online function service test according to each of the service handling exploration paths.

6. A test case generation device, characterized in that Including: An acquisition module, configured to acquire operation behavior data information when a set number of users handle the online function service; A determination module, configured to determine at least one service handling path corresponding to the online function service according to each of the operation behavior data information; A generation module, configured to generate test cases for the online function service test according to each of the service handling paths; The determination module includes an acquisition unit, a construction unit, and a determination unit: The acquisition unit is configured to search the handling point association table to acquire a set of service handling points corresponding to the online function service handling; the set of service handling points includes the starting point, key handling points, necessary handling points, non-necessary handling points, and ending point of the online function service handling; The construction unit is configured to construct a service handling tree of the online function service according to each operation behavior data information and in combination with the set of service handling points; The root node of the service handling tree is the ending point; The determination unit is configured to determine the service handling key path and the service handling exploration path according to the branch weights of each branch on the service handling tree; the service handling key path is a path that passes through the key handling points and the labels of all nodes on the path are critical; the service handling exploration path is a path that passes through the key handling points and there is a path with a label of exploration on the path; the label is determined according to the branch weights of each branch on the service handling tree and in combination with the label determination condition; Among them, the determination method of the branch weight is: traverse each of the operation behavior data information, determine the handling node corresponding to the previous jump when each user handles the service and jumps to the current node as the candidate handling node; count the number of users corresponding to each candidate handling node, and use the ratio of each number of users to the set number as the branch weight of the branch formed by connecting the corresponding candidate handling node and the current node.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test case generation method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the processor to implement the test case generation method according to any one of claims 1-5 when executed.

9. A computer program product, characterized in that, The computer program product includes a computer program which, when executed by a processor, implements the test case generation method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Application software testing method, device and equipment

    CN105893253A

  • Test case generation method and device and storage medium

    CN112631945A

  • UI automatic script generation method and device, computer equipment and storage medium

    CN113419950A