An automated testing method and device involving multi-system interactive interfaces
Through automated testing programs, initializing the database in a large information system and calling local interfaces for business logic processing, the blind spot problem of data flow testing between multiple subsystems is solved, efficient and general full-process testing is achieved, and testing quality and efficiency are improved.
Patent Information
- Application Number
- CN202011559860.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-12-25
AI Technical Summary
In large information systems, there are blind spots in business data flow testing between multiple subsystems, making it difficult to realize automated testing throughout the process, resulting in low testing efficiency and waste of resources.
The database of each subsystem is initialized through an automated test program, the original test data is inserted, and the local interface is called for business logic processing, the data processing results and interface processing results are compared, and the verification is completed to ensure the correctness of data and the verification of interface functions.
The testing of the entire business process has been realized, breaking the barriers between subsystems, improving the test quality, being universal, efficient and low resource consumption, filling the gap in data flow testing between multiple subsystems.
Smart Images

Figure CN112612703B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of system interface testing, and more specifically, to an automated testing method and device involving multi-system interactive interfaces. Background Art
[0002] With the rapid development of information system construction, how to ensure the correctness of business data flow between each subsystem of a large information system has always been a difficult problem in testing. Especially when multiple construction units are responsible for a certain subsystem, there are often blind spots in the testing of business data flow between multiple subsystem interfaces.
[0003] The present invention aims to connect the interfaces and business data storage between multiple subsystems. First, the database of each subsystem is initialized through an automated testing program, and then the local interface of the system under test is called to perform business logic processing. Finally, the automated testing program compares the data processing results of each subsystem and the business logic processing results of the local interface of the system under test to complete the verification work and accurately locate the problem.
[0004] The present invention is convenient for testers to use, has certain versatility in the field of full-process testing of data business flow in large-scale information systems, is easy to maintain, has high operating efficiency, consumes little resources, and fills the testing gap in data flow between multiple subsystems during the full-process testing process. Summary of the invention
[0005] In order to solve the problem that the prior art is difficult to realize automated full-process testing of multi-system interactive interfaces, the present invention provides an automated testing method involving multi-system interactive interfaces, the method comprising:
[0006] Initialize each associated system database and insert original test data into system one;
[0007] System 1 receives and processes the original test data request, and stores the processed original test data into system 2;
[0008] Determine whether the processed original test data stored in the second system is correct; if not, return the system second data storage failure information and end the test;
[0009] If yes, the local interface is called to send a service request to system 2 and receive the return result;
[0010] According to the returned result, determine whether the local interface processing result is correct; if not, return the interface processing data failure information and end the test;
[0011] If yes, then determine whether the data status of system 2 is updated correctly; if not, return the system 2 data update failure information and end the test;
[0012] If so, the system returns the successful verification information of the data processing and local interface processing functions of system 2, completing the whole process test.
[0013] Furthermore, before initializing each associated system database, the method further includes: preparing original test data.
[0014] Further, the preparing original test data includes:
[0015] Prepare original test data of the system-related table names and non-empty fields of the database.
[0016] Furthermore, the associated system databases include Oracle and MySQL.
[0017] Furthermore, the initialization of each associated system database and the insertion of original test data into system one, the determination of whether the processed original test data stored in system two is correct, the calling of the local interface to send a business request to system two, the determination of whether the local interface processing result is correct, and the determination of whether the data status update of system two is correct are completed by adopting an automated testing program.
[0018] An automated testing device for a multi-system interactive interface, the device comprising:
[0019] An initialization unit, one end of which is connected to the judgment test unit; the initialization unit is used to initialize each associated system database and insert original test data into system one;
[0020] A judgment test unit, one end of which is connected to the output unit; the judgment test unit is used to judge whether the original test data received by system one and stored in system two after processing is correct; the judgment test unit is also used to call the local interface to send a service request to system two and receive a return result; the judgment test unit is also used to judge whether the local interface processing result is correct based on the return result; the judgment test unit is also used to judge whether the data status update of system two is correct; the judgment test unit is also used to send the above judgment information to the output unit;
[0021] An output unit, wherein the output unit is used to output the test result to the user according to the judgment information.
[0022] Furthermore, the device also includes:
[0023] A data preparation unit, one end of which is connected to the initialization unit; the data preparation unit is used to prepare original test data of the table names and non-empty fields related to the system-1 database, and send the original test data to the initialization unit.
[0024] Furthermore, the associated system databases include Oracle and MySQL.
[0025] Furthermore, the initialization of each associated system database and the insertion of original test data into system one, the determination of whether the processed original test data stored in system two is correct, the calling of the local interface to send a business request to system two, the determination of whether the local interface processing result is correct, and the determination of whether the data status update of system two is correct are completed by adopting an automated testing program.
[0026] The beneficial effects of the present invention are as follows: the technical scheme of the present invention provides an automated testing method and device involving multi-system interactive interfaces, the method comprising initializing the database of each related system through an automated testing program, and then calling the local interface of the system under test to perform business logic processing; the automated testing program compares the data processing results of each related system and the business logic processing results of the local interface of the system under test, completes the verification work, accurately locates the problem, and implements testing work from the perspective of the entire business process, breaking the barriers between the respective systems and improving the testing quality of the entire link system; the present invention has certain versatility in the field of full-process testing of data business flow in large-scale information systems, the scheme is easy to maintain, has high operating efficiency, and consumes little resources, filling the gap in testing data flow between multiple related systems during the full-process testing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0028] Figure 1 A flowchart of an automated testing method involving a multi-system interactive interface according to a specific implementation of the present invention;
[0029] Figure 2 This is a structural diagram of an automated testing device involving a multi-system interactive interface according to a specific implementation of the present invention. DETAILED DESCRIPTION
[0030] Now, exemplary embodiments of the present invention are described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely and to fully convey the scope of the present invention to those skilled in the art. The terms used in the exemplary embodiments shown in the accompanying drawings are not intended to limit the present invention. In the accompanying drawings, the same units / elements are marked with the same reference numerals.
[0031] Unless otherwise specified, the terms (including technical terms) used herein have the commonly understood meanings to those skilled in the art. In addition, it is understood that the terms defined in commonly used dictionaries should be understood to have the same meanings as those in the context of the relevant fields, and should not be understood as idealized or overly formal meanings.
[0032] Figure 1 FIG. 1 is a flow chart of an automated testing method involving a multi-system interactive interface according to a specific embodiment of the present invention. Figure 1 As shown, the method includes:
[0033] Step 110, prepare original test data; specifically, in order to reduce the difficulty of testing the entire process business data, this example is carried out around the local interface test; first start with the data preparation of the upstream system (system one) of the local interface, use Python language to write code, and simplify the preparation of the original test data. The tester only needs to prepare the table name and original data of the non-empty fields related to the upstream system (system one) database, and can insert various original test data of different test scenarios into the upstream system (system one) database of the local interface through the program, thereby realizing the process of preparing the original test data.
[0034] Step 120, initialize each associated system database, and insert the original test data prepared in step 110 into the upstream system (system one); specifically, the business data of the upstream system (system one) is normally generated in the upstream system (system one), and we can directly provide the original test data of the upstream system (system one) to the local interface by creating data in the database of the upstream system (system one);
[0035] Furthermore, the databases of the associated systems include Oracle and MySQL; the initialization of the databases of the associated systems and the insertion of original test data into the upstream system (system one) are completed by adopting an automated testing program.
[0036] Step 130, the upstream system (system one) receives and processes the original test data request, and stores the processed original test data into the downstream system (system two).
[0037] Step 140, using an automated testing program to determine whether the processed original test data stored in the downstream system (system two) is correct; if not, returning the downstream system (system two) data storage failure information and ending the test; if so, executing step 150.
[0038] Step 150: The automated test program calls the local interface to send a service request to the downstream system (system 2), and receives a return result.
[0039] Step 160, judging whether the local interface processing result is correct according to the returned result; if not, returning the interface processing data failure information and ending the test; if so, executing step 170.
[0040] Step 170 , the automated program determines whether the data status of the downstream system (system 2) is updated correctly; if not, it returns the downstream system (system 2) data update failure information and ends the test; if so, execute step 180 .
[0041] Step 180, return the downstream system (system 2) data processing and local interface processing function verification success information, and complete the whole process test.
[0042] The method includes initializing the database of each related system through an automated testing program, and then calling the local tested system interface to perform business logic processing; the automated testing program compares the data processing results of each related system and the business logic processing results of the local tested system interface, completes the verification work, accurately locates the problem, and implements the testing work from the whole business process, breaking the barriers between the respective systems and improving the testing quality of the whole link system; the method has certain versatility in the field of full-process testing of data business flow of large-scale information systems, is easy to maintain, has high operating efficiency, consumes little resources, and fills the test gap in the data flow between multiple related systems during the full-process testing process.
[0043] This method has been explored and practiced in the integrated value-added tax service platform. It is easy to use, configurable, and easy to regress, which improves work efficiency. It has reference and guiding significance for the full-process business data flow testing work of other large-scale information system projects and has high use value.
[0044] Figure 2 FIG. 1 is a structural diagram of an automated testing device involving a multi-system interactive interface according to a specific embodiment of the present invention. Figure 2 As shown, the device comprises:
[0045] The data preparation unit 110 has one end connected to the initialization unit 120 ; the data preparation unit 110 is used to prepare the original test data of the table name and non-empty fields of the system-1 database, and send the original test data to the initialization unit 120 .
[0046] Specifically, in order to reduce the difficulty of testing the entire process of business data, this example is carried out around the local interface test; first, start with the data preparation of the upstream system (system one) of the local interface, use Python language to write code, and simplify the preparation of the original test data. Testers only need to prepare the table names and original data of non-empty fields related to the upstream system (system one) database, and then insert various original test data of different test scenarios into the upstream system (system one) database of the local interface through the program, thus realizing the process of preparing the original test data.
[0047] Initialization unit 120, one end of which is connected to the judgment test unit 130; the initialization unit 120 is used to initialize each associated system database and insert original test data into the upstream system (system one);
[0048] Furthermore, the databases of the associated systems include Oracle and MySQL; the initialization of the databases of the associated systems and the insertion of original test data into the upstream system (system one) are completed by adopting an automated testing program.
[0049] A judgment test unit 130, one end of which is connected to an output unit 140; the judgment test unit 130 is used to judge whether the original test data received by the upstream system (system one) and stored in the downstream system (system two) after processing is correct; the judgment test unit 130 is also used to call a local interface to send a service request to the downstream system (system two) and receive a return result; the judgment test unit 130 is also used to judge whether the local interface processing result is correct based on the return result; the judgment test unit 130 is also used to judge whether the data status update of the downstream system (system two) is correct; the judgment test unit 130 is also used to send the above judgment information to the output unit 140;
[0050] Furthermore, the determination of whether the processed original test data stored in the downstream system (system two) is correct, the calling of the local interface to send a business request to the downstream system (system two), the determination of whether the local interface processing result is correct, and the determination of whether the data status update of the downstream system (system two) is correct are completed by adopting an automated testing program.
[0051] The output unit 140 is used to output the test result to the user according to the judgment information.
[0052] The device includes initializing the database of each related system through an automated testing program, and then calling the local interface of the system under test to perform business logic processing; the automated testing program compares the data processing results of each related system and the business logic processing results of the local interface of the system under test, completes the verification work, accurately locates the problem, and implements testing work from the whole business process, breaking the barriers between the respective systems and improving the testing quality of the whole link system; the device has certain versatility in the field of full-process testing of data business flow of large-scale information systems, is easy to maintain, has high operating efficiency, consumes little resources, and fills the test gap in data flow between multiple related systems during the full-process testing process.
[0053] This device has been explored and practiced in the integrated value-added tax service platform. It is easy to use, configurable, and easy to regress, which improves work efficiency. It has reference and guiding significance for the full-process business data flow testing work of other large-scale information system projects and has high use value.
[0054] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0055] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition they can be divided into multiple submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner can be combined in any combination. Unless otherwise explicitly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose. The step numbers involved in this specification are only used to distinguish the steps, and are not used to limit the time or logical relationship between the steps. Unless there is a clear definition in the text, the relationship between the steps includes various possible situations.
[0056] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present disclosure and form different embodiments. For example, any one of the embodiments claimed in the claims can be used in any combination.
[0057] The various component embodiments of the present disclosure can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. The present disclosure can also be implemented as a device or system program (e.g., computer program and computer program product) for performing a part or all of the methods described herein. Such a program implementing the present disclosure can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0058] It should be noted that the above embodiments illustrate rather than limit the present disclosure, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of systems, several of these systems may be embodied by the same item of hardware.
[0059] The above description is only a specific implementation mode of the present disclosure. It should be pointed out that, for ordinary technicians in this field, several improvements, modifications, and deformations can be made without departing from the spirit of the present disclosure. These improvements, modifications, and deformations should be deemed to fall within the scope of protection of this application.
Claims
1. An automated testing method involving multi-system interactive interfaces, characterized in that: The method comprises: Initialize each associated system database and insert original test data into system one; System 1 receives and processes the original test data request, and stores the processed original test data into system 2; Determine whether the processed original test data stored in the second system is correct; if not, return the system second data storage failure information and end the test; If yes, the local interface is called to send a service request to system 2 and receive the return result; According to the returned result, determine whether the local interface processing result is correct; if not, return the interface processing data failure information and end the test; If yes, then determine whether the data status of system 2 is updated correctly; if not, return the system 2 data update failure information and end the test; If so, the system returns the successful verification information of the data processing and local interface processing functions of system 2, completing the whole process test.
2. The method according to claim 1, characterized in that Before initializing each associated system database, the process also includes: preparing original test data.
3. The method according to claim 2, characterized in that The preparation of original test data includes: Prepare original test data of the system-related table names and non-empty fields of the database.
4. The method according to claim 1, characterized in that: The associated system databases include Oracle and MySQL.
5. The method according to claim 1, characterized in that: The steps of initializing each associated system database and inserting original test data into system one, determining whether the processed original test data stored in system two is correct, calling the local interface to send a business request to system two, determining whether the local interface processing result is correct, and determining whether the data status update of system two is correct are completed by using an automated testing program.
6. An automated testing device involving a multi-system interactive interface, characterized in that: The device comprises: An initialization unit, one end of which is connected to the judgment test unit; the initialization unit is used to initialize each associated system database and insert original test data into system one; A judgment test unit, one end of which is connected to the output unit; the judgment test unit is used to judge whether the original test data received by system one and stored in system two after processing is correct; the judgment test unit is also used to call the local interface to send a service request to system two and receive a return result; the judgment test unit is also used to judge whether the local interface processing result is correct based on the return result; the judgment test unit is also used to judge whether the data status update of system two is correct; the judgment test unit is also used to send the above judgment information to the output unit; An output unit, wherein the output unit is used to output the test result to the user according to the judgment information.
7. The device according to claim 6, characterized in that The device also includes: A data preparation unit, one end of which is connected to the initialization unit; the data preparation unit is used to prepare original test data of the table names and non-empty fields related to the system-1 database, and send the original test data to the initialization unit.
8. The device according to claim 6, characterized in that: The associated system databases include Oracle and MySQL.
9. The device according to claim 6, characterized in that: The steps of initializing each associated system database and inserting original test data into system one, determining whether the processed original test data stored in system two is correct, calling the local interface to send a business request to system two, determining whether the local interface processing result is correct, and determining whether the data status update of system two is correct are completed by using an automated testing program.
