Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Distributed database testing method, apparatus, device and computer readable medium

A technology of data testing and testing methods, applied in the field of database testing, to achieve the effect of saving labor costs and realizing full automation

Active Publication Date: 2019-07-30
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a distributed database testing method, device, equipment, and computer-readable medium to solve or alleviate one or more technical problems in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Distributed database testing method, apparatus, device and computer readable medium
  • Distributed database testing method, apparatus, device and computer readable medium
  • Distributed database testing method, apparatus, device and computer readable medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] see figure 1 , which is a flow chart of the steps of the distributed database testing method according to Embodiment 1 of the present invention. The first embodiment provides a distributed database testing method, including the following steps:

[0064] S110: Develop a data testing model.

[0065] When formulating the data test model, the data test model needs to be simplified. Because for a record with the same ID, if one SQL operation is performed, the record has 4 possible changes (addition, deletion, modification, query), then N SQL operations are performed, and the record has 4 to the Nth power of possible changes, so Huge permutations and combinations cannot verify the correctness of the data. Since the sequence sequence of the SQL statement only affects the result of the data and does not affect the internal logic of the database, the data testing model can be simplified as follows: the data of the same ID can only perform an insert (insert) operation once, an...

Embodiment 2

[0106] The difference from Embodiment 1 is that: in the step of performing abnormality simulation in Embodiment 2, the abnormality simulation adopted also includes: link abnormality simulation and machine abnormality simulation. Among them, when link abnormality simulation is used, iptables+tc can be used to simulate link abnormal state. When machine exceptions are used, the cpulimit+Linux command can be used to simulate.

[0107] The principle of the second embodiment is the same as that of the first embodiment, so it will not be repeated.

Embodiment 3

[0109] The third embodiment corresponds to the first embodiment, and provides a distributed database testing device. see Figure 7 , which is a connection block diagram of the distributed database testing device in the third embodiment.

[0110] The third embodiment provides a distributed database testing device, including:

[0111] The test model formulation module 110 is used to formulate a data test model.

[0112] The data testing model is: the data of the same ID can only be inserted once, and the operations of query, modification and deletion occur after the addition operation.

[0113] The test data generating module 120 is configured to generate test data.

[0114] The form of the test data is (id, k, c), the field value of the id is a positive integer, the k=id*n, wherein n is a constant; the field value of the c is the mth bit in letters A-Z The corresponding value, where m=id%26, indicates that the value of id is divided by 26 and the remainder is taken.

[011...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a distributed database test method. The method comprises the steps of generating test data; executing abnormal simulation to generate an abnormal environment; performing corresponding operations on multiple database instances of a distributed database at the same time according to a data test model and the test data in the abnormal environment; and performing verification onservice availability and data correctness. The distributed database supporting multi-point concurrent data reading / writing can be subjected to the service availability and data correctness verification under the condition that a cluster is abnormal, so that concurrent verification of the database instances is realized and the blank that a single database instance only can be verified at present is made up for; and cluster operation and an abnormal simulation function are integrated, so that full automation of abnormal testing can be realized, and the manpower cost of test personnel is greatlyreduced.

Description

technical field [0001] The present invention relates to the technical field of database testing, in particular to a distributed database testing method, device, equipment and computer readable medium. Background technique [0002] With the rapid change of database technology, distributed databases are gradually emerging. The system architecture of distributed databases is completely different from mainstream relational databases and NoSQL databases. At the same time, this distributed database supports multi-point access data reading and writing. [0003] The exception test for distributed databases is different from traditional relational databases. Most mainstream relational databases (such as mysql) have a structure of one main database and multiple standby databases. When the main library instance / machine / network is abnormal, the main test cluster selects an instance from multiple slave library instances to serve as the next main library instance, and switches the selec...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36G06F16/27
CPCG06F11/3684G06F11/3688G06F16/27G06F2201/80
Inventor 裴艳秋赖宝华严龙宋浩
Owner BEIJING BAIDU NETCOM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products