A data processing method, device, equipment and medium

By constructing a directed graph and cascading independent business rule factors, the preconditions for software test cases are generated, which solves the problem of excessive number of test cases, reduces maintenance costs, and improves testing efficiency.

CN114721930BActive Publication Date: 2024-10-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110014538.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-06
Publication Date
2024-10-15
Estimated Expiration
2041-01-06

AI Technical Summary

Technical Problem

In the existing technology, in software testing, when generating test cases, all preconditions need to be expanded, resulting in an excessive number of test cases, which increases maintenance costs.

Method used

By constructing a directed graph, explore target use case paths and cascade and expand independent business rule factors to generate preconditions for target test cases, control the number of test cases, and reduce maintenance costs.

Benefits of technology

It effectively controls the number of preconditions for test cases, reduces the number of generated test cases, reduces maintenance costs, and increases the ratio of test output to input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721930B_ABST
    Figure CN114721930B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method, device, equipment and medium. The method includes: obtaining demand data; constructing a directed graph according to the demand data; exploring and obtaining the target use case path from the directed graph, the target use case path refers to the path through the target key business node in the directed graph; obtaining the business rules used by the target key business node, the business rules include multiple rule factors, and the multiple rule factors are independent of each other; cascading and expanding the multiple rule factors to obtain the preconditions of the target test case. The use of the embodiment of the present application can effectively control the number of preconditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, device and computer-readable storage medium. Background Art

[0002] Software testing is an essential step before the release of any software product. How to write test cases for software testing is particularly important.

[0003] In the prior art, it is necessary to fully expand the rules of the business to be tested, obtain all the preconditions of the test case, and generate a corresponding test case for each precondition, so that the generated test cases cover all business situations and enrich the test functions. However, it is found in practice that when the number of generated test cases is large, the maintenance cost of the test cases will increase. Summary of the invention

[0004] The embodiments of the present application provide a data processing method, apparatus, device and medium, which can effectively control the number of preconditions.

[0005] On the one hand, an embodiment of the present application provides a data processing method, the method comprising:

[0006] Obtain demand data, which includes the business path of the business being tested and the business operation steps under the business path;

[0007] Construct a directed graph based on the demand data. The directed graph includes business nodes and edges. Business nodes are used to represent business operation steps in the business under test, and edges are used to represent the jump logic between business operation steps in the business under test.

[0008] A target use case path is obtained from the directed graph. The target use case path refers to a path passing through a target key business node in the directed graph. The target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case.

[0009] Obtain the business rules used by the target key business node, where the business rules include multiple rule factors, and the multiple rule factors are independent of each other;

[0010] Multiple rule factors are cascaded and expanded to obtain the preconditions of the target test case.

[0011] On the other hand, an embodiment of the present application provides a data processing device, the device comprising:

[0012] An acquisition unit, used to acquire demand data, the demand data including a business path of the business under test and business operation steps under the business path;

[0013] A processing unit is used to construct a directed graph according to the demand data, wherein the directed graph includes business nodes and edges, wherein the business nodes are used to represent business operation steps in the business under test, and the edges are used to represent the jump logic between business operation steps in the business under test; and, to explore and obtain a target use case path from the directed graph, wherein the target use case path refers to a path passing through a target key business node in the directed graph; the target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case;

[0014] The acquisition unit is further used to acquire the business rules used by the target key business node, where the business rules include multiple rule factors, and the multiple rule factors are independent of each other;

[0015] The processing unit is also used to perform cascade expansion processing on multiple rule factors to obtain the preconditions of the target test case.

[0016] In one implementation, the business rules used by the target key business node include M rule factors, where M is a positive integer;

[0017] The processing unit is specifically used for:

[0018] Select the i-th rule factor from the M rule factors;

[0019] Keep the remaining rule factors except the selected i-th rule factor from the M rule factors unexpanded, and select the i-th rule factor from the M rule factors for expansion processing to obtain the x of the i-th rule factor i Types of rule items;

[0020] Repeat the above steps until all M rule factors are expanded and processed;

[0021] Generate P preconditions of the target test case according to the rule items obtained by expanding and processing the M rule factors;

[0022] Among them, suppose the i-th rule factor among the M rule factors includes x i The value of P is

[0023] In one embodiment, the processing unit is further configured to:

[0024] Extract target use case steps from target use case paths;

[0025] Based on the target use case steps and preconditions, a target test case corresponding to the target use case path is generated.

[0026] In one embodiment, the processing unit is specifically configured to:

[0027] Extract one or more groups of combined steps from the business operation sequence represented by the target use case path;

[0028] Determine a sequence formed by one or more groups of combined steps as the target use case steps;

[0029] Among them, any group of combined steps is used to represent an interface interaction behavior between a user in the tested business and the tested business. Any group of combined steps includes a first business operation step and a second business operation step. The first business operation step refers to a step in which the tested business provides an interaction interface to the user, and the second business operation step refers to a step in which the user generates an interaction behavior in the interaction interface, and the tested business perceives and feeds back the interaction behavior.

[0030] In one implementation, the tested service includes N service operation steps; the directed graph includes N service nodes; and the processing unit is specifically configured to:

[0031] Determine the i-th business operation step of the tested business as the i-th business node in the directed graph, and determine the j-th business operation step of the tested business as the j-th business node in the directed graph; and,

[0032] Determine the jump logic between the i-th business operation step and the j-th business operation step as the edge between the i-th business node and the j-th business node in the directed graph;

[0033] Construct a directed graph based on the determined business nodes and edges;

[0034] Wherein, N is an integer greater than 1, i and j are both positive integers, and i≤N, j≤N.

[0035] In one embodiment, the processing unit is further configured to:

[0036] Traverse the business nodes in the directed graph to obtain a use case path set, the use case path set contains at least one use case path, and each use case path is used to represent a business operation sequence of the tested business; the target use case path is a path in the use case path set that passes through the target key business node in the directed graph;

[0037] Among them, the types of use case paths in the use case path set include main use case paths or key use case paths, and the type of the target use case path is a key use case path.

[0038] In one implementation, the service path includes a basic service path, and the basic service path includes N service operation steps; M is a positive integer; the directed graph also includes a start node and an end node; the processing unit is further used to:

[0039] Starting from the start node, in accordance with the execution order of the N business operation steps under the basic business path, the N business nodes in the directed graph are traversed in sequence until the end node stops; the N business nodes correspond one to one with the N business operation steps under the basic business path;

[0040] The traversal path passing through the starting node, N business nodes and the ending node is determined as the main use case path.

[0041] In one implementation, the use case type of the target use case path is a critical use case path; the directed graph further includes a start node and an end node; and the processing unit is specifically configured to:

[0042] Determine the target key business nodes in the directed graph;

[0043] Using the shortest path graph traversal algorithm to traverse the directed graph to find a first path between the start node and the target key business node; and traversing the directed graph to find a second path between the target key business node and the end node;

[0044] A path formed by concatenating the first path and the second path is determined as the target use case path.

[0045] In one embodiment, the processing unit is specifically configured to:

[0046] If the type of the target key business node is the first type, then the main use case path is explored in the directed graph, and a second path is explored in the directed graph along the direction of the end node, returning from the target key business node to the main use case path, and reaching the end node along the main use case path; or,

[0047] If the type of the target key business node is the first type, a shortest path graph traversal algorithm is used to traverse the directed graph to find a second path between the target key business node and the end node; or,

[0048] If the type of the target key business node is the second type, determining a path formed by connecting the target key business node and the end node as the second path;

[0049] Among them, if the target key business node is used to represent the business operation steps of providing an interactive interface for the user in the business under test by the business under test, then the type of the target key business node is the first type; if the target key business node is used to represent the business operation steps of the user generating interactive behavior in the interactive interface and the business under test perceiving and feeding back the interactive behavior, then the type of the target key business node is the second type.

[0050] In one embodiment, the use case path set includes a first use case path set and a second use case path set, each of the first use case path set and the second use case path set includes one or more use case paths, wherein the use case paths in the first use case path set are used to generate test cases for verifying business operation behaviors, and the use case paths in the second use case path set are used to generate test cases for verifying business rules; the processing unit is further used to:

[0051] The first use case path set and the second use case path set are optimized.

[0052] In one embodiment, the processing unit is specifically configured to:

[0053] If the first use case path set and the second use case path set include the same use case path, the same use case path is deleted from the first use case path set.

[0054] In one embodiment, the processing unit is specifically configured to:

[0055] Obtain a requirement description document, where the requirement description document is used to describe the business operation process of the business under test, and the requirement description document is a document in the first format;

[0056] The requirement description document is parsed to obtain requirement data, where the requirement data is data in the second format.

[0057] On the other hand, an embodiment of the present application provides a data processing device, the device comprising:

[0058] a processor adapted to execute a computer program;

[0059] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data processing method described above is implemented.

[0060] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method as described above.

[0061] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned data processing method.

[0062] In the embodiment of the present application, the business rules used by the target key business node can be obtained, and the mutually independent rule factors contained in the business rules are cascaded and expanded to obtain the preconditions of the target test case. Compared with expanding all the business rules used by the target key business node, the number of preconditions of the target test case can be better controlled, so that the number of target test cases finally generated can be controlled, and the maintenance cost of the target test case can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0064] Figure 1 A schematic diagram showing a system use case provided by an exemplary embodiment of the present application is shown;

[0065] Figure 2a A schematic diagram of the architecture of a data processing system provided by an exemplary embodiment of the present application is shown;

[0066] Figure 2b A schematic diagram of a data processing architecture provided by an exemplary embodiment of the present application is shown;

