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.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com