CN110058995B - Database testing method and system capable of avoiding interference of database types - Google Patents

Database testing method and system capable of avoiding interference of database types Download PDF

Info

Publication number
CN110058995B
CN110058995B CN201910165027.9A CN201910165027A CN110058995B CN 110058995 B CN110058995 B CN 110058995B CN 201910165027 A CN201910165027 A CN 201910165027A CN 110058995 B CN110058995 B CN 110058995B
Authority
CN
China
Prior art keywords
database
tested
type
test
compatible
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910165027.9A
Other languages
Chinese (zh)
Other versions
CN110058995A (en
Inventor
王长磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201910165027.9A priority Critical patent/CN110058995B/en
Publication of CN110058995A publication Critical patent/CN110058995A/en
Application granted granted Critical
Publication of CN110058995B publication Critical patent/CN110058995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The application provides a database test method and a system capable of avoiding interference of database types, which are used for avoiding the interference of the database types of a database to be tested on TPC-E test through setting of compatible rules. The database testing method provided by the application comprises the following steps: the testing system obtains a database to be tested; the test system inputs a plurality of simulation transactions corresponding to TPC-E test to a database to be tested; when detecting that the database type of the database to be tested is the database type to be compatible, the test system acquires a compatibility rule corresponding to the database type of the database to be tested; the test system acquires response results of the database to be tested corresponding to the plurality of simulated transactions according to the compatibility rule; the test system forms a TPC-E test result of the database to be tested according to the response result; and the test system outputs the TPC-E test result to the management platform.

Description

Database testing method and system capable of avoiding interference of database types
Technical Field
The present application relates to the field of databases, and in particular, to a method and a system for testing a database, which can avoid interference of database types.
Background
The Database is a data set that is stored together in a fixed manner, can be shared by a plurality of users, has the smallest possible redundancy, and is independent of the application program, and in the application, the Database is managed by a Database System (DBS).
The hardware Performance of the database and the processing Performance of the DBS obviously directly affect the use Performance of the database, and for this reason, se:Sub>A series of test benchmarks are established by the Transaction Performance Committee (TPC) from the initial TPC-se:Sub>A to standardize the evaluation criterise:Sub>A and the evaluation results of the database test.
Nowadays, the newly introduced TPC-E test standard is more truly and accurately adapted to the current enterprise application environment, and has greater advantages than the original TPC-C in the aspects of standard completeness, high simulation of a test model or practicality of system configuration, so that the application of the TPC-E gradually replaces the TPC-C in a software and hardware provider of a database.
However, in practical applications, it is found that although the test principle of TPC-E is already clear at the time of introduction, it is obvious that further improvement is required from the theoretical implementation to the specific application, for example, the response result of TPC-E test is extracted from the database to be tested, and is often abnormal or lost.
Disclosure of Invention
The application provides a database test method and a system capable of avoiding interference of database types, which are used for avoiding the interference of the database types of a database to be tested on TPC-E test through setting of compatible rules.
In a first aspect, the present application provides a database testing method capable of avoiding interference of database types, the method including:
the testing system determines a database to be tested;
the test system inputs a plurality of simulation transactions corresponding to TPC-E test to a database to be tested;
when detecting that the database type of the database to be tested is the database type to be compatible, the test system acquires a compatibility rule corresponding to the database type of the database to be tested;
the test system acquires response results of the database to be tested corresponding to the plurality of simulated transactions according to the compatibility rule;
the test system forms a TPC-E test result of the database to be tested according to the response result;
and the test system outputs the TPC-E test result to the management platform.
Optionally, when it is detected that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested includes:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a Damomedm database, the testing system obtains a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises:
and in the storage process of the database to be tested responding to a plurality of simulation transactions, obtaining the response result by a mode of querying variables through SELECT.
Optionally, when it is detected that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested includes:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, the testing system obtains a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises the following steps:
and in the storage process of the database to be tested responding to a plurality of simulated transactions, obtaining the response result in a dynamic cursor grabbing mode.
Optionally, when it is detected that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested includes:
when detecting that the database type of the database to be tested is the big vault KDB database, the testing system obtains a third compatibility rule corresponding to the database type of the database to be tested, wherein the third compatibility rule comprises:
and in the storage process of the database to be tested responding to a plurality of simulated transactions, obtaining a response result through a RECORD keyword retrieval mode.
Optionally, the obtaining, by the test system according to the compatibility rule, response results of the database to be tested and the plurality of simulation transactions includes:
and the test system reads the response result from the database to be tested through the open database connection ODBC connection according to the compatibility rule.
In a second aspect, the present application provides a test system, the system comprising:
the determining unit is used for determining a database to be tested;
the input unit is used for inputting a plurality of simulation transactions corresponding to TPC-E test to the database to be tested;
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a compatibility rule corresponding to the database type of the database to be tested when the database type of the database to be tested is detected to be a database type to be compatible;
the acquisition unit is also used for acquiring response results of the database to be tested and the plurality of simulated transactions according to the compatible rule;
the forming unit is used for forming a TPC-E test result of the database to be tested according to the response result;
and the output unit is used for outputting the TPC-E test result to the management platform.
Optionally, the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a DM database, acquiring a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises the following steps:
in the storage process of the database to be tested responding to a plurality of simulation transactions, a variable inquiry mode is carried out through a SELECT keyword, and a response result is obtained.
Optionally, the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, acquiring a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises the following steps:
and in the storage process of the database to be tested responding to a plurality of simulation transactions, obtaining corresponding results in a dynamic cursor grabbing mode.
Optionally, the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is a KDB database, obtaining a third compatible rule corresponding to the database type of the database to be tested, wherein the third compatible rule comprises the following steps:
and in the storage process of the database to be tested responding to a plurality of simulation transactions, obtaining a response result through a RECORD keyword retrieval mode.
Optionally, the obtaining unit is specifically further configured to:
and reading a response result from the database to be tested through the ODBC connection according to the compatibility rule.
In a third aspect, the present application provides a test system comprising a processor for implementing any of the steps of the database test method of the first aspect described above, when executing a computer program stored in a memory, which avoids interference of database types.
In a fourth aspect, the present application provides a readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements any step of the method for testing a database that can avoid interference of database types as described in the first aspect above.
According to the technical scheme, the method has the following advantages:
in the process of inputting a plurality of simulated transactions into a database to be tested for TPC-E testing, when the database type of the database to be tested is detected to be the database type to be compatible, the corresponding compatibility rule is obtained, so that the problem that the database type of the database to be tested interferes with the TPC-E testing can be avoided, the response result of the database to be tested corresponding to the simulated transactions can be accurately obtained, and a complete TPC-E testing result is formed.
Drawings
FIG. 1 illustrates a scenario diagram of a TPC-E test provided herein;
FIG. 2 is a flow chart illustrating a database testing method for avoiding database type interference according to the present application;
FIG. 3 is a schematic flow chart of a database testing method capable of avoiding interference of database types provided by the present application;
FIG. 4 is a schematic diagram of an embodiment of a test system provided herein;
fig. 5 shows a schematic structural diagram of a test system provided in the present application.
Detailed Description
The application provides a database test method and a system capable of avoiding interference of database types, which are used for avoiding the interference of the database types of a database to be tested on TPC-E test through setting of compatible rules.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be implemented in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow must be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered flow steps may be changed in execution order according to the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The division of the modules presented in this application is a logical division, and in practical applications, there may be another division, for example, multiple modules may be combined or integrated in another system, or some features may be omitted, or not executed, and in addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, and the indirect coupling or communication connection between the modules may be in an electrical or other similar form, which is not limited in this application. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present disclosure.
First, before introducing the present application, referring to fig. 1, fig. 1 shows a scenario diagram of a TPC-E test provided by the present application, as shown in fig. 1, a test system and a to-be-tested database are respectively deployed on different processing devices to operate, and a network connection between the test system and the to-be-tested database is established, under control management of a management platform side, the to-be-tested database provides a response of the to-be-tested database by inputting a simulation transaction to the to-be-tested database, and then obtains a response result of the to-be-tested database to the simulation transaction, so as to form a TPC-E test result of the to-be-tested database. When the database type of the database to be tested is detected to be the database type to be compatible, the test system can guarantee that the response result of the database to be tested and the simulation transaction can be accurately obtained by obtaining the corresponding compatibility rule.
Secondly, the TPC-E test related by the application comprises the following test principles: and enabling the database to be tested to execute the simulated transaction, and forming a TPC-E test result according to the response result of the database to be tested to the simulated transaction. The simulation transactions include Broker-transaction statistics transactions (Broker-Volume), customer-value statistics transactions (Customer-Position) Market observation transactions, (Market-Watch), data Maintenance transactions (Data-Maintenance), security information transactions (Security-Detail), trade inquiry transactions (Trade-Lookup), trade execution transactions (Trade-Order) Trade state transactions (Trade-Status), trade correction transactions (Trade-daUpdate), market tracking transactions (Market-Feed), trade Result Update transactions (Trade-Result) and Trade cleaning transactions (Trade-clean), the mixing ratio of the transaction types can be adjusted, and the mixing ratio of the final execution can be within a standard range of TPC-E test.
Next, a detailed description of the database testing method provided in the present application is started based on the scenario diagram shown in fig. 1.
Referring to fig. 2, fig. 2 is a schematic flow chart of the database testing method for avoiding interference of database types provided by the present application, and in particular, the database testing method for avoiding interference of database types provided by the present application may include the following steps:
step S201, a testing system determines a database to be tested;
when the TPC-E test is performed, firstly, the test system can determine a target database, namely a database to be tested, and establish network connection with the target database.
Step S202, the test system inputs a plurality of simulation affairs corresponding to TPC-E test to a database to be tested;
after establishing network connection with the database to be tested, the test system can input a plurality of simulation transactions corresponding to the TPC-E to the database to be tested.
It is understood that the simulation transaction is a transaction serving the TPC-E test and is used for restoring the processing transaction involved in the enterprise application environment under the TPC-E test benchmark.
Step S203, when detecting that the database type of the database to be tested is the database type to be compatible, the test system obtains a compatibility rule corresponding to the database type of the database to be tested;
in the application, because compatibility setting is introduced for different types of databases, the test system also identifies the type of the database to be tested, and when the type of the database to be tested is a preset type of the database to be compatible, the test system can acquire the compatibility rule corresponding to the type of the database of the current database to be tested from a plurality of stored sets of compatibility rules.
It is understood that steps S203 and S202 are not limited in time sequence, and step S202 may be executed first, and then step S203 is executed; alternatively, step S203 may be executed first, and then step S202 may be executed; alternatively, step S202 and step S203 may be executed simultaneously, and the embodiment is not limited herein.
Step S204, the test system obtains response results of the database to be tested and a plurality of simulation affairs according to the compatible rule;
it will be appreciated that in the disclosed TPC-E test benchmarks, no specification is made as to how to obtain in particular the response results of the database under test to the simulated transaction. In practical application, it is found that data is easy to be abnormal and lost in the process of reading response results because the data structures of different types of databases are different.
Therefore, in the application, the test system avoids the interference of the database types through the compatible rule corresponding to the database types of the database to be tested, and accurately acquires the response results corresponding to the previously input multiple simulation transactions from the database to be tested.
Step S205, the test system forms a TPC-E test result of the database to be tested according to the response result;
after the response result is obtained, the test system can form a complete TPC-E test result and represent the performance index of the database to be tested.
And step S206, the test system outputs the TPC-E test result to the management platform.
After the TPC-E test result is obtained, the test system can output the TPC-E test result to the management platform so as to display the TPC-E test result to related workers.
The server can be built through server equipment, and the effect of remotely managing TPC-E test is achieved.
In the above description, it can be seen that the database testing method capable of avoiding interference of the database types provided by the application can avoid the interference of the database types of the database to be tested with the TPC-E test by acquiring the corresponding compatibility rule when detecting that the database types of the database to be tested are the database types to be compatible in the process of inputting a plurality of analog transactions to the database to be tested for TPC-E test, and ensure that the response results corresponding to the database to be tested and the analog transactions can be accurately acquired to form the complete TPC-E test result.
With continuing reference to fig. 3, fig. 3 is a schematic flow chart of the database testing method capable of avoiding interference of database types provided by the present application, and in particular, the database testing method capable of avoiding interference of database types provided by the present application may include the following steps:
step S301, user Equipment (UE) initiates a test request to a management platform;
wherein, the test request carries the database identification of the database to be tested.
It can be understood that, when there is a TPC-E test task for the database, the relevant worker may initiate a test request for the database to be tested to the management platform through the client application corresponding to the TPC-E test on the UE, and the management platform may determine the database to be tested according to the database identifier carried in the test request, and perform the corresponding TPC-E test.
Step S302, the management platform sends a data file of a database to be tested to the test system;
in the application, in order to facilitate performance testing of the database system of the database to be tested, the management platform may first obtain the data file of the database to be tested according to the test request.
After the data file of the database to be tested is obtained, the data file can be sent to a testing system.
Step S303, the test system determines a database to be tested according to the test request;
after receiving the data file of the database to be tested sent by the management platform, the test system can determine a target database of the TPC-E test, namely the database to be tested, according to the data file.
Step S304, the test system deploys the data files of the database to be tested;
in practical application, a test system may deploy data files of a database to be tested on a processing device, run the database to be tested, and establish a network connection with the database to be tested.
Certainly, in practical application, the management platform may also run the database to be tested on the processing device through the data file of the database to be tested, and establish or trigger the establishment of the network connection between the testing system and the database to be tested.
Or, the database to be tested may also have completed deploying the hardware device of the data file of the database, and the management platform triggers the test system to perform TPC-E test on the database to be tested according to the test request, which is not limited herein.
Step S305, inputting a plurality of simulation transactions corresponding to TPC-E test to a database to be tested by a test system;
after establishing network connection with the database to be tested, the test system can input a plurality of simulation transactions corresponding to the TPC-E to the database to be tested.
Step S306, the testing system identifies the database type of the database to be tested;
in some embodiments, the specific identification manner of the database type of the database to be tested includes:
the test system specifically identifies the database type of the database to be tested according to the database identification carried in the test request;
or, the test system can also identify the database type of the database to be tested by detecting the programming language of the data file of the database to be tested;
or, the test system may further trigger a response of the database to be tested, and identify the database type of the database to be tested according to the keywords related to the database type in the response information, such as the keywords of "DM", "KDB", "MYSQL", "Oracle", and the like.
Step S307, when detecting that the database type of the database to be tested is the database type to be compatible, the test system acquires a compatibility rule corresponding to the database type of the database to be tested;
in practical application, according to different database types of the database to be tested, the test system can match different compatibility rules, which are described in detail as follows:
1、SELECT
in some embodiments, step S307 comprises:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a DM database, the testing system obtains a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises the following steps:
in the storage process of the database to be tested responding to a plurality of simulation transactions, a variable inquiry mode is carried out through a SELECT keyword, and a response result is obtained. 2. Dynamic vernier
In some embodiments, step S307 comprises:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, the testing system obtains a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises:
and in the storage process that the database to be tested responds to a plurality of simulation transactions, obtaining a response result in a dynamic cursor grabbing mode.
In practical applications, taking an Oracle database as an example, the corresponding second compliance rule may specifically include the following execution operations:
SQL>conn scott/tiger@vongates
connected.
SQL>create or replace procedure getEmpByDept(in_deptNo in emp.deptno%type,
2out_curEmp out SYS_REFCURSOR)as
3
4begin
5open out_curEmp for
6SELECT*FROM emp WHERE deptno=in_deptNo;
7EXCEPTION
8WHEN OTHERS THEN
9RAISE_APPLICATION_ERROR(-20101,
10'Error in getEmpByDept'||SQLCODE);
12end getEmpByDept;
13/
the procedure is established.
SQL>var rset refcursor;
SQL>exec getEmpByDept(10,:rset);
PL/SQL program completion.
SQL>print rset;
3、RECORD
In some embodiments, step S307 comprises:
when detecting that the database type of the database to be tested is a KDB database, the testing system obtains a third compatibility rule corresponding to the database type of the database to be tested, wherein the third compatibility rule comprises:
and in the storage process of the database to be tested responding to a plurality of simulation transactions, obtaining a response result through a RECORD keyword retrieval mode.
Step S308, the test system obtains response results of the database to be tested and corresponding to a plurality of simulation transactions according to the compatibility rule;
in some embodiments, on the basis of obtaining the compatibility rule, the test system may specifically read a corresponding response result from the storage information of the database to be tested in response to the plurality of simulation transactions through a unified interface mode of ODBC.
Step S309, the test system forms a TPC-E test result of the database to be tested according to the response result;
after the response result is obtained, the test system can form a complete TPC-E test result and represent the performance index of the database to be tested.
The TPC-E test result can be specifically output in file formats such as a report, a chart and the like.
And step S310, the test system outputs a TPC-E test result to the management platform.
It is to be understood that steps S305 to S310 are similar to steps S201 to S206 in the embodiment corresponding to fig. 2, and repeated contents are not repeated herein.
Step S311, the management platform outputs the TPC-E test result to the User Equipment (UE).
In the application, the management platform can also send the TPC-E test result to the UE for the staff to check.
The UE may specifically be a desktop computer, a notebook computer, a smart Phone, or a tablet computer, and the UE includes input and output devices and other structures for a user to initiate a test request and display a TPC-E test result to the user, where the UE may use different types of operating systems such as Mac OS, windows, android, IOS, tizen, ubuntu, or Windows Phone, and is not limited herein.
The management platform can also directly comprise a client application corresponding to the TPC-E test of the UE, or the management platform can be built and realized through the client application corresponding to the TPC-E test of the UE, so that related workers can directly interface with the test system through the UE, manage the execution of the TPC-E test and check the TPC-E test result fed back by the test system.
The above is an introduction to the database testing method provided in the present application, which can avoid interference of the database type, and the following begins to introduce the testing system provided in the present application.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of the test system provided by the present application, specifically, the test system provided by the present application may include the following structure:
a determining unit 401, configured to determine a database to be tested;
an input unit 402, configured to input multiple simulation transactions corresponding to the TPC-E test to the database to be tested;
an obtaining unit 403, configured to obtain a compatibility rule corresponding to a database type of a database to be tested when it is detected that the database type of the database to be tested is a to-be-compatible database type;
the obtaining unit 403 is further configured to obtain, according to the compatibility rule, response results of the database to be tested and the plurality of simulation transactions;
a forming unit 404, configured to form a TPC-E test result of the to-be-tested database according to the response result;
and an output unit 405, configured to output the TPC-E test result to the management platform.
Optionally, the obtaining unit 403 is specifically configured to:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a DM database, acquiring a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises the following steps:
in the storage process of the database to be tested responding to a plurality of simulation transactions, a variable query mode is carried out through a SELECT keyword to obtain a response result.
Optionally, the obtaining unit 403 is specifically configured to:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, acquiring a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises the following steps:
and in the storage process of the database to be tested responding to a plurality of simulated transactions, obtaining a response result in a dynamic cursor grabbing mode.
Optionally, the obtaining unit 403 is specifically configured to:
when detecting that the database type of the database to be tested is a KDB database, obtaining a third compatible rule corresponding to the database type of the database to be tested, wherein the third compatible rule comprises the following steps:
and in the storage process of the database to be tested responding to a plurality of simulated transactions, obtaining a response result through a RECORD keyword retrieval mode.
Optionally, the obtaining unit 403 is further specifically configured to:
and reading a response result from the database to be tested through the ODBC connection according to the compatibility rule.
Referring to fig. 5, fig. 5 shows a schematic structural diagram of another structure of the test system provided in the present application, specifically, the test system provided in the present application includes a processor 501, and when the processor 501 is used to execute a computer program stored in a memory 502, the steps of the database test method in any embodiment corresponding to fig. 2 or fig. 3 are implemented; alternatively, the processor 501 is configured to implement the functions of the units in the corresponding embodiment of fig. 4 when executing the computer program stored in the memory 502.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in memory 502 and executed by processor 501 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The test system may include, but is not limited to, a processor 501, a memory 502. It will be appreciated by those skilled in the art that the illustration is merely an example of a computer apparatus and does not constitute a limitation of the test system and may include more or fewer components than those shown, or some components may be combined, or different components, for example, the test system may further include input output devices, network access devices, buses, etc., and the processor 501, the memory 502, the input output devices, the network access devices, etc., are connected via the buses.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center of the computer device and various interfaces and lines connecting the various parts of the overall computer device.
The memory 502 may be used to store computer programs and/or modules, and the processor 501 implements various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 502 and invoking data stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The present application further provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements a database testing method that can avoid interference of database types as in any of the embodiments corresponding to fig. 2 or fig. 3.
It will be appreciated that the integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the above-described specific working process of the test system and the units thereof may refer to the description of the database test method capable of avoiding the interference of the database type in the embodiment corresponding to fig. 2 or fig. 3, and details thereof are not repeated herein.
In summary, the database testing method, system and readable storage medium capable of avoiding interference of database types provided by the present application can avoid interference of the database types of the database to be tested with the TPC-E test by obtaining the corresponding compatibility rules when detecting that the database types of the database to be tested are the database types to be compatible in the process of inputting a plurality of analog transactions to the database to be tested for TPC-E test, and ensure that the response results corresponding to the database to be tested and the analog transactions can be accurately obtained to form complete TPC-E test results.
In the embodiments provided in the present application, it should be understood that the disclosed test system and its units may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for testing a database to avoid interference of database types, the method comprising:
the test system determines a database to be tested;
the test system inputs a plurality of simulation transactions corresponding to TPC-E test to the database to be tested;
when detecting that the database type of the database to be tested is the database type to be compatible, the test system acquires a compatibility rule corresponding to the database type of the database to be tested;
the test system acquires response results of the database to be tested corresponding to the plurality of simulated transactions according to the compatibility rule;
the test system forms a TPC-E test result of the database to be tested according to the response result;
and the test system outputs the TPC-E test result to a management platform.
2. The method of claim 1, wherein when it is detected that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested comprises:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a DM database, the testing system obtains a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises the following steps:
and in the storage process of the to-be-tested database responding to the plurality of simulated transactions, obtaining the response result by a SELECT keyword query variable mode.
3. The method of claim 1, wherein when it is detected that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested comprises:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, the testing system obtains a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises:
and in the storage process that the to-be-tested database responds to the plurality of simulation transactions, obtaining the response result in a dynamic cursor grabbing mode.
4. The method of claim 1, wherein when detecting that the database type of the database to be tested is the database type to be compatible, the obtaining, by the testing system, the compatibility rule corresponding to the database type of the database to be tested comprises:
when detecting that the database type of the database to be tested is a KDB database, the testing system obtains a third compatibility rule corresponding to the database type of the database to be tested, wherein the third compatibility rule comprises:
and in the storage process that the to-be-tested database responds to the plurality of simulation transactions, obtaining the response result in a RECORD keyword retrieval mode.
5. The method of claim 1, wherein the testing system obtaining the response results of the database to be tested corresponding to the plurality of simulated transactions according to the compliance rule comprises:
and the test system reads the response result from the database to be tested through open database connection ODBC connection according to the compatibility rule.
6. A test system, the system comprising:
the determining unit is used for determining a database to be tested;
the input unit is used for inputting a plurality of simulation transactions corresponding to the TPC-E test to the database to be tested;
the acquisition unit is used for acquiring a compatibility rule corresponding to the database type of the database to be tested when the database type of the database to be tested is detected to be a database type to be compatible;
the obtaining unit is further used for obtaining response results of the to-be-tested database corresponding to the plurality of simulated transactions according to the compatible rule;
the forming unit is used for forming a TPC-E test result of the database to be tested according to the response result;
and the output unit is used for outputting the TPC-E test result to a management platform.
7. The system according to claim 6, wherein the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is an SQL Server database, an MYSQL database or a DM database, acquiring a first compatible rule corresponding to the database type of the database to be tested, wherein the first compatible rule comprises:
and in the process that the database to be tested responds to the storage of the plurality of simulation transactions, acquiring the response result by inquiring a variable mode through a SELECT keyword.
8. The system according to claim 6, wherein the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is an Oracle database or a DM database, obtaining a second compatible rule corresponding to the database type of the database to be tested, wherein the second compatible rule comprises:
and in the storage process that the to-be-tested database responds to the plurality of simulation transactions, obtaining the response result in a dynamic cursor grabbing mode.
9. The system according to claim 6, wherein the obtaining unit is specifically configured to:
when detecting that the database type of the database to be tested is a KDB database, obtaining a third compatible rule corresponding to the database type of the database to be tested, wherein the third compatible rule comprises:
and in the storage process of the to-be-tested database responding to the plurality of simulated transactions, obtaining the response result in a RECORD keyword retrieval mode.
10. The system according to claim 6, wherein the obtaining unit is further configured to:
and reading the response result from the database to be tested through an open database connection ODBC connection according to the compatibility rule.
CN201910165027.9A 2019-03-05 2019-03-05 Database testing method and system capable of avoiding interference of database types Active CN110058995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910165027.9A CN110058995B (en) 2019-03-05 2019-03-05 Database testing method and system capable of avoiding interference of database types

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910165027.9A CN110058995B (en) 2019-03-05 2019-03-05 Database testing method and system capable of avoiding interference of database types

Publications (2)

Publication Number Publication Date
CN110058995A CN110058995A (en) 2019-07-26
CN110058995B true CN110058995B (en) 2022-12-20

Family

ID=67316600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910165027.9A Active CN110058995B (en) 2019-03-05 2019-03-05 Database testing method and system capable of avoiding interference of database types

Country Status (1)

Country Link
CN (1) CN110058995B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704301B (en) * 2019-08-27 2020-12-29 武汉迎风聚智科技有限公司 TPC-E automatic test method and TPC-E test system
CN111045903A (en) * 2019-10-25 2020-04-21 武汉迎风聚智科技有限公司 High-concurrency TPC-E test method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6442714B1 (en) * 1999-03-17 2002-08-27 Cisco Technology Web-based integrated testing and reporting system
CN1633198A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A method and system for compatibility test of subscriber identification module tool kit card
CN108415849A (en) * 2018-05-23 2018-08-17 百度在线网络技术(北京)有限公司 Method and apparatus for test application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6442714B1 (en) * 1999-03-17 2002-08-27 Cisco Technology Web-based integrated testing and reporting system
CN1633198A (en) * 2004-12-31 2005-06-29 大唐微电子技术有限公司 A method and system for compatibility test of subscriber identification module tool kit card
CN108415849A (en) * 2018-05-23 2018-08-17 百度在线网络技术(北京)有限公司 Method and apparatus for test application

Also Published As

Publication number Publication date
CN110058995A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN107957957B (en) Test case obtaining method and device
CN108733713B (en) Data query method and device in data warehouse
EP3812993A1 (en) Method and apparatus for constructing merkle trees, and method and apparatus for simplified payment verification
CN111104392B (en) Database migration method and device, electronic equipment and storage medium
CN107798038B (en) Data response method and data response equipment
EP3477914B1 (en) Data recovery method and device, and cloud storage system
CN110737594B (en) Database standard conformance testing method and device for automatically generating test cases
CN108920370B (en) Compatibility problem detection method, device and equipment
CN108388509B (en) Software testing method, computer readable storage medium and terminal equipment
CN111124480B (en) Method and device for generating application program package, electronic equipment and storage medium
CN110058995B (en) Database testing method and system capable of avoiding interference of database types
CN110727702B (en) Data query method, device, terminal and computer readable storage medium
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN110659259A (en) Database migration method, server and computer storage medium
CN109902027B (en) TPC-DS testing method and system convenient to implement
CN111241177A (en) Data acquisition method, system and network equipment
CN114860699A (en) Data quality detection method, device, equipment and storage medium
CN110298178B (en) Trusted policy learning method and device and trusted security management platform
CN104506636A (en) Method and device for synchronizing data
CN111143196A (en) Database testing method and device
CN111339560A (en) Data isolation method, device and system
CN114564856B (en) Data sharing method based on FMEA and electronic equipment
KR20130126012A (en) Method and apparatusfor providing report of business intelligence
CN110704301B (en) TPC-E automatic test method and TPC-E test system
CN115237889A (en) Database switching method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant