CN115136120A - Database synchronization test method and device, computer equipment and storage medium - Google Patents

Database synchronization test method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115136120A
CN115136120A CN202080097443.0A CN202080097443A CN115136120A CN 115136120 A CN115136120 A CN 115136120A CN 202080097443 A CN202080097443 A CN 202080097443A CN 115136120 A CN115136120 A CN 115136120A
Authority
CN
China
Prior art keywords
test case
target
target test
data
databases
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080097443.0A
Other languages
Chinese (zh)
Inventor
梁焕勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115136120A publication Critical patent/CN115136120A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

A database synchronization test method, a database synchronization test device, computer equipment and a storage medium belong to the technical field of computers. The method comprises the following steps: acquiring a unique identifier of a target test case from a configuration file, wherein the target test case is used for testing whether data between at least two databases are synchronous or not (201); calling the target test case through a target interface according to the unique identifier of the target test case, wherein the target interface is provided with a test logic (202) of the target test case; and synchronously testing the data between the at least two databases according to the target test result output after the target test case is called (203). The method can realize synchronous testing of the data between the at least two databases through the target test case and the target interface in a scene of synchronizing the data between the at least two databases, avoids rewriting of each test case in the at least two databases, and improves the expansibility of each test case in the scene.

Description

Database synchronization test method and device, computer equipment and storage medium Technical Field
The present application relates to the field of computer technologies, and in particular, to a database synchronization testing method and apparatus, a computer device, and a storage medium.
Background
With the development of the computer technology field, a database is used as an unavailable tool in the computer equipment field, and a developer can test the database through a test case.
Currently, a code designer may create various test cases in a computer device and run the created test cases in the computer device. For example, the computer device may run different programming language environments, such as a Java language environment, a Kotlin language environment, a C + + language environment, and the like. When a certain database needs to be tested, developers can write test cases in different programming language environments and run the test cases in computer equipment, so that the database is tested.
For a scene of data synchronization among a plurality of databases, how to adopt a test case to perform synchronous test on the databases does not have a perfect solution at present.
Disclosure of Invention
The embodiment of the application provides a database synchronization test method, a database synchronization test device, computer equipment and a storage medium, which can realize synchronous test in a scene of data synchronization among a plurality of databases and improve the expansibility of a test case in the scene. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a database synchronization testing method, where the method is executed by a computer device, and the method includes:
acquiring a unique identifier of a target test case from a configuration file, wherein the target test case is used for testing whether data between at least two databases are synchronous or not;
calling the target test case through a target interface according to the unique identifier of the target test case, wherein the target interface is provided with a test logic of the target test case;
and carrying out synchronous test on the data between the at least two databases according to a target test result output after the target test case is called.
In another aspect, an embodiment of the present application provides a database synchronization testing apparatus, where the apparatus is used in a computer device, and the apparatus includes:
the system comprises an identification acquisition module, a data synchronization module and a data synchronization module, wherein the identification acquisition module is used for acquiring a unique identification of a target test case from a configuration file, and the target test case is used for testing whether data between at least two databases are synchronous or not;
the calling module is used for calling the target test case through a target interface according to the unique identification of the target test case, and the target interface is provided with test logic of the target test case;
and the test module is used for synchronously testing the data between the at least two databases according to a target test result output after the target test case is called.
In yet another aspect, an embodiment of the present application further provides a computer device, which includes a processor and a memory, where at least one instruction, at least one program, a code set, or a set of instructions is stored in the memory, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the database synchronization testing method described above.
In yet another aspect, an embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by a processor to implement the database synchronization testing method described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the method comprises the steps of obtaining a unique identification of a target test case for testing whether data between at least two databases are synchronous, calling the target test case by using a target interface provided with test logic of the target test case, outputting a target test result, and synchronously testing the data between the at least two databases through the target test result. According to the method and the device, the synchronous test of the data between the at least two databases can be realized through the target test case and the target interface in the scene of synchronizing the data between the at least two databases, the rewriting of the test cases in the at least two databases is avoided, and therefore the expansibility of the test cases in the scene is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a database synchronization structure provided in an exemplary embodiment of the present application;
FIG. 2 is a flow chart of a method of testing database synchronization in accordance with an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a method of testing database synchronization in accordance with an exemplary embodiment of the present application;
FIG. 4 is an interface diagram of a test case invocation interface according to an exemplary embodiment of the present application;
FIG. 5 is an interface schematic diagram of a test case invocation interface according to an exemplary embodiment of the present application;
FIG. 6 is a block diagram of a computer device provided in an exemplary embodiment of the present application;
FIG. 7 is a flowchart of a method of an exemplary embodiment of the present application directed to a method of performing database synchronization testing by a computer device of FIG. 6;
FIG. 8 is a block diagram illustrating an exemplary embodiment of a database synchronization testing apparatus;
fig. 9 is a schematic structural diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The scheme provided by the application can be used in a real scene in which the data of a plurality of databases are synchronously called in the development process of the program codes. For ease of understanding, some noun terms and scenario architectures are first briefly described below.
Test Case (Test Case): the source code established when testing a certain software product may include codes such as a test target, a test environment, input data, test steps, expected results, test scripts, and the like. Alternatively, a test case is a set of test inputs, execution conditions, and expected results that are programmed for a source code under test, and can be used to verify that the source code under test functions properly.
Please refer to fig. 1, which illustrates a schematic structural diagram of a database synchronization provided in an exemplary embodiment of the present application. As shown in fig. 1, a computer device 100, several databases 110 are included.
Alternatively, the computer device 100 may be a terminal device installed with a development tool and having a function of writing test cases, for example, the computer device may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, and the like.
For example, the computer device 100 further includes a test case writing interface 101, and a developer can write a test case for any one of the databases 110 in the test case writing interface 101, so as to implement the test case.
Optionally, the databases 110 include data between at least two databases that need to be synchronized. For example, the data in the first database is synchronized with the data in the second database, wherein the data in the second database is generally fixed, the data in the first database is easy to increase or decrease, and when the data in the first database increases or decreases, the data in the second database is also increased or decreased.
Alternatively, the computer device 100 and the databases 110 may be connected via a communication network, which may be a wireless network or a wired network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The Network is typically the internet, but may be any Network including, but not limited to, any combination of Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area networks (MANs), mobile, wireline or wireless networks, private networks, or virtual private networks. In some embodiments, data exchanged over a network is represented using techniques and/or formats including Hypertext Mark-up Language (HTML), Extensible Markup Language (XML), and the like. All or some of the links may also be encrypted using conventional encryption techniques such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec). In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
In order to implement synchronous testing in a scene of data synchronization among multiple databases and improve the extensibility of a test case in the scene, an embodiment of the present application provides a database synchronization testing method, which can be applied to the scene architecture shown in fig. 1, so as to implement data synchronization testing among multiple databases. Referring to fig. 2, a flowchart of a method for testing database synchronization according to an exemplary embodiment of the present application is shown, where the method may be applied to the scenario architecture shown in fig. 1, and is executed by a computer device in the scenario architecture. As shown in fig. 2, the database synchronization testing method may include the following steps.
Step 201, obtaining the unique identifier of the target test case from the configuration file, where the target test case is used to test whether data between at least two databases is synchronous.
The unique identifier of the target test case may be a name of the target test case. The target test case can test whether data between at least two databases are synchronous.
Step 202, according to the unique identifier of the target test case, calling the target test case through the target interface, wherein the target interface provides the test logic of the target test case.
And 203, synchronously testing the data between the at least two databases according to the target test result output after the target test case is called.
In summary, by obtaining the unique identifier of the target test case for testing whether the data between the at least two databases is synchronous, the target test case is called by using the target interface of the test logic provided with the target test case, and the target test result is output, and the data between the at least two databases is synchronously tested through the target test result. According to the method and the device, the synchronous test of the data between the at least two databases can be realized through the target test case and the target interface in the scene of synchronizing the data between the at least two databases, the rewriting of the test cases in the at least two databases is avoided, and therefore the expansibility of the test cases in the scene is improved.
In a possible implementation manner, a target container may be maintained, each test case written by a developer may be stored in the target container, the unique identifier of the test case may be associated with the test case, and when the test case is called, the corresponding test case may be searched from the target container through the unique identifier of the test case.
Referring to fig. 3, a flowchart of a method for testing synchronization of a database according to an exemplary embodiment of the present application is shown, where the method may be applied to the scenario architecture shown in fig. 1, and executed by a computer device in the scenario architecture. As shown in fig. 3, the database synchronization testing method may include the following steps.
And step 301, registering the target test case into the target container in an annotation mode.
The target test case is used for testing whether data between at least two databases are synchronous or not.
Alternatively, the target container may be maintained within the computer device, or may be maintained in another computer device or server external to the computer device. After a target test case is written in the computer device, the computer device can register the target test case into the target container for centralized management in an annotation mode. For example, the target container is a Spring IOC (Inversion of Control) container. The target container can store a test case for detecting whether the data between the first database and the second database are synchronous or not, and can also store a test case for detecting whether the data between the third database, the fourth database and the fifth database are synchronous or not.
Optionally, the synchronization between the at least two databases means that when data of any one database in the at least two databases is increased or decreased, the same data is correspondingly increased or decreased in the rest databases. For example, between two databases, when data in one database is increased or decreased, the other database also increases or decreases the same data. Or, among the three databases, when the data of one database is increased or decreased, the other two databases also increase or decrease the same data.
Step 302, adding the unique identifier of the target test case in the configuration file.
Optionally, the computer device may write a configuration file in the process of annotating the target test case to the target container, and add the unique identifier of the target test case to the configuration file. In one possible implementation, the unique identification of the target test case may be the name of the target test case. In this application, the configuration file may be used to store unique identifiers of the target test cases, and when the computer device registers one target test case in the target container, the computer device may add a name of the target test case in the configuration file. Optionally, the configuration file may be maintained in the computer device itself or in a server.
And 303, acquiring the unique identifier of the target test case from the configuration file.
Optionally, when detecting whether data between at least two databases is synchronous, the computer device may obtain a unique identifier of a certain target test case through the configuration file, and call the target test case through the unique identifier.
In a possible implementation manner, a unique identification input box of the target test case may be provided in the computer device, and the computer device receives the input unique identification of the target test case and searches the unique identification of the target test case from the configuration file according to the unique identification of the target test case. Referring to fig. 4, an interface diagram of a test case invocation interface according to an exemplary embodiment of the present application is shown. As shown in fig. 4, an identification input box 401, a confirmation control 402, and a cancel control 403 are included in the interface 400, the user can input the name of the target test case in the identification input box 401, and click the confirmation control 402, and the computer device can search the configuration file for the name of the target test case with the same content as the input content of the user.
In a possible implementation manner, the computer device may provide a unique identifier selection control corresponding to the configuration file, and the computer device may receive a selection operation on the unique identifier selection control, so as to obtain a unique identifier of a certain target test case in the configuration file. Please refer to fig. 5, which illustrates an interface diagram of a test case invocation interface according to an exemplary embodiment of the present application. As shown in fig. 5, an identification selection control 501 is included in the interface 500, the identification selection control 501 may provide names of all test cases included in the configuration file, and a user may directly select a name of a certain test case in the configuration file through the identification selection control 501.
And 304, acquiring the target test case corresponding to the unique identifier of the target test case from the target container according to the unique identifier of the target test case.
Optionally, the computer device may obtain, from the target container, the target test case corresponding to the unique identifier through the determined unique identifier of the target test case.
And 305, acquiring the initialization data and the test logic of the target test case according to the unique identifier of the target test case.
Optionally, the target interface in the present application may define a synchronous test process of the database, and provide initialization data and test logic of the target test case through the target interface. After the computer equipment acquires the unique identifier of the target test case, the initialization data and the test logic of the target test case can be acquired through the target interface. For example, for the target test case 1, the target interface provides the test logic of the prepareData () method initialization data and the execute () method for the test case 1, and when the name of the target test case selected by the user is the target test case 1, the computer device may obtain the test logic of the prepareData () method initialization data and the execute () method provided by the target interface.
And step 306, calling the target test case through the target interface according to the initialization data and the test logic.
The computer device can call the target test case according to the obtained initialization data and the test logic to complete the operation of the target test case.
And 307, synchronously testing the data between the at least two databases according to the target test result output after the target test case is called.
That is, the computer device detects whether the data between the at least two databases corresponding to the target test case is synchronized according to the test result output after the target test case is run.
In one possible implementation, the computer device may determine that data between the at least two databases is synchronized in response to the output format of the target test result conforming to the first format. For example, when the computer device has completed synchronization of data between at least two databases, the computer device may output a test result according to a uniform format after running the target test case, and if the target test result output after calling the target test case is the same as the format, the computer device may determine that the data between the at least two databases has completed synchronization, and the data between the at least two databases is consistent. Correspondingly, if the target test result output after calling the target test case is different from the unified format, the computer device can determine that the data between the at least two databases are inconsistent.
In summary, by obtaining the unique identifier of the target test case for testing whether the data between the at least two databases is synchronous, the target test case is called by using the target interface of the test logic provided with the target test case, and the target test result is output, and the data between the at least two databases is synchronously tested according to the target test result. According to the method and the device, the synchronous test of the data between the at least two databases can be realized through the target test case and the target interface in the scene of synchronizing the data between the at least two databases, the rewriting of the test cases in the at least two databases is avoided, and therefore the expansibility of the test cases in the scene is improved.
In addition, the name of the test case is associated with the test case, and when the test case needs to be called, the corresponding test case is selected through the name of the test case, so that whether the data in at least two databases are consistent or not is tested, a synchronous testing process is specified, and the efficiency of testing whether the data between the two databases are consistent or not is improved.
In a possible implementation manner, the target container and the configuration file are in a computer device, please refer to fig. 6, which shows a schematic structural diagram of a computer device provided in an exemplary embodiment of the present application. As shown in fig. 6, the computer device includes a calling module 601, a test interface 602, a target container module 603, a configuration file module 604, and a test case module 605.
The calling module 601 may obtain the name of the target test case from the configuration file module 604, and call the target test case by using the obtained name of the target test case in the configuration file.
The test interface 602 may provide test logics of different target test cases, and the computer device obtains the corresponding test logics by calling the names of the target test cases in the module 601, and realizes the calling of the test cases through the test interface.
The target container module 603 registers the test case module 605 to each target test in itself for centralized management, and provides a corresponding test case for the test interface 602. Accordingly, the test case module 605 may register the target test cases into the target container module 603.
Referring to fig. 7, a flowchart of a method for a computer device to execute a database synchronization test method according to an exemplary embodiment of the present application is shown. As shown in fig. 7, the computer device may include the steps of:
step 701, compiling a target test case in computer equipment.
Step 702, the computer device adds the target test case to a configuration file.
Step 703, the computer device registers the target test case in the target container.
Step 704, the computer device records the names of all target test cases.
The computer equipment records the names of all target test cases in the configuration file module.
Step 705, the computer device maintains all target test cases in the target container.
In step 706, the computer device discovers all target test cases through the configuration file.
Optionally, the calling module in the computer device may search for the same name of the target test case from the configuration file module by using the name of the target test case, and the configuration file module returns the name of the target test case to the calling module.
Step 707, the computer device obtains a target test case corresponding to the name of the target test case from the target container.
Step 708, the computer device completes the testing process of the target test case through the testing interface.
Optionally, in this step, reference may be made to the description of step 305 to step 307 in the foregoing embodiment, which is not described herein again.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 8 is a block diagram illustrating a structure of a database synchronization testing apparatus according to an exemplary embodiment of the present application. The database synchronization test apparatus may be used in the computer device shown in fig. 1 to perform all or part of the steps of the methods shown in the corresponding embodiments of fig. 2, fig. 3 or fig. 7. The database synchronization testing device can comprise the following modules:
an identifier obtaining module 801, configured to obtain a unique identifier of a target test case from a configuration file, where the target test case is used to test whether data between at least two databases is synchronous;
a calling module 802, configured to call the target test case through a target interface according to the unique identifier of the target test case, where the target interface provides a test logic of the target test case;
the testing module 803 is configured to perform synchronous testing on data between the at least two databases according to a target test result output after the target test case is called.
Optionally, the invoking module 802 includes: the system comprises a first acquisition unit, a second acquisition unit and a calling unit;
the first obtaining unit is used for obtaining the target test case according to the unique identifier of the target test case;
the second obtaining module is configured to obtain the initialization data and the test logic of the target test case according to the unique identifier of the target test case;
the calling unit is used for calling the target test case through the target interface according to the initialization data and the test logic.
Optionally, the apparatus further comprises:
the registration module is used for registering the target test case into a target container in an annotation mode;
the adding module is used for adding the unique identifier of the target test case in the configuration file;
the first obtaining unit is further configured to obtain, from the target container, the target test case corresponding to the unique identifier of the target test case according to the unique identifier of the target test case.
Optionally, the identifier obtaining module 801 includes: a receiving unit and a searching unit;
the receiving unit is used for receiving the input unique identifier of the target test case;
and the searching unit is used for searching the unique identifier of the target test case from the configuration file according to the unique identifier of the target test case.
Optionally, the testing module 803 is further configured to determine that the data between the at least two databases are synchronous in response to that the output format of the target test result conforms to the first format.
Optionally, when data in any one of the at least two databases is increased or decreased, the same data is correspondingly increased or decreased in the other databases.
In summary, by obtaining the unique identifier of the target test case for testing whether the data between the at least two databases is synchronous, the target test case is called by using the target interface of the test logic provided with the target test case, and the target test result is output, and the data between the at least two databases is synchronously tested through the target test result. According to the method and the device, the synchronous test of the data between the at least two databases can be realized through the target test case and the target interface in the scene of synchronizing the data between the at least two databases, the rewriting of the test cases in the at least two databases is avoided, and therefore the expansibility of the test cases in the scene is improved.
It should be noted that: in the device provided in the foregoing embodiment, when the above steps are executed, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the apparatus provided in the above embodiment and the method embodiment of the database synchronization test method belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Fig. 9 is a schematic structural diagram of a computer device according to an exemplary embodiment of the present application. The computer apparatus 900 includes a Central Processing Unit (CPU) 901, a system Memory 904 including a Random Access Memory (RAM) 902 and a Read Only Memory (ROM) 903, and a system bus 905 connecting the system Memory 904 and the CPU 901. The computer device 900 also includes a basic Input/Output System (I/O System) 906 for facilitating information transfer between devices within the computer, and a mass storage device 907 for storing an operating System 912, application programs 913, and other program modules 914.
The basic input/output system 906 includes a display 908 for displaying information and an input device 909 such as a mouse, keyboard, etc. for user input of information. Wherein the display 908 and the input device 909 are connected to the central processing unit 901 through an input output controller 910 connected to the system bus 905. The basic input/output system 906 may also include an input/output controller 910 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, an input-output controller 910 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905. The mass storage device 907 and its associated computer-readable media provide non-volatile storage for the computer device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM (Compact disk Read-Only Memory) drive.
The computer readable media may include computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other solid state Memory technology, CD-ROM, DVD (Digital Video Disc) or other optical, magnetic, tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 904 and mass storage device 907 described above may be collectively referred to as memory.
The computer device 900 may connect to the internet or other network devices through a network interface unit 911 connected to the system bus 905.
The memory further includes one or more programs, the one or more programs are stored in the memory, and the central processing unit 901 implements all or part of the steps executed by the computer device in the methods provided by the above embodiments of the present application by executing the one or more programs.
In an exemplary embodiment, a computer readable storage medium is also provided, in which at least one instruction, at least one program, code set, or instruction set is stored, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor (also referred to as a central processing unit) of a computer device to complete all or part of the steps of the method shown in the various embodiments of the present application. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

  1. A database synchronization testing method, the method being performed by a computer device, the method comprising:
    acquiring a unique identifier of a target test case from a configuration file, wherein the target test case is used for testing whether data between at least two databases are synchronous or not;
    calling the target test case through a target interface according to the unique identifier of the target test case, wherein the target interface is provided with a test logic of the target test case;
    and carrying out synchronous test on the data between the at least two databases according to a target test result output after the target test case is called.
  2. The method according to claim 1, wherein the invoking the target test case through a target interface according to the unique identifier of the target test case comprises:
    acquiring the target test case according to the unique identifier of the target test case;
    acquiring initialization data and the test logic of the target test case according to the unique identifier of the target test case;
    and calling the target test case through the target interface according to the initialization data and the test logic.
  3. The method of claim 2, further comprising:
    registering the target test case into a target container in an annotation mode;
    adding the unique identification of the target test case in the configuration file;
    the obtaining the target test case according to the unique identifier of the target test case includes:
    and acquiring the target test case corresponding to the unique identifier of the target test case from the target container according to the unique identifier of the target test case.
  4. The method of claim 1, wherein obtaining the unique identifier of the target test case from the configuration file comprises:
    receiving the input unique identification of the target test case;
    and searching the unique identifier of the target test case from a configuration file according to the unique identifier of the target test case.
  5. The method according to claim 1, wherein the performing the synchronous test on the data between the at least two databases according to a target test result output after the target test case is called comprises:
    determining that data between the at least two databases is synchronized in response to the output format of the target test result conforming to a first format.
  6. The method according to any one of claims 1 to 5, wherein when data in any one of the at least two databases is increased or decreased, the remaining databases are correspondingly increased or decreased with the same data.
  7. A database synchronization test apparatus, wherein the apparatus is used in a computer device, the apparatus comprising:
    the system comprises an identification acquisition module, a configuration file acquisition module and a data synchronization module, wherein the identification acquisition module is used for acquiring a unique identification of a target test case from the configuration file, and the target test case is used for testing whether data between at least two databases are synchronous or not;
    the calling module is used for calling the target test case through a target interface according to the unique identifier of the target test case, and the target interface is provided with a test logic of the target test case;
    and the test module is used for synchronously testing the data between the at least two databases according to a target test result output after the target test case is called.
  8. The apparatus of claim 7, wherein the means for invoking comprises: the system comprises a first acquisition unit, a second acquisition unit and a calling unit;
    the first obtaining unit is used for obtaining the target test case according to the unique identifier of the target test case;
    the second obtaining module is configured to obtain the initialization data and the test logic of the target test case according to the unique identifier of the target test case;
    the calling unit is used for calling the target test case through the target interface according to the initialization data and the test logic.
  9. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement the database synchronization test method according to any one of claims 1 to 6.
  10. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the database synchronization test method according to any one of claims 1 to 6.