[0067] Figure 2c A timing diagram of data processing of a demand management module provided by an exemplary embodiment of the present application is shown;

[0068] Figure 3a A schematic diagram of an interface for uploading a requirement description document provided by an exemplary embodiment of the present application is shown;

[0069] Figure 3b A schematic diagram showing a processing flow of viewing a requirement description document provided by an exemplary embodiment of the present application;

[0070] Figure 3c A schematic diagram of an interface for checking a business path step provided by an exemplary embodiment of the present application is shown;

[0071] Figure 3d A schematic diagram of an interface for checking supplementary constraints provided by an exemplary embodiment of the present application is shown;

[0072] Figure 3e A schematic diagram of an interface for modifying a requirement description document provided by an exemplary embodiment of the present application is shown;

[0073] Figure 4 A schematic diagram of a test case provided by an exemplary embodiment of the present application is shown;

[0074] Figure 5 A schematic diagram of a data processing method provided by an exemplary embodiment of the present application is shown;

[0075] Figure 6a A schematic diagram of a directed graph provided by an exemplary embodiment of the present application is shown;

[0076] Figure 6b A schematic diagram of a directed graph provided by an exemplary embodiment of the present application is shown;

[0077] Figure 7 A flowchart of determining a use case path set provided by an exemplary embodiment of the present application is shown;

[0078] Figure 8 A schematic diagram of a business rule table provided by an exemplary embodiment of the present application is shown;

[0079] Fig. 9 A schematic diagram of a reference rule factor provided by an exemplary embodiment of the present application is shown;

[0080] Fig.10 A flow chart of another data processing method provided by an exemplary embodiment of the present application is shown;

[0081] Fig.11 A schematic diagram of the structure of a data processing device provided by an exemplary embodiment of the present application is shown;

[0082] Fig.12 A structural schematic diagram of a data processing device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0083] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. 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 creative work are within the scope of protection of this application.

[0084] The following is an explanation of some terms and concepts involved in this application:

[0085] The embodiments of the present application involve software testing, which is an important part of the software development process. It is an activity process that runs through the entire software development life cycle and verifies and confirms software products (including phased products). Its purpose is to discover various problems existing in software products as soon as possible, such as the inconsistency between software products and user requirements, the inconsistency between the functions of software products and pre-defined functions, etc. By testing software products, problems existing in software products can be discovered in a timely manner, so that developers can optimize software products.

[0086] MBT (Model Based Testing) is a testing method in the field of software testing. The software testing process based on MBT thinking can roughly include the following four steps: ① Obtain the business requirements of the business under test in the business system. The business system here refers to the system that provides various Internet services to users, including but not limited to: payment business system, instant messaging business system, content social business system, etc. The business under test can be the business system itself (for example, a payment business system itself is a payment software product), or it can be any functional business in the business system (for example, an instant messaging business system supports multiple Internet services such as payment, instant messaging, and electronic maps at the same time, and the business under test can be any of these functional businesses). Business requirements can be described by a requirement description document. The requirement description document is often written based on the business requirements of the business under test. The requirement description document is usually a description of the functions of the business under test. ② Analyze the business requirements in the requirement description document to obtain the corresponding test cases. ③ Test the business under test in the business system through test cases.

[0087] Among them, a test case can refer to the description of a test task for a specific software product (for example, a newly developed business system), reflecting the test plan, test method, test technology and test strategy; a test case can include test objectives, test environment, input data, test case steps, expected results, test scripts, etc. In other words, a test case is a set of test inputs, execution conditions and expected results compiled for a specific goal (for example, testing a certain function of a business), which is used to verify whether the tested business in the business system meets the business requirements.

[0088] In the software testing scenario, when generating test cases based on the requirements description document of the business under test, the most important data involved include: basic business path, extended business path, preconditions, postconditions and supplementary constraints. These data are obtained by processing the requirements description document of the business under test, and these data constitute the system use case of the business under test. The relationship diagram of the various parts of the data that constitute the system use case can be seen in Figure 1 , Figure 1 A schematic diagram of a system use case provided by an exemplary embodiment of the present application is shown; Figure 1 As shown in the figure, the system use case mainly includes: executors, stakeholder interests, business paths (including basic business paths and extended business paths), preconditions, postconditions, and supplementary constraints, etc. Among them, the executors include the main executors and the auxiliary executors. For example, in the payment test scenario, the main executor can refer to the user who has registered the relevant payment information, and the auxiliary executor can refer to the bank system used for payment. Stakeholder interests refer to multiple users associated with the business under test. These users may have an interest relationship with the business under test. Analyzing the interest relationship between each user has a guiding role in generating test cases. Preconditions refer to the conditions that trigger the start of the execution of the test case. If the same business path references different preconditions, different test cases can be generated. Postconditions specify the conditions that the execution results of the test case should meet, that is, the postconditions can verify the execution results of the test case. There are multiple business operation steps in the business path, and each business operation step forms a business path according to the business operation process. When the business operation step is understood as a business node, the path is composed of multiple business nodes; each business path can generate a test case. The basic business path under the business path refers to the path formed by connecting the basic business operation steps of the business under test. And, the extended business path under the business path refers to the path formed by connecting the extended business operation steps of the business under test, and the extended business path can provide more test scenarios.

[0089] Based on the above description, it can be seen that in addition to generating test cases corresponding to each business function based on the business path, since the business under test also involves multiple preconditions, when a path contains multiple preconditions, test cases associated with each precondition corresponding to the path can be generated to meet the testing requirements of the business under test.

[0090] But practice found that when all the preconditions of the tested business are expanded to generate test cases, the test output input ratio is high and the practicality is low. Based on this discovery, an embodiment of the present application provides a data processing scheme, which can obtain the business rules used by the target key business node (i.e., the business node passed by the target use case path), and the part of the rule factors that are independent of each other included in the business rules are cascaded and expanded to obtain the preconditions of the target test case. In the above process, only the rule factors that are independent of each other are cascaded and expanded to avoid all the business rules used by the target key business node from being expanded, which can not only maintain the test task requirements, but also control the number of preconditions of the target test case, reduce the number of target test cases, improve the test output input ratio, and reduce the maintenance cost of the test case.

[0091] The data processing scheme for generating test cases described above can be applied to a data processing system. Figure 2a , Figure 2a The schematic diagram of the architecture of a data processing system provided by an exemplary embodiment of the present application is shown, and the data processing system includes a terminal 201 and a server 202. The embodiment of the present application does not limit the number of the terminal 201 and the server 202. Among them, the terminal 201 may refer to a device used to receive a demand description document and display demand data, execution results and other data. The terminal 201 may include but is not limited to: PC (Personal Computer, personal computer), PDA (tablet computer), mobile phone, wearable smart device, etc.; the terminal is often equipped with a display device, and the display device may also be a display, a display screen, a touch screen, etc., and the touch screen may also be a touch screen, a touch panel, etc. The server 202 can provide computing and application service support for the terminal 201. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal 201 and the server 202 may be directly or indirectly connected via wired communication or wireless communication, which is not limited in the present application.

[0092] like Figure 2aAs shown, the data processing system also includes a use case generation system, which is used to execute the data processing solution provided by the present application to generate test cases. The use case generation system includes a demand management module 2021, a feature management module 2022, and a use case generation module 2023. In one implementation, the use case generation system can be deployed on a server 202, and the server 202 provides a hardware and software environment for the use case generation system, wherein the hardware environment parameters may include but are not limited to server models, memory, central processing unit, hard disk, etc.; the software environment parameters may include but are not limited to operating systems, databases, Web servers, programming languages, open source software, etc. The above hardware environment parameters and software environment parameters are only used for examples. In actual application scenarios, the hardware environment parameters and software environment parameters deployed by the use case generation system can also be other situations, and the embodiments of the present application do not limit this.

[0093] The data processing architecture between the use case generation system and the terminal 201 can be found in Figure 2b , Figure 2b The schematic diagram of the architecture of a data processing architecture provided by an exemplary embodiment of the present application is shown. The process of data interaction between modules in the use case generation system and between the use case generation system and the terminal to realize the generation of target test cases can be briefly described as follows: First, the user's terminal 201 inputs the business requirements (or demand description documents) of the tested business to the demand management module 2021, and the demand management module 2021 can perform structured processing on the business requirements to obtain demand data; secondly, the feature management module 2022 extracts the corpus information of the demand description document from the demand management module 2021, and performs feature and classification processing on the corpus information. The so-called demand description document is a document in the first format used to describe the business operation process of the tested business; the first format may refer to the DOCX format. And, the use case generation module 203 extracts the demand data from the demand management module 2021, and reads the corpus classification information and conflict corpus information from the feature management module 2022. The so-called demand data is the data in the second format obtained by parsing the demand description document; the second format may refer to the json (JavaScript Object Notation, JS object notation) format, which is a lightweight data exchange format. Finally, the use case generation module 2023 generates a target test case for the business under test based on the data read from the requirement management module 2021 and the feature management module 2022 (ie, requirement data, corpus classification information, and conflicting corpus information).

[0094] The following is a more detailed introduction to the functions of each device in the data processing system, including:

[0095] 1. Requirements management module 2021. The requirements management module is used to convert requirements description documents described in natural language (such as docx format) into requirements data described in computer language (such as json format). Requirements management module 2021 is a typical management information system, which is a B / S (Browser / Server) architecture model, that is, a browser-server architecture model. The adoption of this architecture model allows data interaction between the browser and the database by only running the browser on the terminal and deploying the database on the server. This can simplify the development, maintenance and use of the requirements management module.

[0096] In the scenario of generating test cases, this B / S architecture mode of the requirement management module 2021 supports receiving test data of the tested business uploaded by users through the browser. The test data can refer to the requirement description document in DOCX format uploaded by the user, or it can refer to the data for generating test cases configured by the user in the requirement management interface provided by the browser. Among them, the requirement management interface can be designed according to the UML use case specification, and the user writes data according to the UML use case specification when configuring in the requirement management interface. UML is a modeling language, which usually refers to the use of model elements to form a model of the entire system. Model elements include classes in the system, classes and instances of associated classes between classes, which cooperate with each other to realize the dynamic behavior of the system.

[0097] It is worth mentioning that the demand management module 2021 converts the demand description document in the first format into demand data in the second format, and provides the functions of adding, deleting, modifying and checking these demand data. The following is a more detailed description of the above-described functions of adding, deleting, modifying and checking in conjunction with the data processing sequence diagram of the demand management module 2021. Figure 2c , Figure 2c FIG. 1 shows a timing diagram of data processing of a demand management module provided by an exemplary embodiment of the present application; Figure 2c As shown, the data processing sequence includes three data processing cycles, namely: a new data cycle, a data review cycle, and a data modification cycle. In the new data cycle, the user can upload the demand content of the tested business; in the review data cycle, the user can view the uploaded demand content of the tested business; in the modification data cycle, the user can modify, delete, and perform other operations on the uploaded demand content of the tested business. The demand content here can refer to the demand data and demand description document described above.

[0098] 1) The data processing sequence is the newly added data cycle. In the newly added data cycle, the interface diagram of the user uploading the demand description document can be seen in Figure 3a , Figure 3a FIG. 1 shows a schematic diagram of an interface for uploading a requirement description document provided by an exemplary embodiment of the present application; Figure 3aAs shown, an upload entry 301 for the demand description document is displayed in the service interface; when the upload entry 301 is triggered, a document selection page is displayed, and a demand description document is selected from the document selection page; when the confirmation option 302 in the service interface is selected, it indicates uploading the currently selected demand description document, and the demand description document is uploaded from the browser to the demand management module 2021, and the upload progress (such as uploading 50%, uploading 100%...) is displayed in the service interface. Correspondingly, the process of implementing a new demand description document in the background may include but is not limited to: s11, the user uploads the demand description document described in natural language to the logic layer of the demand management module 2021 through the browser; the logic layer parses the demand description document to obtain the demand data described in json format. s12, the logic layer uploads the corpus information of the processed demand data to the feature management module, and receives the upload result returned by the feature management module (such as successful upload); and the logic layer also sends the demand data to the processing layer, so that the processing layer sends the demand data to the database for entry (i.e. storage). s13, the logic layer receives the input result returned by the processing layer, and returns the input result to the browser for display, so that the user can confirm the input result. In addition, after uploading the requirement description document, you can view the processing flow of the requirement description document, for example, check the legality of the requirement description document, etc. Figure 3b , Figure 3b A schematic diagram of a processing flow for viewing a requirement description document provided by an exemplary embodiment of the present application is shown; Figure 3b As shown, the user can view each processing step of the newly added requirement description document by triggering the “previous step” mark 303 or the “next step” mark 304 .

[0099] 2) The data processing sequence is the data query cycle. During the data query cycle, the user interface diagram for querying the requirement description document can be found in Figure 3c and Figure 3d , Figure 3c A schematic diagram of an interface for checking a business path step provided by an exemplary embodiment of the present application is shown; Figure 3dA schematic diagram of an interface for checking supplementary constraints provided by an exemplary embodiment of the present application is shown; as shown in the figure, the system use case corresponding to the tested business is displayed in the service interface (see the description of the system use case above), and the service interface displays the stakeholder interest option, the precondition option, the postcondition option, the business path step option, and the supplementary constraint option, etc.; when the user selects any option, the service interface displays the content corresponding to the selected option to meet the user's needs to check the various business contents of the tested business. For example: when the path step option is selected, the basic business path and the extended business path are displayed in the service interface. Correspondingly, the process of the background response to check the demand description document may include but is not limited to: the user initiates a query request through the browser; the logic layer of the demand management module responds to the query request and sends a data acquisition request to the processing layer; the processing layer obtains data from the database and returns the data to the logic layer; the logic layer sends the data to the browser so that the browser can display the data. This can help the user determine the data of the uploaded demand description document, so that the system performs the subsequent steps of generating test cases based on the correct demand data, and improves the correctness and completeness of the test cases.

[0100] 3) The data processing sequence is the modification data cycle. During the modification data cycle, the user can modify the interface diagram of the requirement description document as shown in Figure 3e , Figure 3e FIG. 1 shows a schematic diagram of an interface for modifying a requirement description document provided by an exemplary embodiment of the present application; Figure 3e As shown, a modification option 305 is displayed in the service interface, and the information of the business rules under the supplementary constraint option is displayed in the current service interface; when the user has a modification requirement for the business rules, the user can select the modification option 305, and at this time, the area 306 where the business rules are located in the service interface is in an editable state, and the user is supported to edit the business rules in the editable state. Correspondingly, the process of the background response modification requirement description document may include but is not limited to: receiving a modification request initiated by the user through a browser, and the modification request carries the modification data; the logic layer of the demand management module responds to the modification request and uploads the modification data to the feature management module; the feature management module returns the upload result of the modification data to the logic layer; the logic layer also sends a modification request to the processing layer so that the processing layer can update the historical data stored in the database (including: data update, deletion and addition); the logic layer receives the update result returned by the processing layer, and returns the update result to the web browser so that the user can confirm whether the modification operation is successful. For example, when the update result is an update failure, the user can perform the editing operation again until the update result is displayed as an update success. This can help users to conveniently improve business data and enrich business needs.

[0101] In summary, after receiving the demand description document in the first format, the demand management module can also receive operations such as viewing and modifying the demand description document, and generate demand data in the second format (i.e., json format) based on the finalized demand description document. For example, the demand data in json format in a payment business scenario is shown in the following code:

[0102]

[0103]

[0104] Representing demand data in JSON format can better describe the structured relationship between various data in the demand data (i.e. preconditions, postconditions, executors, business paths, and business operation steps under the business paths, etc.).

[0105] 2. Feature management module 2022. The feature management module 2022 is used to assist the requirement management module in converting the requirement description document described in natural language into the requirement data described in computer language; in addition, the feature management module is also used to perform conflict verification on the requirement description document to ensure the feasibility of the requirement description document. The feature management module can extract the corpus information of the requirement description document from the requirement management module 2021, and perform feature processing and conflict processing on the corpus information. The processed data can be used as a reference material for generating test cases. Among them, the so-called feature processing can be understood as characterizing the corpus information, and the corpus after characterization is marked with classification labels so as to allocate different implementation methods (such as allocation interfaces) to each category of corpus information. The so-called conflict processing can be understood as analyzing the relationship between corpus information, marking conflict labels on contradictory and repeated corpus information, so as to filter these conflicting corpus information when processing the corpus information later.

[0106] 3. Use case generation module 2023. The use case generation module 2023 is used to analyze and process the demand data, and then generate test cases. The use case generation module 2023 generates test cases by extracting the data of the tested business from the demand management module 2021 and the feature management module 2022. As described above, the most important data used to generate test cases include: basic business path, extended business path, preconditions, postconditions and supplementary constraints. Among them, there will be supplementary constraints associated with the business path under the basic business path and the extended business path. The supplementary constraints include field lists, business rules, non-functional requirements and design constraints, etc. Most of these contents are displayed in tabular form. For example, the displayed tables can be divided into three categories according to the type of business operation steps under the business path of the tested business and the type of supplementary constraints. See Table 1 for details.

[0107] Table 1

[0108]

[0109] As shown in Table 1, business rule types may include system verification type, system processing type and system feedback type, and each business rule type corresponds to multiple business rule table types. The business rule types in Table 1 may also be used as step types for each business operation step under the extended business path.

[0110] In summary, through the processing of each module in the use case generation system, test cases for the tested business can be generated. The test cases can be displayed in the form of Excel, which is convenient for users to view. Among them, the headers of the Excel table are: use case type, automation, use case name, preconditions, use case steps and expected results. Taking the payment business as an example, a test case Excel display format is given, which can be seen in Figure 4 . Figure 4 A schematic diagram of a test case provided by an exemplary embodiment of the present application is shown; Figure 4 As shown, each row of Excel represents a test case, and the business under test can correspond to multiple test cases, thus improving the readability of the test cases.

[0111] The embodiment of the present application generates preconditions by cascading and expanding mutually independent rule factors, which can solve the problem of a large number of preconditions being expanded in the process of automatically generating test cases based on product requirement documents described in natural language. By controlling the number of preconditions, the number of test cases generated is reduced, thereby reducing the maintenance cost of the test cases.

[0112] The data processing solution provided in the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.

[0113] See also Figure 5 , Figure 5 A flow chart of a data processing method provided by an exemplary embodiment of the present application is shown. The data processing scheme can be executed by the server described above, specifically by a use case generation module deployed in the server; the scheme includes steps S501-S505, wherein:

[0114] S501. Obtain demand data.

[0115] The demand data includes the business path of the business under test and the business operation steps under the business path. The business path is used to indicate the execution order of each business operation step and the jump logic between business operation steps; for example, when transferring money, you need to enter the transfer amount first and then verify the password. Therefore, the business path of the transfer business includes two business operation steps, "enter the amount" and "identity verification". The business path is used to indicate that after completing the "enter the amount", "identity verification" is performed, that is, after executing the "enter the amount" operation step, jump to the "identity verification" operation step. Before executing the "identity verification" operation step, the "enter the amount" operation step needs to be executed. Among them, the business under test is a collection of one or more computer codes; for example, the business under test can be a software or an application subroutine.

