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

Database test method and device, storage medium and electronic equipment

A test method and technology of electronic equipment, applied in the field of database testing, can solve problems such as inability to test database service exceptions, synchronization delay problems, database service exceptions of master-slave databases, etc.

Pending Publication Date: 2020-04-14
BEIKE TECH CO LTD
View PDF12 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the master-slave database has defects due to the synchronization delay of data stored between the master database and the slave database. The synchronization delay problem of storing data with the slave library causes the database service exception of the master-slave database
The single-database deployment method in the prior art cannot test the database service abnormality caused by the synchronization delay of the master-slave database, and deploying the database used for the test as the master-slave database will cause excessive waste of resources

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
  • Database test method and device, storage medium and electronic equipment
  • Database test method and device, storage medium and electronic equipment
  • Database test method and device, storage medium and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0054] figure 1 A schematic flow chart of the database testing method provided in the embodiment of the present application, such as figure 1 As shown, this embodiment mainly includes:

[0055] S101: Obtain at least one operation log for at least one database request.

[0056] The database request is an operation request to the database, and a database interface is called once for a database request, and at least one operation for the database can be performed in a database request. Since the time interval between two database requests is usually sufficient for synchronization of stored data between the master database and the slave database, the embodiment of the present application preferably analyzes multiple database operations requested in one database request.

[0057] When testing the database, an operation log will be generated every time a database request is received. Specifically, an operation log will be generated for each operation on the database. At least one ...

Embodiment 2

[0070] like figure 2 As shown, the embodiment of the present application also provides another database testing method, including:

[0071] S201: Obtain at least one operation log for at least one database request.

[0072] When testing the database, an operation log will be generated every time a database request is received. Specifically, an operation log will be generated for each operation on the database. At least one operation on the database can be performed in one database request. Therefore, a database The request can generate at least one operation log. Here, each operation log generated by a database request to the database is obtained. Usually, each operation log generated by a database request is arranged according to the sequence of operations on the database. Exemplarily, an operation log is as follows:

[0073] 2019-07-03 20:16:41|[INFO]|db-listen|{"sql":"select *from`agent_pages`where`agent_pages`..."}|{"memory_usage":"16MB"," process_id": 6869, "log_id": ...

Embodiment 3

[0111] like Figure 4 As shown, the embodiment of the present application also provides a database testing device 400, including:

[0112] A log acquisition module 401, configured to acquire at least one operation log for at least one database request;

[0113] A type determining module 402, configured to determine the operation type of the operation log for each of the operation logs;

[0114] The risky operation determination module 403 is configured to use the operation log as the first operation log when the operation type is the preset first operation type, and set a preset number of consecutive operations starting with the first operation log The operation log is determined as the target operation log, and it is judged whether the operation type of the target operation log includes the preset second operation type; when the preset second operation type is included, the operation type is the preset second operation type. The operation log of the operation type is determ...

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 discloses a database test method and device, a storage medium and electronic equipment, and relates to a database test technology. According to the specific scheme, the method comprisesthe steps: obtaining at least one operation log for at least one database request; determining an operation type of each operation log; if yes, taking the operation log as a first operation log, determining a target operation log according to the first operation log, and judging whether the target operation log contains a preset second operation type or not; if yes, determining the operation log of which the operation type is a preset second operation type as a second operation log, and judging whether the second operation log is the same as data table information contained in the first operation log or not; and if yes, marking the first operation log and the second operation log as risk operations. According to the method, the database service exception caused by the synchronization delayproblem of the master database and the slave database can be tested in a single-database deployment mode so that the resource waste is avoided while the test comprehensiveness is improved.

Description

technical field [0001] The present application relates to database testing technology, in particular to a database testing method, device, storage medium and electronic equipment. Background technique [0002] At present, the database mostly adopts the master-slave database (Master-Slave) deployment method: Among them, the master database (Master) is used to change the stored data; the slave database (Slave) is used as the backup of the master database, and is also used for storage Data query operations. However, the master-slave database has defects due to the synchronization delay of data stored between the master database and the slave database. The synchronization delay problem of stored data with the slave database causes the database service exception of the master-slave database. In order to avoid the database service exception of the master-slave database, it is necessary to test the master-slave database, so as to avoid the occurrence of abnormal situations in adv...

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
IPC IPC(8): G06F11/36G06F16/21
CPCG06F11/3684G06F11/3688G06F16/219Y02D10/00
Inventor 侯存宁
Owner BEIKE 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