CN112306639B - Virtual desktop testing method and device - Google Patents

Virtual desktop testing method and device Download PDF

Info

Publication number
CN112306639B
CN112306639B CN202011253110.0A CN202011253110A CN112306639B CN 112306639 B CN112306639 B CN 112306639B CN 202011253110 A CN202011253110 A CN 202011253110A CN 112306639 B CN112306639 B CN 112306639B
Authority
CN
China
Prior art keywords
user
virtual machine
server
virtual
software
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
CN202011253110.0A
Other languages
Chinese (zh)
Other versions
CN112306639A (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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202011253110.0A priority Critical patent/CN112306639B/en
Publication of CN112306639A publication Critical patent/CN112306639A/en
Application granted granted Critical
Publication of CN112306639B publication Critical patent/CN112306639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Abstract

The embodiment of the application provides a method and a device for testing a virtual desktop, wherein the method comprises the following steps: the method comprises the steps that a client side obtains object files corresponding to a preset number of users stored in a sharing device; starting a client process corresponding to each user according to the object file corresponding to the user, wherein the client process corresponding to the user is connected with a virtual machine corresponding to the user in a server; sending an automatic script operation instruction to a virtual machine corresponding to each user in a server through a client process corresponding to each user; and the virtual machine corresponding to the user in the server runs the automation script of the software stored in the virtual machine corresponding to the user according to the automation script running instruction, and the test virtual machine in the server collects the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user. By applying the technical scheme provided by the embodiment of the application, when the running state of the virtual machine is tested by simulating a real application scene, the material and labor costs are reduced.

Description

Virtual desktop testing method and device
Technical Field
The application relates to the technical field of cloud desktops, in particular to a method and a device for testing a virtual desktop.
Background
Under the big background of the cloud computing technology, the application scenes of the virtual desktop based on the cloud computing technology are more and more extensive. Such as daily office, school teaching and other application scenarios. The Virtual Desktop is implemented using VDI (Virtual Desktop Infrastructure). The virtual desktop accessed by the user through the client is not a PC (Personal Computer) side desktop in the actual sense, but a desktop located on a high-performance server.
In VDI, a virtual machine authorized for a user is deployed on a server, and the user connects to the virtual machine on the server through a client using a virtualization transport protocol, and the virtual machine provides a desktop located on the server, i.e., a virtual desktop, for the user. At this time, the user directly uses the software installed in the virtual machine through the virtual desktop.
However, if the software used by the user has a high requirement on hardware such as a CPU (Central Processing Unit), a memory, and a graphics card, and a plurality of virtual machines on the server run the software at the same time, a certain burden is imposed on the server, which causes problems such as stuttering of running of the virtual machines.
To solve the above problem, the virtual desktop needs to be tested. At present, the test method of the virtual desktop mainly comprises: a tester logs in each client and manually simulates a user to use software in the virtual machine; and the tester determines the running state of the virtual machine according to the visual feeling.
In the testing method of the virtual desktop, in order to test the running state of the virtual machine in the real application scene, a large amount of manpower is consumed to simulate the user to use the software in the virtual machine, and a large amount of clients are deployed to simulate the real application scene, which greatly increases the consumption of material resources and manpower.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for testing a virtual desktop, so as to reduce material and labor costs when a real application scene is simulated to test an operating state of a virtual machine. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for testing a virtual desktop, which is applied to a test virtual machine of a server, and the method includes:
determining software to be operated in a virtual machine corresponding to each user;
aiming at the virtual machine corresponding to each user, acquiring an automation script of software to be operated in the virtual machine corresponding to the user from the sharing equipment, and adding the acquired automation script to the virtual machine corresponding to the user, so that the virtual machine corresponding to the user operates the automation script of the software stored in the virtual machine corresponding to the user after receiving an automation script operation instruction sent by a client through a client process corresponding to the user, wherein the automation script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user; the client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
and collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user.
In a second aspect, an embodiment of the present application provides a method for testing a virtual desktop, which is applied to a client, and the method includes:
acquiring object files corresponding to a preset number of users stored in a sharing device, wherein the object file corresponding to each user comprises information of a virtual machine authorized by a server for the user;
starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to each user, wherein the client process corresponding to each user is connected with the virtual machine corresponding to each user in the server;
sending an automation script operation instruction to a virtual machine corresponding to each user in the server through a client process corresponding to each user, so that the virtual machine corresponding to each user in the server operates an automation script of software stored in the virtual machine corresponding to each user according to the automation script operation instruction, wherein the automation script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user, the automation script of the software is obtained by a test virtual machine in the server from the shared device, and the test virtual machine in the server collects performance parameters of the server in the process of operating the automation script by the virtual machine corresponding to each user.
In a third aspect, an embodiment of the present application provides a testing apparatus for a virtual desktop, which is applied to a testing virtual machine of a server, and the apparatus includes:
the determining unit is used for determining software to be operated in the virtual machine corresponding to each user;
the acquisition unit is used for acquiring an automation script of software to be run in a virtual machine corresponding to each user from the sharing equipment, and adding the acquired automation script to the virtual machine corresponding to the user, so that the virtual machine corresponding to the user runs the automation script of the software stored in the virtual machine corresponding to the user after receiving an automation script running instruction sent by a client through a client process corresponding to the user, wherein the automation script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user; the client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
and the collecting unit is used for collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user.
In a fourth aspect, an embodiment of the present application provides a testing apparatus for a virtual desktop, which is applied to a client, and the apparatus includes:
the system comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring object files corresponding to a preset number of users stored in a sharing device, and the object file corresponding to each user comprises information of a virtual machine authorized by a server for the user;
the starting unit is used for starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to the user, and the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
a sending unit, configured to send an automation script operation instruction to a virtual machine corresponding to each user in the server through a client process corresponding to each user, so that the virtual machine corresponding to the user in the server operates an automation script of software stored in the virtual machine corresponding to the user according to the automation script operation instruction, where the automation script of the software includes a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user, the automation script of the software is acquired by a test virtual machine in the server from the shared device, and the test virtual machine in the server collects performance parameters of the server in a process in which the virtual machine corresponding to each user operates the automation script.
In a fifth aspect, embodiments of the present application provide an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the method steps described above.
In a sixth aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the method steps described above.
In the technical scheme provided by the embodiment of the application, the object files corresponding to the preset number of users are stored through the sharing equipment. And starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to each user in the client, wherein the client process corresponding to each user is connected with the virtual machine corresponding to each user in the server. Thus, one client process in the client corresponds to one VDI client.
In addition, the automation script of the software is stored in the virtual machine corresponding to each user in the server. When the virtual machine corresponding to the user receives the automatic script running instruction sent by the client process corresponding to the user, the automatic script can be run, and the operation of the user on the software on the virtual desktop provided by the virtual machine is simulated. In this case, the performance parameters of the server are collected by the testing virtual machine in the server in the process that the virtual machine corresponding to each user runs the automation script.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients are not required to be consumed to use software in the virtual machine, and a large amount of clients are not required to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a VDI architecture;
FIG. 2 is a testing system of a virtual desktop according to an embodiment of the present application
Fig. 3 is a schematic flowchart of a method for testing a virtual desktop according to an embodiment of the present disclosure;
fig. 4 is another schematic flowchart of a testing method for a virtual desktop according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a method for testing a virtual desktop according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a testing apparatus for a virtual desktop according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a testing apparatus for a virtual desktop according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The VDI architecture shown in fig. 1 includes a client 11 and a server 12. The server 12 is deployed with virtual machines authorized for users, and the virtual machines correspond to the clients 11 one by one. Fig. 1 illustrates only 2 clients as an example, and is not limited.
The virtualized transport protocol used to establish the connection between the client 11 and the virtual machine on the server 12 includes, but is not limited to: SPICE (Simple Protocol for Independent Computing Environment Simple Protocol), RDP (Remote Desktop Protocol), VNC (virtual Network Computing) Protocol, and ICA (Independent Computing Architecture) Protocol, etc.
The server 12 virtual machine System supports windows System, ubuntu System, readhat System, centros (Community Enterprise Operating System), galaxy kylin System, etc.
In fig. 1, the client 11 is connected to the virtual machine on the server 12 through SPICE, that is, the client 11 is connected to the virtual desktop through SPICE. After the connection is successful, the user can directly use the software installed in the virtual machine on the server 12 through the client 11.
In this case, if the software used by the user has a high requirement on hardware such as a CPU, a memory, and a graphics card, and a plurality of virtual machines on the server run the software at the same time, a certain load is imposed on the server, which causes problems such as a virtual machine running jam.
To solve the above problem, the virtual desktop needs to be tested. At present, the virtual desktop testing method mainly comprises the following steps: a tester logs in each client and manually simulates a user to use software in a virtual machine; and the tester determines the running state of the virtual machine according to the visual feeling.
In the testing method of the virtual desktop, in order to test the running state of the virtual machine in the real application scene, a large amount of manpower is consumed to simulate the user to use the software in the virtual machine, and a large amount of clients are deployed to simulate the real application scene, which greatly increases the consumption of material resources and manpower.
In order to solve the above problem, the embodiment of the present application provides a test system for a virtual desktop, as shown in fig. 2, the system includes a client 21, a sharing device 22, and a server 23. The client 21 is a Machine running a Virtual desktop client, a plurality of client processes (e.g., VDSession processes) may run in the client 21, and a plurality of VMs (Virtual machines) may be established in the server 23. The shared device 22 stores therein a shared directory and various service components. The service components can include batch creation users, json (JavaScript Object Notation) files of the users, automation scripts transmitted to the virtual machines, components for monitoring running states of the scripts, components for collecting performance data of the servers and the like; the shared directory stores the automation script of the software in the virtual machine system (such as the galaxy kylin system), the performance parameters of the server, and the like. The Json file may also be referred to as an object file, where the object file corresponds to a user, and the object file corresponding to the user includes VM information authorized by the server 23 for the user.
The virtual machine system of the server is an operating system of the server, and the type of the automation script can be based on the virtual machine system of the server. For example, if the virtual machine system of the server is the galaxy kylin system, the automation script may be a shell script.
In the test system, a client 21 acquires object files corresponding to a preset number of users stored in a sharing device 22; starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to the user, where the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server 23; sending an automated script operation instruction to the virtual machine corresponding to each user in the server 23 through the client process corresponding to each user;
the virtual machine corresponding to the user in the server 23 runs the automation script of the software stored in the virtual machine corresponding to the user according to the automation script running instruction, the automation script of the software includes a simulation operation flow of the software on a virtual desktop provided by the user to the virtual machine, and the automation script of the software is obtained by the test virtual machine in the server 23 from the shared device 22; the test virtual machine in the server 23 collects performance parameters of the server in the process that the virtual machine corresponding to each user runs the automation script.
In the technical scheme provided by the embodiment of the application, the object files corresponding to the preset number of users are stored through the sharing equipment. And starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to each user in the client, wherein the client process corresponding to each user is connected with the virtual machine corresponding to each user in the server. Thus, one client process in the client corresponds to one VDI client.
In addition, the automation script of the software is stored in the virtual machine corresponding to each user in the server. When the virtual machine corresponding to the user receives the automatic script running instruction sent by the client process corresponding to the user, the automatic script can be run, and the operation of the user on the software on the virtual desktop provided by the virtual machine is simulated. In this case, the test virtual machine in the server collects the performance parameters of the server in the process that the virtual machine corresponding to each user runs the automation script.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients are not required to be consumed to use software in the virtual machine, and a large amount of clients are not required to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
The following describes in detail a test method of a virtual desktop provided in an embodiment of the present application by using a specific embodiment.
Referring to fig. 3, fig. 3 is a schematic flowchart of a method for testing a virtual desktop according to an embodiment of the present disclosure. The method is applied to the client and comprises the following steps.
Step S31, obtaining object files corresponding to a preset number of users stored in the sharing device, where the object file corresponding to each user includes information of a virtual machine authorized by the server for the user.
Wherein, the preset quantity can be set according to actual requirements. For example, the predetermined number may be 50, 100, 1000, etc.
The object file corresponding to the user may be pre-stored in the common shared device for a manager, or may be generated and stored in the common shared device when the server deploys the virtual machine. This is not particularly limited.
When the virtual desktop is tested, the client side obtains object files corresponding to a preset number of users from the sharing equipment.
Step S32, according to the information of the virtual machine included in the object file corresponding to each user, starting the client process corresponding to the user, wherein the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server.
In the embodiment of the present application, the operating system of the server may be a galaxy kylin system, or may also be a windows system, an ubuntu system, a reddat system, or a CentOS. The server is also provided with a desktop template matched with the Galaxy kylin system, for example, an xdotool desktop template matched with the Galaxy kylin system.
When the object files corresponding to the preset number of users are obtained, the client starts the client process corresponding to the user according to the information of the virtual machine included in the object file corresponding to the user, and the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server. And the virtual machine corresponding to the user is the virtual machine indicated by the information in the object file corresponding to the user. Each client process launched in the client may represent a VDI client.
Step S33, sending an automation script operation instruction to the virtual machine corresponding to the user in the server through the client process corresponding to each user, so that the virtual machine corresponding to the user in the server operates the automation script of the software stored in the virtual machine corresponding to the user according to the automation script operation instruction, where the automation script of the software includes a simulation operation flow of the user on the software on the virtual desktop provided by the virtual machine, the automation script of the software is obtained from the shared device for the test virtual machine in the server, and the test virtual machine in the server collects performance parameters of the server in the process of operating the automation script by the virtual machine corresponding to each user.
In the embodiment of the application, after the client starts the client process according to the object file, the client process corresponding to each user sends an automatic script operation instruction to the virtual machine corresponding to the user in the server. And the virtual machine corresponding to the user receives the automatic script operation instruction and operates the automatic script of the software stored in the virtual machine corresponding to the user.
And the server is also provided with a test virtual machine, and the test virtual machine collects the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user. The test virtual machine can store the collected performance parameters of the server into the shared device, so that a manager can determine the running state of the server.
In one embodiment of the present application, testing a virtual machine may be implemented by a component of server performance data collection in a shared device. The test virtual machine may also be a virtual machine with performance of collecting performance parameters, which is configured in the server in advance by a manager.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients are not required to be consumed to use software in the virtual machine, and a large amount of clients are not required to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
Corresponding to the testing method of the virtual desktop shown in fig. 3, the embodiment of the present application further provides a testing method of a virtual desktop. Referring to fig. 4, fig. 4 is another schematic flow chart of the testing method for the virtual desktop according to the embodiment of the present application. The method is applied to a test virtual machine of a server; in the embodiment of the present application, the operating system of the server may be a galaxy kylin system, or may also be a windows system, an ubuntu system, a reddat system, or a CentOS. The server is also provided with a desktop template matched with the Kagaku system, for example, an xdotool desktop template matched with the Kagaku system. The testing method of the virtual desktop comprises the following steps. The desktop template may also be referred to as a virtual machine template.
And S41, determining software to be operated in the virtual machine corresponding to each user.
When the virtual desktop is tested, aiming at the virtual machine corresponding to each user, the test virtual machine determines the software to be operated in the virtual machine corresponding to the user.
In one embodiment of the present application, the test virtual machine may output a configuration interface. And based on the configuration interface, a manager formulates an application scene of each virtual machine and selects software to be operated on each virtual machine. Aiming at the software selected by a manager for each virtual machine, the test virtual machine determines the software selected for the virtual machine as the software to be run in the virtual machine.
Step S42, aiming at the virtual machine corresponding to each user, acquiring an automation script of software to be operated in the virtual machine corresponding to the user from the sharing equipment, and adding the acquired automation script to the virtual machine corresponding to the user, so that the virtual machine corresponding to the user operates the automation script of the software stored in the virtual machine corresponding to the user after receiving an automation script operation instruction sent by a client through a client process corresponding to the user, wherein the automation script of the software comprises a simulation operation flow of the user on the software on a virtual desktop provided by the virtual machine; the client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; and the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server.
After determining the software to be run in each virtual machine, the test virtual machine acquires the automation script of the software to be run in the virtual machine corresponding to each user from the sharing equipment aiming at the virtual machine corresponding to each user, and adds the acquired automation script to the virtual machine corresponding to the user.
And for each virtual machine corresponding to each user, after the virtual machine corresponding to the user receives an automatic script operation instruction sent by a client process corresponding to the user, the virtual machine corresponding to the user operates an automatic script of software stored in the virtual machine corresponding to the user. The automation script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by a user. Therefore, the virtual machine corresponding to the user runs the automation script, and the user can simulate the operation of the software on the virtual desktop.
The client process corresponding to the user is as follows: the client acquires the object file corresponding to the user from the sharing device, and starts the client process corresponding to the user according to the information of the virtual machine included in the object file corresponding to the user, wherein the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server. See in particular the description of fig. 3 above.
And S43, collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user.
The test virtual machine can store the collected performance parameters of the server into the shared device, so that a manager can determine the running state of the server.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients do not need to consume software in the virtual machine, and a large amount of clients do not need to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
In an embodiment of the application, a test virtual machine deploys a preset number of virtual machines through a virtual machine template, calls a VDI interface, creates a preset number of users, and generates object files corresponding to the preset number of users, where the object file corresponding to each user includes information of a virtual machine authorized for the user. And the test virtual machine adds the object files corresponding to the preset number of users to the sharing equipment. And later, the subsequent client acquires the object file from the sharing equipment and starts a corresponding client process to realize automatic test of the virtual desktop.
In an embodiment of the application, the test virtual machine detects whether the running automation scripts of the virtual machine corresponding to each user are all started normally. And if the virtual machines are all started normally, testing the performance parameters of the virtual machine collection server in the process of running the automation script by the virtual machine corresponding to each user. And if the running automation script of the virtual machine corresponding to the first user in the virtual machines corresponding to each user is abnormally started, the test virtual machine indicates the virtual machine corresponding to the first user to rerun the automation script of the software stored in the virtual machine corresponding to the first user. So as to improve the test accuracy of the virtual desktop.
In one embodiment of the application, for each virtual machine, the test virtual machine detects whether the running of the automation script in the virtual machine is completed. If the operation is not finished, the test virtual machine continuously detects whether the operation of the automation script in the virtual machine is finished. And if the operation is finished, the testing virtual machine deletes the automation script in the virtual machine so as to save the storage space of the server.
The following describes in detail a testing method for a virtual desktop according to an embodiment of the present application with reference to a flowchart of the testing method for a virtual desktop shown in fig. 5. Wherein the predetermined number is m.
S51, deploying m tested virtual machines by the test virtual machine through a virtual machine template;
in the embodiment of the application, m can be configured by a manager according to the hardware of the server, and the number of the virtual machines which can be born by the server is estimated to be m.
And S52, the testing virtual machine calls a VDI (virtual desktop infrastructure) interface, m users are created, the tested virtual machine is authorized for the users, json files corresponding to the m users are generated after the authorization is successful, and the Json files are stored in the sharing equipment.
And S53, the manager formulates an application scene of each tested virtual machine on the server and selects software which needs to run on each tested virtual machine.
And S54, adding the automation script of the software selected in the step S53 to the corresponding virtual machine to be tested from the shared equipment by the test virtual machine.
Step S55, the testing virtual machine detects whether the tested virtual machine has the automation script of the software selected in the step S53. If yes, go to step S56; if not, step S53 is executed again.
And step S56, the client acquires the Json file generated in the step S52 from the sharing equipment, and starts client processes by using the Json file, wherein each client process is equivalent to a VDI client.
And S57, the client process sends an automatic script running instruction to the tested virtual machine.
Step S57 may be understood as that the client sends an automation script running instruction to the virtual machine under test through the client process.
And S58, running the automation script by the tested virtual machine based on the automation script running instruction.
And step S59, the testing virtual machine detects whether the automation script in the tested virtual machine is started normally. If not, the process returns to step S58. If yes, go to step S510.
Step S510, the testing virtual machine collects performance parameters of the server during the process that the virtual machine corresponding to each user runs the automation script, and stores the collected performance parameters in the sharing device.
Step S511, the testing virtual machine detects whether the running of the automation script in the tested virtual machine is finished. If yes, go to step S512; if not, the process returns to step S510.
And step S512, deleting the automation script in the tested virtual machine by the testing virtual machine.
The descriptions of the above steps S51 to S512 are relatively simple, and reference may be made to the descriptions of fig. 3 to 4.
Corresponding to the foregoing embodiment of the testing method for a virtual desktop, an embodiment of the present application further provides a testing apparatus for a virtual desktop, and with reference to fig. 6, the apparatus is applied to a client, and includes:
the acquiring unit 61 is configured to acquire object files corresponding to a preset number of users stored in the sharing device, where an object file corresponding to each user includes information of a virtual machine authorized by the server for the user;
a starting unit 62, configured to start, according to information of a virtual machine included in an object file corresponding to each user, a client process corresponding to the user, where the client process corresponding to the user is connected to the virtual machine corresponding to the user in the server;
a sending unit 63, configured to send an automation script operation instruction to a virtual machine corresponding to each user in the server through a client process corresponding to each user, so that the virtual machine corresponding to the user in the server operates an automation script of software stored in the virtual machine corresponding to the user according to the automation script operation instruction, where the automation script of the software includes a simulation operation flow of the software on a virtual desktop provided by the user to the virtual machine, the automation script of the software is acquired from a shared device for a test virtual machine in the server, and the test virtual machine in the server collects performance parameters of the server in a process of the virtual machine corresponding to each user operating the automation script.
In an alternative embodiment, the operating system of the server may be the Galaxy kylin system; the shared device may also have stored therein an automation script for the software and server collected performance parameters for the server.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients do not need to consume software in the virtual machine, and a large amount of clients do not need to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
Corresponding to the foregoing embodiment of the testing method for a virtual desktop, an embodiment of the present application further provides a testing apparatus for a virtual desktop, and referring to fig. 7, the apparatus is applied to a testing virtual machine of a server, and includes:
a determining unit 71, configured to determine software to be run in a virtual machine corresponding to each user;
the obtaining unit 72 is configured to obtain, for each virtual machine corresponding to each user, an automation script of software to be run in the virtual machine corresponding to the user from the sharing device, and add the obtained automation script to the virtual machine corresponding to the user, so that after the virtual machine corresponding to the user receives an automation script running instruction sent by the client through the client process corresponding to the user, the virtual machine corresponding to the user runs an automation script of the software stored in the virtual machine corresponding to the user, where the automation script of the software includes a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user. The client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
and the collecting unit 73 is configured to collect the performance parameters of the server in the process that the virtual machine corresponding to each user runs the automation script.
In an optional embodiment, the apparatus may further include:
the deployment unit is used for deploying a preset number of virtual machines through the virtual machine templates;
the Virtual Desktop Infrastructure (VDI) interface creating unit is used for calling VDI interfaces of a virtual desktop infrastructure, creating a preset number of users and generating object files corresponding to the preset number of users, wherein the object file corresponding to each user comprises information of a virtual machine authorized for the user;
and the adding unit is used for adding the object files corresponding to the preset number of users to the sharing equipment.
In an optional embodiment, the apparatus may further include:
the detection unit is used for detecting whether the virtual machine operation automation scripts corresponding to each user are normally started or not;
the processing unit is used for detecting that the virtual machine operation automation scripts corresponding to each user are normally started and triggering the collection unit; and if the running automation script of the virtual machine corresponding to the first user is abnormally started, indicating the virtual machine corresponding to the first user to run the automation script of the software stored in the virtual machine corresponding to the first user again.
In an alternative embodiment, the operating system of the server may be the galaxy kylin system; the sharing device may further store performance parameters of the server collected by the server.
In the embodiment of the present application, one client process corresponds to one VDI client. When a real application scene needs to be simulated, only some client processes need to be started in the client, and corresponding automation scripts are stored in the corresponding virtual machines. Under the condition, a large amount of manpower simulation clients are not required to be consumed to use software in the virtual machine, and a large amount of clients are not required to be deployed, so that the material and labor costs are reduced when the real application scene is simulated to test the running state of the virtual machine.
Corresponding to the above embodiment of the testing method for the virtual desktop, an embodiment of the present application further provides an electronic device, as shown in fig. 8, including a processor 81 and a machine-readable storage medium 82, where the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81. Processor 81 is caused by machine executable instructions to implement any of the steps shown in fig. 2-5 above.
Corresponding to the foregoing embodiment of the virtual desktop testing method, an embodiment of the present application further provides a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by a processor. The processor is caused by machine executable instructions to implement any of the steps shown in fig. 2-5 above.
The machine-readable storage medium may include a RAM (Random Access Memory) and a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium may be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a Central Processing Unit (CPU), etc.; special purpose processors, including DSPs (Digital Signal processors) and NPs (Network processors), may also be used.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the testing apparatus, the electronic device, and the machine-readable storage medium of the virtual desktop, since they are substantially similar to the embodiments of the testing method of the virtual desktop, the description is relatively simple, and relevant points can be referred to the partial description of the embodiments of the testing method of the virtual desktop.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the scope of protection of the present application.

Claims (10)

1. A method for testing a virtual desktop is characterized in that the method is applied to a virtual machine of a server, and comprises the following steps:
determining software to be operated in a virtual machine corresponding to each user;
aiming at the virtual machine corresponding to each user, acquiring an automatic script of software to be operated in the virtual machine corresponding to the user from the sharing equipment, and adding the acquired automatic script to the virtual machine corresponding to the user, so that the virtual machine corresponding to the user operates the automatic script of the software stored in the virtual machine corresponding to the user after receiving an automatic script operation instruction sent by a client through a client process corresponding to the user, wherein the automatic script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user; the client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
and collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user.
2. The method of claim 1, further comprising:
deploying a preset number of virtual machines through a virtual machine template;
calling a VDI (virtual desktop infrastructure) interface, creating the preset number of users, and generating object files corresponding to the preset number of users, wherein the object file corresponding to each user comprises information of a virtual machine authorized for the user;
and adding the object files corresponding to the preset number of users to the sharing equipment.
3. The method of claim 1, further comprising:
detecting whether the running automation scripts of the virtual machines corresponding to each user are all started normally or not;
if yes, executing the step of collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user;
and if the running automation script of the virtual machine corresponding to the first user is abnormally started, indicating the virtual machine corresponding to the first user to run the automation script of the software stored in the virtual machine corresponding to the first user again.
4. A method according to any of claims 1-3, characterized in that the operating system of the server is the galaxy kylin system;
the performance parameters of the server collected by the server are also stored in the sharing device.
5. A method for testing a virtual desktop is applied to a client, and comprises the following steps:
acquiring object files corresponding to a preset number of users stored in a sharing device, wherein the object file corresponding to each user comprises information of a virtual machine authorized by a server for the user;
starting a client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to each user, wherein the client process corresponding to each user is connected with the virtual machine corresponding to each user in the server;
and sending an automatic script operation instruction to the virtual machine corresponding to the user in the server through the client process corresponding to each user, so that the virtual machine corresponding to the user in the server operates an automatic script of software stored in the virtual machine corresponding to the user according to the automatic script operation instruction, wherein the automatic script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the user to the virtual machine, the automatic script of the software is acquired by a test virtual machine in the server from the shared device, and the test virtual machine in the server collects performance parameters of the server in the process of operating the automatic script by the virtual machine corresponding to each user.
6. A testing device for a virtual desktop is characterized in that the device is applied to a testing virtual machine of a server and comprises:
the determining unit is used for determining software to be operated in the virtual machine corresponding to each user;
the acquisition unit is used for acquiring an automation script of software to be run in a virtual machine corresponding to each user from the sharing equipment, and adding the acquired automation script to the virtual machine corresponding to the user, so that the virtual machine corresponding to the user runs the automation script of the software stored in the virtual machine corresponding to the user after receiving an automation script running instruction sent by a client through a client process corresponding to the user, wherein the automation script of the software comprises a simulation operation flow of the software on a virtual desktop provided by the virtual machine by the user; the client process corresponding to each user is started by the client acquiring the object file corresponding to the user from the sharing equipment and according to the information of the virtual machine included in the object file corresponding to the user; the client process corresponding to the user is connected with the virtual machine corresponding to the user in the server;
and the collecting unit is used for collecting the performance parameters of the server in the process of running the automation script by the virtual machine corresponding to each user.
7. The apparatus of claim 6, further comprising:
the deployment unit is used for deploying a preset number of virtual machines through the virtual machine templates;
the creating unit is used for calling a VDI (virtual desktop infrastructure) interface of a virtual desktop infrastructure, creating the preset number of users and generating object files corresponding to the preset number of users, wherein the object file corresponding to each user comprises information of a virtual machine authorized for the user;
and the adding unit is used for adding the object files corresponding to the preset number of users to the sharing equipment.
8. A testing device for a virtual desktop, applied to a client, the device comprising:
the system comprises an acquisition unit, a sharing unit and a processing unit, wherein the acquisition unit is used for acquiring object files corresponding to a preset number of users stored in the sharing device, and the object file corresponding to each user comprises information of a virtual machine authorized by a server for the user;
the starting unit is used for starting the client process corresponding to each user according to the information of the virtual machine included in the object file corresponding to each user, and the client process corresponding to each user is connected with the virtual machine corresponding to each user in the server;
a sending unit, configured to send an automation script operation instruction to a virtual machine corresponding to the user in the server through a client process corresponding to each user, so that the virtual machine corresponding to the user in the server operates an automation script of software stored in the virtual machine corresponding to the user according to the automation script operation instruction, where the automation script of the software includes a simulated operation flow of the software on a virtual desktop provided by the virtual machine by the user, the automation script of the software is obtained by a test virtual machine in the server from the shared device, and the test virtual machine in the server collects performance parameters of the server in a process in which the virtual machine corresponding to each user operates the automation script.
9. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 5.
10. A machine-readable storage medium having stored thereon machine-executable instructions executable by a processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 5.
CN202011253110.0A 2020-11-11 2020-11-11 Virtual desktop testing method and device Active CN112306639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011253110.0A CN112306639B (en) 2020-11-11 2020-11-11 Virtual desktop testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011253110.0A CN112306639B (en) 2020-11-11 2020-11-11 Virtual desktop testing method and device

Publications (2)

Publication Number Publication Date
CN112306639A CN112306639A (en) 2021-02-02
CN112306639B true CN112306639B (en) 2023-02-24

Family

ID=74325730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011253110.0A Active CN112306639B (en) 2020-11-11 2020-11-11 Virtual desktop testing method and device

Country Status (1)

Country Link
CN (1) CN112306639B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434255B (en) * 2021-06-30 2024-03-22 青岛海尔科技有限公司 Virtual device creation method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986280A (en) * 2010-11-29 2011-03-16 浙江大学 Automatic testing platform for virtual computing system
CN105446846A (en) * 2015-11-30 2016-03-30 中电科华云信息技术有限公司 Cloud desktop based performance test method
TW201640371A (en) * 2015-05-04 2016-11-16 Chunghwa Telecom Co Ltd Method and architecture for cluster implementation of cloud desktop efficacy detector
CN106406975A (en) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Test method and device of desktop cloud system
CN106484623A (en) * 2016-10-21 2017-03-08 郑州云海信息技术有限公司 A kind of method of software test, apparatus and system
CN110928647A (en) * 2019-11-29 2020-03-27 苏州浪潮智能科技有限公司 Virtualization performance testing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101986280A (en) * 2010-11-29 2011-03-16 浙江大学 Automatic testing platform for virtual computing system
TW201640371A (en) * 2015-05-04 2016-11-16 Chunghwa Telecom Co Ltd Method and architecture for cluster implementation of cloud desktop efficacy detector
CN106406975A (en) * 2015-07-30 2017-02-15 中兴通讯股份有限公司 Test method and device of desktop cloud system
CN105446846A (en) * 2015-11-30 2016-03-30 中电科华云信息技术有限公司 Cloud desktop based performance test method
CN106484623A (en) * 2016-10-21 2017-03-08 郑州云海信息技术有限公司 A kind of method of software test, apparatus and system
CN110928647A (en) * 2019-11-29 2020-03-27 苏州浪潮智能科技有限公司 Virtualization performance testing method and device

Also Published As

Publication number Publication date
CN112306639A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US11755919B2 (en) Analytics for an automated application testing platform
WO2018184361A1 (en) Application test method, server, terminal, and storage media
US11237948B2 (en) Rendering engine component abstraction system
US9292423B1 (en) Monitoring applications for compatibility issues
CN109815119B (en) APP link channel testing method and device
CN109684188B (en) Test method and device
US11106562B2 (en) System and method for detecting anomalies based on feature signature of task workflows
US9454463B2 (en) Rapid automation front-end framework library and executable graphic user interface testing system and method
CN110955600A (en) Interface test method and device
CN113485880A (en) Test method and device
CN112306639B (en) Virtual desktop testing method and device
CN107368407B (en) Information processing method and device
WO2022100075A1 (en) Method and apparatus for performance test, electronic device and computer-readable medium
CN110727575B (en) Information processing method, system, device and storage medium
CN111523676A (en) Method and device for assisting machine learning model to be online
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN110647453A (en) Application performance comparison test method, system, equipment and computer readable storage medium
US10169216B2 (en) Simulating sensors
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN113127369A (en) Processing method and device for execution script
CN115344490A (en) Method and device for testing software product, storage medium and electronic equipment
US20220147437A1 (en) Automated testing of mobile devices using visual analysis
CN113986719A (en) Automatic test method and system for large-scale cluster performance based on cloud service
CN113448730A (en) Service processing method and device, computer equipment and storage medium
CN112416769A (en) Automatic test method and system for simulating user operation in batches under cloud desktop scene

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