Method and device for generating test report of Window mirror image

By building interfaces based on the target programming language to create virtual machines and elastic IPs, execute test commands and generate reports, it solves the problems of cumbersome Windows image testing and report generation, realizes automated testing and report generation, and improves efficiency and readability of reports. .

CN118708464APending Publication Date: 2024-09-27BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310307793.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, Window mirror testing needs to be completed manually, the process is cumbersome and test reports cannot be generated, and the test case description is not convenient for others to read and analyze.

Method used

Create virtual machines and elastic IPs by building interfaces based on the target programming language, execute test commands and generate test reports to achieve automated testing and report generation.

Benefits of technology

It implements automated testing of Window images and generates easy-to-read test reports, simplifying the testing process and improving efficiency and report readability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708464A
    Figure CN118708464A
Patent Text Reader

Abstract

The invention relates to a method and device for generating a test report of a Window mirror image, and the method comprises the steps: creating a virtual machine based on an interface constructed by a target programming language, and creating an elastic IP used for logging in the virtual machine; logging in the virtual machine based on the elastic IP, and executing a test command for testing the Window mirror image; and generating a test report of the Window mirror image based on execution of the test command. According to the method and the device, not only can the test of the Window mirror image be automatically realized, but also the test report for reading can be generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a method and device for generating a test report of a Windows image. Background Art

[0002] Currently, the testing of Windows-related images still needs to be done manually; however, the manual testing process is cumbersome and repetitive, and manual testing of Windows images cannot generate test reports, and the test case descriptions are not easy for others to read and analyze. Furthermore, image stability testing, such as round-trip migration, load testing, etc., and network testing, such as network bandwidth testing, network PPS (number of packets sent per second) testing, and network delay testing, also require users to manually install multiple testing tools, and the testing process is cumbersome. Summary of the invention

[0003] The present application provides a method and device for generating a test report of a Window image, so as to solve the problem in the prior art that the Window image test is manually performed, the test process is cumbersome and a test report cannot be generated.

[0004] In a first aspect, the present application provides a method for generating a test report for a Window image, comprising: creating a virtual machine based on an interface constructed in a target programming language and creating an elastic IP for logging into the virtual machine; logging into the virtual machine based on the elastic IP, and executing a test command for testing the Window image; and generating a test report for the Window image based on executing the test command.

[0005] In the second aspect, the present application provides a device for generating a test report of a Window image, including: a first creation module, used to create a virtual machine based on an interface constructed in a target programming language and create an elastic IP for logging into the virtual machine; a processing module, used to log in to the virtual machine based on the elastic IP and execute a test command for testing the Window image; a generation module, used to generate a test report for the Window image based on executing the test command.

[0006] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0007] Memory, used to store computer programs;

[0008] The processor is used to implement the steps of the method for generating a test report of a Window image as described in any one of the embodiments of the first aspect when executing a program stored in the memory.

[0009] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a test report of a Window image as described in any embodiment of the first aspect are implemented.

[0010] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0011] The method provided in the embodiment of the present application can log in to the virtual machine created by the elastic IP for logging in to the virtual machine based on the interface constructed by the target programming language, and then perform the test on the Window image. Taking the Window image file as a hot-swappable cloud disk as an example, the entire test process includes creating a VM (virtual machine), binding an EIP (dynamic IP), mounting a cloud disk (test command), remotely logging in to the VM to view the cloud disk mounting situation, uninstalling the cloud disk (test command), remotely logging in to the VM again to view the cloud disk uninstallation situation, and deleting the VM. For the entire test process, a corresponding test report is generated, that is, how the cloud disk is uninstalled. If there are multiple Window images, a test report corresponding to the multiple Window images can be generated, that is, the test situation of multiple Window images can be viewed on one test report. It can be seen that through this application, not only can the test of the Window image be automatically implemented, but also a test report for reading can be generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0014] Figure 1 A flowchart of a method for generating a test report of a Window image provided in an embodiment of the present application;

[0015] Figure 2 A schematic diagram of a system architecture for implementing Window mirroring automation provided in an embodiment of the present application;

[0016] Figure 3 A schematic diagram of the structure of a device for generating a test report of a Window image provided in an embodiment of the present application;

[0017] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0019] First, the terms appearing in this application are explained;

[0020] WinRM (Windows Remote Management) is called Windows remote management. WinRM allows remote users to use tools and scripts to manage Windows servers and obtain data.

[0021] Jenkins is an open source continuous integration tool written in Java.

[0022] Allure is a lightweight and very flexible open source test report generation framework that supports most test frameworks, such as TestNG, Pytest, etc. It is simple to use and easy to integrate.

[0023] Pytest is a unit testing framework for Python, which is characterized by simplicity, flexibility, ease of use, and support for parameterization.

[0024] Figure 1 A flowchart of a method for generating a test report of a Window image provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:

[0025] Step 101, creating a virtual machine based on an interface constructed in a target programming language and creating an elastic IP for logging into the virtual machine;

[0026] In the embodiment of the present application, the target programming language may be Python, or other object-oriented programming languages.

[0027] Step 102: Log in to the virtual machine based on the elastic IP, and execute a test command for testing the Window image;

[0028] In an embodiment of the present application, the Window image can be an image related to the Window system, such as hot-plugging a cloud disk, changing a host name, changing a password, and viewing system configuration information.

[0029] Step 103: Generate a test report for the Window image based on executing the test command.

[0030] Through steps 101 to 103 in this application, an elastic IP for logging into a virtual machine created based on an interface built by a target programming language can be used to log in to a virtual machine created based on an interface built by a target programming language, and then the Window image is tested. Taking the Window image file as a hot-swappable cloud disk as an example, the entire test process includes creating a VM (virtual machine), binding an EIP (dynamic IP), mounting a cloud disk (test command), remotely logging into the VM to view the cloud disk mounting situation, uninstalling the cloud disk (test command), remotely logging into the VM again to view the cloud disk uninstallation situation, and deleting the VM. For the entire test process, a corresponding test report is generated, that is, how the cloud disk is uninstalled. If there are multiple Window images, a test report corresponding to the multiple Window images can be generated, that is, the test situation of multiple Window images can be viewed on one test report. In other words, through this application, not only can the test of the Window image be automated, but also a test report for reading can be generated.

[0031] In the embodiment of the present application, the interface constructed based on the target programming language may include: Nova interface and Neutron interface; based on this, the method of creating a virtual machine based on the interface constructed based on the target programming language and creating an elastic IP for logging into the virtual machine involved in step 101 in the embodiment of the present application may further include: creating a virtual machine based on the Nova interface, and creating an elastic IP based on the Neutron interface.

[0032] It should be noted that the Nova interface can not only create virtual machines, but also allocate and manage virtual machines on demand, that is, if there are multiple Window images, the corresponding multiple virtual machines can be allocated according to the multiple Window images. In addition, the Neutron interface is used to create elastic IP, through which the connection between network settings can be achieved, and it can also allow end users to create and add network interfaces.

[0033] In an optional implementation of the embodiment of the present application, the interface constructed based on the target programming language in the present application may also include: Cinder interface and Glance interface; based on this, the method of the present application may also include:

[0034] Step 11: Create a block storage service that can be used for persistent storage to the virtual machine based on the Cinder interface;

[0035] Step 12: Create a registration service for the image based on the Glance interface.

[0036] In a specific example, the block storage service cloud disk that can be used for persistent storage, and the image registration service can be to create an image and query the image progress.

[0037] It should be noted that the above interfaces built based on the target programming language: Nova interface, Neutron interface, Cinder interface and Glance interface are all used to provide basic services for testing.

[0038] In an optional implementation of an embodiment of the present application, the method of logging in to the virtual machine based on the elastic IP and executing a test command to test the Window image involved in the above step 102 can further include: logging in to the virtual machine based on the elastic IP through WinRM, and sending a test command based on an interface built in the target programming language.

[0039] In the specific example of this application, since WinRM allows remote users to use tools and scripts to manage Windows servers and obtain data, it is possible to implement remote login to virtual machines based on elastic IP users based on WinRM, making it convenient for users to perform Window mirroring tests. In addition, the test command can be sent based on requests (Requests is a Python HTTP client library), and the specific test commands are get (get), post (power on), put (mount), delete (delete), etc.

[0040] For example, if the current test scenario is hot-swappable cloud disk, the entire test process includes: creating a VM, binding an EIP, mounting a cloud disk, remotely logging into the VM to check the cloud disk mounting status, unmounting the cloud disk, remotely logging into the VM again to check the cloud disk unmounting status, and deleting the VM. The corresponding test commands can be mounting a cloud disk, unmounting a cloud disk, deleting a VM, etc.

[0041] In an optional implementation manner of the embodiment of the present application, the method of generating a test report for the Window image based on executing the test command involved in the above step 103 may further include:

[0042] Step 21, generating an initial test report for the Window image based on executing the test command;

[0043] Step 22, submitting the code corresponding to the initial test report to a code management tool, wherein the code management tool is used to manage the code and documents generated during the software development process;