[0116] It should be noted that the specific implementation process of obtaining demand data can be found in Figure 2b The relevant description of the specific implementation process of the embodiment shown, that is, the use case generation module obtains the demand data processed by the demand management module from the demand management module, is not repeated here in detail.

[0117] S502: Construct a directed graph according to the demand data.

[0118] A directed graph is a graph composed of directed edges and business nodes, used to describe the business operation process of the business under test. The business nodes in the directed graph can be used to represent the business operation steps in the business under test, and the edges in the directed graph can be used to represent the jump logic between the business operation steps in the business under test. In order to better understand the concept of directed graphs, the following first introduces the relevant terms and concepts involved in directed graphs, see Table 2.

[0119] Table 2

[0120]

[0121]

[0122] As described in Table 2, the business node in the directed graph represents a step in the business path of the business under test. In other words, each business operation step of the business under test is used as a node of the directed graph. Business nodes are divided according to different dimensions to obtain different types of nodes; for example, according to the execution order between steps, other nodes connected to the current node are called: child business nodes, parent business nodes and brother business nodes; for example, according to the step type, business node types are divided into user selection nodes, system verification nodes, system feedback nodes, etc., and the interface feedback reflected by the steps corresponding to different types of business nodes may be different. The edges in the directed graph reflect the connection relationship between steps, that is, connecting business nodes according to the direction between steps forms the edges of the directed graph.

[0123] The following takes the tested business including N business operation steps as an example to explain the implementation method of constructing a directed graph: the i-th business operation step of the tested business is determined as the i-th business node in the directed graph, and the j-th business operation step of the tested business is determined as the j-th business operation step in the directed graph; then, the jump logic between the i-th business operation step and the j-th business operation step is determined as the edge between the i-th business node and the j-th business node in the directed graph, and the direction of the edge is from the i-th business node to the j-th business node; then, a directed graph is constructed based on the edges between N business nodes and nodes. The i and j described above are both positive integers, and i≤N, j≤N.

[0124] It should be noted that in addition to the N business nodes described above, the directed graph also includes virtual nodes, including the start node S and the end node E. Connecting the start node to the business node corresponding to the first business operation step under the business path of the tested business, and connecting the end node to the business node corresponding to the last business operation step under the business path of the tested business, a complete directed graph is formed. The appearance of the start node S and the end node E can ensure the integrity of the directed graph, making it convenient for users to consult and analyze the directed graph.

[0125] S503. Explore and obtain a target use case path from the directed graph; the target use case path refers to a path passing through a target key business node in the directed graph.

[0126] Based on the above description, it can be known that a directed graph contains multiple business nodes and edges. Then, by traversing different business nodes in the directed graph, a use case path passing through each business node can be obtained. The so-called use case path refers to a path starting from the start node S, passing through the business node, and terminating at the end node E according to the business operation sequence. The use case paths corresponding to all business nodes constitute a use case path set. The use case path set contains at least one use case path, and each use case path is used to represent a business operation sequence of the tested business.

[0127] Since the types of business nodes that a use case path passes through may be different, the types of use case paths are also different. The types of use case paths in the use case path set mainly include main use case paths and key use case paths, among which the type of the target use case path is the key use case path. Among them:

[0128] (1) The main use case path refers to a path that starts from the starting node S and passes through the N business nodes included in the basic business path of the business under test, and ends at the ending node E, wherein the N business nodes correspond one-to-one to the N business operation steps under the basic business path. The test cases generated according to the main use case path can meet the basic testing requirements of the business under test. It is worth mentioning that the method for exploring the main use case path in a directed graph may include: starting from the starting node S, traversing the N business nodes in the directed graph in sequence according to the execution order of the N business operation steps under the basic business path, until stopping at the ending node E; the traversal path that passes through the starting node S, N business nodes and the ending node E is determined as the main use case path. The following is combined with the attached Figure 6a For an introduction to exploring the main use case paths in a directed graph, see Figure 6a , Figure 6a A schematic diagram of a directed graph provided by an exemplary embodiment of the present application is shown; Figure 6a As shown, the directed graph includes a starting node S, a business node A, a business node B, a business node C1, a business node C21, a business node C22, a business node D, a business node E and an ending node E. Business node A corresponds to operation step 1, business node B corresponds to operation step 2, business node C1 corresponds to operation step 3, business node C21 corresponds to operation step 4, business node C22 corresponds to operation step 5, business node D corresponds to operation step 6, and business node E corresponds to operation step 7. The execution order of the business operation steps under the basic business path indicated by the demand data is: step 1→step 2→step 3→step 6→step 7. According to the execution order of the five business operation steps under the basic business path, the use case path "starting node→business node A→business node B→business node C1→business node D→business node E→ending node" is determined as the main use case path.

[0129] (2) A critical use case path refers to a path that starts from the starting node S, passes through the target critical business node, and ends at the ending node E. Based on this, it can be seen that the use case type of the target use case path is a critical use case path. It should be noted that the number of target critical business nodes in a directed graph may be more than one, so there is more than one critical use case path. Among them, the target critical business nodes may include a first type of business node and a second type of business node. Among them, the first type of business node refers to: a business node for a business operation step in which the business under test provides an interactive interface to the user in the business under test. The second type of business node refers to: a business node for a business operation step in which the user generates an interactive behavior in the interactive interface, and the business under test perceives and feedbacks the interactive behavior.

[0130] In combination with the above description, the following is an implementation method for exploring and obtaining a target use case path (or a key use case path) from a directed graph. The implementation method may include steps s11-s14, wherein:

[0131] s11. In the directed graph, explore the business nodes whose types are the first type or the second type, and determine the business nodes found as target key business nodes.

[0132] s12. Use the shortest path graph traversal algorithm to traverse the directed graph to find the first path between the starting node S and the target key business node. The shortest path graph traversal algorithm here aims to find the shortest path from the starting node S to the target key business node; compared with other paths from the starting node S to the target key business node, the shortest path passes through the least number of business nodes. The shortest path graph traversal algorithm may include but is not limited to the Dijkstra algorithm, the Floyd algorithm, etc., which is not limited to the embodiments of the present application.

[0133] s13, traverse and search for the second path between the target key business node and the end node in the directed graph. Here, according to the different types of the target key business node, the method of exploring the second path is also different. In one embodiment, the type of the target key business node is the first type, and the method of traversing and searching the second path between the target key business node and the end node in the directed graph may include: starting from the target key business node, exploring the path from the target key business node to the main use case path in the directed graph along the direction of the end node E, and reaching the end node E along the main use case path, and using the path as the second path. When there is no path from the target key business node to the main use case path along the direction of the end node E, the shortest path graph traversal algorithm can be used to traverse and search for the shortest path between the target key business node and the end node S in the directed graph, and use the shortest path as the second path. In another implementation, the type of the target key business node is the second type, and the method of traversing and searching the second path between the target key business node and the end node in the directed graph may include: determining the path formed by connecting the target key business node and the end node E as the second path.

[0134] s14. Determine the path formed by concatenating the first path obtained in step s12 and the second path obtained in step s13 as the target use case path.

[0135] The following is combined with Figure 6b To introduce the key use case paths in the exploration directed graph described in steps s11-s14, see Figure 6b , Figure 6b A schematic diagram of a directed graph provided by an exemplary embodiment of the present application is shown; Figure 6bAs shown, assuming that the service node C21 is the target key service node, the main use case path is the starting node S→service node A→service node B1→service node C1→service node D→service node F→end node E. Then exploring the first path between the starting node S and the service node C21 may include: first, exploring all paths between the starting node S and the service node C21, such as all paths may include the following two types: starting node S→service node A→service node B1→service node C21, and starting node S→service node A→service node B21→service node B22→service node C21; secondly, since the starting node S→service node A→service node B1→service node C21 contains the least number of nodes, this path is determined as the first path between the starting node and the service node C21. Exploring the second path between the service node C21 and the end node E may include: determining the type of the target key service node; when the type of the target key service node is the first type, exploring the shortest path from the service node C21 to the main use case path, and according to the principle that the shortest path contains the least number of nodes, the second path may be explored: service node C21-service node C22-service node D-service node F-end node E. In this case, the key use case path passing through the service node C21 is: starting node S→service node A→service node B1→service node C21-service node C22-service node D-service node F-end node E. When the type of the target key service node is the second type, the path from the service node C21 to the end node E is used as the second path, that is, service node C21-end node E. In this case, the key use case path passing through the service node C21 is: starting node S→service node A→service node B1→service node C21-end node E.

[0136] As described above, the types of target key business nodes include a first type and a second type, so the use case path set obtained by traversing the directed graph may include a first use case path set and a second use case path set. The first use case path set contains use case paths corresponding to business nodes whose type of business nodes is the first type, that is, the use case paths in the first use case path set are used to generate test cases for verifying business operation behaviors (that is, the target key business nodes traversed by the use case paths are used to represent the business operation steps in which the user generates an interactive behavior in the interactive interface, and the tested business perceives and feeds back the interactive behavior). The second use case path set contains use case paths corresponding to business nodes whose type of business nodes is the second type, that is, the use case paths in the second use case path set are used to generate test cases for verifying business rules (that is, the target key business nodes traversed by the use case paths are used to represent the business operation steps in which the tested business provides an interactive interface to the user in the tested business).

