CN116149912A - Batch operation testing method and device of cloud host, electronic equipment and storage medium - Google Patents

Batch operation testing method and device of cloud host, electronic equipment and storage medium Download PDF

Info

Publication number
CN116149912A
CN116149912A CN202111386770.0A CN202111386770A CN116149912A CN 116149912 A CN116149912 A CN 116149912A CN 202111386770 A CN202111386770 A CN 202111386770A CN 116149912 A CN116149912 A CN 116149912A
Authority
CN
China
Prior art keywords
test script
batch
timing task
test
testing
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.)
Pending
Application number
CN202111386770.0A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202111386770.0A priority Critical patent/CN116149912A/en
Publication of CN116149912A publication Critical patent/CN116149912A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention provides a batch operation testing method and device of a cloud host, electronic equipment and a storage medium, wherein the method comprises the following steps: at least one timing task is created, each timing task corresponds to a test script, the test script is used for testing a batch operation of the cloud host, and for each timing task, when the timing time of the timing task is reached, the timing task is started to execute the test script corresponding to the timing task. The test script is executed to realize the test of batch operation without human participation, the problem of long time consumption caused by adopting manual test is solved, and the labor is saved.

Description

Batch operation testing method and device of cloud host, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of performance testing, in particular to a batch operation testing method and device of a cloud host, electronic equipment and a storage medium.
Background
The cloud host is one of important products in the field of cloud computing, is a leasing service integrating IT infrastructure capability of computing, storing and network resources, and has the characteristics of low cost, high reliability, easiness in management and the like, so that the cloud host is widely used.
In the business direction of cloud hosts, time consumption for batch operations (such as creating, powering off, restarting, hanging off a cloud disk, hanging off a network card, etc.) on host objects is an important performance data. Therefore, to understand the performance of a cloud host, it is often necessary to test the batch operation of the cloud host to determine time consumption.
Currently, testing for cloud host batch operations is typically performed manually by a person when the testing environment uses low peak time points (e.g., during the middle of the day or the evening, etc.). In this way, the test takes a long time since it is entirely manually operated.
Disclosure of Invention
In view of this, in order to solve the technical problem that batch operation test of a cloud host takes longer time in the prior art, an embodiment of the invention provides a batch operation test method and device of a cloud host, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for testing batch operation of a cloud host, where the method includes:
creating at least one timing task, wherein each timing task corresponds to a test script, and the test script is used for testing one batch operation of the cloud host;
and when the timing time of any timing task is reached, starting the timing task to execute the test script corresponding to the timing task.
As a possible implementation manner, before the starting the timing task, the method further includes:
acquiring a test script storage address corresponding to the timing task from a designated storage space;
and downloading the test script corresponding to the timing task from the test script storage address.
As a possible implementation manner, after the test scripts corresponding to the timing tasks are executed, the method further includes:
and storing the test result corresponding to the test script into a preset data table corresponding to the test script.
As a possible implementation manner, after the test scripts corresponding to the timing tasks are executed, the method further includes:
and clearing dirty data generated by executing the test script.
As a possible implementation manner, the method further includes:
monitoring the execution time in the process of executing the test script corresponding to the timing task;
and stopping executing the test script when the execution time is monitored to be equal to the preset duration.
As a possible implementation manner, the monitoring the execution time includes:
a polling database for storing data generated by executing the test script;
recording the polling times of the database;
and when the polling times are determined to be equal to the preset times, determining that the monitored execution time is equal to the preset duration.
As a possible implementation manner, the batch operation includes one or several of the following: batch creation operation, batch shutdown operation, batch restarting operation, batch cloud disk mounting operation, batch cloud disk unloading operation, batch network card mounting operation and batch network card unloading operation.
In a second aspect, an embodiment of the present application further provides a batch operation testing device of a cloud host, where the device includes:
the cloud host comprises a creating module, a testing module and a processing module, wherein the creating module is used for creating at least one timing task, each timing task corresponds to a testing script, and the testing script is used for testing one batch operation of the cloud host;
and the execution module is used for starting the timing task when the timing time of any timing task is reached so as to execute the test script corresponding to the timing task.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the cloud host batch operation testing method according to any one of the first aspect comprises a processor and a memory, wherein the processor is used for executing a cloud host batch operation testing program stored in the memory.
In a fourth aspect, an embodiment of the present application further provides a storage medium, where one or more programs are stored, where the one or more programs are executable by one or more processors to implement the batch operation testing method of the cloud host according to any one of the first aspects.
According to the technical scheme provided by the embodiment of the invention, at least one timing task is created, each timing task corresponds to a test script, the test script is used for testing one batch operation of the cloud host, and for each timing task, when the timing time of the timing task is reached, the timing task is started to execute the test script corresponding to the timing task. The test script is executed to realize the test of batch operation without human participation, the problem of long time consumption caused by adopting manual test is solved, and the labor is saved.
Drawings
FIG. 1 is a flowchart of an embodiment of a method for testing batch operation of a cloud host according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the execution of a first test script according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the execution of a second test script according to an embodiment of the present invention;
FIG. 4 is a block diagram of an embodiment of a batch operation testing device for a cloud host according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The batch operation testing method of the cloud host provided by the invention is further explained by a specific embodiment with reference to the accompanying drawings, and the embodiment does not limit the embodiment of the invention.
Referring to fig. 1, a flowchart of an embodiment of a method for testing batch operation of a cloud host according to an embodiment of the present application is provided. As shown in fig. 1, the method may include the steps of:
s11, creating at least one timing task, wherein each timing task corresponds to at least one test script, and the test scripts are used for testing batch operation of the cloud host.
The batch operation testing method of the cloud host provided by the embodiment of the application can be applied to a physical machine provided with a continuous integration tool. Wherein the continuous integration tool is a tool which can be used for continuously and regularly constructing software items, for example, jenkins is an open-source continuous integration tool which provides friendly operation interfaces.
In embodiments of the present application, batch operations include, but are not limited to, one or more of the following: batch creation operation, batch shutdown operation, batch restarting operation, batch cloud disk mounting operation, batch cloud disk unloading operation, batch network card mounting operation or batch network card unloading operation.
As one embodiment, before executing S11, the developer may develop a corresponding test script for at least one batch operation of the cloud host in advance. After developing the test script, at least one timing task is created in the physical machine based on the persistent integration tool installed in the physical machine, and a corresponding test script is bound for each timing task.
As one example, in order to reduce the occupation of the storage space of the physical machine, the developed test script may be stored in a code storage platform, such as the code online storage platform Github, and the physical machine may access the test script through the storage address of the test script in the code storage platform. In this way, when the timing task is created, in order to ensure that the corresponding test script can be acquired based on the timing task, a corresponding storage space can be designated for each timing task, and then the storage address (such as the Git address) of the test script corresponding to the timing task is stored in the storage space corresponding to the timing task, so that the corresponding test script can be acquired based on the timing task.
As an embodiment, the timing time of each timing task may be set by a user (e.g., a tester) according to actual requirements when the timing task is created, and the timing times corresponding to different timing tasks may be different.
And S12, when the timing time of any timing task is reached, starting the timing task to execute a test script corresponding to the timing task.
As one embodiment, after the timed tasks are created, each timed task is monitored separately to determine if it has reached a timed time. When any timing task is monitored to reach the timing time, executing a test script corresponding to the timing task (for convenience of description, the target timing task) reaching the timing time.
As an embodiment, if the test script is stored in the code storage platform, the test script corresponding to the target timing task may be downloaded to the physical machine locally before the test script corresponding to the target timing task is executed. Specifically, the storage address of the test script corresponding to the target timing task, that is, the test script storage address, may be obtained from the designated storage space corresponding to the target timing task, and then the test script corresponding to the timing task is downloaded from the test script storage address.
After the test script is downloaded, the test script can be executed, and the test of batch operation of the cloud host corresponding to the test script can be realized by executing the test script, so that a corresponding test result is obtained.
According to the batch operation testing method, at least one timing task is created, each timing task corresponds to one testing script, the testing scripts are used for testing batch operation of the cloud host, and when the timing time of each timing task is reached, the timing task is started to execute the testing script corresponding to the timing task, so that the batch operation can be tested through executing the testing script without human participation, the problem that time consumption is long due to the fact that manual testing is adopted is solved, and manpower is saved.
Further, in the batch operation testing method of the cloud host provided in another embodiment of the present application, after the test script is executed, the method may further include: and storing the test result corresponding to the test script into a preset data table corresponding to the test script.
As an embodiment, a data table for storing test results may be set in advance for each test script in the physical machine. After the test script is executed, the obtained test result is automatically stored in a data table, so that the test result is convenient for a tester to check.
According to the batch operation testing method of the cloud host, provided by the embodiment of the application, the testing results of batch operation of the cloud host are automatically recorded, and compared with the existing method that the testing results are recorded manually, the working efficiency is improved.
Further, in the batch operation testing method of a cloud host provided in still another embodiment of the present application, after the test script is executed, the method may further include: dirty data generated by executing the test script is cleared.
Dirty data refers to data which is meaningless to business, has illegal data format or can affect production environment. Typically, some test-related data is generated during the execution of the test script, and some of the data is not reused after the test is completed, i.e., the data is meaningless to business, so the data is regarded as dirty data. For example, when testing a batch creation host operation, multiple hosts are created, and after testing is completed, these created hosts are typically not used and are therefore determined to be dirty data.
In the embodiment of the application, after the test script is executed, that is, after the test is completed, dirty data is automatically cleared, so that adverse effects of the dirty data on the production environment can be effectively avoided. And the dirty data is automatically cleared, so that the efficiency is higher compared with the existing manual clearing.
Because testing for batch operations typically requires resources of the physical machine, testing is typically performed in a test environment using low peak times. The test time is not too long, otherwise other services may be affected.
Therefore, in order to avoid adverse effects caused by excessively long testing time, in the batch operation testing method of the cloud host provided in the further embodiment of the present application, the batch operation testing method may further include: and monitoring the execution time in the process of executing the test script corresponding to the timing task, and stopping executing the test script when the execution time is monitored to be equal to the preset duration. Therefore, the excessively long test time can be effectively avoided, and the influence of the test on other services is reduced.
In general, when testing a batch operation of cloud hosts, it is necessary to determine the number of hosts (hereinafter referred to as the target number of hosts) corresponding to the batch operation, so as to determine whether the test is completed based on the target number of hosts during the test. For example: when testing is performed for batch creation operation, the number of hosts to be created needs to be determined, during the testing process, the number of hosts which are created is determined by polling the database, and when the number of hosts which are created is equal to the number of target hosts, the testing is determined to be completed. The database is a data path for storing related data generated by executing the test script, wherein the related data may include information such as a host name, a host ID, a host state, a task identifier, a timestamp, and the like of the host.
Since the interval time between two adjacent polls is a preset fixed value, the test duration, that is, the execution time of the test script, can be determined according to the number of polls. Thus, as one embodiment, monitoring execution time may include: and polling the database, recording the polling times of the database, and determining that the duration of the monitored execution time is equal to the preset duration when the polling times are equal to the preset times. The preset times can be input by a user or preset.
According to the batch operation testing method of the cloud host, the fact that the testing time is too long can be effectively avoided, and therefore the influence of testing on other businesses is reduced.
For ease of understanding, the execution process will be described below taking, as an example, a test script (hereinafter referred to as a first test script) that executes a lot creation operation and a test script (hereinafter referred to as a second test script) that executes a lot shutdown operation, respectively.
As shown in fig. 2, which is a flowchart of a first test script execution process, as shown in fig. 2, the execution of the first test script mainly includes the following steps:
s21, determining the target host name.
The target host name is the name of the host needing to be created, the target host name needs to be redetermined each time the first test script is executed, and the target host name is unique each time the first test script is created.
As an embodiment, in order to guarantee the uniqueness of the target hostname, the system time at the start of execution may be taken as the target hostname each time the first test script is executed. For example, if the start time is 2021, 5, 12, 12:00, then 2021-05-12-12:00 as the target hostname.
S22, determining the number of target hosts.
As one embodiment, the host number input by the user may be acquired as the target host number.
As another example, a preset host number may be acquired as the target host number.
S23, creating a host with a host name being a target host name through a preset interface for creating the host, and receiving a task identifier returned by the interface.
As one embodiment, each test script generates a unique identifier, reservation_id, each time it is executed, as the task identifier. The reservation_id can be used for acquiring a list of hosts created in the execution process, so that the dirty data is convenient to clean later.
S24, creating a database connection, wherein information of a host created through an interface is stored in the database.
Wherein the information of the host includes, but is not limited to, host name, host ID, host status change timestamp, etc. of the host.
S25, determining the target polling times.
As one example, the number of polls input by the user may be acquired as the target number of polls.
As another example, a preset number of polls may be acquired as the target number of polls.
S26, polling the number of target hosts in the database through the database connection based on the target polling times, wherein the target hosts are hosts with host names being target host names and states being active states.
S27, if the number of the target hosts is equal to the number of the target hosts in the polling process, stopping polling, calculating time consumption of batch creation operation, and storing the time consumption as a test result of the test script in a data table corresponding to the test script.
The polling process refers to a polling process when the polling times are less than or equal to the target polling times.
As one embodiment, when calculating the time consumption of the batch creation operation, the creation time and the activation time of each target host may be determined, the minimum value of the creation time and the maximum value of the activation time of all target hosts may be determined, and then the maximum value of the activation time and the minimum value of the creation time may be differed, and the difference value may be taken as the time consumption of the batch creation operation.
S28, if the polling times are equal to the target polling times, stopping polling, and storing the target host name and the task identifier as test results of the test script into a data table corresponding to the test script.
If the polling times are equal to the target polling times, determining that the number of the determined target hosts is smaller than the number of the target hosts, determining that the test is overtime, and recording the target host name and the task identifier at the moment, thereby facilitating subsequent investigation of logs.
Thus, the execution of the first test script is completed.
As shown in fig. 3, which is a flowchart of the execution process of the second test script, as shown in fig. 3, the execution of the first test script mainly includes the following steps:
s31, determining the names of the target hosts and the number of the target hosts.
Because the second test script is a test for a batch shutdown operation, it is necessary to create a batch of hosts and record the host names and numbers of the created hosts before executing the second test script. In this way, in executing S31, the host name and the number of created hosts can be regarded as the target host name and the target host number, respectively.
S32, closing a host with a target host name through a preset interface for closing the host, and receiving a task identifier returned by the interface.
As one embodiment, each test script generates a unique identifier, reservation_id, each time it is executed, as the task identifier. The reservation_id can be used for acquiring a list of hosts created in the execution process, so that the dirty data is convenient to clean later.
S33, creating a database connection, wherein information of a host closed through an interface is stored in the database.
As one embodiment, the information of the host includes, but is not limited to: host name, host ID, host status switch time, etc.
S34, determining the target polling times.
As one example, the number of polls input by the user may be acquired as the target number of polls.
As another example, a preset number of polls may be acquired as the target number of polls.
S35, polling the number of target hosts in the database through the database connection based on the target polling times, wherein the target hosts are hosts with host names being target host names and the state being a host in a shutdown state.
S36, if the number of the target hosts is equal to the number of the target hosts in the polling process, stopping polling, calculating time consumption of batch shutdown operation, and storing the time consumption as a test result of the test script in a data table corresponding to the test script.
The polling process refers to a polling process when the polling times are less than or equal to the target polling times.
As an embodiment, when calculating the time consumption of the batch shutdown operation, the time when all the target hosts are converted into the shutdown state (referred to as shutdown time hereinafter) may be obtained, then the maximum value of the shutdown time is selected, the time when the second test script starts to execute is subtracted from the maximum value of the shutdown time, and the obtained difference is taken as the time consumption of the batch shutdown operation.
S37, if the polling times are equal to the target polling times, stopping polling, and storing the target host name and the task identifier as test results of the test script into a data table corresponding to the test script.
If the polling times are equal to the target polling times, determining that the number of the determined target hosts is smaller than the number of the target hosts, determining that the test is overtime, and recording the target host name and the task identifier at the moment, thereby facilitating subsequent investigation of logs.
Thus, the second test script execution is completed.
The invention further provides an embodiment of the batch operation testing device of the cloud host corresponding to the embodiment of the batch operation testing method of the cloud host.
Referring to fig. 4, a block diagram of an embodiment of a batch operation testing device for a cloud host according to an embodiment of the present invention is provided. As shown in fig. 4, the apparatus includes:
the creating module 401 is configured to create at least one timing task, where each timing task corresponds to a test script, and the test script is configured to test a batch operation of the cloud host;
and the execution module 402 is used for starting the timing task when the timing time of any timing task is reached, so as to execute the test script corresponding to the timing task.
As a possible implementation, the apparatus may further include (not shown in fig. 4):
the downloading module is used for acquiring a test script storage address corresponding to the timing task from a designated storage space before the timing task is started; and downloading the test script corresponding to the timing task from the test script storage address.
As a possible implementation, the apparatus may further include (not shown in fig. 4):
and the storage module is used for storing the test result corresponding to the test script into a preset data table corresponding to the test script after the test script corresponding to the time task is executed.
As a possible implementation, the apparatus may further include (not shown in fig. 4):
and the clearing module is used for clearing dirty data generated by executing the test script after the test script corresponding to the time task is executed.
As a possible implementation, the apparatus may further include (not shown in fig. 4):
and the monitoring module is used for monitoring the execution time in the process of executing the test script corresponding to the timing task, and stopping executing the test script when the execution time is monitored to be equal to the preset duration.
As one possible implementation, monitoring the execution time may include:
recording the polling times of a database, wherein the database is used for storing data generated by executing a test script;
and when the polling times are determined to be equal to the preset times, determining that the monitored execution time is equal to the preset duration.
As one possible implementation, the batch operation includes one or more of the following: batch creation operation, batch shutdown operation, batch restarting operation, batch cloud disk mounting operation, batch cloud disk unloading operation, batch network card mounting operation or batch network card unloading operation.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and an electronic device 500 shown in fig. 5 includes: at least one processor 501, memory 502, at least one network interface 504, and other user interfaces 503. The various components in the electronic device 500 are coupled together by a bus system 505. It is understood that bus system 505 is used to enable connected communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as bus system 505 in fig. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touch pad, or a touch screen, etc.).
It will be appreciated that the memory 502 in embodiments of the invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (ProgrammableROM, PROM), an erasable programmable Read-only memory (ErasablePROM, EPROM), an electrically erasable programmable Read-only memory (ElectricallyEPROM, EEPROM), or a flash memory, among others. The volatile memory may be a random access memory (RandomAccessMemory, RAM) that acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic random access memory (DynamicRAM, DRAM), synchronous dynamic random access memory (SynchronousDRAM, SDRAM), double data rate synchronous dynamic random access memory (DoubleDataRateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (EnhancedSDRAM, ESDRAM), synchronous link dynamic random access memory (SynchlinkDRAM, SLDRAM), and direct memory bus random access memory (DirectRambusRAM, DRRAM). The memory 502 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 5022 includes various application programs such as a media player (MediaPlayer), a Browser (Browser), and the like for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 5022.
In the embodiment of the present invention, the processor 501 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022, for example, including:
creating at least one timing task, wherein each timing task corresponds to a test script, and the test script is used for testing one batch operation of the cloud host;
and when the timing time of any timing task is reached, starting the timing task to execute the test script corresponding to the timing task.
The method disclosed in the above embodiment of the present invention may be applied to the processor 501 or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 501. The processor 501 may be a general purpose processor, a digital signal processor (DigitalSignalProcessor, DSP), an application specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), an off-the-shelf programmable gate array (FieldProgrammableGateArray, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software elements in a decoding processor. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 502, and the processor 501 reads information in the memory 502 and, in combination with its hardware, performs the steps of the method described above.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (ApplicationSpecificIntegratedCircuits, ASIC), digital signal processors (DigitalSignalProcessing, DSP), digital signal processing devices (dspev), programmable logic devices (ProgrammableLogicDevice, PLD), field programmable gate arrays (Field-ProgrammableGateArray, FPGA), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be an electronic device as shown in fig. 5, and may perform all steps of the batch operation testing method of the cloud host as shown in fig. 2-3, so as to achieve the technical effects of the batch operation testing method of the cloud host as shown in fig. 2-3, and the detailed description of the method is referred to in fig. 2-3, which is omitted herein for brevity.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium here stores one or more programs. Wherein the storage medium may comprise volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid state disk; the memory may also comprise a combination of the above types of memories.
When one or more programs in the storage medium can be executed by one or more processors, the batch operation testing method of the cloud host executed on the electronic device side is realized.
The processor is used for executing a batch operation test program of the cloud host stored in the memory so as to realize the following steps of a batch operation test method of the cloud host executed on the electronic equipment side:
creating at least one timing task, wherein each timing task corresponds to a test script, and the test script is used for testing one batch operation of the cloud host;
and when the timing time of any timing task is reached, starting the timing task to execute the test script corresponding to the timing task.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of function in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A batch operation testing method for a cloud host, the method comprising:
creating at least one timing task, wherein each timing task corresponds to a test script, and the test script is used for testing one batch operation of the cloud host;
and when the timing time of any timing task is reached, starting the timing task to execute the test script corresponding to the timing task.
2. The method of claim 1, wherein prior to said initiating said timed task, said method further comprises:
acquiring a test script storage address corresponding to the timing task from a designated storage space;
and downloading the test script corresponding to the timing task from the test script storage address.
3. The method of claim 1, wherein after executing the test script corresponding to the timed task, the method further comprises:
and storing the test result corresponding to the test script into a preset data table corresponding to the test script.
4. The method of claim 1, wherein after executing the test script corresponding to the timed task, the method further comprises:
and clearing dirty data generated by executing the test script.
5. The method according to claim 1, wherein the method further comprises:
monitoring the execution time in the process of executing the test script corresponding to the timing task;
and stopping executing the test script when the execution time is monitored to be equal to the preset duration.
6. The method of claim 5, wherein monitoring execution time comprises:
a polling database for storing data generated by executing the test script;
recording the number of polls to the database,
and when the polling times are determined to be equal to the preset times, determining that the monitored execution time is equal to the preset duration.
7. The method of claim 1, wherein the batch operation comprises one or more of: batch creation operation, batch shutdown operation, batch restarting operation, batch cloud disk mounting operation, batch cloud disk unloading operation, batch network card mounting operation and batch network card unloading operation.
8. A batch operation testing device for a cloud host, the device comprising:
the cloud host comprises a creating module, a testing module and a processing module, wherein the creating module is used for creating at least one timing task, each timing task corresponds to a testing script, and the testing script is used for testing one batch operation of the cloud host;
and the execution module is used for starting the timing task when the timing time of any timing task is reached so as to execute the test script corresponding to the timing task.
9. An electronic device, comprising: a processor and a memory, the processor being configured to execute a batch operation test program of a cloud host stored in the memory, to implement the batch operation test method of a cloud host according to any one of claims 1 to 7.
10. A storage medium storing one or more programs executable by one or more processors to implement the batch operation testing method of a cloud host of any of claims 1-7.
CN202111386770.0A 2021-11-22 2021-11-22 Batch operation testing method and device of cloud host, electronic equipment and storage medium Pending CN116149912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111386770.0A CN116149912A (en) 2021-11-22 2021-11-22 Batch operation testing method and device of cloud host, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111386770.0A CN116149912A (en) 2021-11-22 2021-11-22 Batch operation testing method and device of cloud host, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116149912A true CN116149912A (en) 2023-05-23

Family

ID=86351195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111386770.0A Pending CN116149912A (en) 2021-11-22 2021-11-22 Batch operation testing method and device of cloud host, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116149912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756162A (en) * 2023-06-28 2023-09-15 蝉鸣科技(西安)有限公司 Method and system for guaranteeing data consistency

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756162A (en) * 2023-06-28 2023-09-15 蝉鸣科技(西安)有限公司 Method and system for guaranteeing data consistency
CN116756162B (en) * 2023-06-28 2024-03-12 蝉鸣科技(西安)有限公司 Method and system for guaranteeing data consistency

Similar Documents

Publication Publication Date Title
CN108459962B (en) Code normalization detection method and device, terminal equipment and storage medium
US10142170B2 (en) Log processing method and client
CN109587331B (en) Method and system for automatically repairing cloud mobile phone fault
JP5213671B2 (en) Test case selection method and selection system
CN104503788A (en) Setting method capable of shortening starting time of Android operating system
CN109669798B (en) Crash analysis method, crash analysis device, electronic equipment and storage medium
US8645766B2 (en) Serialized error injection into a function under test
KR20160029754A (en) Software failure locating method, apparatus and equipment
CN112115005A (en) Test data acquisition method and device, computer equipment and storage medium
CN112783761A (en) Method, device and system for testing cold start duration of application program
CN116149912A (en) Batch operation testing method and device of cloud host, electronic equipment and storage medium
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
US20190149571A1 (en) Method and device for repairing page vulnerability
CN111198703A (en) Version upgrading method, system, equipment and medium
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN112269697B (en) Equipment storage performance testing method, system and related device
CN113468009A (en) Pressure testing method and device, electronic equipment and storage medium
CN113377669A (en) Automatic testing method and device, computer equipment and storage medium
CN111124774B (en) Method and related device for testing stability of server in starting process
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN110928787A (en) Automatic test script recording and playback method, device, equipment and storage medium
CN103176897A (en) Software regression testing method and software regression testing system
US10922249B2 (en) Input/output control code filter
CN105988818B (en) Automatic bug debugging system and method
CN117149904A (en) Method, device, terminal and storage medium for data synchronization

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