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

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

A testing method and data testing technology, applied in the field of database testing, to achieve full automation and save labor costs

Active Publication Date: 2018-08-17
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF4 Cites 12 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 test method, apparatus and device, and computer readable medium
  • Distributed database test method, apparatus and device, and computer readable medium
  • Distributed database test method, apparatus and 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 the first embodiment of the present invention. The first embodiment provides a distributed database testing method, including the following steps:

[0064] S110: Formulate a data test model.

[0065] When developing a data test model, it is necessary to simplify the data test model. Because for the record with the same ID, if an SQL operation is performed, the record has 4 possible changes (addition, deletion, modification and query), then if N SQL operations are performed, the record has 4 possible changes to the Nth power, so that The huge permutation and combination cannot verify the correctness of the data. Since the sequence of SQL statements 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 with the same ID can only perform an insert operation once, and t...

Embodiment 2

[0106] The difference from Embodiment 1 is that in the step of executing abnormality simulation in Embodiment 2, the abnormality simulation adopted further includes: link abnormality simulation and machine abnormality simulation. Among them, when the link abnormality simulation is used, iptables+tc can be used to simulate the abnormal state of the link. When a machine exception is 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 apparatus. see Figure 7 , which is a connection block diagram of the distributed database testing device of 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 as follows: data with 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 used for generating test data.

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

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, and in particular, to a distributed database testing method and apparatus, device and computer-readable medium. Background technique [0002] With the rapid changes in 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 read and write. [0003] For the abnormal test of distributed database, it is different from traditional relational database. The mainstream relational database (such as mysql) is mostly a main database with multiple standby databases. When the master database instance / machine / network is abnormal, the main test cluster selects one instance from multiple slave database instances to serve as the next master database instance, and switches the se...

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 Applications(China)
IPC IPC(8): G06F11/36G06F17/30
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