CN114003421B - Virtual machine timeout mechanism testing method, system, terminal and storage medium - Google Patents

Virtual machine timeout mechanism testing method, system, terminal and storage medium Download PDF

Info

Publication number
CN114003421B
CN114003421B CN202111231229.2A CN202111231229A CN114003421B CN 114003421 B CN114003421 B CN 114003421B CN 202111231229 A CN202111231229 A CN 202111231229A CN 114003421 B CN114003421 B CN 114003421B
Authority
CN
China
Prior art keywords
handle
virtual machine
test
browser
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111231229.2A
Other languages
Chinese (zh)
Other versions
CN114003421A (en
Inventor
李波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111231229.2A priority Critical patent/CN114003421B/en
Publication of CN114003421A publication Critical patent/CN114003421A/en
Application granted granted Critical
Publication of CN114003421B publication Critical patent/CN114003421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • 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

Abstract

The invention provides a method, a system, a terminal and a storage medium for testing a timeout mechanism of a virtual machine, comprising the following steps: assigning a first handle to the browser and a second handle to the virtual machine; after waiting for the appointed time, the browser page is switched to the test virtual machine interface by utilizing the second handle, and the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine and record the operation result; and switching to a browser interface by using the first handle, ending the overtime state of the test virtual machine through browser interface operation, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording a verification result. The invention can verify the KVM overtime mechanism for a long time, is beneficial to improving the product quality and accords with the interests of companies and the expectations of clients.

Description

Virtual machine timeout mechanism testing method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of virtual machines, in particular to a virtual machine timeout mechanism testing method, a system, a terminal and a storage medium.
Background
KVM stands for Keyboard (Keyboard), display (Video) and Mouse (Mouse), i.e. a group of Keyboard, display and Mouse are used to control devices, playing an important role in remote scheduling and monitoring, BMC has VGA interface, BMC supports virtual KVM function, and by turning on KVM, display of server can be checked and operated. Kernel-based Virtual Machine is an open-source system virtualization module, which is integrated in each main release of Linux after Linux 2.6.20. It uses the Linux's own scheduler for management, so its core source code is very small compared to Xen. KVM has become one of the mainstream VMMs in the academia. Virtualization of KVM requires hardware support (such as Intel VT technology or AMD V technology). Is based on complete virtualization of hardware. While Xen was early Para-Virtualization based on software simulation, the new version was fully virtualized based on hardware support. However, xen itself has its own process scheduler, storage management module, and so on, so the code is huge. The wide-spread commercial system Virtualization software VMware ESX family is based on the Full-Virtualization of software simulations.
The KVM session has a timeout mechanism, and can exit after timeout, so that the KVM session has safety, and avoids being operated by other people without timeout for a long time, such as shutdown, and the like, and the consequences are serious. When the overtime condition of the KVM cannot be started or the KVM never overtime occurs in the actual testing process, a certain pressure test is needed to avoid the phenomenon.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a virtual machine timeout mechanism testing method, a system, a terminal and a storage medium, so as to solve the technical problems.
In a first aspect, the present invention provides a method for testing a timeout mechanism of a virtual machine, including:
assigning a first handle to the browser and a second handle to the virtual machine;
after waiting for the appointed time, the browser page is switched to the test virtual machine interface by utilizing the second handle, and the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine and record the operation result;
and switching to a browser interface by using the first handle, ending the overtime state of the test virtual machine through browser interface operation, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording a verification result.
Further, assigning a first handle to the browser and a second handle to the virtual machine, including:
logging in a browser, and assigning a handle value acquired from a browser page to a first handle;
and starting the test virtual machine page, and assigning the handle value acquired from the test virtual machine page to the second handle.
Further, after waiting for the specified time, the browser page is switched to the test virtual machine interface by using the second handle, and the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine and record the operation result, including:
switching to a browser interface by using the first handle, and starting timing;
judging whether the timing time reaches the waiting time set according to the starting time of the timeout mechanism or not:
if yes, switching to the test virtual machine interface by using the second handle.
Further, the method further comprises:
and circularly executing the virtual machine timeout mechanism testing method until the cycle times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
In a second aspect, the present invention provides a virtual machine timeout mechanism testing system, including:
the handle assignment unit is used for assigning a first handle to the browser and assigning a second handle to the virtual machine;
the shutdown test unit is used for switching to the test virtual machine interface by using the second handle after waiting for the appointed time on the browser page, calling a shutdown operation item of the test virtual machine to perform shutdown restarting operation on the test virtual machine and recording an operation result;
the wake-up test unit is used for switching to a overtime state of the browser interface, ending the test virtual machine through browser interface operation by utilizing the first handle, verifying whether the test virtual machine can be successfully opened or not by calling the second handle, and recording a verification result.
Further, the handle assignment unit includes:
the first assignment module is used for logging in the browser and assigning the handle value acquired from the browser page to the first handle;
and the second assignment module is used for starting the test virtual machine page and assigning the handle value acquired from the test virtual machine page to the second handle.
Further, the shutdown test unit includes:
the timeout waiting module is used for switching to the browser interface by using the first handle and starting timing;
the overtime judging module is used for judging whether the timing time reaches the waiting time set according to the overtime mechanism starting time;
and the interface switching module is used for switching to the test virtual machine interface by using the second handle if the timing time reaches the waiting time set according to the starting time of the timeout mechanism.
Further, the system further comprises:
and the test circulation unit is used for circularly executing the virtual machine timeout mechanism test method until the circulation times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program,
the processor is configured to call and run the computer program from the memory, so that the terminal performs the method of the terminal as described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the above aspects.
The virtual machine timeout mechanism testing method, the system, the terminal and the storage medium have the advantages that the first handle is assigned to the browser, the second handle is assigned to the virtual machine, after the browser page waits for the assigned time, the second handle is used for switching to the test virtual machine interface, the shutdown operation item of the test virtual machine is called for performing shutdown restarting operation on the test virtual machine and recording the operation result, after shutdown testing is completed, the first handle is used for switching to the browser interface, the timeout state of the test virtual machine is finished through the browser interface operation, whether the test virtual machine can be successfully opened is verified through calling the second handle, and the verification result is recorded. The invention can verify the KVM overtime mechanism for a long time, is beneficial to improving the product quality and accords with the interests of companies and the expectations of clients.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention.
FIG. 2 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution 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 only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The following explains key terms appearing in the present invention.
web (World Wide Web) is a global wide area network, also known as the world wide web, which is a global, dynamically interactive, cross-platform distributed graphical information system based on hypertext and HTTP. The network service is established on the Internet, a graphical and easily-accessible visual interface is provided for a browser to search and browse information on the Internet, and documents and hyperlinks organize information nodes on the Internet into a mutually-associated network structure. One important reason the Web is very popular is the ability to display both color rich graphics and text on a page. The information on the Internet was only in text form prior to the Web. The Web may provide features that integrate graphics, audio, and video information. The web pages are classified into dynamic and static pages in the traditional sense, in principle, static pages are redesigned and changed by website design software, and the relative delay is relatively long, and a website management system is adopted, so that static pages can be generated, and the static pages are called static. The dynamic page automatically processes the automatically updated page, such as a bar, through the webpage script and the language, namely, the web server runs the program, automatically processes the information and updates the webpage according to the flow.
A Handle (Handle) is an identifier that is used to identify an object or item and may be used to describe a form, file, etc., it being noted that the Handle cannot be constant. The Windows needs to set up a handle, which is basically derived from the problem of the memory management mechanism, i.e. the virtual address. In short, since the address of data needs to be changed, and a person is required to record and manage the change after the change, the system records the change of the data address by using a handle. In programming, a handle is a special smart pointer that is used when an application is to reference a memory block or object managed by other systems (e.g., databases, operating systems). Handle is a term often referred to in c++ programming. It is not a specific, fixed, data type or entity, but rather represents a broad concept in programming. A handle generally refers to a method of obtaining another object-a generalized pointer, which may be in the form of an integer, an object, or just a real pointer, and whose purpose is to establish a unique association with an object being accessed. In c++, to access an object, a pointer to the object may typically be established. In many specific applications, however, representing objects directly with pointers is not a good solution. From the data type point of view, it is only a 16-bit unsigned integer. The application always obtains a handle by calling the Windows API, which can then be used by other Windows functions to reference and manipulate the corresponding kernel object. The handle may be left empty like a pointer, so that the handle has no meaning and does not represent any kernel object.
A CPU central processing unit (central processing unit, abbreviated as CPU) is used as an operation and control core of the computer system, and is a final execution unit for information processing and program running.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The execution body of fig. 1 may be a virtual machine timeout mechanism test system.
As shown in fig. 1, the method includes:
step 110, assigning a first handle to the browser and a second handle to the virtual machine;
step 120, after waiting for the specified time, the browser page is switched to the test virtual machine interface by using the second handle, and the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine and record the operation result;
and 130, switching to a browser interface by using the first handle, ending the overtime state of the test virtual machine through the browser interface operation, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording the verification result.
According to the method, the first handle is assigned to the browser, the second handle is assigned to the virtual machine, after the browser page waits for the assigned time, the second handle is used for switching to the test virtual machine interface, the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine, the operation result is recorded, after the shutdown test is completed, the first handle is used for switching to the browser interface, the overtime state of the test virtual machine is finished through the browser interface operation, whether the test virtual machine can be successfully opened is verified by calling the second handle, and the verification result is recorded. The invention can verify the KVM overtime mechanism for a long time, is beneficial to improving the product quality and accords with the interests of companies and the expectations of clients.
In order to facilitate understanding of the present invention, the virtual machine timeout mechanism testing method provided by the present invention is further described below by using the principle of the virtual machine timeout mechanism testing method of the present invention, and combining with the process of testing the virtual machine timeout mechanism in the embodiment.
Specifically, the method for testing the timeout mechanism of the virtual machine comprises the following steps:
s1, assigning a first handle for the browser and assigning a second handle for the virtual machine.
Logging in a browser, and assigning a handle value acquired from a browser page to a first handle; and starting the test virtual machine page, and assigning the handle value acquired from the test virtual machine page to the second handle.
The method comprises the steps of logging in a web, acquiring a current handle A and assigning the current handle A to the web handle, starting a KVM page, acquiring a current handle B, and assigning the handle B to the KVM handle if the current handle A is inconsistent with the handle B.
The specific implementation method is as follows:
defining web login classes
S2, after waiting for the appointed time, the browser page is switched to the test virtual machine interface by using the second handle, and the shutdown operation item of the test virtual machine is called to perform shutdown restarting operation on the test virtual machine and record the operation result.
Switching to a browser interface by using the first handle, and starting timing; judging whether the timing time reaches the waiting time set according to the starting time of the timeout mechanism or not: if yes, switching to the test virtual machine interface by using the second handle.
And switching a window to a KVM page handle, waiting for triggering of the KVM overtime mechanism, attempting to close the KVM after waiting for a period of time, if the KVM is normally closed, considering that the operation of the KVM session overtime mechanism is effective, and writing the result into a test log.
The specific implementation method comprises the following steps:
s3, switching to a browser interface by using the first handle, ending the overtime state of the test virtual machine through browser interface operation, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording a verification result.
And switching the window to the Web page handle, operating the Web page to avoid overtime, attempting to open the KVM, if the KVM fails to open, considering that the KVM session overtime mechanism is not effective, and writing the result into the test log.
S4, circularly executing the virtual machine timeout mechanism testing method of the S1-S3 until the cycle times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
As shown in fig. 2, the system 200 includes:
a handle assignment unit 210, configured to assign a first handle to the browser and assign a second handle to the virtual machine;
the shutdown test unit 220 is configured to switch to the test virtual machine interface by using the second handle after waiting for the specified time on the browser page, call a shutdown operation item of the test virtual machine to perform a shutdown restart operation on the test virtual machine, and record an operation result;
the wake-up test unit 230 is configured to switch to a timeout state of the test virtual machine by the browser interface through the browser interface operation using the first handle, verify whether the test virtual machine can be successfully opened by calling the second handle, and record a verification result.
The handle assignment unit firstly logs in the web, obtains the current handle A and assigns the current handle A to the web handle, then opens the KVM page, obtains the current handle B, and assigns the handle B to the KVM handle if the current handle A is inconsistent with the handle B. And then switching the window to the KVM page handle by the shutdown test unit, waiting for triggering of the KVM overtime mechanism, and attempting to close the KVM after waiting for a period of time, if the KVM overtime mechanism can be normally closed, then considering that the KVM session overtime mechanism is effective, switching the window to the Web page handle by the wakeup test unit, operating the Web page to avoid overtime, attempting to open the KVM, and if the KVM fails to open, considering that the KVM session overtime mechanism is not effective, and repeating the steps.
Optionally, as an embodiment of the present invention, the handle assignment unit includes:
the first assignment module is used for logging in the browser and assigning the handle value acquired from the browser page to the first handle;
and the second assignment module is used for starting the test virtual machine page and assigning the handle value acquired from the test virtual machine page to the second handle.
Optionally, as an embodiment of the present invention, the shutdown test unit includes:
the timeout waiting module is used for switching to the browser interface by using the first handle and starting timing;
the overtime judging module is used for judging whether the timing time reaches the waiting time set according to the overtime mechanism starting time;
and the interface switching module is used for switching to the test virtual machine interface by using the second handle if the timing time reaches the waiting time set according to the starting time of the timeout mechanism.
Optionally, as an embodiment of the present invention, the system further includes:
and the test circulation unit is used for circularly executing the virtual machine timeout mechanism test method until the circulation times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the virtual machine timeout mechanism testing method according to the embodiment of the present invention.
The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the server as shown in the drawings is not limiting of the invention, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
The memory 320 may be used to store instructions for execution by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile memory terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. The execution of the instructions in memory 320, when executed by processor 310, enables terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by running or executing software programs and/or modules stored in the memory 320, and invoking data stored in the memory. The processor may be comprised of an integrated circuit (Integrated Circuit, simply referred to as an IC), for example, a single packaged IC, or may be comprised of a plurality of packaged ICs connected to the same function or different functions. For example, the processor 310 may include only a central processing unit (Central Processing Unit, simply CPU). In the embodiment of the invention, the CPU can be a single operation core or can comprise multiple operation cores.
And a communication unit 330 for establishing a communication channel so that the storage terminal can communicate with other terminals. Receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium in which a program may be stored, which program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
Therefore, the method and the device assign the first handle to the browser and assign the second handle to the virtual machine, then switch to the interface of the test virtual machine by using the second handle after the browser page waits for the appointed time, call the shutdown operation item of the test virtual machine to perform shutdown restarting operation on the test virtual machine and record the operation result, switch to the interface of the browser by using the first handle after the shutdown test is completed, finish the overtime state of the test virtual machine through the operation of the browser interface, and verify whether the test virtual machine can be successfully opened or not and record the verification result by calling the second handle. The invention can verify the KVM overtime mechanism for a long time, is beneficial to improving the product quality, accords with the interests of companies and the expectations of clients, and the technical effects achieved by the embodiment can be seen from the description above and are not repeated here.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium such as a U-disc, a mobile hard disc, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, etc. various media capable of storing program codes, including several instructions for causing a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the terminal embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, system or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for testing a timeout mechanism of a virtual machine is characterized by comprising the following steps:
assigning a first handle to the browser and a second handle to the virtual machine;
switching to a browser interface by using a first handle, starting timing, switching to a test virtual machine interface by using a second handle when the timing time reaches waiting time set according to starting time of a timeout mechanism, calling a shutdown operation item of the test virtual machine to perform shutdown restarting operation on the test virtual machine, and recording an operation result;
and switching to a browser interface by using the first handle, ending the overtime state of the test virtual machine through browser interface operation, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording a verification result.
2. The method of claim 1, wherein assigning a first handle to the browser and a second handle to the virtual machine comprises:
logging in a browser, and assigning a handle value acquired from a browser interface to a first handle;
and starting the test virtual machine interface, and assigning the handle value acquired in the test virtual machine interface to the second handle.
3. The method according to claim 1, wherein the method further comprises:
and circularly executing the virtual machine timeout mechanism testing method until the cycle times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
4. A virtual machine timeout mechanism test system, comprising:
the handle assignment unit is used for assigning a first handle to the browser and assigning a second handle to the virtual machine;
the shutdown test unit is used for switching to the browser interface by using the first handle, starting timing, switching to the test virtual machine interface by using the second handle when the timing time reaches the waiting time set according to the starting time of the timeout mechanism, calling a shutdown operation item of the test virtual machine to perform shutdown restarting operation on the test virtual machine, and recording an operation result;
the wake-up test unit is used for switching to a overtime state of the browser interface, ending the test virtual machine through browser interface operation by utilizing the first handle, verifying whether the test virtual machine can be successfully opened by calling the second handle, and recording a verification result.
5. The system of claim 4, wherein the handle assignment unit comprises:
the first assignment module is used for logging in the browser and assigning the handle value acquired from the browser interface to the first handle;
and the second assignment module is used for starting the test virtual machine interface and assigning the handle value acquired from the test virtual machine interface to the second handle.
6. The system of claim 4, wherein the system further comprises:
and the test circulation unit is used for circularly executing the virtual machine timeout mechanism test method until the circulation times reach the set times, and storing the operation result and the verification result obtained in each execution process into a test log.
7. A terminal, comprising:
a processor;
a memory for storing execution instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-3.
8. A computer readable storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-3.
CN202111231229.2A 2021-10-22 2021-10-22 Virtual machine timeout mechanism testing method, system, terminal and storage medium Active CN114003421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111231229.2A CN114003421B (en) 2021-10-22 2021-10-22 Virtual machine timeout mechanism testing method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111231229.2A CN114003421B (en) 2021-10-22 2021-10-22 Virtual machine timeout mechanism testing method, system, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN114003421A CN114003421A (en) 2022-02-01
CN114003421B true CN114003421B (en) 2023-11-07

Family

ID=79923713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111231229.2A Active CN114003421B (en) 2021-10-22 2021-10-22 Virtual machine timeout mechanism testing method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114003421B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579473B (en) * 2022-05-09 2022-09-02 太平金融科技服务(上海)有限公司深圳分公司 Application testing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699430A (en) * 2014-01-06 2014-04-02 山东大学 Working method of remote KVM (Kernel-based Virtual Machine) management system based on J2EE (Java 2 Platform Enterprise Edition) framework
CN111010308A (en) * 2019-10-29 2020-04-14 苏州浪潮智能科技有限公司 KVM service test method and device
CN113467893A (en) * 2021-07-14 2021-10-01 山石网科通信技术股份有限公司 Virtual machine automation test method and device, storage medium and processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699430A (en) * 2014-01-06 2014-04-02 山东大学 Working method of remote KVM (Kernel-based Virtual Machine) management system based on J2EE (Java 2 Platform Enterprise Edition) framework
CN111010308A (en) * 2019-10-29 2020-04-14 苏州浪潮智能科技有限公司 KVM service test method and device
CN113467893A (en) * 2021-07-14 2021-10-01 山石网科通信技术股份有限公司 Virtual machine automation test method and device, storage medium and processor

Also Published As

Publication number Publication date
CN114003421A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
US11687645B2 (en) Security control method and computer system
US9602347B2 (en) Method, system and program for browser to switch IE kernel
US10963287B2 (en) Reducing request latency in a multi-tenant web service host
US9778942B2 (en) Generating a replacement binary for emulation of an application
US10614208B1 (en) Management of login information affected by a data breach
US20200210325A1 (en) Streamlined creation of integration tests
US11360973B2 (en) Generating multilingual queries
US11269756B1 (en) Self-healing web applications
CN104753909A (en) Updated information authentication method, device and system
CN113536174A (en) Interface loading method, device and equipment
CN114003421B (en) Virtual machine timeout mechanism testing method, system, terminal and storage medium
CN113408254A (en) Page form information filling method, device, equipment and readable medium
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
US10776133B2 (en) Preemptive loading of code dependencies for improved performance
US20230136265A1 (en) Content management system
CN111625290B (en) Layout file preloading method and device under Android platform and electronic equipment
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN113961286A (en) Page generation method, device and equipment for application program
US11169904B2 (en) Automatically initiating tracing of program code based on statistical analysis
US9146720B1 (en) Binary file application processing
CN111679862A (en) Cloud host shutdown method and device, electronic equipment and medium
CN108848183B (en) Login method and device for simulation user
CN112732542A (en) Information processing method, information processing device and terminal equipment
CN112631949A (en) Debugging method and device, computer equipment and storage medium

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