Method and device for multiplexing test data between associated systems
By performing full backup of the database of the associated system and processing of test data, the problem of low test data reuse rate is solved, efficient test data preparation and data backup are achieved, and data loss is avoided.
Patent Information
- Application Number
- CN202510378980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, the test data reuse rate is low, resulting in unavailability of the test environment and data accumulation.
By performing full backup of databases of multiple systems with associated relationships, testing is performed using database data, and processing it based on data change information in the test stage, multiplexing of test data is achieved.
It reduces the workload of test data preparation, shortens preparation time, improves development and testing efficiency, and avoids data loss during data reuse.
Smart Images

Figure CN120386726A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing, and in particular, to a method and device for reusing test data between associated systems. Background Art
[0002] During the test implementation process, test data often becomes unavailable due to various reasons such as the accumulation of various abnormal error reports and the batch running of the test environment. To address the above problems, currently, the test environment generally adopts the method of constructing new data to solve them. However, this solution will cause a large accumulation of unavailable test data. Summary of the Invention
[0003] The present invention is used to solve the problem of low test data reuse rate in the existing method of re-applying for test data.
[0004] To solve the above technical problems, a first aspect of the present invention provides a method for reusing test data between associated systems, including:
[0005] According to the global reuse indication, perform a full backup on the databases of multiple systems with an associated relationship to obtain multiple first copies. The databases of each system store the test data of each system;
[0006] Use the data in the databases of each system to perform tests. After the tests are completed, mount each first copy to the database related to each first copy;
[0007] According to the data change information of each system in the test phase, perform data change processing on the databases of each system;
[0008] Return to continue to execute the above full backup and subsequent steps.
[0009] As a further embodiment of the present invention, during or after the process of performing data change processing on the databases of each system according to the data change information of each system in the test phase, it further includes:
[0010] Receive a request for new full test data;
[0011] According to the request for new full test data, obtain the new test data of the systems related to the target business;
[0012] Add the new test data of the systems related to the target business to the databases of each system related to the target business.
[0013] As a further embodiment of the present invention, according to the request for new full test data, obtaining the new test data of the systems related to the target business includes:
[0014] According to the request for new full test data, obtain multiple first target systems associated with the target business;
[0015] Obtain multiple pieces of input data for the target service;
[0016] Use the multiple first target systems to execute transactions on each piece of input data to obtain new test data for each first target system.
[0017] As a further embodiment of the present invention, when performing a full backup on the databases of multiple systems with an association relationship, it further includes:
[0018] Record the duration spent on backing up each system with an association relationship;
[0019] If the duration spent on backing up a certain system is greater than a preset threshold, an alarm is issued.
[0020] As a further embodiment of the present invention, it further includes:
[0021] According to the local reuse indication, determine the local reuse strategy, the second target system, and the data items associated with the associated system of the second target system;
[0022] Obtain the data of the data items;
[0023] Back up the data of the data items according to the local reuse strategy to obtain a second copy and perform tests;
[0024] Obtain the latest test data of the second target system and store it in the database of the second target system;
[0025] Insert the second copy into the database of the second target system.
[0026] As a further embodiment of the present invention, when the local reuse strategy is the first local reuse strategy, backing up the data of the data items according to the local reuse strategy to obtain a second copy and performing tests includes:
[0027] Back up the data of the data items to obtain a second copy;
[0028] Use the data in the databases of the second target system and its associated system to perform tests.
[0029] As a further embodiment of the present invention, when the local reuse strategy is the second local reuse strategy, backing up the data of the data items according to the local reuse strategy to obtain a second copy and performing tests includes:
[0030] Use the data in the databases of the second target system and its associated system to perform tests;
[0031] Extract the data of the data items from the tested data and back up the data of the data items to obtain a second copy.
[0032] In a further embodiment of the present invention, it further includes:
[0033] Recording unavailable test data during the test process;
[0034] Mounting each first copy to the database related to each first copy, and updating the data in the database according to the unavailable test data.
[0035] In a further embodiment of the present invention, the data change information at least includes: database table structure change information and database instance change information.
[0036] A second aspect of the present invention provides a test data reuse device for associated systems, including:
[0037] A first backup unit, configured to perform a full backup on the databases of multiple systems with an associated relationship according to a global reuse instruction to obtain multiple first copies, and the databases of each system store the test data of each system;
[0038] A first reuse unit, configured to perform tests using the data in the databases of each system, and after the test is completed, mount each first copy to the database related to each first copy;
[0039] A correction unit, configured to perform data change processing on the databases of each system according to the data change information of each system in the test phase;
[0040] A loop control unit, configured to sequentially activate the first backup unit, the first reuse unit, and the correction unit.
[0041] In a further embodiment of the present invention, it further includes:
[0042] A local analysis unit, configured to determine a local reuse strategy, a second target system, and the data items associated between the second target system and its associated systems according to a local reuse instruction;
[0043] A first data preparation unit, configured to obtain the data of the data items;
[0044] A backup test unit, configured to perform a backup on the data of the data items according to the local reuse strategy to obtain a second copy and perform tests;
[0045] A second data preparation unit, configured to obtain the latest test data of the second target system and store it in the database of the second target system;
[0046] A second reuse unit, configured to insert the second copy into the database of the second target system.
[0047] The present invention provides a method and device for reusing test data between associated systems. By performing a full backup on the databases of multiple systems with an associated relationship according to a global reuse indication, multiple first copies are obtained. The databases of each system store the test data of each system; use the data in the databases of each system to perform tests. After the tests are completed, mount each first copy to the database associated with each first copy; according to the data change information of each system in the test phase, perform data change processing on the databases of each system; return to continue to execute the above full backup and subsequent steps, which can realize the reuse of test data between associated systems, reduce the workload of preparing test data, shorten the test data preparation time, and improve the development and test efficiency. At the same time, while realizing the reuse of test data, data backup is realized to avoid the loss of test data due to hardware failures, software errors, human operations, or natural disasters, etc.
[0048] To make the above and other objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and cooperates with the attached drawings to make a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0050] Figure 1 Shows the structural diagram of the test data reuse system between associated systems in an embodiment of the present invention;
[0051] Figure 2 Shows the first flowchart of the method for reusing test data between associated systems in an embodiment of the present application;
[0052] Figure 3 Shows the first schematic diagram of the test process and the data change process in an embodiment of the present application;
[0053] Figure 4 Shows the second flowchart of the method for reusing test data between associated systems in an embodiment of the present invention;
[0054] Figure 5 Shows the third flowchart of the method for reusing test data between associated systems in an embodiment of the present invention;
[0055] Figure 6 Shows the second schematic diagram of the test process and the data change process in an embodiment of the present invention;
[0056] Figure 7The third schematic diagram showing the test process and the data change process of the embodiments of the present invention;
[0057] Figure 8 The first structural diagram of the test data reuse device between associated systems according to the embodiments of the present invention;
[0058] Figure 9 The second structural diagram of the test data reuse device between associated systems according to the embodiments of the present invention;
[0059] Figure 10 The structural diagram of the computer device according to the embodiments of the present invention.
[0060] Description of the reference numerals in the drawings:
[0061] 101, Client;
[0062] 102, Server;
[0063] 801, First backup unit;
[0064] 802, First reuse unit;
[0065] 803, Correction unit;
[0066] 804, Loop control unit;
[0067] 901, Local analysis unit;
[0068] 902, First data preparation unit;
[0069] 903, Backup test unit;
[0070] 904, Second data preparation unit;
[0071] 905, Second reuse unit;
[0072] 1002, Computer device;
[0073] 1004, Processor;
[0074] 1006, Memory;
[0075] 1008, Driving mechanism;
[0076] 1010, Input / output module;
[0077] 1012, Input device;
[0078] 1014, Output device;
[0079] 1016, Presentation device;
[0080] 1018, Graphical user interface;
[0081] 1020, Network interface;
[0082] 1022, Communication link;
[0083] 1024, Communication bus. Detailed implementation manner
[0084] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0085] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data used in appropriate cases can be interchanged so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment including a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.
[0086] This specification provides the method operation steps as described in the embodiments or flowcharts, but based on routine or non-creative labor, it may include more or fewer operation steps. The order of steps listed in the embodiments is only one way among the execution orders of numerous steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or executed in parallel.
[0087] It should be noted that the method and device for reusing test data between associated systems of the present application can be used in the financial field and can also be used in any field other than the financial field. The application field of the method and device for reusing test data between associated systems of the present application is not limited.
[0088] It should be noted that the data involved in the present application (including but not limited to data for analysis, stored data, displayed data, etc.) are all information and data authorized by users or fully authorized by all parties, and the acquisition, transmission, storage, use and processing of relevant data all comply with the relevant laws, regulations and standards of relevant countries and regions.
[0089] It should be noted that in the embodiments of the present application, some industry-existing solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solution of the present application, but it does not mean that the applicant has already or necessarily used this solution.
[0090] In an embodiment of the present invention, a test data reuse system between associated systems is provided to solve the problem of low reuse rate in the existing technology for the usage mode of test data. Specifically, as Figure 1 shown, the test data reuse system between associated systems includes: a client 101 and a server 102.
[0091] In some embodiments of this specification, the client 101 can be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, a smart wearable device, etc. Among them, the smart wearable device can include a smart bracelet, a smart watch, smart glasses, a smart helmet, etc. Of course, the client is not limited to the above-mentioned electronic devices with a certain entity, and it can also be software running on the above-mentioned electronic devices.
[0092] The client 101 is used for a user to input a global reuse instruction and a local reuse instruction, and send the global reuse instruction and the local reuse instruction to the server 102. In specific implementation, the client 101 displays a configuration interface, and there are multiple controls set in the configuration interface for the user to input the global reuse instruction and the local reuse instruction. Among them, the global reuse instruction indicates multiple associated systems to be reused, and the local reuse instruction indicates a local reuse strategy and a target system to be reused, and may also indicate the data items associated with the target system and its associated systems to be reused, or the server 102 determines the data items. The local reuse strategy is used to indicate the order of backup and testing, including a first local reuse strategy (first back up the data of the data item, and then execute the test) and a second local reuse strategy (first execute the test, and then back up the data of the data item).
[0093] When the server 102 receives the global reuse instruction, according to the global reuse instruction, it performs a full backup on the databases of multiple associated systems to obtain multiple first copies. The database of each system stores the test data of each system; it uses the data in the databases of each system to perform tests, and after the tests are completed, mounts each first copy to the database related to each first copy; according to the data change information of each system in the test phase, it performs data change processing on the databases of each system; and returns to continue to execute the above full backup and subsequent steps.
[0094] When the server 102 receives a local reuse indication, it determines a local reuse strategy, a second target system, and data items associated with the associated system of the second target system according to the local reuse indication; obtains the data of the data items; performs backup on the data of the data items according to the local reuse strategy to obtain a second copy and executes a test; obtains the latest test data of the second target system and stores it in the database of the second target system; inserts the second copy into the database of the second target system.
[0095] This embodiment can realize the reuse of test data between associated systems, reduce the workload of preparing test data, shorten the time for preparing test data, and improve the development and test efficiency. At the same time, while realizing the reuse of test data, data backup is realized to avoid the loss of test data caused by hardware failures, software errors, human operations, or natural disasters.
[0096] This embodiment can also realize local reuse, avoiding the problem that the local reuse system changes data irregularly, resulting in inconsistent data between the local reuse system and its associated system, and further resulting in unavailable data.
[0097] In an embodiment of the present invention, a method for reusing test data between associated systems is provided, as Figure 2 and Figure 3 shown, the method for reusing test data between associated systems includes:
[0098] Step 201, according to the global reuse indication, perform a full backup on the databases of multiple systems with an associated relationship to obtain multiple first copies, and the databases of each system store the test data of each system.
[0099] Among them, multiple systems with an associated relationship are specified by the global reuse indication. The systems with an associated relationship in this application refer to systems related to business. For example, the card-opening business involves systems such as the customer information management system, the core business system, and the account system. Each system with an associated relationship has a database, and a first copy will be obtained for each database backup.
[0100] As Figure 3 shown, perform a backup on the data in the databases of each system to obtain version A1 data.
[0101] Specifically, when the databases of all systems with an associated relationship are backed up, the test process is then executed.
[0102] The data in each system database is provided by the data generation platform. For example, in the banking field, when creating data for debit IC card types for personal customer accounts, testers provide information such as institution numbers, document types, main account natures, transaction amounts, etc. The data generation platform completes steps such as creating personal customers, online synchronization of customer information, prefabricated card applications and batch processing, teller sign-in, card issuance, and teller sign-out through interface calls, and finally completes the construction of test data.
[0103] When this step is implemented, the construction and backup of test data are also completed at the stable time node of test data (usually selected before the monthly requirement is tested).
[0104] Step 202: Use the data in the databases of each system to perform tests. After the tests are completed, mount each first copy to the database related to each first copy.
[0105] As Figure 3 shown, after the tests are completed, version B1 data is obtained. After the tests are completed, by mounting each first copy to the database related to each first copy, the data in the database can be restored to version A1 data, realizing data reuse.
[0106] Specifically, through step 202, only the data structure of the test data can be restored, and the data of the newly added fields cannot be directly obtained. When actually implemented, the specific data of the newly added fields can also be obtained from the test data, or the data of the newly added fields can be completed through subsequent transactions.
[0107] Step 203: According to the data change information of each system in the test phase, perform data change processing on the databases of each system, and return to continue executing the above steps 201 to 203.
[0108] During the test process, the data structure and instances of the database will be modified, such as adding new fields. The data change information includes at least: database table structure change information and database instance change information. When actually implemented, the data change information depends on the actual test content.
[0109] In some implementation manners, first sort out and summarize the SQL statements for changing the table structure of each system, and execute the SQL statements on the data in the database to catch up with the database version.
[0110] As Figure 3 shown, through the data change processing in this step, test data of version A2 can be obtained. The data processed in this step can meet the next test requirements. After entering the next data stable stage, continue the next cycle of processing for the databases of multiple systems with an associated relationship, that is, perform backup, test, and update (i.e., data catch-up). Among them, the data stable stage refers to the stage where the data in multiple databases with an associated relationship does not change.
[0111] This application can achieve the reuse of test data between associated systems, reduce the workload of test data preparation, shorten the test data preparation time, and improve the development and test efficiency. At the same time, while realizing the reuse of test data, data backup is achieved to avoid the loss of test data caused by hardware failures, software errors, human operations, or natural disasters.
[0112] In some embodiments of the present invention, during the database backup and recovery process, different types of databases such as Oracle and MySQL are involved, and there is a scenario where multiple sets of test environments share a database through multiple instances. The present invention can achieve the reuse of test data through the instance-by-instance backup and recovery method.
[0113] In one embodiment of this application, as the test requirements change, testers may add new data. Therefore, as Figure 4 shown, in addition to the above steps 201 to 203, the method for reusing test data between associated systems further includes:
[0114] Step 401, receiving a request for adding full-volume test data.
[0115] Among them, the request for adding full-volume test data can be sent by the user through the client, and the target service is indicated in the request for adding full-volume test data.
[0116] Step 402, according to the request for adding full-volume test data, obtaining the new test data of the systems related to the target service.
[0117] In some embodiments, the test data can be obtained from the data factory.
[0118] In some embodiments, the test data can also be obtained according to the following process: according to the request for adding full-volume test data, obtaining multiple first target systems associated with the target service; obtaining multiple input data of the target service; using the multiple first target systems to perform transactions on each input data to obtain the new test data of each first target system.
[0119] Step 403, adding the new test data of the systems related to the target service to the databases of each system related to the target service.
[0120] This embodiment can continuously supplement the quantity and types of reusable test data, continuously strengthen the diversity of all basic data, and continuously improve the quality of reusable data. During this process, multiple associated systems are backed up and restored simultaneously, and a management mechanism needs to be established (clearly defining the operation time points for each associated system and the operations to be completed between different operation time points; corresponding handling mechanisms if the operations that should be completed in case of special circumstances cannot be completed on time) to ensure the coordinated cooperation between multiple systems.
[0121] In this embodiment, through multiple loops, while realizing data reusability, data augmentation is performed during the preparation of test data each time, improving the diversity of test data.
[0122] In some embodiments of the present application, when performing a full backup of the databases of multiple systems with an association relationship, it further includes:
[0123] Recording the time taken for the backup of each system with an association relationship; if the time taken for the backup of a certain system is greater than a preset threshold, an alarm is issued. Among them, the preset threshold is set according to actual requirements, and the present invention does not limit this.
[0124] This embodiment can ensure the consistency of the backup of each database and ensure the effectiveness of the test.
[0125] In some embodiments of the present application, as Figure 5 shown, the test data reuse method between associated systems further includes:
[0126] Step 501, according to the local reuse indication, determine the local reuse strategy, the second target system, and the data items associated with the second target system and its associated systems.
[0127] Among them, the local reuse indication at least indicates the local reuse strategy and the second target system.
[0128] Among them, the local reuse strategy is used to indicate the order of reuse and testing, including the first local reuse strategy and the second local reuse strategy.
[0129] The second target system is a system to be locally updated and whose data changes regularly, such as the core system in the banking field.
[0130] The associated system of the second target system is a system that has business dealings with the second target system. The data items associated with the second target system and its associated systems can be the fields shared by the second target system and its associated systems. For example, if the second target system has fields A, B, C, and the associated system of the second target system has fields B, D, E, then field B is the data item associated with the second target system and its associated systems. The data items associated with the second target system and its associated systems can be specified by the local reuse indication or can also be obtained by the server based on the analysis of the second target system and its associated systems.
[0131] Step 502, obtain the data of the data items.
[0132] To avoid conflicts between the backup data and the data for testing, when implementing this step: first determine the serial number of the data item from the database; then, increase the serial number of the data item, and then obtain the data of the data item. For example, if the serial number of the data item in the database is 10, the serial number of the data item can be increased to 101, and the data of the data item is numbered starting from 101. Assuming 10 pieces of data are obtained, the data of the data items numbered 101 to 110 can be obtained through this step. When implementing, in order not to occupy high serial numbers additionally, restore the original serial number for daily use.
[0133] When implementing this step, sort out the SQL statement for extracting the data of the data item (data to be backed up) according to the business logic, and use the SQL statement to extract the data of the data item.
[0134] Step 503, back up the data of the data item according to the local reuse strategy to obtain a second copy and perform testing.
[0135] In some embodiments, as Figure 6 shown, when the local reuse strategy is the first local reuse strategy, backing up the data of the data item according to the local reuse strategy to obtain a second copy and performing testing includes:
[0136] Back up the data of the data item to obtain a second copy; use the data in the database of the second target system and its associated system to perform testing.
[0137] The first local reuse strategy is applicable to relatively fixed test data (cases), such as automated regression testing.
[0138] In this embodiment, the data restored each time is the same data, that is, newly constructed test data.
[0139] In this embodiment, because backup is performed first and then testing is carried out, when restoring the local backup data, it may cause the problem that the association of the second target system is inconsistent with the local backup data. For this problem, the inconsistent data can be supplemented and restored in the associated system through the transaction interface. The local backup data is, for example, customer information such as name, ID number, and mobile phone number.
[0140] In some embodiments, as Figure 7 shown, when the local reuse strategy is the second local reuse strategy, backing up the data of the data item according to the local reuse strategy to obtain a second copy and performing testing includes:
[0141] Use the data in the database of the second target system and its associated system to perform testing; extract the data of the data item from the data after testing, and back up the data of the data item to obtain a second copy.
[0142] The second partial reuse strategy is applicable to cases with large changes, such as regular verification tests.
[0143] In this embodiment, the data restored each time has continuity with the data before re-importing into the second target system. It is not data newly constructed, but maintains the continuity of the data.
[0144] In this embodiment, since the test is executed first and then the backup is performed, therefore, it can make the data restored each time be basically consistent with the system data state associated with the second target system.
[0145] Step 504, obtain the latest test data of the second target system and store it in the database of the second target system. This step is used to pour in new test data.
[0146] Step 505, insert the second copy into the database of the second target system.
[0147] In this step, inserting the second copy into the database of the second target system can achieve the reuse of locally reused data.
[0148] After step 505, the test process can be continued. After the test process, return to step 504 to continue execution.
[0149] Based on the same inventive concept, the present application also provides a test data reuse device between associated systems, as described in the following embodiments. Since the principle of the test data reuse device between associated systems for solving problems is similar to that of the test data reuse method between associated systems, therefore, the implementation of the test data reuse device between associated systems can refer to the test data reuse method between associated systems, and the repeated parts will not be elaborated.
[0150] Specifically, as Figure 8 shown, the test data reuse device between associated systems includes;
[0151] The first backup unit 801 is used to perform a full backup on the databases of multiple systems with an associated relationship according to the global reuse indication to obtain multiple first copies. The databases of each system store the test data of each system.
[0152] The first reuse unit 802 is used to execute tests using the data in the databases of each system, and after the test is completed, mount each first copy to the database associated with each first copy.
[0153] The correction unit 803 is used to perform data change processing on the databases of each system according to the data change information of each system in the test stage.
[0154] The loop control unit 804 is used to sequentially activate the first backup unit, the first reuse unit, and the correction unit.
[0155] This embodiment can achieve the reuse of test data between associated systems, reduce the workload of test data preparation, shorten the test data preparation time, and improve the development and test efficiency. At the same time, while realizing the reuse of test data, data backup is achieved to avoid the loss of test data caused by hardware failures, software errors, human operations, or natural disasters.
[0156] In a further embodiment, as Figure 9 shown, the test data reuse device between associated systems further includes:
[0157] A local analysis unit 901, configured to determine a local reuse strategy, a second target system, and data items associated with the second target system and its associated systems according to a local reuse indication.
[0158] A first data preparation unit 902, configured to obtain the data of the data items.
[0159] A backup test unit 903, configured to back up the data of the data items according to the local reuse strategy to obtain a second copy and perform tests.
[0160] A second data preparation unit 904, configured to obtain the latest test data of the second target system and store it in the database of the second target system.
[0161] A second reuse unit 905, configured to insert the second copy into the database of the second target system.
[0162] This embodiment can improve the data reusability and test efficiency and reduce the pressure on the data factory to generate data by reusing the local data of the system that changes irregularly.
[0163] In an embodiment of the present invention, a computer device is further provided, as Figure 10As shown, the computer device 1002 may include one or more processors 1004, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing any kind of information such as code, settings, data, etc. By way of non-limiting example, for instance, the memory 1006 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory devices, hard disks, optical discs, etc. More generally, any memory may store information using any technology. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 1002. In one case, when the processor 1004 executes the associated instructions stored in any memory or combination of memories, the computer device 1002 may perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any memory, such as a hard disk drive mechanism, an optical disc drive mechanism, etc.
[0164] The computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via the input device 1012) and for providing various outputs (via the output device 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface 1018 (GUI). In other embodiments, the input / output module 1010 (I / O), the input device 1012, and the output device 1014 may not be included, and it may only be a computer device in a network. The computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0165] The communication link 1022 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0166] An embodiment of the present application also provides a computer-readable storage medium, such as a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the steps of the above method.
[0167] The embodiments of the present application also provide a computer-readable instruction. When a processor executes the instruction, the program therein causes the processor to execute the method described in any of the foregoing embodiments.
[0168] It should be understood that in various embodiments of the present application, the sequence numbers of the above processes do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0169] It should also be understood that in the embodiments of the present application, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects before and after.
[0170] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0171] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0172] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between each other can be an indirect coupling or communication connection through some interfaces, devices, or units, and can also be in an electrical, mechanical, or other form of connection.
[0173] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0174] In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above integrated units may be implemented in the form of hardware or in the form of software functional units.
[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0176] Specific embodiments are applied in the present application to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for reusing test data between associated systems, characterized in that, Including: According to the global reuse indication, perform a full backup on the databases of multiple systems with an associated relationship to obtain multiple first copies. The databases of each system store the test data of each system; Use the data in the databases of each system to perform tests. After the tests are completed, mount each first copy to the database related to each first copy; According to the data change information of each system in the test phase, perform data change processing on the databases of each system; Return to continue executing the above full backup and subsequent steps.
2. The method according to claim 1, wherein During or after performing data change processing on the databases of each system according to the data change information of each system in the test phase, it further includes: Receive a request for new full test data; According to the request for new full test data, obtain the new test data of the systems related to the target business; Add the new test data of the systems related to the target business to the databases of each system related to the target business.
3. The method according to claim 2, wherein According to the request for new full test data, obtaining the new test data of the systems related to the target business includes: According to the request for new full test data, obtain multiple first target systems associated with the target business; Obtain multiple input data of the target business; Use the multiple first target systems to perform transactions on each input data to obtain the new test data of each first target system.
4. The method according to claim 1, wherein When performing a full backup on the databases of multiple systems with an associated relationship, it further includes: Record the time taken for the backup of each system with an associated relationship; If the time taken for the backup of a certain system is greater than the preset threshold, issue an alarm.
5. The method according to claim 1, wherein It further includes: According to the local reuse indication, determine the local reuse strategy, the second target system, and the data items associated with the second target system and its associated systems; Obtain the data of the data items; According to the local reuse strategy, perform backup on the data of the data items to obtain a second copy and perform tests; Obtain the latest test data of the second target system and store it in the database of the second target system; Insert the second copy into the database of the second target system.
6. The method according to claim 5, wherein When the local reuse strategy is the first local reuse strategy, performing backup on the data of the data items to obtain a second copy and perform tests according to the local reuse strategy includes: Perform backup on the data of the data items to obtain a second copy; Use the data in the databases of the second target system and its associated systems to perform tests.
7. The method according to claim 5, characterized in that When the local reuse strategy is the second local reuse strategy, performing backup on the data of the data items to obtain a second copy and perform tests according to the local reuse strategy includes: Use the data in the databases of the second target system and its associated systems to perform tests; Extract the data of the data items from the data after the tests, and perform backup on the data of the data items to obtain a second copy.
8. The method according to claim 1, wherein The data change information at least includes: database table structure change information and database instance change information.
9. An apparatus for reusing test data between associated systems, characterized in that, Including: The first backup unit is used to perform a full backup on the databases of multiple systems with an associated relationship according to the global reuse indication to obtain multiple first copies. The databases of each system store the test data of each system; The first multiplexing unit is configured to execute tests using the data in the databases of each system, and after the tests are completed, mount each first copy to the database associated with each first copy; The correction unit is configured to perform data change processing on the databases of each system according to the data change information of each system during the test phase; The loop control unit is configured to sequentially activate the first backup unit, the first multiplexing unit, and the correction unit.
10. The device according to claim 9, characterized in that It further includes: The local analysis unit is configured to determine a local multiplexing strategy, a second target system, and the data items associated with the second target system and its associated systems according to a local multiplexing indication; The first data preparation unit is configured to obtain the data of the data items; The backup test unit is configured to back up the data of the data items according to the local multiplexing strategy to obtain a second copy and execute tests; The second data preparation unit is configured to obtain the latest test data of the second target system and store it in the database of the second target system; The second multiplexing unit is configured to insert the second copy into the database of the second target system.
11. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 8.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor of a computer device, it implements the method according to any one of claims 1 to 8.
13. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor of a computer device, it implements the method according to any one of claims 1 to 8.