[0044] Step 23, pull the code from the code management tool through the software tool for continuous integration, and configure the test case corresponding to the Window image;

[0045] Step 24, execute the test case to generate an Allure report based on the code, wherein the Allure report is a test report of the Window image.

[0046] In this application, an initial test report can be generated locally based on the interface built in the target programming language and WinRM. The test report can be used by the developer himself. If you want to give it to more users to view or analyze, you can generate an Allure report based on code management tools such as Gitlab and software tools for continuous integration, such as Jenkins.

[0047] In an optional implementation manner of the embodiment of the present application, after generating a test report for the Window image based on executing the test command, the method of the embodiment of the present application may further include:

[0048] Step 31, when the test report indicates that the Window mirror test fails, adjust the code in the code management tool.

[0049] In this regard, the code can be modified in Jenkins so that the test that failed can also be successfully completed. In addition, it should be noted that if the test is successfully completed, the virtual machine corresponding to the Window image does not need to be used and can be deleted.

[0050] The overall implementation of the present application is explained below. Figure 2 As shown in the figure, the system architecture for implementing Window image automation includes: local development environment, Gitlab, and Jenkins. Among them, the local development environment can be divided into three layers. The bottom layer is Nova, Neutron, Cinder, and Glance modules, which are responsible for providing basic services. Specifically, users can create VMs (virtual machines) through the Nova interface, create EIPs (elastic IPs) through the Neutron interface, create cloud disks through the cinder interface, create images through the glance interface, and query image progress. The Requests module in the middle layer is responsible for sending request messages to the underlying interfaces (Nova, Neutron, Cinder, and Glance), and its request methods support get, post, put, and delete. In addition, the WinRM module in the middle layer can help users remotely log in to the VM and execute terminal commands, such as get-physicaldisk, ipconfig, and systeminfo. The top layer Pytest is used for unit testing, and the Allure module is used to generate test reports.

[0051] After the project is developed in the local development environment, its code can be uploaded to Gitlab. Since Gitlab manages the code and documents generated during the software development process, uploading the code to Gitlab can facilitate version control and rapid iteration of the code. In addition, for continuous integration and use by others, the code in Gitlab can be further deployed to Jenkins, which can manage various tasks (jobs). A job is an execution plan of Jenkins, which is a collection of a series of operations. After the environment and task construction of the task are completed, the test case can be executed through the execution of the task to realize the one-click execution of the window image automated testing function. In addition, after the test is completed, an allure report can be generated for others to read and analyze. For defects and deficiencies in the report, feedback can be given to the developer in a timely manner to encourage them to further improve the project code.

[0052] Combine the following Figure 2 Taking a specific test scenario as an example, if the current test scenario is hot-swappable cloud disk, the entire test process includes: creating a VM, binding EIP, mounting the cloud disk, remotely logging into the VM to view the cloud disk mounting status, unmounting the cloud disk, remotely logging into the VM again to view the cloud disk unmounting status, and deleting the VM.

[0053] If the current test scenario is virtual machine upgrade, the entire test process includes: creating a VM, binding an EIP, creating a new flavor (templating the hardware size of the virtual machine), upgrading the VM, restarting the VM, logging in to the VM, checking the CPU, MEM, and disk configurations, and deleting the VM. If the test is successful, it means that you have logged in to the VM to check its configuration, which is consistent with the new flavor information.

[0054] If the current test scenario is to create a snapshot based on the system disk and reinstall the system, the entire test process includes: creating a VM, binding EIP, generating a test file test1.txt in the VM, obtaining the system disk ID, making a snapshot, generating a test file test2.txt in the VM, reinstalling the system using the snapshot, and verifying data integrity. A successful test indicates that test1.txt exists in the reinstalled VM, but test2.txt does not exist.

[0055] If the current test scenario is to mount and unmount a cloud disk, the entire test process includes: creating a VM, binding an EIP, mounting 8 cloud disks, logging into the VM, viewing cloud disk information, unmounting 8 cloud disks, logging into the VM, viewing cloud disk information again, and deleting the VM. A successful test indicates that after mounting a cloud disk, 9 disks (1 system disk + 8 cloud disks) can be seen through get-physicaldisk. After unmounting a cloud disk, only 1 system disk can be seen through get-physicaldisk.

[0056] It can be seen that in this application, the mainstream test scenarios of Window images can be automated through the target programming language (such as Python code), that is, Nova, Neutron, Cinder, and Glance interface automation. Furthermore, by combining pytest, allure, and jenkins, after the Window image test is completed, a beautiful and easy-to-read online report can be generated, which is convenient for others to further read and analyze.

[0057] like Figure 3 As shown, the embodiment of the present application also provides a device for generating a test report of a Window image, the device comprising:

[0058] A first creation module 32, used to create a virtual machine based on an interface constructed in a target programming language and to create an elastic IP for logging into the virtual machine;

[0059] The processing module 34 is used to log in to the virtual machine based on the elastic IP and execute a test command for testing the Window image;

[0060] The generating module 36 is used to generate a test report for the Window image based on executing the test command.

[0061] Through the device of the present application, an elastic IP for logging into a virtual machine created based on an interface constructed by a target programming language can be used to log in to a virtual machine created based on an interface constructed by a target programming language, and then the Window image can be tested. Taking the Window image file as a hot-swappable cloud disk as an example, the entire test process includes creating a VM (virtual machine), binding an EIP (dynamic IP), mounting a cloud disk (test command), remotely logging into the VM to view the cloud disk mounting situation, uninstalling the cloud disk (test command), remotely logging into the VM again to view the cloud disk uninstallation situation, and deleting the VM. For the entire test process, a corresponding test report is generated, that is, how the cloud disk is uninstalled. If there are multiple Window images, a test report corresponding to the multiple Window images can be generated, that is, the test situation of multiple Window images can be viewed on one test report. In other words, through this application, not only can the test of the Window image be automatically implemented, but also a test report for reading can be generated.

[0062] Optionally, the interface constructed based on the target programming language in the present application may include: Nova interface and Neutron interface; based on this, the first creation module 32 in the embodiment of the present application may further include: a creation unit for creating a virtual machine based on the Nova interface, and creating an elastic IP based on the Neutron interface.

[0063] It should be noted that the Nova interface can not only create virtual machines, but also allocate and manage virtual machines on demand, that is, if there are multiple Window images, the corresponding multiple virtual machines can be allocated according to the multiple Window images. In addition, the Neutron interface is used to create elastic IP, through which the connection between network settings can be achieved, and it can also allow end users to create and add network interfaces.

[0064] Optionally, the interface constructed based on the target programming language of the present application may also include: a Cinder interface and a Glance interface; based on this, the device of the embodiment of the present application may also include: a second creation module, used to create a block storage service that can be used for persistent storage to the virtual machine based on the Cinder interface; a third creation module, used to create a registration service for the image based on the Glance interface.

[0065] In a specific example, the block storage service cloud disk that can be used for persistent storage, and the image registration service can be to create an image and query the image progress.

[0066] It should be noted that the above interfaces built based on the target programming language: Nova interface, Neutron interface, Cinder interface and Glance interface are all used to provide basic services for testing.

[0067] Optionally, the processing module 34 in the embodiment of the present application may further include: a processing unit, used to log in to the virtual machine based on the elastic IP through WinRM, and send a test command based on an interface constructed in the target programming language.

[0068] In the specific example of this application, since WinRM allows remote users to use tools and scripts to manage Windows servers and obtain data, it is possible to implement remote login to virtual machines based on elastic IP users based on WinRM, making it convenient for users to perform Window mirroring tests. In addition, the test command can be sent based on requests (Requests is a Python HTTP client library), and the specific test commands are get (get), post (power on), put (mount), delete (delete), etc.

[0069] Optionally, the generation module 36 in the embodiment of the present application may further include: a first generation unit, used to generate an initial test report for the Window image based on executing a test command; a submission unit, used to submit the code corresponding to the initial test report to a code management tool, wherein the code management tool is used to manage the code and documents generated during the software development process; a processing unit, used to pull code from the code management tool through a software tool for continuous integration, and configure test cases corresponding to the Window image; a second generation unit, used to execute the test case to generate an Allure report based on the code, wherein the Allure report is a test report for the Window image.

[0070] It can be seen that in this application, an initial test report can be generated locally based on the interface built in the target programming language and WinRM. The test report can be used by the developer himself. If you want to let more users view or analyze it, you can generate an Allure report based on code management tools such as Gitlab and software tools for continuous integration, such as Jenkins.

[0071] If the current test scenario is hot-swappable cloud disk, the entire test process includes: creating a VM, binding an EIP, mounting a cloud disk, remotely logging into the VM to view the cloud disk mounting status, unmounting the cloud disk, remotely logging into the VM again to view the cloud disk unmounting status, and deleting the VM.