[0137] The embodiment of the present application also supports optimizing the first use case path set and the second use case path set. The so-called optimization processing can be understood as deduplication processing, that is, if the first use case path set and the second use case path set contain the same use case path, the same use case path is deleted in the first use case path set. Through this deduplication method, it is possible to avoid repeatedly generating test cases for the same test task and reduce the cost of test case generation.

[0138] Based on the implementation process described in steps S501-S503, the main use case path and the key use case path of the business under test can be obtained, and multiple test cases of the business under test can be generated based on the main use case path and the key use case path. Figure 7 For a summary description of the implementation process described in steps S501-S503, see Figure 7 , Figure 7 A flowchart of determining a use case path set provided by an exemplary embodiment of the present application is shown; Figure 7 As shown, first, by analyzing the business operation steps and business operation sequences under the business path of the tested business, a directed graph is constructed; secondly, the main use case path is traversed using the above method, and a target use case path is generated for each target key business node; finally, the first use case path set and the second use case path set are optimized to obtain an optimized use case path set. Based on the optimized use case path set, multiple test cases that meet the test requirements can be generated.

[0139] S504: Acquire business rules used by the target key business node, where the business rules include multiple rule factors, and the multiple rule factors are independent of each other.

[0140] S505: Perform cascade expansion processing on multiple rule factors to obtain the preconditions of the target test case.

[0141] In steps S504-S505, as described above, it can be known that the target use case path corresponding to the target key business node represents a deterministic business operation sequence. If the target key business node does not have a business rule mounted on it (i.e., the target key business node does not use the business rule), then executing according to the business operation sequence can obtain a determined execution result. For example, if the type of the target key business node is the second type, and the business rule is not mounted on the target key business node, then after executing according to the business operation sequence corresponding to the template key business node, a determined interface feedback can be given to the user. On the contrary, if the target key business node has a business rule mounted on it (i.e., the target key business node uses the business rule), then even if it is executed according to the business operation sequence, a variety of possible execution results can be obtained. This is due to the multiple rule items contained in the business rules mounted on the target key business node, and one rule item corresponds to one precondition; when the executed rule items are different, the execution results may be different.

[0142] It should be noted that the business rules mounted on the target key business node can be presented in the form of a table, that is, a business rule table is mounted on the target key business node, and the business rule table includes one or more rule columns. In the embodiment of the present application, the rule column is referred to as a rule item. The business rule table can be found in Figure 8 , Figure 8 A schematic diagram of a business rule table provided by an exemplary embodiment of the present application is shown; Figure 8 As shown, the business rule table includes 5 columns of rule items, which means that the target use case path where the target key business node mounted by the business rule table is located has at least 5 preconditions, and at least 5 test cases can be generated accordingly.

[0143] In addition, any rule item of the business rule table associated with the target key business node can also reference other business rule tables. In the embodiment of the present application, the business rule table referenced by the rule item is called a rule factor. In this case, the number of preconditions of the target key business node will increase with the number of rule factors, and the number of corresponding test cases generated will also increase accordingly. Among them, the schematic diagram of the rule item referencing the business rule table can be seen in Fig. 9 , Fig. 9 FIG. 1 shows a schematic diagram of a reference rule factor provided by an exemplary embodiment of the present application; Fig. 9 As shown in the figure, the rule items in the business rule table mounted on the target key business node reference multiple other rule factors. When the rule items are combined with one or more rule factors, multiple preconditions can be obtained. For example: the rule item is combined with rule factor A to obtain precondition A; the rule item is combined with rule factor A and rule factor B to obtain precondition B; and so on. Fig. 9As described, if all rule factors referenced by the rule items are expanded, the number of preconditions generated will be huge, and when test cases are generated based on these preconditions, it is very likely that test cases with the same test functions will be obtained, which makes the test case generation cost high.

[0144] Based on this, the embodiment of the present application supports analyzing the reference relationship between the rule factors referenced by the rule items, and only performs cascade expansion processing on the rule factors whose reference relationship is independent of each other, obtains a certain number of preconditions, and generates test cases based on these conditions. This can effectively reduce the cost of generating test cases, and because the rule factors are independent of each other, it can cover all preconditions that affect the interface feedback, ensuring the integrity of the test function. Among them, the way to analyze whether the reference relationship between the rule factors is independent of each other may include but is not limited to: (1) judging whether the rule factors are independent of each other according to the writing rules between the rule factors. Specifically, semantically identify the semantic information of each rule factor; if the semantic information of each rule factor is different, then determine that the reference relationship between each rule factor is independent of each other, otherwise it is non-independent. (2) Use white box testing to judge whether the rule factors are independent of each other. Specifically, execute the business operation sequence of the tested business, analyze the jump relationship between the interface feedback corresponding to the execution result; if the jump relationship between the interface feedback is independent, then judge that the rule factors corresponding to the interface feedback are independent of each other. Of course, other methods can also be used to verify whether the rule factors are independent of each other, and the embodiment of the present application is not limited to this.

[0145] When it is determined that the M rule factors included in the business rules used by the target key business node are independent of each other, the N rule factors can be cascaded and expanded to obtain the preconditions of the target test case. The following takes the example of a rule item in the business rule table carried by the target key business node referencing 4 independent rule factors to introduce in detail the above-described cascade expansion of multiple rule factors to obtain the preconditions of the target test case. Assuming that the 4 independent rule factors are the first rule factor, the second rule factor, the third rule factor and the fourth rule factor, the first rule factor contains 1 rule item (ie, x1), the second rule factor contains 2 rule items (ie, x2), the third rule factor includes 3 rule items (ie, x3) and the fourth rule factor contains 4 rule items (ie, x4), then the 4 rule factors are cascaded and expanded to obtain the preconditions of the target test case, including:

[0146] s11, selecting the i-th rule factor from the four rule factors, for example, i=2, indicating that the second rule factor is selected.

[0147] s12, keep the remaining rule factors except the selected second rule factor among the four rule factors unexpanded, and expand the second rule factor selected from the four rule factors to obtain the x of the second rule factor i In other words, if the currently selected rule factor is the second rule factor, the first rule factor, the third rule factor, and the fourth rule factor are kept unexpanded (i.e., not processed), and the second rule factor is expanded to obtain x i The rule items, x i =1*x2, where the value 1 represents a column of rule items that reference 4 rule factors, and x2 represents 2 columns of rule items contained in the second rule factor.

[0148] s13, execute the operations of steps s11-s12 for each of the four rule factors, and obtain 1*x1 preconditions for the expansion of the first rule factor, 1*x2 preconditions for the expansion of the second rule factor, 1*x3 preconditions for the expansion of the third rule factor, and 1*x4 preconditions for the expansion of the fourth rule factor.

[0149] s14, generate P preconditions of the target test case according to the rule items obtained by expanding the 4 rule factors; where P = 1*x1+1*x2+1*x3+1*x4=10.

[0150] In summary, by cascading the expansion of four independent rule factors, 10 preconditions can be obtained. Compared with the 1*x1*x2*x3*x4=24 preconditions obtained by fully expanding the four rule factors, the number of preconditions is effectively reduced, thereby reducing the number of test cases generated and reducing the maintenance cost of test cases.

[0151] See below Fig.10 , Fig.10 A flow chart of another data processing method provided by an exemplary embodiment of the present application is shown; the data processing scheme can be executed by the server described above, specifically by a use case generation module deployed in the server; the scheme includes steps S1001-S1006, wherein:

[0152] S1001, obtaining demand data.

[0153] S1002, constructing a directed graph according to the demand data.

[0154] S1003, exploring and obtaining a target use case path from the directed graph, where the target use case path refers to a path passing through a target key business node in the directed graph.

[0155] S1004, obtaining business rules used by the target key business node, where the business rules include multiple rule factors, and the multiple rule factors are independent of each other.

[0156] S1005, performing cascade expansion processing on multiple rule factors to obtain the preconditions of the target test case.

[0157] It should be noted that the specific implementation process shown in steps S1001-S1005 can be found in Figure 5 The relevant description of the specific implementation process described in steps S5001-S5005 in the illustrated embodiment is not repeated here.

[0158] S1006, based on the precondition of the target test case, generate a target test case corresponding to the target test case path.

[0159] The specific implementation method of generating a target test case based on the precondition of the target test case may include: extracting the target test case step from the target test case path; generating a target test case corresponding to the target test case path based on the target test case step and the precondition. In other words, a precondition of the target test case and the target test case step can generate a test case of the target test case path, and if the target test case has P preconditions, P target test cases of the target test case path can be generated.

[0160] In the above-mentioned step of generating the target test case, the specific implementation method of extracting the target use case step from the target use case path may include: (1) extracting one or more groups of combined steps from the business operation sequence represented by the target use case path; wherein, any group of combined steps is used to represent an interface interaction behavior between a user in the tested business and the tested business, and any group of combined steps includes a first business operation step and a second business operation step, and the first business operation step refers to the step in which the tested business provides an interactive interface to the user, and the second business operation step refers to the step in which the user generates an interactive behavior in the interactive interface, and the tested business perceives and feeds back the interactive behavior. (2) Determine the sequence formed by one or more groups of combined steps as the target use case step. It should be noted that the use of Figure 2b In the process of generating target test cases by the use case generation module in the illustrated embodiment, the use case generation module also needs to refer to the corpus information and conflict information read from the feature management module to filter out some contradictory and repeated corpora to improve the feasibility of the generated test cases.

[0161] The following is an example of a business operation sequence in a payment business scenario. The business operation requirements in the payment business scenario are as follows:

[0162] Business operation steps 1. [Tested business] Request the user to confirm XX information

[0163] Business operation step 2b. [Tested business] Verify that the result of user feedback is to confirm XX information, and guide the user to bind a bank card

[0164] Business operation steps 2b1. [Tested business] Request the user to add a bank card

[0165] Business operation steps 2b11. [Tested business] Obtain bank card number

[0166] Business operation step 2b12. [Tested business] Verify bank card number

[0167] Business operation step 2b13. [Tested business] Request bank payment authorization

[0168] Business operation steps 2b14. [Tested business] Verify payment authority

[0169] Business operation step 2b15. [Tested business] Enter business operation step 2

[0170] Business operation step 2d. [Tested business] Verify that the result of user feedback is to confirm XX information, and the user needs to be guided to perform real-name authentication

[0171] Business operation steps 2d1. [Tested business] Request users to submit real-name authentication information

[0172] Business operation step 2d2. [Tested business] Verify that the result of user feedback is to submit real-name authentication informationBusiness operation step 2d3. [Tested business] Enter business operation step 2

[0173] Business operation step 2. [Tested business] Request the user to submit the payment password

[0174] Business operation step 3. [Tested business] Verify that the result of user feedback is to submit the payment password

[0175] In the above business operation sequence, the numbers or letters after the business operation steps represent the numbers of the business operation steps. The business operation sequence formed by business operation steps 1 to 3, which do not contain letters in the numbers of the business operation steps, corresponds to the main use case path. In business operation step 2d, the user generates an interactive behavior in the interactive interface (i.e., feedback XX information through the interactive interface), and the tested business perceives and feedbacks the interactive behavior (i.e., verifies the result of the feedback XX information). Therefore, it can be seen that the business node corresponding to business operation step 2d is the first type of target key business node. The business operation sequence formed by business operation steps 1 to 2d corresponds to the first path; the business operation sequence formed by business operation steps 2d to 2 corresponds to the path from the target key business node back to the main use case path; the business operation sequence formed by business operation steps 2 to 3 corresponds to the path to the end node along the main use case path; that is, the business operation sequence formed by business operation steps 2d to 4 corresponds to the second path. Similarly, the business node corresponding to business operation step 2b is the first type of target key business node. The business operation sequence formed by business operation step 1 to business operation step 2b corresponds to the first path; the business operation sequence formed by business operation step 2b to business operation step 2 corresponds to the path from the target key business node back to the main use case path; the business operation sequence formed by business operation step 2 to business operation step 3 corresponds to the path along the main use case path to reach the end node; that is, the business operation sequence formed by business operation step 2b to business operation step 3 corresponds to the second path.

[0176] The combined use case steps extracted from the business operation sequence in the above payment business scenario are as follows:

[0177] Combined steps 1. [Tested business] requests the user to confirm XX information_[Tested business] verifies that the result of the user's feedback is to confirm XX information, and the user needs to be guided to perform real-name authentication

[0178] Combined step 2. [Tested business] requests the user to submit real-name authentication information_[Tested business] verifies that the result of user feedback is to submit real-name authentication information

[0179] Combined step 3. [Tested business] Request the user to add a bank card_[Tested business] Verify the bank card number

[0180] Combined step 4. [Business under test] Request bank payment authorization_[Business under test] Verify payment authority

[0181] Combined step 5. [Tested business] requests the user to submit XX password_[Tested business] verifies that the result of the user's feedback is to submit XX password

[0182] It can be seen from the above-mentioned combined use case steps that the combined use case steps include an information acquisition step and an information verification step. Taking combined step 1 as an example, the first business operation step included in combined step 1 is business operation step 1, and the second business operation step included in combined step 1 is business operation step 2d. Business operation step 1 refers to the step in which the tested business provides the user with an interactive interface containing XX information (i.e., the information acquisition step), and business operation step 2d refers to the step in which the user generates an interactive behavior in the interactive interface (i.e., confirms XX information through feedback from the interactive interface containing XX information), and the tested business perceives and feedbacks the interactive behavior (i.e., verifies the result of the feedback XX information) (i.e., the information verification step). Business operation step 1 and business operation step 2d constitute combined step 1, and combined step 1 represents an interface (interactive interface containing XX information) interaction behavior between the user in the tested business and the tested business. By analogy, combined steps 2 to combined steps 5 in the target use case steps can be further extracted from the business operation sequence under the above-mentioned payment scenario.

[0183] After extracting the target use case steps from the target traversal path, the target test case corresponding to the target use case path can be generated according to the target use case steps and preconditions. When the target test case is used to perform the test on the tested business, the test result can be obtained, and the quality of the test result is used to judge the quality of the software product.

[0184] In the embodiment of the present application, by combining each precondition with the target use case step to generate multiple target test cases, multiple possible test cases for a target use case path can be expanded, thereby improving the completeness of the test task.

[0185] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.

[0186] See also Fig.11 , Fig.11 A schematic diagram of the structure of a data processing device provided by an exemplary embodiment of the present application is shown. The data processing device can be installed in a server; the data processing device can be an application or plug-in in a data processing device. Fig.11 The data processing device shown can be used to perform the above Figure 5 and Fig.10 Part or all of the functions of the method embodiment described. The detailed description of each unit is as follows:

[0187] An acquisition unit 1101 is used to acquire demand data, where the demand data includes a service path of the service under test and service operation steps under the service path;

[0188] Processing unit 1102 is used to construct a directed graph according to the demand data, the directed graph includes business nodes and edges, the business nodes are used to represent the business operation steps in the business under test, and the edges are used to represent the jump logic between the business operation steps in the business under test; and, explore and obtain a target use case path from the directed graph, the target use case path refers to a path passing through the target key business node in the directed graph; the target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case;

[0189] The acquisition unit 1101 is further used to acquire the business rules used by the target key business node, where the business rules include multiple rule factors, and the multiple rule factors are independent of each other;

[0190] The processing unit 1102 is further used to perform cascade expansion processing on multiple rule factors to obtain the preconditions of the target test case.

[0191] In one implementation, the business rules used by the target key business node include M rule factors, where M is a positive integer; the processing unit 1102 is used to perform cascade expansion processing on multiple rule factors to obtain the precondition of the target test case, specifically for:

[0192] Select the i-th rule factor from the M rule factors;

[0193] Keep the remaining rule factors except the selected i-th rule factor from the M rule factors unexpanded, and select the i-th rule factor from the M rule factors for expansion processing to obtain the x of the i-th rule factor i Types of rule items;

[0194] Repeat the above steps until all M rule factors are expanded and processed;

[0195] Generate P preconditions of the target test case according to the rule items obtained by expanding and processing the M rule factors;

[0196] Among them, suppose the i-th rule factor among the M rule factors includes x i The value of P is

[0197] In one implementation, the processing unit 1102 is further configured to:

[0198] Extract target use case steps from target use case paths;

[0199] Based on the target use case steps and preconditions, a target test case corresponding to the target use case path is generated.

[0200] In one implementation, the processing unit 1102 is configured to extract a target use case step from a target use case path, specifically to:

[0201] Extract one or more groups of combined steps from the business operation sequence represented by the target use case path;

[0202] Determine a sequence formed by one or more groups of combined steps as the target use case steps;

[0203] Among them, any group of combined steps is used to represent an interface interaction behavior between a user in the tested business and the tested business. Any group of combined steps includes a first business operation step and a second business operation step. The first business operation step refers to a step in which the tested business provides an interaction interface to the user, and the second business operation step refers to a step in which the user generates an interaction behavior in the interaction interface, and the tested business perceives and feeds back the interaction behavior.

[0204] In one implementation, the tested service includes N service operation steps; the directed graph includes N service nodes; the processing unit 1102 is used to construct the directed graph according to the demand data, specifically for:

[0205] Determine the i-th business operation step of the tested business as the i-th business node in the directed graph, and determine the j-th business operation step of the tested business as the j-th business node in the directed graph; and,

[0206] Determine the jump logic between the i-th business operation step and the j-th business operation step as the edge between the i-th business node and the j-th business node in the directed graph;

[0207] Construct a directed graph based on the determined business nodes and edges;

[0208] Wherein, N is an integer greater than 1, i and j are both positive integers, and i≤N, j≤N.

[0209] In one implementation, the processing unit 1102 is further configured to:

[0210] Traverse the business nodes in the directed graph to obtain a use case path set, the use case path set contains at least one use case path, and each use case path is used to represent a business operation sequence of the tested business; the target use case path is a path in the use case path set that passes through the target key business node in the directed graph;

[0211] Among them, the types of use case paths in the use case path set include main use case paths or key use case paths, and the type of the target use case path is a key use case path.

[0212] In one implementation, the business path includes a basic business path, and the basic business path includes N business operation steps; M is a positive integer; the directed graph also includes a start node and an end node; the processing unit 1102 is used to traverse the business nodes in the directed graph to obtain a use case path set, specifically for:

[0213] Starting from the start node, in accordance with the execution order of the N business operation steps under the basic business path, the N business nodes in the directed graph are traversed in sequence until the end node stops; the N business nodes correspond one to one with the N business operation steps under the basic business path;

[0214] The traversal path passing through the starting node, N business nodes and the ending node is determined as the main use case path.

[0215] In one implementation, the use case type of the target use case path is a key use case path; the directed graph further includes a start node and an end node; the processing unit 1102 is used to explore and obtain the target use case path from the directed graph, specifically to:

[0216] Determine the target key business nodes in the directed graph;

[0217] Using the shortest path graph traversal algorithm to traverse the directed graph to find a first path between the start node and the target key business node; and traversing the directed graph to find a second path between the target key business node and the end node;

[0218] A path formed by concatenating the first path and the second path is determined as the target use case path.