CN202080097443.0A 2020-03-26 2020-03-26 Database synchronization test method and device, computer equipment and storage medium Pending CN115136120A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/081367 WO2021189348A1 (en) 2020-03-26 2020-03-26 Database synchronization test method and apparatus, and computer device and storage medium

Publications (1)

Publication Number Publication Date
CN115136120A true CN115136120A (en) 2022-09-30

Family

ID=77890807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080097443.0A Pending CN115136120A (en) 2020-03-26 2020-03-26 Database synchronization test method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115136120A (en)
WO (1) WO2021189348A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110137859A1 (en) * 2009-12-08 2011-06-09 David Dickman Staged Data Conversion
CN107402872A (en) * 2016-03-31 2017-11-28 阿里巴巴集团控股有限公司 A kind of method and apparatus for being used to determine database data synchronic delay
CN106156278B (en) * 2016-06-24 2020-07-17 安徽三禾一信息科技有限公司 Database data reading and writing method and device
CN109189864B (en) * 2018-08-09 2021-03-16 联动优势电子商务有限公司 Method, device and equipment for determining data synchronization delay

Also Published As

Publication number Publication date
WO2021189348A1 (en) 2021-09-30

Similar Documents

Publication Publication Date Title
CN110209652B (en) Data table migration method, device, computer equipment and storage medium
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
CN110569035B (en) Code compiling method, device, equipment and storage medium of software development project
CN108388515B (en) Test data generation method, device, equipment and computer readable storage medium
US20150006608A1 (en) Networked solutions integration using a cloud business object broker
US11726799B2 (en) Preventing framework conflicts for multi-OS applications
EP3030969A1 (en) Automated application test system
CN104272704B (en) First application program for describing cloud environment appurtenant
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN103853535A (en) Method and device for modifying middleware
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
US10585678B2 (en) Insertion of custom activities in an orchestrated application suite
CN112187713A (en) Message conversion method, device, computer equipment and storage medium
US9064042B2 (en) Instrumenting computer program code by merging template and target code methods
CN110806891B (en) Method and device for generating software version of embedded device
CN117493309A (en) Standard model generation method, device, equipment and storage medium
CN111782474A (en) Log processing method and device, electronic equipment and medium
CN116719735A (en) Test case generation method and device
CN111158777A (en) Component calling method and device and computer readable storage medium
CN115136120A (en) Database synchronization test method and device, computer equipment and storage medium
JP6717140B2 (en) Analysis program, analysis method, and analysis device
CN113704120A (en) Data transmission method, device, equipment and storage medium
JP2012133567A (en) Information processor, control method thereof, and program
CN112231377A (en) Data mapping method, system, device, server and storage medium
CN111444161A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination