CN111008124B - Task scheduling method and device for database test - Google Patents
Task scheduling method and device for database test Download PDFInfo
- Publication number
- CN111008124B CN111008124B CN201911020160.1A CN201911020160A CN111008124B CN 111008124 B CN111008124 B CN 111008124B CN 201911020160 A CN201911020160 A CN 201911020160A CN 111008124 B CN111008124 B CN 111008124B
- Authority
- CN
- China
- Prior art keywords
- test
- database
- task
- driver
- equipment
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a task scheduling method and device for database testing, and the task scheduling device is deployed between a testing platform and driver equipment to schedule testing tasks and reduce the running cost of the testing platform. The method comprises the following steps: the task scheduling equipment receives a first task request sent by the test platform, wherein the first task request is used for requesting the task scheduling equipment to trigger execution of a database test on a specified database; the task scheduling equipment allocates driver equipment for executing the database test according to the task information carried in the first task request; the task scheduling device sends a second task request to the driver device, wherein the second task request is used for requesting the driver device to execute database test on the database; the task scheduling equipment acquires test information of the database test from the driver equipment, wherein the test information comprises a test state, a test log or a test result of the database test; and the task scheduling equipment sends test information to the test platform.
Description
Technical Field
The present application relates to the field of testing, and in particular, to a task scheduling method and apparatus for database testing.
Background
High performance databases are of great significance for enterprise applications of databases, and therefore, it is necessary to evaluate the performance of databases through test tools.
The database test benchmark comprises TPC-E and other test benchmarks, and correspondingly, matched database test tools need to be developed so as to perform database test on the database, evaluate the transaction processing capability of the database under the database test benchmark and reflect the performance of the database.
In the existing database testing tool, a testing program is loaded locally on equipment, a simulation object is launched to a connected database, and an object processing result of the database is monitored to realize database testing.
Disclosure of Invention
The application provides a task scheduling method and device for database testing, and the task scheduling device is arranged between a testing platform and a driver device to schedule testing tasks, so that the running cost of the testing platform is reduced.
In a first aspect, the present application provides a task scheduling method for a database test, the method including:
the task scheduling equipment receives a first task request sent by the test platform, wherein the first task request is used for requesting the task scheduling equipment to trigger execution of a database test on a specified database;
the task scheduling equipment allocates driver equipment for executing the database test according to the task information carried in the first task request;
the task scheduling device sends a second task request to the driver device, wherein the second task request is used for requesting the driver device to execute the database test on the database;
the task scheduling equipment acquires test information of the database test from the driver equipment, wherein the test information comprises a test state, a test log or a test result of the database test;
and the task scheduling equipment sends test information to the test platform.
Optionally, the obtaining, by the task scheduling device, test information of the database test from the driver device includes:
the task scheduling device receives test information sent by the driver device through the HTTP POST interface.
Optionally, the obtaining, by the task scheduling device, test information of the database test from the driver device includes:
the task scheduling device monitors a standard output channel Sdout of the driver device and reads test information from Sdout, wherein the test information is obtained by outputting a log of a database test to Sdout by the driver device.
Optionally, the method further comprises:
the task scheduling equipment allocates one-to-one corresponding tasks (IDs) for different task links of database testing, wherein the different task links comprise data import, data verification, data creation index and data restoration;
the task scheduling device obtaining test information for performing a database test from the driver device includes:
the task scheduling equipment acquires sub-test information of different task links from the driver equipment according to different task IDs;
and the task scheduling equipment combines the plurality of pieces of sub-test information to obtain the test information.
Optionally, the allocating, by the task scheduling device, the driver device for performing the database test according to the task information carried in the first task request includes:
the task scheduling equipment detects whether the task information has the specified information of the target driver equipment;
if yes, the task scheduling device allocates a target driver device for executing the database test;
if not, the task scheduling device screens out the driver devices meeting the requirements in the task information as the driver devices for executing the database test according to the priorities, the computing resources, the idle time or the pre-distributed driver devices of the different driver devices.
In a second aspect, the present application provides a task scheduling apparatus for database testing, the apparatus including:
the system comprises a receiving unit, a testing platform and a task scheduling device, wherein the receiving unit is used for receiving a first task request sent by the testing platform, and the first task request is used for requesting the task scheduling device to trigger execution of a database test on a specified database;
the allocation unit is used for allocating driver equipment for executing the database test according to the task information carried in the first task request;
a sending unit, configured to send a second task request to the driver device, where the second task request is used to request the driver device to perform a database test on the database;
the device comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring test information of a database test from driver equipment, and the test information comprises a test state, a test log or a test result of the database test;
and the sending unit is also used for sending the test information to the test platform.
Optionally, the obtaining unit is specifically configured to receive test information sent by the driver device through an HTTP POST interface.
Optionally, the obtaining unit is specifically configured to monitor Sdout of the driver device, and read test information from Sdout, where the test information is obtained by the driver device outputting a log of a database test to Sdout.
Optionally, the allocating unit is further configured to allocate one-to-one corresponding task IDs to different task links of the database test, where the different task links include data import, data verification, data creation index, and data restoration;
an acquisition unit, specifically configured to:
acquiring sub-test information of different task links from driver equipment according to different task IDs;
and combining the plurality of pieces of sub-test information to obtain the test information.
Optionally, the allocation unit is specifically configured to:
detecting whether the task information has the specified information of the target driver device;
if so, allocating the target driver device for executing the database test;
if not, screening out the driver equipment meeting the requirements in the task information as the driver equipment for executing the database test according to the priority, the computing resources, the idle time or the pre-distributed driver equipment of different driver equipment.
In a third aspect, the present application provides a task scheduling device for database testing, comprising a processor, configured to implement any one of the steps of the first aspect as described above when the processor executes a computer program stored in a memory.
In a fourth aspect, the present application provides a database test system, comprising a test platform, a task scheduling device and a driver device, wherein the task scheduling device is configured to perform any one of the steps of the first aspect.
In a fifth aspect, the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, performs any of the steps of the first aspect as described above.
According to the technical scheme, the method has the following advantages:
by deploying the task scheduling equipment between the test platform and the driver equipment, when the test platform manages the database test, only a first task request needs to be sent to the task scheduling equipment, the task scheduling equipment redistributes the corresponding driver equipment to execute the database test on the database specified by the first task request according to the first task request, and then the task scheduling equipment sends the test information obtained from the driver equipment back to the test platform, so that the current database test task can be completed.
Drawings
FIG. 1 is a schematic flow chart of a task scheduling method for database testing according to the present application;
FIG. 2 is a schematic flowchart illustrating a task scheduling method for database testing according to the present invention;
FIG. 3 is a schematic flow chart illustrating a task scheduling method for database testing according to the present application;
FIG. 4 is a schematic diagram of a task scheduler for database testing according to the present application;
fig. 5 is a schematic structural diagram of a task scheduling device for database testing according to the present application.
Detailed Description
The application provides a task scheduling method and device for database testing, and the task scheduling device is deployed between a testing platform and driver equipment to schedule testing tasks and reduce the running cost of the testing platform.
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 practiced otherwise than as specifically illustrated or described herein. Moreover, the terms "comprises," "comprising," and any other variation 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 have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on 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 into 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.
The test platform, task scheduling device, driver device and database to which the present application relates will first be briefly described.
In the application, the test platform can be a cloud platform built by one or more processing devices and used for remote management of database tests, a user can log in the test platform, trigger tasks or look up task information, the test platform can run independently or can be built in Office Automation (OA) systems and other systems, and the processing devices can be server devices or host devices.
The task scheduling device is one or more processing devices, and by running the program of the task scheduling method for realizing the database test, the test tasks are scheduled between the test platform and the driver device, so that the running cost of the test platform is reduced.
In the application, the database test reference may be specifically a reference such as TPC-C, TPC-E, TPC-DS or TPC-H, and correspondingly, the database test may be specifically a test of a type such as TPC-C test, TPC-E test, TPC-DS test or TPC-H test. For convenience of introduction, the following description of the present application will be given by taking a TPC-E test corresponding to a TPC-E test reference as an example.
The Driver device is used for running a Driver component, a CE component and an MEE component which are specified by the database test benchmark, the Driver component is used for controlling the CE component and the MEE component, the CE component is used for simulating a client operation type transaction, and the MEE is used for simulating a market operation type transaction.
The database can be specifically Oracle, mySQL, SQLServer, dameng, jin Cang, nanda general purpose database and the like. It should be noted that, for the purpose of brevity, the data referred to in this application actually refers to a database management system, that is, the database test is directed to the database management system.
Next, a task scheduling method for the database test of the present application is described.
Example one
Referring to fig. 1, fig. 1 shows a schematic flow chart of a task scheduling method for a database test of the present application, specifically, the task scheduling method for a database test of the present application may include the following steps:
step S101, a task scheduling device receives a first task request sent by a test platform;
the first task request is used for requesting the task scheduling device to trigger the execution of the database test on the specified database.
In practical application, the test platform may trigger sending of the first task request according to manual operation of a user.
Step S102, the task scheduling device distributes driver devices for executing the database test according to the task information carried in the first task request;
in the application, a plurality of driver devices may form a driver device network in advance, so that when the task scheduling device receives a first task request sent by the test platform, the task scheduling device may match an optimal driver device suitable for the database test from the driver device network according to task information of the current first task request and a preset matching policy.
Step S103, the task scheduling device sends a second task request to the driver device;
wherein the second task request is for requesting the driver device to perform a database test on the database.
After matching the driver device that executes the current database test, the task scheduling device may send a second request to the driver device, triggering the driver device to execute the database test on the database.
Step S104, the task scheduling equipment acquires the test information of the database test from the driver equipment;
the test information comprises a test state, a test log or a test result of the database test.
After receiving a second task request sent by the task scheduling device, the Driver device may perform a database test on the database specified by the first task request according to task information of the second task request, that is, launch a simulation transaction to the database through the Driver component, the CE component, and the MEE component, test the transaction processing capability of the database for the simulation transaction, and in the execution process, the Driver device may monitor a response of the database to obtain the test information.
Correspondingly, the task scheduling device can obtain the test information of the database test from the driver device, and the test information can include at least one of a test state, a test log and a test result according to preset information requirements.
Step S105, the task scheduling equipment sends test information to the test platform.
Subsequently, the task scheduling device can send test information to the test platform to complete the task scheduling and the database test.
It can be seen from the above that, in the task scheduling method for database testing of the present application, by deploying the task scheduling device between the test platform and the driver device, when the test platform performs management of the database test, it only needs to send the first task request to the task scheduling device, and the task scheduling device reallocates the corresponding driver device to perform the database test on the database specified by the first task request according to the first task request, and then the task scheduling device sends the test information obtained from the driver device back to the test platform, so as to complete the database test task of this time.
In addition, it should be noted that, by deploying the task scheduling device, it is more convenient to network a database test network, improve the service efficiency of the database test service, efficiently allocate the driver device, efficiently perform the database test, and improve the service quality of the database test service.
Example two
In another embodiment, the step S104 can be specifically implemented as follows:
1. and the task scheduling equipment passively receives the test information.
Specifically, the method comprises the following steps:
the task scheduling device may receive test information sent by the driver device through the HTTP POST interface.
It can be understood that the driver device can actively push the monitored test information to the task scheduling device through the HTTP POST interface, and under this setting, transmission of signaling can be avoided as much as possible, and bandwidth and communication time between the driver device and the task scheduling device can be saved.
2. Task scheduling equipment actively acquires test information
Specifically, the method comprises the following steps:
the task scheduling device may listen to Sdout of the driver device and read test information from Sdout, where the test information is derived by the driver device outputting a log of the database test to Sdout.
It can be understood that the driver device listens to the database for the transaction of the database test and can obtain the log of the database test, and then outputs the log to Sdout for the task scheduling device to call.
In addition, the task scheduling device can also communicate with the test platform through the Websokcet.
EXAMPLE III
In practical applications, for each database test task, a corresponding test task ID may be assigned for identification, and a plurality of task links are required for performing a database test on a database under test of a driver device, so that the task scheduling method for performing the database test of the present application may further include the steps of:
the task scheduling equipment allocates task IDs corresponding to one another to different task links for database testing, wherein the different task links comprise data import, data verification, data creation index and data restoration.
By identifying different task links, each task link is monitored and managed more finely.
Correspondingly, referring to another flow diagram of the scheduling method for the database test in the present application shown in fig. 2, the step S104 may be specifically implemented by:
step S201, the task scheduling device obtains sub-test information of different task links from the driver device according to different task IDs;
after the corresponding task IDs are respectively allocated to the different task links, the task scheduling device can obtain the sub-test information of each task link from the driver device one by one according to the task IDs.
Step S202, the task scheduling device combines the sub-test information to obtain the test information.
After the word test information of each task link is obtained, the task scheduling equipment can combine the word test information of each task link to obtain complete test information of the database test.
Example four
In the above, it is mentioned that there is a matching policy preset for the assignment of the driver device, and correspondingly, referring to another flow chart of the database testing method of the present application shown in fig. 3, the step S102 may specifically include the following steps:
step S301, the task scheduling device detects whether the task information has the specified information of the target driver device, if yes, step S302 is triggered, and if not, step S303 is triggered;
the task information carried by the first task request may specify a database that needs to perform the database test of this time, may also directly specify a driver device that performs the database test of this time, and may specifically specify a target driver device through specified information such as a device ID, an IP address, or an MAC address of the driver device.
Step S302, the task scheduling device allocates a target driver device for executing a database test;
if the specified driver equipment exists, the task scheduling equipment can find the target driver equipment based on the specified information of the target driver equipment and allocate and execute the database test for the target driver equipment.
Step S303, the task scheduling device screens out the driver devices meeting the requirements in the task information as the driver devices for executing the database test according to the priorities, the computing resources, the idle time or the pre-allocated driver devices of the different driver devices.
If the appointed driver equipment does not exist, the task scheduling equipment can automatically distribute and execute the database test task.
Specifically, when one driver device meeting the requirements in the task information is used, the task scheduling device can directly allocate the driver device to designate the database test of this time; when the number of driver devices meeting the requirements in the task information is multiple, the first task scheduling device may perform sorting of the driver device allocation priorities according to the priority of the driver devices, the computing resources, the idle time, or pre-allocation of the driver devices, and then allocate the driver device with the highest priority to perform the database test, and when the number of the called elements is multiple, different weights and constraint conditions may also be introduced to perform sorting of the driver device allocation priorities by synthesizing the influences of different elements, so as to screen out the driver devices meeting the requirements in the task information as the driver devices performing the database test.
The above is an introduction of the task scheduling method for the database test of the present application, and the following is a description of the task scheduling apparatus for the database test of the present application.
Referring to fig. 4, fig. 4 is a schematic structural diagram illustrating a task scheduling apparatus for a database test according to the present application, specifically, the task scheduling apparatus for a database test may include the following structure:
a receiving unit 401, configured to receive a first task request sent by a test platform, where the first task request is used to request a task scheduling device to trigger a specific database to perform a database test;
an allocating unit 402, configured to allocate a driver device for performing a database test according to the task information carried in the first task request;
a sending unit 403, configured to send a second task request to the driver device, where the second task request is used to request the driver device to perform a database test on the database;
an obtaining unit 404, configured to obtain test information of a database test from a driver device, where the test information includes a test status, a test log, or a test result of the database test;
the sending unit 403 is further configured to send test information to the test platform.
Optionally, the obtaining unit 404 is specifically configured to receive test information sent by the driver device through an HTTP POST interface.
Optionally, the obtaining unit 404 is specifically configured to monitor a standard output channel Sdout of the driver device, and read test information from the Sdout, where the test information is obtained by the driver device outputting a log of a database test to the Sdout.
Optionally, the allocating unit 402 is further configured to allocate one-to-one corresponding task IDs to different task links of the database test, where the different task links include data import, data verification, data creation index, and data restoration;
the obtaining unit 404 is specifically configured to:
acquiring sub-test information of different task links from driver equipment according to different task IDs;
and combining the plurality of pieces of sub-test information to obtain the test information.
Optionally, the allocating unit 402 is specifically configured to:
detecting whether the task information has the specified information of the target driver device;
if so, allocating the target driver device for performing the database test;
if not, screening out the driver equipment meeting the requirements in the task information as the driver equipment for executing the database test according to the priority, the computing resources, the idle time or the pre-distributed driver equipment of different driver equipment.
Referring to fig. 5, fig. 5 shows a schematic structural diagram of a task scheduling apparatus for a database test provided in the present application, specifically, the task scheduling apparatus for a database test provided in the present application includes a processor 501, where the processor 501 is configured to implement, when executing a computer program stored in a memory 502, each step of a task scheduling method for a database test in any embodiment corresponding to fig. 1 to fig. 3; 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 complete the 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 the computer program in the computer apparatus.
The task scheduling device for the database test may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that the illustration is merely an example of the task scheduling device for the database test, and does not constitute a limitation of the task scheduling device for the database test, and may include more or less components than those illustrated, or combine some components, or different components, for example, the task scheduling device for the database test may further include an input/output device, a network access device, a bus, etc., and the processor 501, the memory 502, the input/output device, the network access device, etc., are connected through the bus.
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, etc., and the processor is a control center of the task scheduling device for the database test, and various interfaces and lines are used to connect various parts of the task scheduling device for the entire database test.
The memory 502 may be used to store computer programs and/or modules, and the processor 501 may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 502, as well as 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 task scheduling device of the database test, and the like. 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 application also provides a database test system, which comprises a test platform, task scheduling equipment and driver equipment, wherein the task scheduling equipment is used for realizing the task scheduling method of the database test in any embodiment corresponding to the embodiment shown in fig. 1 to fig. 3.
The present application further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the task scheduling method for the database test in any embodiment corresponding to fig. 1 to 3 is implemented.
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 solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) 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 or an optical disk, and 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 processes of the task scheduling apparatus, the device and the unit thereof for the database test may refer to the descriptions of the task scheduling method for the database test in the embodiments corresponding to fig. 1 to fig. 3, and are not described herein again in detail.
In summary, according to the task scheduling method, apparatus, device and readable storage medium for database testing provided by the present application, by deploying the task scheduling device between the test platform and the driver device, when the test platform performs management of the database test, it only needs to send the first task request to the task scheduling device, and the task scheduling device reassigns the corresponding driver device to perform the database test on the database specified by the first task request according to the first task request, and then the task scheduling device sends the test information acquired from the driver device back to the test platform, so as to complete the database test task of this time.
In the several embodiments provided in the present application, it should be understood that the disclosed task scheduling apparatus, device and unit for database testing may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, 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 position, 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 can be realized in a form of hardware, and can also be realized in a 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 (8)
1. A task scheduling method for database testing, the method comprising:
the task scheduling equipment receives a first task request sent by a test platform, wherein the first task request is used for requesting the task scheduling equipment to trigger execution of a database test on a specified database;
the task scheduling equipment allocates driver equipment for executing the database test according to the task information carried in the first task request;
the task scheduling device sends a second task request to the driver device, wherein the second task request is used for requesting the driver device to execute the database test on the database;
the task scheduling equipment acquires the test information of the database test from the driver equipment, wherein the test information comprises the test state, the test log or the test result of the database test;
the task scheduling equipment sends the test information to the test platform;
wherein the task scheduling device obtaining the test information of the database test from the driver device includes:
the task scheduling equipment monitors a standard output channel (Sdout) of the driver equipment and reads the test information from the Sdout, wherein the test information is obtained by outputting a log of the database test to the Sdout by the driver equipment;
and the driver equipment monitors the transaction processing of the database for the database test, obtains a log of the database test, and outputs the log of the database test to the Sdout for the task scheduling equipment to call.
2. The method of claim 1, wherein the task scheduling device obtaining test information for the database test from the driver device comprises:
and the task scheduling equipment receives the test information sent by the driver equipment through an HTTP POST interface.
3. The method of claim 1, further comprising:
the task scheduling equipment allocates task identification IDs corresponding to each other to different task links for the database test, wherein the different task links comprise data import, data verification, data creation index and data restoration;
the task scheduling device obtaining test information for performing the database test from the driver device includes:
the task scheduling equipment acquires sub-test information of different task links from the driver equipment according to different task identification IDs;
and the task scheduling equipment combines the sub-test information to obtain the test information.
4. The method of claim 1, wherein the task scheduling device allocating, according to the task information carried in the first task request, a driver device for performing the database test comprises:
the task scheduling device detects whether the task information has the specified information of the target driver device;
if yes, the task scheduling equipment allocates the target driver equipment for executing the database test;
if not, the task scheduling device screens out the driver devices meeting the requirements in the task information as the driver devices for executing the database test according to the priorities, the computing resources, the idle time or the pre-distributed driver devices of different driver devices.
5. A task scheduling apparatus for testing a database, the apparatus comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a first task request sent by a test platform, and the first task request is used for requesting task scheduling equipment to trigger execution of a database test on a specified database;
the allocation unit is used for allocating driver equipment for executing the database test according to the task information carried in the first task request;
a sending unit, configured to send a second task request to the driver device, where the second task request is used to request the driver device to perform the database test on the database;
an obtaining unit, configured to obtain test information of the database test from the driver device, where the test information includes a test status, a test log, or a test result of the database test;
the sending unit is further configured to send the test information to the test platform;
the obtaining unit is specifically configured to monitor a standard output channel Sdout of the driver device, and read the test information from the Sdout, where the test information is obtained by the driver device outputting a log of the database test to the Sdout;
and the driver equipment monitors the transaction processing of the database for the database test, obtains a log of the database test, and outputs the log of the database test to the Sdout for the task scheduling equipment to call.
6. The apparatus according to claim 5, wherein the obtaining unit is specifically configured to receive the test information sent by the driver device through an HTTP POST interface.
7. The device according to claim 5, wherein the allocating unit is further configured to allocate one-to-one corresponding task identifiers IDs to different task links for the database test, where the different task links include data import, data verification, data creation index, and data restoration;
the obtaining unit is specifically configured to:
acquiring sub-test information of different task links from the driver equipment according to different task Identifiers (IDs);
and combining the sub-test information to obtain the test information.
8. The apparatus according to claim 5, wherein the allocation unit is specifically configured to:
detecting whether the task information has the specified information of the target driver device;
if so, allocating the target driver device for performing the database test;
if not, screening out the driver equipment meeting the requirements in the task information as the driver equipment for executing the database test according to the priority, the computing resources, the idle time or the pre-distributed driver equipment of different driver equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911020160.1A CN111008124B (en) | 2019-10-25 | 2019-10-25 | Task scheduling method and device for database test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911020160.1A CN111008124B (en) | 2019-10-25 | 2019-10-25 | Task scheduling method and device for database test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111008124A CN111008124A (en) | 2020-04-14 |
CN111008124B true CN111008124B (en) | 2023-01-24 |
Family
ID=70110911
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911020160.1A Active CN111008124B (en) | 2019-10-25 | 2019-10-25 | Task scheduling method and device for database test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111008124B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111654416B (en) * | 2020-05-29 | 2021-12-24 | 北京智网信测科技有限公司 | Internet of things testing cloud platform and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8418000B1 (en) * | 2012-03-13 | 2013-04-09 | True Metrics LLC | System and methods for automated testing of functionally complex systems |
US9239775B1 (en) * | 2012-06-20 | 2016-01-19 | Synchronoss Technologies, Inc. | Coordinated testing |
WO2016140654A1 (en) * | 2015-03-04 | 2016-09-09 | Hewlett Packard Enterprise Development Lp | Performance testing using service call executors |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104850491B (en) * | 2014-02-19 | 2018-09-25 | 深圳中兴网信科技有限公司 | A kind of method for testing software, equipment and system |
US10210076B2 (en) * | 2016-09-26 | 2019-02-19 | International Business Machines Corporation | White box testing |
CN108399132B (en) * | 2018-03-21 | 2021-01-08 | 腾讯科技(深圳)有限公司 | Scheduling test method, device and storage medium |
CN109120679B (en) * | 2018-07-27 | 2021-09-28 | 平安科技(深圳)有限公司 | Task allocation method and device |
CN109167835B (en) * | 2018-09-13 | 2021-11-26 | 重庆邮电大学 | Physical resource scheduling method and system based on kubernets |
-
2019
- 2019-10-25 CN CN201911020160.1A patent/CN111008124B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8418000B1 (en) * | 2012-03-13 | 2013-04-09 | True Metrics LLC | System and methods for automated testing of functionally complex systems |
US9239775B1 (en) * | 2012-06-20 | 2016-01-19 | Synchronoss Technologies, Inc. | Coordinated testing |
WO2016140654A1 (en) * | 2015-03-04 | 2016-09-09 | Hewlett Packard Enterprise Development Lp | Performance testing using service call executors |
Non-Patent Citations (2)
Title |
---|
基于Python和Jenkins的设备异常诊断***设计与实现;信斌等;《软件导刊》;20171115(第11期);全文 * |
基于Python和SIPp的自动化压力测试***设计和实现;信斌等;《电脑知识与技术》;20170805(第22期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111008124A (en) | 2020-04-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10606662B2 (en) | System and method for processing task resources | |
CN108268372B (en) | Mock test processing method and device, storage medium and computer equipment | |
CN107590075B (en) | Software testing method and device | |
CN108256118B (en) | Data processing method, device, system, computing equipment and storage medium | |
CN110399213B (en) | Method, device, electronic equipment and medium for determining resource demand of application program | |
WO2019024508A1 (en) | Resource allocation method, master device, slave device, and distributed computing system | |
CN107682417B (en) | Task allocation method and device for data nodes | |
CN111338779B (en) | Resource allocation method, device, computer equipment and storage medium | |
CN110389843A (en) | A kind of business scheduling method, device, equipment and readable storage medium storing program for executing | |
CN112241316A (en) | Method and device for distributed scheduling application | |
CN104869229A (en) | Task allocation method | |
CN111008124B (en) | Task scheduling method and device for database test | |
CN113886069A (en) | Resource allocation method and device, electronic equipment and storage medium | |
CN111459676A (en) | Node resource management method, device and storage medium | |
CN114356521A (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN104301944A (en) | Resource capacity allocation method and equipment | |
CN109639599B (en) | Network resource scheduling method and system, storage medium and scheduling device | |
CN109947613B (en) | File reading test method and device | |
CN112968812A (en) | Network performance testing method, device, equipment and storage medium | |
CN110275778B (en) | Online program running method and device, electronic equipment and computer storage medium | |
CN111045903A (en) | High-concurrency TPC-E test method and device | |
CN109257227A (en) | Coupling management method, apparatus and system in data transmission | |
CN110780817B (en) | Data recording method and apparatus, storage medium, and electronic apparatus | |
CN103051528A (en) | Method and device for rapidly distributing messages for bus | |
CN113204434B (en) | Planned task execution method and device based on k8s 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 |