[0219] In one implementation, the processing unit 1102 is configured to traverse and search for a second path between the target key service node and the end node in the directed graph, specifically to:

[0220] If the type of the target key business node is the first type, then the main use case path is explored in the directed graph, and a second path is explored in the directed graph along the direction of the end node, returning from the target key business node to the main use case path, and reaching the end node along the main use case path; or,

[0221] If the type of the target key business node is the first type, a shortest path graph traversal algorithm is used to traverse the directed graph to find a second path between the target key business node and the end node; or,

[0222] If the type of the target key business node is the second type, determining a path formed by connecting the target key business node and the end node as the second path;

[0223] Among them, if the target key business node is used to represent the business operation steps of providing an interactive interface for the user in the business under test by the business under test, then the type of the target key business node is the first type; if the target key business node is used to represent the business operation steps of the user generating interactive behavior in the interactive interface and the business under test perceiving and feeding back the interactive behavior, then the type of the target key business node is the second type.

[0224] In one implementation, the use case path set includes a first use case path set and a second use case path set, each of the first use case path set and the second use case path set includes one or more use case paths, wherein the use case paths in the first use case path set are used to generate test cases for verifying business operation behaviors, and the use case paths in the second use case path set are used to generate test cases for verifying business rules; the processing unit 1102 is further used to:

[0225] The first use case path set and the second use case path set are optimized.

[0226] In one implementation, the processing unit 1102 is configured to optimize the first use case path set and the second use case path set, specifically to:

[0227] If the first use case path set and the second use case path set include the same use case path, the same use case path is deleted from the first use case path set.

[0228] In one implementation, the processing unit 1102 is used to obtain demand data, specifically to:

[0229] Obtain a requirement description document, where the requirement description document is used to describe the business operation process of the business under test, and the requirement description document is a document in the first format;

[0230] The requirement description document is parsed to obtain requirement data, where the requirement data is data in the second format.

[0231] According to one embodiment of the present application, Figure 5 and Fig.10 Some of the steps involved in the data processing method shown can be represented by Fig.11 The data processing device shown in the figure is executed by each unit. For example, Figure 5 The steps S501 and S504 shown in FIG. 5 can be performed by Fig.11 The acquisition unit 1101 shown in FIG. 1 is executed, and steps S502, S503 and S505 can be performed by Fig.11 The processing unit 1102 is shown to execute. Fig.10 Steps S1001 and S1004 shown in FIG. 1 can be represented by Fig.11The acquisition unit 1101 shown in FIG. 1 is executed, and steps S1002, S1003, S1005 and S1006 can be performed by Fig.11 The processing unit 1102 is shown to execute. Fig.11 The various units in the data processing device shown can be respectively or all combined into one or several other units to constitute, or some of the units (some) can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0232] According to another embodiment of the present application, the program can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM) and other processing elements and storage elements. Figure 5 and Fig.10 A computer program (including program code) for each step involved in the corresponding method shown in Fig.11 The data processing device shown in and the data processing method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer readable recording medium, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.

[0233] In the embodiment of the present application, the acquisition unit 1101 can acquire the business rules used by the target key business node; accordingly, the processing unit 1102 performs cascade expansion processing on the mutually independent part of the rule factors contained in the business rules, and then obtains the preconditions of the target test case. Compared with expanding all the business rules used by the target key business node, the embodiment of the present application can better control the number of preconditions of the target test case, so that the number of target test cases finally generated is controllable, and the maintenance cost of the target test case is reduced.

[0234] See also Fig.12 , Fig.12The structural diagram of a data processing device provided by an exemplary embodiment of the present application is shown. The data processing device can be a terminal device used by a user who uploads a demand description document; the data processing device includes at least a processor 1201, a communication interface 1202 and a memory 1203. Among them, the processor 1201, the communication interface 1202 and the memory 1203 can be connected by a bus or other means. The embodiment of the present application takes the bus connection as an example. Among them, the processor 1201 (or the central processing unit (CPU)) is the computing core and control core of the data processing device, which can parse various instructions in the terminal device and process various data of the terminal device. For example, the CPU can be used to parse the power on and off instructions sent by the user to the terminal device, and control the terminal device to perform power on and off operations; for another example, the CPU can transmit various types of interactive data between the internal structures of the terminal device, and so on. The communication interface 1202 can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), which can be used to send and receive data under the control of the processor 1201; the communication interface 1202 can also be used for the transmission and interaction of internal data of the terminal device. The memory 1203 (Memory) is a memory device in the terminal device, which is used to store programs and data. It is understandable that the memory 1203 here can include both the built-in memory of the terminal device and the extended memory supported by the terminal device. The memory 1203 provides a storage space, which stores the operating system of the terminal device, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.

[0235] In the embodiment of the present application, the processor 1201 performs the following operations by running the executable program code in the memory 1203:

[0236] Obtain demand data, which includes the business path of the business being tested and the business operation steps under the business path;

[0237] Constructing a directed graph according to the demand data, the directed graph includes business nodes and edges, the business nodes are used to represent the business operation steps in the business under test, and the edges are used to represent the jump logic between the business operation steps in the business under test; and, exploring and obtaining a target use case path from the directed graph, the target use case path refers to a path passing through the target key business node in the directed graph; the target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case;

[0238] Get the business rules used by the target key business node. The business rules include multiple rule factors.

[0239] Multiple rule factors are independent of each other;

[0240] Multiple rule factors are cascaded and expanded to obtain the preconditions of the target test case.

[0241] In one implementation, the business rules used by the target key business node include M rule factors, where M is a positive integer; the processor 1201 performs cascade expansion processing on multiple rule factors to obtain a specific implementation of the precondition of the target test case as follows:

[0242] Select the i-th rule factor from the M rule factors;

[0243] Keep the remaining rule factors except the selected i-th rule factor from the M rule factors unexpanded, and select the i-th rule factor from the M rule factors for expansion processing to obtain the x of the i-th rule factor i Types of rule items;

[0244] Repeat the above steps until all M rule factors are expanded and processed;

[0245] Generate P preconditions of the target test case according to the rule items obtained by expanding and processing the M rule factors;

[0246] Among them, suppose the i-th rule factor among M rule factors includes xi rule items, then the value of P is

[0247] In one implementation, the processor 1201 further performs the following operations by running the executable program code in the memory 1203:

[0248] Extract target use case steps from target use case paths;

[0249] Based on the target use case steps and preconditions, a target test case corresponding to the target use case path is generated.

[0250] In one implementation, the specific implementation of the step of extracting the target use case from the target use case path by the processor 1201 is as follows:

[0251] Extract one or more groups of combined steps from the business operation sequence represented by the target use case path;

[0252] Determine a sequence formed by one or more groups of combined steps as the target use case steps;

[0253] Among them, any group of combined steps is used to represent an interface interaction behavior between a user in the tested business and the tested business. Any group of combined steps includes a first business operation step and a second business operation step. The first business operation step refers to a step in which the tested business provides an interaction interface to the user, and the second business operation step refers to a step in which the user generates an interaction behavior in the interaction interface, and the tested business perceives and feeds back the interaction behavior.

[0254] In one implementation, the tested service includes N service operation steps; the directed graph includes N service nodes; and the specific implementation of the processor 1201 constructing the directed graph according to the demand data is as follows:

[0255] Determine the i-th business operation step of the tested business as the i-th business node in the directed graph, and determine the j-th business operation step of the tested business as the j-th business node in the directed graph; and,

[0256] Determine the jump logic between the i-th business operation step and the j-th business operation step as the edge between the i-th business node and the j-th business node in the directed graph;

[0257] Construct a directed graph based on the determined business nodes and edges;

[0258] Wherein, N is an integer greater than 1, i and j are both positive integers, and i≤N, j≤N.

[0259] In one implementation, the processor 1201 further performs the following operations by running the executable program code in the memory 1203:

[0260] Traverse the business nodes in the directed graph to obtain a use case path set, the use case path set contains at least one use case path, and each use case path is used to represent a business operation sequence of the tested business; the target use case path is a path in the use case path set that passes through the target key business node in the directed graph;

[0261] Among them, the types of use case paths in the use case path set include main use case paths or key use case paths, and the type of the target use case path is a key use case path.

[0262] In one implementation, the business path includes a basic business path, and the basic business path includes N business operation steps; M is a positive integer; the directed graph also includes a start node and an end node; the processor 1201 traverses the business nodes in the directed graph to obtain a specific implementation of the use case path set as follows:

[0263] Starting from the start node, in accordance with the execution order of the N business operation steps under the basic business path, the N business nodes in the directed graph are traversed in sequence until the end node stops; the N business nodes correspond one to one with the N business operation steps under the basic business path;

[0264] The traversal path passing through the starting node, N business nodes and the ending node is determined as the main use case path.

[0265] In one implementation, the use case type of the target use case path is a key use case path; the directed graph further includes a start node and an end node; the specific implementation of the processor 1201 in exploring and obtaining the target use case path from the directed graph is:

[0266] Determine the target key business nodes in the directed graph;

[0267] Using the shortest path graph traversal algorithm to traverse the directed graph to find a first path between the start node and the target key business node; and traversing the directed graph to find a second path between the target key business node and the end node;

[0268] A path formed by concatenating the first path and the second path is determined as the target use case path.

[0269] In one implementation, the specific implementation of the processor 1201 traversing and searching for the second path between the target key service node and the end node in the directed graph is:

[0270] If the type of the target key business node is the first type, then the main use case path is explored in the directed graph, and a second path is explored in the directed graph along the direction of the end node, returning from the target key business node to the main use case path, and reaching the end node along the main use case path; or,

