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

Simulation return method, device and equipment of Mysql

A technology of return value and mode, applied in the field of software testing, can solve problems such as low testing efficiency

Active Publication Date: 2019-12-20
浙江诺诺网络科技有限公司
View PDF17 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of this application is to provide a Mysql simulation return method, device, equipment and readable storage medium to solve the problem that the traditional database test scheme needs to initialize the database repeatedly, resulting in low test efficiency

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
  • Simulation return method, device and equipment of Mysql
  • Simulation return method, device and equipment of Mysql
  • Simulation return method, device and equipment of Mysql

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] The following introduces Embodiment 1 of a Mysql simulation return method provided by the application, see figure 1 , embodiment one includes:

[0037] S101. Obtain the sql statement used to test the Mysql database;

[0038] In this embodiment, the client needs to encapsulate the sql statement and send it to the Mysql database, and parse the returned content of the Mysql database. The purpose of this embodiment is to simulate the return result of the interface function according to the return value of the interface function between the client and Mysql, so as to ensure that the data obtained from the Mysql database is always consistent during each test. Specifically, after the sql statement is packaged and before the sql statement is sent to the Mysql database, the implementation process of this embodiment is executed.

[0039] S102. According to the preset configuration information, respectively judge whether the current mode is the recording mode or the playback mod...

Embodiment 2

[0047] see figure 2 , embodiment two specifically includes:

[0048] S201, encapsulating the sql statement used to test the Mysql database; S202, judging whether the current mode is a recording mode according to the preset configuration information when the sql operation occurs and before running to the executeInternal function; if so, enter S203, otherwise enter S204;

[0049] S203. Call the target interface function to read the data of the Mysql database, obtain and record the return value as the data reading result;

[0050] S204. According to the preset configuration information, judge whether the current mode is the playback mode; if so, enter S205, otherwise enter S206;

[0051] S205, when the sql operation occurs and before running to the executeInternal function, skip running the executeInternal function, generate an object of the same type as the return value of the executeInternal function; assign a value to the object, and obtain the data reading result;

[0052]...

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 simulation return method of Mysql. According to the scheme, when the database operation is carried out for the first time, the database data preparation process is recorded,and when the database operation is carried out subsequently, the database data is not prepared again, and the database data is determined according to the recording result, so that the original database data is always consistent in each database operation. On one hand, the interference of data change on a test result is avoided, on the other hand, the huge workload of repeatedly initializing the database is avoided, and finally, the database test efficiency is improved. In addition, the invention further provides a simulation return device and equipment of Mysql and a readable storage medium,and the technical effects of the Mysql simulation return device and equipment correspond to the technical effects of the method.

Description

technical field [0001] The application relates to the field of software testing, in particular to a Mysql simulation return method, device, equipment and readable storage medium. Background technique [0002] When testing the database, it is necessary to use related database operations, and some database operations may change the data in the database and affect the test results of the subsequent test process. The traditional solution is to repeatedly perform initialization operations on database data during the test process. This solution requires a lot of work, time-consuming and labor-intensive, resulting in low test efficiency. Contents of the invention [0003] The purpose of this application is to provide a Mysql simulation return method, device, equipment and readable storage medium to solve the problem of low test efficiency due to the need to repeatedly initialize the database in traditional database testing schemes. The specific plan is as follows: [0004] In t...

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/36G06F16/21G06F16/25
CPCG06F11/3684G06F11/3688G06F16/21G06F16/252Y02D10/00
Inventor 苏志锦邬娇娇
Owner 浙江诺诺网络科技有限公司
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