[0072] If the current test scenario is virtual machine upgrade, the entire test process includes: creating a VM, binding an EIP, creating a new flavor (templating the hardware size of the virtual machine), upgrading the VM, restarting the VM, logging in to the VM, checking the CPU, MEM, and disk configurations, and deleting the VM. A successful test means that you have logged in to the VM to check its configuration, which is consistent with the new flavor information.

[0073] If the current test scenario is to create a snapshot based on the system disk and reinstall the system, the entire test process includes: creating a VM, binding EIP, generating a test file test1.txt in the VM, obtaining the system disk ID, making a snapshot, generating a test file test2.txt in the VM, reinstalling the system using the snapshot, and verifying data integrity. A successful test indicates that test1.txt exists in the reinstalled VM, but test2.txt does not exist.

[0074] If the current test scenario is to mount and unmount a cloud disk, the entire test process includes: creating a VM, binding an EIP, mounting 8 cloud disks, logging into the VM, viewing cloud disk information, unmounting 8 cloud disks, logging into the VM, viewing cloud disk information again, and deleting the VM. A successful test indicates that after mounting a cloud disk, 9 disks (1 system disk + 8 cloud disks) can be seen through get-physicaldisk. After unmounting a cloud disk, only 1 system disk can be seen through get-physicaldisk.

[0075] It can be seen that in this application, the mainstream test scenarios of Window images can be automated through the target programming language (such as Python code), which involves nova, neutron, glance, and cinder interface automation. Furthermore, by combining pytest, allure, and jenkins, after the window image test is completed, a beautiful and easy-to-read online report can be generated, which is convenient for others to further read and analyze.

[0076] Optionally, the device in the embodiment of the present application may also include: an adjustment module, which is used to adjust the code in the code management tool after generating a test report for the Window image based on executing the test command, if the test report indicates that the Window image test fails.

[0077] Optionally, the device in the embodiment of the present application may further include: a deletion module, used to delete the virtual machine after generating a test report for the Window image based on executing the test command.

[0078] like Figure 4 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0079] Memory 113, used for storing computer programs;

[0080] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the method for generating a test report of the Window image provided by any of the aforementioned method embodiments, and the role it plays is the same and will not be repeated here.

[0081] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for generating a test report of a Window image provided in any of the aforementioned method embodiments are implemented.

[0082] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0083] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for generating a test report of a Window image, It is characterized in that include: Creating a virtual machine based on an interface built in a target programming language and creating an elastic IP for logging into the virtual machine; Log in to the virtual machine based on the elastic IP, and execute a test command for testing the Window image; A test report for the Window image is generated based on executing the test command.

2. The method according to claim 1, It is characterized in that The interface constructed based on the target programming language includes: a Nova interface and a Neutron interface; the interface constructed based on the target programming language creates a virtual machine and creates an elastic IP for logging into the virtual machine, including: The virtual machine is created based on the Nova interface, and the elastic IP is created based on the Neutron interface.

3. The method according to claim 2, It is characterized in that The interface constructed based on the target programming language also includes: Cinder interface and Glance interface; the method also includes: Create a block storage service that can be used for persistent storage to the virtual machine based on the Cinder interface; A registry service for creating images based on the Glance interface.

4. The method according to claim 1, It is characterized in that The step of logging into the virtual machine based on the elastic IP and executing a test command for testing the Window image includes: The virtual machine is logged in based on the elastic IP through WinRM, and the test command is sent based on an interface constructed in the target programming language.

5. The method according to claim 1, It is characterized in that The generating a test report for the Window image based on executing the test command includes: Generating an initial test report for the Window image based on executing the test command; Submitting the code corresponding to the initial test report to a code management tool, wherein the code management tool is used to manage the code and documents generated during the software development process; Pulling code from the code management tool through a software tool for continuous integration, and configuring test cases corresponding to the Window image; The test case is executed to generate an Allure report based on the code, wherein the Allure report is a test report of the Window image.

6. The method according to claim 5, It is characterized in that After generating a test report for the Window image based on executing the test command, the method further includes: When the test report indicates that the Window mirror test fails, the code in the code management tool is adjusted.

7. The method according to claim 5, It is characterized in that After generating a test report for the Window image based on executing the test command, the method further includes: Delete the virtual machine.

8. A device for generating a test report of a Window image, It is characterized in that include: A first creation module, used to create a virtual machine based on an interface built in a target programming language and to create an elastic IP for logging into the virtual machine; A processing module, used to log in to the virtual machine based on the elastic IP and execute a test command for testing the Window image; A generating module is used to generate a test report for the Window image based on executing the test command.

9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the steps of the method for generating a test report of a Window image as described in any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for generating a test report of a Window image as described in any one of claims 1 to 7 are implemented.