[0271] If the type of the target key business node is the first type, a shortest path graph traversal algorithm is used to traverse the directed graph to find a second path between the target key business node and the end node; or,

[0272] If the type of the target key business node is the second type, determining a path formed by connecting the target key business node and the end node as the second path;

[0273] Among them, if the target key business node is used to represent the business operation steps of providing an interactive interface for the user in the business under test by the business under test, then the type of the target key business node is the first type; if the target key business node is used to represent the business operation steps of the user generating interactive behavior in the interactive interface and the business under test perceiving and feeding back the interactive behavior, then the type of the target key business node is the second type.

[0274] In one implementation, the use case path set includes a first use case path set and a second use case path set, each of the first use case path set and the second use case path set includes one or more use case paths, wherein the use case paths in the first use case path set are used to generate test cases for verifying business operation behaviors, and the use case paths in the second use case path set are used to generate test cases for verifying business rules; the processor 1201 further performs the following operations by running the executable program code in the memory 1203:

[0275] The first use case path set and the second use case path set are optimized.

[0276] In one implementation, the specific implementation of the processor 1201 optimizing the first use case path set and the second use case path set is as follows:

[0277] If the first use case path set and the second use case path set include the same use case path, the same use case path is deleted from the first use case path set.

[0278] In one implementation, the specific implementation of the processor 1201 in acquiring the demand data is:

[0279] Obtain a requirement description document, where the requirement description document is used to describe the business operation process of the business under test, and the requirement description document is a document in the first format;

[0280] The requirement description document is parsed to obtain requirement data, where the requirement data is data in the second format.

[0281] In the embodiment of the present application, the processor 1201 can obtain the business rules used by the target key business node, and perform cascade expansion processing on the mutually independent part of the rule factors contained in the business rules to obtain the preconditions of the target test case. Compared with expanding all the business rules used by the target key business node, the embodiment of the present application can better control the number of preconditions of the target test case, so that the number of target test cases finally generated is controllable, and the maintenance cost of the target test case is reduced.

[0282] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the data processing method of the above method embodiment.

[0283] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the above-mentioned data processing method.

[0284] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0285] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0286] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0287] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the readable storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0288] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiment and equivalent changes made according to the claims of the present application are still within the scope covered by the application.

Claims

1. A data processing method, characterized in that: include: Acquire demand data, where the demand data includes a business path of the business under test and business operation steps under the business path; Constructing a directed graph according to the demand data, the directed graph comprising service nodes and edges, the service nodes being used to represent service operation steps in the tested service, and the edges being used to represent jump logic between service operation steps in the tested service; A target use case path is obtained by exploring from the directed graph, wherein the target use case path refers to a path passing through a target key business node in the directed graph; the target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case; Acquire a business rule used by the target key business node, wherein the business rule includes M rule factors, the M rule factors are independent of each other, and M is a positive integer; each of the rule factors includes at least one rule item, and one rule item corresponds to one precondition; Performing cascade expansion processing on the M rule factors to obtain the precondition of the target test case; The cascade expansion process includes steps S1-S4; S1, select the i-th rule factor from the M rule factors, i is a positive integer and i is less than or equal to M; S2, keep the remaining rule factors except the selected i-th rule factor from the M rule factors unexpanded, and expand the i-th rule factor to obtain the x of the i-th rule factor i The rule items, x i is a positive integer; S3, repeating steps S1 and S2 until all the M rule factors are expanded and processed; S4. Generate P preconditions for the target test case according to the rule items obtained by expanding the M rule factors, where the value of P is 2. The method according to claim 1, characterized in that The method further comprises: Extracting target use case steps from the target use case path; Based on the target use case steps and the preconditions, a target test case corresponding to the target use case path is generated.

3. The method according to claim 2, characterized in that The step of extracting the target use case from the target use case path includes: Extracting one or more groups of combined steps from the business operation sequence represented by the target use case path; Determine a sequence formed by the one or more groups of combined steps as a target use case step; Among them, any group of the combined steps is used to represent an interface interaction behavior between a user in the tested business and the tested business, and any group of the combined steps includes a first business operation step and a second business operation step, the first business operation step refers to a step in which the tested business provides an interaction interface to the user, and the second business operation step refers to a step in which the user generates an interaction behavior in the interaction interface, and the tested business perceives and feeds back the interaction behavior.

4. The method according to claim 1, characterized in that The tested service includes N service operation steps; the directed graph includes N service nodes; and constructing the directed graph according to the demand data includes: Determine the i-th service operation step of the tested service as the i-th service node in the directed graph, and determine the j-th service operation step of the tested service as the j-th service node in the directed graph; and, Determine the jump logic between the i-th business operation step and the j-th business operation step as an edge between the i-th business node and the j-th business node in the directed graph; Constructing the directed graph according to the determined business nodes and edges; Wherein, N is an integer greater than 1, i and j are both positive integers, and i≤N, j≤N.

5. The method according to claim 1, characterized in that The method further comprises: Traversing the business nodes in the directed graph to obtain a use case path set, wherein the use case path set includes at least one use case path, and each use case path is used to represent a business operation sequence of the tested business; the target use case path is a path in the use case path set that passes through a target key business node in the directed graph; Among them, the types of use case paths in the use case path set include main use case paths or key use case paths, and the type of the target use case path is a key use case path.

6. The method according to claim 5, characterized in that The business path includes a basic business path, and the basic business path includes N business operation steps; M is a positive integer; the directed graph also includes a start node and an end node; The traversing of the business nodes in the directed graph to obtain a use case path set includes: Starting from the start node, traversing the N service nodes in the directed graph in sequence according to the execution order of the N service operation steps under the basic service path, until stopping at the end node; the N service nodes correspond one to one to the N service operation steps under the basic service path; A traversal path passing through the start node, the N service nodes, and the end node is determined as the main use case path.

7. The method according to claim 5, characterized in that The use case type of the target use case path is a key use case path; the directed graph further includes a start node and an end node; The step of exploring and obtaining a target use case path from the directed graph includes: Determining a target key business node in the directed graph; Using a shortest path graph traversal algorithm to traverse the directed graph to find a first path between the start node and the target key business node; and traversing the directed graph to find a second path between the target key business node and the end node; A path formed by concatenating the first path and the second path is determined as the target use case path.

8. The method according to claim 7, characterized in that The traversing and searching for a second path between the target key service node and the end node in the directed graph includes: If the type of the target key business node is the first type, then a main use case path is explored in the directed graph, and a second path is explored in the directed graph along the direction of the end node, returning from the target key business node to the main use case path, and reaching the end node along the main use case path; or, If the type of the target key business node is the first type, a shortest path graph traversal algorithm is used to traverse the directed graph to find a second path between the target key business node and the end node; or If the type of the target key business node is the second type, determining a path formed by connecting the target key business node and the end node as a second path; Among them, if the target key business node is used to represent the business operation steps in which the user generates an interactive behavior in the interactive interface and the tested business perceives and feeds back the interactive behavior, then the type of the target key business node is the first type; if the target key business node is used to represent the business operation steps in which the tested business provides an interactive interface to the user in the tested business, then the type of the target key business node is the second type.

9. The method according to claim 5, characterized in that The use case path set includes a first use case path set and a second use case path set, each of the first use case path set and the second use case path set includes one or more use case paths, wherein the use case paths in the first use case path set are used to generate test cases for verifying business operation behaviors, and the use case paths in the second use case path set are used to generate test cases for verifying business rules; the method further includes: The first use case path set and the second use case path set are optimized.

10. The method according to claim 9, characterized in that The optimizing the first use case path set and the second use case path set includes: If the first use case path set and the second use case path set include the same use case path, the same use case path is deleted from the first use case path set.

11. The method according to claim 1, characterized in that The obtaining of demand data includes: Obtaining a requirement description document, where the requirement description document is used to describe the business operation process of the business under test, and the requirement description document is a document in a first format; The requirement description document is parsed to obtain the requirement data, where the requirement data is data in a second format.

12. A data processing device, characterized in that: include: An acquisition unit, configured to acquire demand data, wherein the demand data includes a service path of the service under test and service operation steps under the service path; A processing unit, configured to construct a directed graph according to the demand data, wherein the directed graph includes service nodes and edges, wherein the service nodes are used to represent service operation steps in the tested service, and the edges are used to represent jump logic between service operation steps in the tested service; The processing unit is used to explore and obtain a target use case path from the directed graph, wherein the target use case path refers to a path passing through a target key business node in the directed graph; the target use case path is used to represent a business operation sequence of the business under test, and the target use case path is used to generate a target test case; The acquisition unit is used to acquire the business rules used by the target key business node, the business rules include M rule factors, the M rule factors are independent of each other, and M is a positive integer; each of the rule factors includes at least one rule item, and one rule item corresponds to one precondition; The processing unit is further used to perform cascade expansion processing on the M rule factors to obtain the precondition of the target test case; the cascade expansion processing includes steps S1-S4; S1, selecting the i-th rule factor from the M rule factors, i is a positive integer and i is less than or equal to M; S2, keeping the remaining rule factors except the selected i-th rule factor from the M rule factors unexpanded, and performing expansion processing on the i-th rule factor to obtain the x of the i-th rule factor i The rule items, x i is a positive integer; S3, repeating steps S1 and S2 until all the M rule factors are expanded and processed; S4. Generate P preconditions for the target test case according to the rule items obtained by expanding the M rule factors, where the value of P is 13. A data processing device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the data processing method according to any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor reads the computer instructions from the computer-readable storage medium, and the computer instructions are loaded by the processor to execute the data processing method according to any one of claims 1 to 11.