A method and device for automatically generating batches of automated transaction chain cases in all scenarios
Through the batch automatic generation method and device of full-scene transaction chain automation cases, the problem of not being able to fully cover complex business test scenarios in the existing technology is solved, and the full-scene coverage of transaction chain cases and the improvement of automated test efficiency is achieved.
Patent Information
- Application Number
- CN202111483821.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The existing technology cannot fully cover the complex business test scenarios of multi-system interaction. The transaction chain cases are inefficient when written one by one, and the test data preparation time is long. The existing data filling logic cannot be automatically reused, resulting in low automated testing efficiency.
It provides a batch automatic generation method and device for automatic case generation of full-scene transaction chain automation cases. By obtaining selection instructions, single transaction script selection, field rule configuration, and field combination relationship configuration between transactions, it constructs a data model and scenario generation model, generates a set of transaction chain scenario case, and fills data through the test data middle platform to achieve batch generation of transaction chain cases.
It realizes full-scene coverage of transaction chain cases, avoids omissions in test scenarios during manual design, improves writing efficiency, and can automatically generate test data that complies with field rules and business rules, reduces test data preparation time, and improves overall automated testing efficiency.
Smart Images

Figure CN114218083B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automatic programming, and in particular to a method and device for automatically generating batches of automated cases for a full-scenario transaction chain. Background Art
[0002] As software business scenarios become more diverse and complex, there are more and more complex business scenario tests for interactive serial execution of transactions between single systems or across systems (transaction chains), and the corresponding transaction chain automation testing has become important and urgent. At present, complex business test scenarios in the process of serial execution of multiple transactions between multiple systems have not been fully covered, and it is impossible to realize the solution of automatically batch generating transaction chain automation cases.
[0003] However, the inventors of this application found that the above technology has at least the following technical problems in the process of implementing the technical solution of the invention in the embodiment of this application:
[0004] There are problems such as the inability to fully cover complex business test scenarios that involve multi-system interactions, low efficiency when writing transaction chain cases one by one, a long time to prepare test data, an inability to automatically reuse existing data filling logic, and low efficiency of automated testing. Summary of the invention
[0005] The embodiment of the present application provides a method and device for batch automatic generation of full-scenario transaction chain automation cases, which solves the technical problems in the prior art that the complex business test scenarios of multi-system interactions cannot be fully covered, the efficiency of writing transaction chain cases one by one is low, the test data preparation is long, the existing data filling logic cannot be automatically reused, and the efficiency of automated testing is low. The technical effect of achieving full-scenario coverage of transaction chain cases, avoiding missing test scenarios during manual design, improving writing efficiency, being able to automatically generate test data that conforms to field rules and business rules, reducing the time for test data preparation, and improving the efficiency of automated testing as a whole is achieved.
[0006] In view of the above problems, an embodiment of the present application provides a method and device for automatically generating batches of automated transaction chain cases in all scenarios.
[0007] In a first aspect, an embodiment of the present application provides a method for batch automatic generation of full-scenario transaction chain automation cases, wherein the method includes: obtaining a first selection instruction, selecting a single transaction script according to the first selection instruction, and obtaining a first selection result; obtaining a first single transaction field rule configuration instruction, configuring a single transaction field rule according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result; obtaining a first transaction field combination relationship configuration instruction, configuring the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and building a transaction chain case scenario generation model according to the configuration result; generating a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; filling the script data filling model with script data through a test data middle platform, and based on the script data filling result, batch generating transaction chain cases through the transaction chain scenario case set.
[0008] On the other hand, an embodiment of the present application provides a device for automatically generating batches of automated transaction chain cases in a full scenario, wherein the device includes: a first obtaining unit, the first obtaining unit is used to obtain a first selection instruction, select a single transaction script according to the first selection instruction, and obtain a first selection result; a second obtaining unit, the second obtaining unit is used to obtain a first single transaction field rule configuration instruction, configure a single transaction field rule according to the first single transaction field rule configuration instruction, and build a data model according to the configuration result; a third obtaining unit, the third obtaining unit is used to obtain a first transaction field combination relationship configuration instruction, configure the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and build a transaction chain case scenario generation model according to the configuration result; a first generating unit, the first generating unit is used to generate a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; a first executing unit, the first executing unit is used to fill the script data filling model with script data through a test data middle platform, and based on the script data filling result, batch generate transaction chain cases through the transaction chain scenario case set.
[0009] In the third aspect, an embodiment of the present application provides a device for automatically generating batches of automated cases for a full-scenario transaction chain, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.
[0010] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0011] Due to the adoption of obtaining a first selection instruction, selecting a single transaction script according to the first selection instruction, and obtaining a first selection result; obtaining a first single transaction field rule configuration instruction, configuring a single transaction field rule according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result; obtaining a first inter-transaction field combination relationship configuration instruction, configuring the inter-transaction field combination relationship according to the first inter-transaction field combination relationship configuration instruction, and building a transaction chain case scenario generation model according to the configuration result; generating a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; filling the script data filling model with script data through a test data middle platform, and batch generating transaction chain cases through the transaction chain scenario case set based on the script data filling result. The embodiment of the present application provides a method and device for batch automatic generation of full-scenario transaction chain automation cases, thereby achieving full-scenario coverage of transaction chain cases, avoiding omission of test scenarios during manual design, improving writing efficiency, being able to automatically generate test data that conforms to field rules and business rules, reducing the time for test data preparation, and improving the overall technical effect of improving the efficiency of automated testing.
[0012] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of a method for automatically generating batches of automated transaction chain cases in all scenarios according to an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a flow chart of configuring the field combination relationship between transactions in a method for automatically generating batches of automated transaction chain cases in all scenarios according to an embodiment of the present application;
[0015] Figure 3 A schematic diagram of a process for selecting a single transaction script in a method for automatically generating batches of automated transaction chain cases in a full-scenario transaction chain according to an embodiment of the present application;
[0016] Figure 4 A schematic diagram of a process of constructing a data model according to a configuration result in a method for automatically generating batches of automated transaction chain cases in a full-scenario manner according to an embodiment of the present application;
[0017] Figure 5This is a structural schematic diagram of a device for automatically generating batches of automated transaction chain cases in all scenarios according to an embodiment of the present application;
[0018] Figure 6 It is a schematic diagram of the structure of an exemplary electronic device according to an embodiment of the present application.
[0019] Explanation of the reference numerals: first obtaining unit 11 , second obtaining unit 12 , third obtaining unit 13 , first generating unit 14 , first executing unit 15 , electronic device 300 , memory 301 , processor 302 , communication interface 303 , bus architecture 304 . DETAILED DESCRIPTION
[0020] The embodiment of the present application provides a method and device for batch automatic generation of full-scenario transaction chain automation cases, which solves the technical problems in the prior art that the complex business test scenarios of multi-system interactions cannot be fully covered, the efficiency of writing transaction chain cases one by one is low, the test data preparation is long, the existing data filling logic cannot be automatically reused, and the efficiency of automated testing is low. The technical effect of achieving full-scenario coverage of transaction chain cases, avoiding missing test scenarios during manual design, improving writing efficiency, being able to automatically generate test data that conforms to field rules and business rules, reducing the time for test data preparation, and improving the efficiency of automated testing as a whole is achieved.
[0021] Application Overview
[0022] With the increasing diversification and complexity of software business scenarios, there are more and more complex business scenario tests for the interactive serial execution of transactions between single systems or across systems (transaction chains), and the corresponding transaction chain automation testing has become important and urgent. At present, complex business test scenarios in the process of serial execution of multiple transactions between multiple systems have not been fully covered, and it is impossible to realize the automatic batch generation of transaction chain automation cases. There are technical problems in the existing technology that cannot fully cover complex business test scenarios of multi-system interactions, the efficiency is low when writing transaction chain cases one by one, the test data preparation is long, the existing data filling logic cannot be automatically reused, and the efficiency of automated testing is low.
[0023] In response to the above technical problems, the overall idea of the technical solution provided by this application is as follows:
[0024] An embodiment of the present application provides a method for batch automatic generation of full-scenario transaction chain automation cases, wherein the method includes: obtaining a first selection instruction, selecting a single transaction script according to the first selection instruction, and obtaining a first selection result; obtaining a first single transaction field rule configuration instruction, configuring a single transaction field rule according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result; obtaining a first transaction field combination relationship configuration instruction, configuring the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and building a transaction chain case scenario generation model according to the configuration result; generating a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; filling the script data filling model with script data through a test data middle platform, and based on the script data filling result, batch generating transaction chain cases through the transaction chain scenario case set.
[0025] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application will be specifically described below in conjunction with the drawings in the specification.
[0026] Embodiment 1
[0027] like Figure 1 As shown, the embodiment of the present application provides a method for automatically generating batches of automated transaction chain cases in all scenarios, wherein the method includes:
[0028] S100: Obtain a first selection instruction, select a single transaction script according to the first selection instruction, and obtain a first selection result;
[0029] S200: Obtain a first transaction field rule configuration instruction, perform single transaction field rule configuration according to the first transaction field rule configuration instruction, and build a data model according to the configuration result;
[0030] Specifically, with the increasing diversification and complexity of software business scenarios, there are more and more complex business scenario tests for interactive serial execution (transaction chain) between transactions in a single system or across systems, and the corresponding transaction chain automation testing has become important and urgent. In order to realize the rapid generation of transaction chain automation cases for all scenarios, the first selection instruction is obtained, and the required single transaction script is selected according to the first selection instruction. The automation script module provides the automation script of the single transaction. The automation script module supports interface automation scripts, interface automation scripts, etc. Further, the single transaction script is expanded according to the time sequence between transactions to obtain the first selection result. The transaction field rules are configured according to the first single transaction field rule configuration instruction, and a data model is constructed according to the configuration result. The data model can meet the needs of data filling. Lay the foundation for the script data filling of the subsequent transaction chain case set.
[0031] S300: Obtain a first transaction field combination relationship configuration instruction, configure the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and build a transaction chain case scenario generation model according to the configuration result;
[0032] Specifically, when the transaction chain connects different transactions in series, the scene combination relationship between transactions can be generated by the field combination relationship between transactions. According to the first transaction field combination relationship configuration instruction, the transaction field combination relationship is configured. The transaction field combination relationship includes Cartesian relationship, left coverage, right coverage, function relationship, mutual exclusion relationship, cascade relationship, etc., and supports multiple combination configurations to build the transaction chain case scenario generation model, which is used to generate a transaction chain case scenario set. The transaction chain case scenario set can be a series of scenarios such as configuring global signature products, adding global signature signers, purchasing global signature products, and querying global signing orders when purchasing global signature products. It can complete the full scene coverage of transaction chain cases, fully cover business test scenarios, and avoid the omission of test scenarios when manually designing long transaction chain cases.
[0033] S400: Generate a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model;
[0034] S500: The script data filling model is filled with script data through the test data middle platform, and based on the script data filling result, batch generation of transaction chain cases is performed through the transaction chain scenario case set.
[0035] Specifically, based on the first selection result, the transaction chain case scenario generation model and the data model, a transaction chain scenario case set is automatically generated in batches, and the transaction chain scenario case set includes a single transaction script combination and a script data filling model. The test data middle station can provide data that meets the conditions according to the scenario combination between transactions and the transaction field value rules. The script data filling model is filled with script data through the test data middle station, and the data that meets the rules is extracted and constructed and returned to the transaction chain automation script. Through real-time interaction between the automated testing platform and the test data middle station, the data of the transaction chain automation script is automatically filled, thereby completing the script data filling of the transaction chain case set. Among them, the test data middle station returns the test data of the transaction chain case according to the field rules of the transaction, and the returned results and test data are saved in the automated testing platform. The tester can view the execution data and the corresponding results for statistics and analysis. Thereby improving the efficiency of automated case writing, and automatically generating test data that meets the field rules and business rules, reducing the time for test data preparation, and improving the overall efficiency of automated testing.
[0036] Further, such as Figure 2 As shown, the inter-transaction field combination relationship configuration is performed according to the first inter-transaction field combination relationship configuration instruction, and step S300 further includes:
[0037] S310: Obtain a first transaction and a second transaction, wherein the first transaction is different from the second transaction, and construct a transaction relationship between the first transaction and the second transaction based on a first transaction relationship to obtain a first construction result;
[0038] S320: Obtain a third transaction, wherein the third transaction is different from the first transaction and the second transaction, and construct an inter-transaction relationship between the second transaction and the third transaction based on a second inter-transaction relationship to obtain a second construction result;
[0039] S330: Complete the configuration of the field combination relationship between transactions through the first construction result and the second construction result.
[0040] Furthermore, step S310 also includes:
[0041] Step S311: The first inter-transaction relationship and the second inter-transaction relationship include but are not limited to a Cartesian relationship, a left covering relationship, a right covering relationship, a functional relationship, a mutually exclusive relationship, and a cascade relationship.
[0042] Specifically, when configuring the inter-transaction field combination relationship, firstly, the single transaction field rule is configured according to the inter-transaction field combination relationship configuration instruction to obtain different first transactions and second transactions. Secondly, according to the inter-transaction field combination relationship, i.e., the first inter-transaction relationship, the inter-transaction relationship is constructed to obtain the first construction result. Further, the third transaction different from the first transaction and the second transaction is obtained, and the inter-transaction relationship between the second transaction and the third transaction is constructed based on the second inter-transaction relationship to obtain the second construction result, wherein the first inter-transaction relationship and the second inter-transaction relationship include but are not limited to Cartesian relationship, left covering relationship, right covering relationship, functional relationship, mutually exclusive relationship, and cascade relationship. For example, the first transaction constructs the inter-transaction relationship with the second transaction through Cartesian relationship and functional relationship, and the second transaction constructs the inter-transaction relationship with the third transaction through right covering relationship and functional relationship. According to the first construction result and the second construction result, the inter-transaction field combination relationship configuration can be completed quickly.
[0043] Furthermore, the single transaction script is selected according to the first selection instruction to obtain a first selection result, and step S100 further includes:
[0044] S110: Obtaining a first predetermined transaction time sequence;
[0045] S120: Performing timing configuration of a single transaction script constituting a transaction chain based on the first predetermined transaction timing to obtain a first timing configuration result;
[0046] S130: Obtain the first selection result according to the first timing configuration result.
[0047] Specifically, most financial data, from stock prices to GDP values, are time-varying variables, and the sequence of different values at different time points is called time series. The first predetermined transaction time series is obtained, and the time series configuration is performed according to the first predetermined transaction time series to obtain the first time series configuration result. Based on the first time series configuration result, the single transaction script is expanded according to the preset transaction time series to obtain the first selection result. The first selection result satisfies the required time series, thereby realizing the time series combination of transactions.
[0048] Further, such as Figure 4 As shown, the step S200 further includes obtaining a first transaction field rule configuration instruction, configuring a single transaction field rule according to the first transaction field rule configuration instruction, and constructing a data model according to the configuration result:
[0049] S210: Obtain a fourth transaction, and perform field segmentation on the fourth transaction according to the first transaction field rule configuration instruction to obtain a first field segmentation result;
[0050] S220: performing rule distribution of the first transaction rules of each field based on the first field segmentation result to obtain the configuration result;
[0051] S230: Construct the data model based on the configuration result.
[0052] Furthermore, step S220 further includes:
[0053] S221: The first transaction rules include but are not limited to function construction rules, fixed value rules and SQL value rules.
[0054] Specifically, the fourth transaction is obtained, and after the fourth transaction field is segmented according to the first transaction field rule configuration instruction, the first transaction rule is distributed according to the rules of each field, and the first transaction rule includes but is not limited to the function construction rule, the fixed value rule and the sql value rule, that is, the multiple fields generated after the transaction segmentation can use different value rules. For example, the fourth transaction is segmented into 5 fields, where fields 1 and 2 are distributed according to the function construction rule, fields 3 and 5 are distributed according to the sql value rule, and field 4 is distributed according to the fixed value rule. The configuration result is obtained, and a data model is constructed according to the configuration result, and the data model can meet the needs of data filling.
[0055] In summary, the method and device for automatically generating batches of automated transaction chain cases in all scenarios provided by the embodiments of the present application have the following technical effects:
[0056] 1. Due to the adoption of obtaining a first selection instruction, selecting a single transaction script according to the first selection instruction, and obtaining a first selection result; obtaining a first single transaction field rule configuration instruction, configuring a single transaction field rule according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result; obtaining a first transaction field combination relationship configuration instruction, configuring the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and building a transaction chain case scenario generation model according to the configuration result; generating a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; filling the script data filling model with script data through a test data middle platform, and batch generating transaction chain cases through the transaction chain scenario case set based on the script data filling result. The technical solution, the embodiment of the present application provides a method and device for batch automatic generation of full-scenario transaction chain automation cases, so as to achieve full-scenario coverage of transaction chain cases, avoid missing test scenarios during manual design, improve writing efficiency, and can automatically generate test data that conforms to field rules and business rules, reduce the time for test data preparation, and improve the overall efficiency of automated testing.
[0057] 2. By adopting the method of classifying the data scenario combination methods of the multi-transaction serial execution process, a full-scenario transaction chain automation script set is generated, which is not only suitable for data-driven test cases, but also for automation script-driven test cases, thereby achieving the technical effect of reducing the cost of manually writing transaction chain automation scripts and avoiding the omission of test scenarios in the business chain.
[0058] Embodiment 2
[0059] Based on the same inventive concept as the method for automatically generating batches of automated transaction chain cases in the aforementioned embodiment, Figure 5 As shown, the embodiment of the present application provides a device for automatically generating batches of automated transaction chain cases in all scenarios, wherein the device includes:
[0060] A first obtaining unit 11, the first obtaining unit 11 is used to obtain a first selection instruction, perform single transaction script selection according to the first selection instruction, and obtain a first selection result;
[0061] A second obtaining unit 12, the second obtaining unit 12 is used to obtain a first single transaction field rule configuration instruction, perform single transaction field rule configuration according to the first single transaction field rule configuration instruction, and build a data model according to the configuration result;
[0062] A third obtaining unit 13, the third obtaining unit 13 is used to obtain a first transaction field combination relationship configuration instruction, perform transaction field combination relationship configuration according to the first transaction field combination relationship configuration instruction, and build a transaction chain case scenario generation model according to the configuration result;
[0063] A first generating unit 14, the first generating unit 14 is used to generate a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model;
[0064] The first execution unit 15 is used to perform script data filling on the script data filling model through the test data middle platform, and based on the script data filling result, perform batch generation of transaction chain cases through the transaction chain scenario case set.
[0065] Furthermore, the device comprises:
[0066] a fourth obtaining unit, the fourth obtaining unit being configured to obtain a first transaction and a second transaction, wherein the first transaction is different from the second transaction, and constructing an inter-transaction relationship between the first transaction and the second transaction based on the first inter-transaction relationship to obtain a first construction result;
[0067] a fifth obtaining unit, the fifth obtaining unit being configured to obtain a third transaction, wherein the third transaction is different from the first transaction and the second transaction, and constructing an inter-transaction relationship between the second transaction and the third transaction based on a second inter-transaction relationship to obtain a second construction result;
[0068] The second execution unit is used to complete the configuration of the field combination relationship between transactions through the first construction result and the second construction result.
[0069] Furthermore, the device comprises:
[0070] A sixth obtaining unit, the sixth obtaining unit being used to obtain a first predetermined transaction time sequence;
[0071] a seventh obtaining unit, the seventh obtaining unit being configured to perform a timing configuration of a single transaction script constituting a transaction chain based on the first predetermined transaction time sequence, and obtain a first timing configuration result;
[0072] An eighth obtaining unit, wherein the eighth obtaining unit is configured to obtain the first selection result according to the first timing configuration result.
[0073] Furthermore, the device comprises:
[0074] a ninth obtaining unit, the ninth obtaining unit being used to obtain a fourth transaction, and to perform field segmentation on the fourth transaction according to the first transaction field rule configuration instruction to obtain a first field segmentation result;
[0075] a tenth obtaining unit, the tenth obtaining unit being configured to perform rule distribution of the first transaction rules of each field based on the first field segmentation result to obtain the configuration result;
[0076] An eleventh obtaining unit, the eleventh obtaining unit is used to construct the data model based on the configuration result.
[0077] Exemplary Electronic Devices
[0078] Reference below Figure 6 To describe the electronic device of the embodiment of the present application,
[0079] Based on the same inventive concept as a method for batch automatic generation of automated transaction chain cases in the aforementioned embodiment, an embodiment of the present application also provides a device for batch automatic generation of automated transaction chain cases in the entire scenario, including: a processor, the processor is coupled to a memory, the memory is used to store a program, and when the program is executed by the processor, the device executes any one of the methods described in the first aspect.
[0080] The electronic device 300 includes: a processor 302, a communication interface 303, and a memory 301. Optionally, the electronic device 300 may also include a bus architecture 304. The communication interface 303, the processor 302, and the memory 301 may be interconnected via the bus architecture 304; the bus architecture 304 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus architecture 304 may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0081] The processor 302 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
[0082] The communication interface 303 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), wired access networks, etc.
[0083] The memory 301 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via the bus architecture 304. The memory may also be integrated with the processor.
[0084] The memory 301 is used to store computer execution instructions for executing the solution of the present application, and the execution is controlled by the processor 302. The processor 302 is used to execute the computer execution instructions stored in the memory 301, thereby realizing a method for automatically generating batches of automated transaction chain cases in a full-scenario manner provided in the above embodiment of the present application.
[0085] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0086] An embodiment of the present application provides a method for batch automatic generation of full-scenario transaction chain automation cases, wherein the method includes: obtaining a first selection instruction, selecting a single transaction script according to the first selection instruction, and obtaining a first selection result; obtaining a first single transaction field rule configuration instruction, configuring a single transaction field rule according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result; obtaining a first transaction field combination relationship configuration instruction, configuring the transaction field combination relationship according to the first transaction field combination relationship configuration instruction, and building a transaction chain case scenario generation model according to the configuration result; generating a transaction chain scenario case set based on the first selection result, the transaction chain case scenario generation model and the data model, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; filling the script data filling model with script data through a test data middle platform, and based on the script data filling result, batch generating transaction chain cases through the transaction chain scenario case set.
[0087] Those of ordinary skill in the art will appreciate that the various digital numbers such as the first and second involved in the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application, nor do they represent the order of precedence. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one" refers to one or more. At least two refers to two or more. "At least one", "any one" or similar expressions refer to any combination of these items, including any combination of single items (individuals) or plural items (individuals). For example, at least one item (individual, kind) of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0088] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server, data center, etc. that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
[0089] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration to implement.
[0090] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a terminal. Optionally, the processor and the storage medium can also be arranged in different components in the terminal. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0091] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A method for automatically generating batches of automated transaction chain cases in all scenarios. in, The method comprises: Obtain a first selection instruction, select a single transaction script according to the first selection instruction, and obtain a first selection result; Obtaining a first transaction field rule configuration instruction, performing single transaction field rule configuration according to the first transaction field rule configuration instruction, wherein the rule configuration includes a combined distribution of function construction rules, fixed value rules, and SQL value rules, and constructing a dynamic data model according to the configuration result; Obtaining a first inter-transaction field combination relationship configuration instruction, configuring the field combination relationship between the target single transaction script and other single transaction scripts according to the first inter-transaction field combination relationship configuration instruction, wherein the field combination relationship includes a preset Cartesian relationship, a cascade relationship, a left-overlapping relationship, and a mutually exclusive relationship. A transaction chain case scenario generation model is constructed according to the configuration result; Generate a transaction chain scenario case set based on the first selection result, the dynamic data model and the transaction chain case scenario, wherein the transaction chain scenario case set includes a single transaction script combination and a script data filling model; Among them, the scenario combination relationship between transactions is generated by the field combination relationship between transactions, and the test data middle platform generates test data that complies with business rules based on the scenario combination between transactions and the field rules of the transaction; the script data filling model is filled with script data, and based on the script data filling results, batch generation of transaction chain cases is performed through the transaction chain scenario case set.
2. The method according to claim 1, in, The configuring the inter-transaction field combination relationship according to the first inter-transaction field combination relationship configuration instruction also includes: Obtaining a first transaction and a second transaction, wherein the first transaction is different from the second transaction, and constructing an inter-transaction relationship between the first transaction and the second transaction based on a first inter-transaction relationship to obtain a first construction result; obtaining a third transaction, wherein the third transaction is different from the first transaction and the second transaction, and constructing an inter-transaction relationship between the second transaction and the third transaction based on a second inter-transaction relationship to obtain a second construction result; The configuration of the field combination relationship between transactions is completed through the first construction result and the second construction result.
3. The method according to claim 1, in, The selecting a single transaction script according to the first selection instruction to obtain a first selection result also includes: Obtaining the first scheduled transaction time sequence; Based on the first predetermined transaction time sequence, a time sequence configuration of a single transaction script constituting a transaction chain is performed to obtain a first time sequence configuration result; The first selection result is obtained according to the first timing configuration result.
4. The method according to claim 1, in, The obtaining of the first single transaction field rule configuration instruction, performing single transaction field rule configuration according to the first single transaction field rule configuration instruction, and building a data model according to the configuration result also includes: Obtain a fourth transaction, and perform field segmentation on the fourth transaction according to the first transaction field rule configuration instruction to obtain a first field segmentation result; Perform rule distribution of the first transaction rules of each field based on the first field segmentation result to obtain the configuration result; The data model is constructed based on the configuration result.
5. A device for automatically generating batches of automated transaction chain cases in all scenarios, include: A processor, the processor is coupled to a memory, the memory is used to store a program, when the program is executed by the processor, the device is enabled to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Global service data driven automatic test method, device, equipment and medium
CN111813661A
Method and device for automatically generating full-scene automatic test case through data combination calculation, storage medium and electronic equipment
CN112882956A