Cloud Virtualization Testing Method, Device, Equipment and Storage Medium
By creating virtualized devices in the simulator and finding corresponding test cases, the problem of high device testing costs is solved, and a more efficient and flexible testing method is achieved.
Patent Information
- Application Number
- CN202010400792.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-12
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2040-05-12
AI Technical Summary
In the prior art, equipment testing requires physical equipment, which leads to high procurement costs, consumes a lot of manpower and material resources, and is inflexible.
By creating a virtualized device in the simulator and finding the corresponding test cases based on the test requirements information and types for testing, it is converted into virtualized device testing.
Save testing costs, improve testing efficiency, reduce dependence on physical equipment, and enhance testing flexibility.
Smart Images

Figure CN113656278B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device testing, and in particular to a cloud virtualization testing method, device, equipment and storage medium. Background Art
[0002] In the prior art, physical machine testing or cloud real machine testing is usually used to test devices. Among them, physical machine testing is to perform development debugging and testing through physical devices, and cloud real machine testing is to uniformly store physical devices and use them as cloud devices to perform development debugging and testing through browsers or integrated development environments (IDEs). However, whether it is physical machine testing or cloud real machine testing, physical devices are required, resulting in high procurement costs, and the need for placement in a computer room, consuming a large amount of manpower, material resources and money. Summary of the Invention
[0003] The main purpose of the present invention is to provide a cloud virtualization testing method, device, equipment and storage medium, aiming to solve the technical problem of how to save testing costs and improve testing efficiency.
[0004] To achieve the above object, the present invention provides a cloud virtualization testing method, which includes the following steps:
[0005] When a test instruction is received, extract test requirement information from the test instruction;
[0006] Create a plurality of virtualized devices in a target simulator according to the test requirement information;
[0007] Extract the test type corresponding to the virtualized device from the test instruction;
[0008] Find a corresponding test case according to the test type, and test the virtualized device according to the test case.
[0009] Optionally, the step of finding a corresponding test case according to the test type and testing the virtualized device according to the test case specifically includes:
[0010] When the test type is application testing, find an application test case corresponding to the application testing;
[0011] Select a target test case from the application test cases;
[0012] Determine a target application program and a test process according to the target test case;
[0013] Install the target application in the virtualized device and test the virtualized device according to the test process.
[0014] Optionally, the test process includes response time testing;
[0015] The step of installing the target application in the virtualized device and testing the virtualized device according to the test process specifically includes:
[0016] Obtain the program installation file corresponding to the target application;
[0017] Transfer the program installation file to the virtualized device so that the virtualized device installs the target application according to the program installation file and starts the target application;
[0018] Detect the installation duration of the target application installed in the virtualized device and the startup duration of starting the target application;
[0019] Compare the installation duration with a preset installation duration threshold to obtain an installation time test result;
[0020] Compare the startup duration with a preset startup duration threshold to obtain a startup time test result;
[0021] Determine a response time test result based on the installation time test result and the startup time test result.
[0022] Optionally, the test process further includes running performance testing;
[0023] After determining the response time test result based on the installation time test result and the startup time test result, it further includes:
[0024] Obtain the running time of the virtualized device running the target application;
[0025] Judge whether the running time is equal to a preset time threshold;
[0026] When the running time is equal to the preset time threshold, detect the current device information of the virtualized device;
[0027] Compare the current device information with preset device information to obtain a running performance test result.
[0028] Optionally, before receiving a test instruction and extracting test requirement information from the test instruction, it further includes:
[0029] When receiving a system configuration instruction, configure a sub - operating system in the current operating system based on the system configuration instruction;
[0030] Locate a target simulator corresponding to the sub - operating system and install the target simulator in the sub - operating system.
[0031] Optionally, when receiving a system configuration instruction, configuring a sub - operating system in the current operating system based on the system configuration instruction specifically includes:
[0032] When receiving a system configuration instruction, determine the sub - operating system according to the system configuration instruction;
[0033] Locate the configuration requirement information corresponding to the sub - operating system and obtain the current operating system information of the current operating system;
[0034] Configure the sub - operating system in the current operating system based on the configuration requirement information and the current operating system information.
[0035] Optionally, the configuring the sub - operating system in the current operating system based on the configuration requirement information and the current operating system information specifically includes:
[0036] Extract target operating system information from the configuration requirement information and determine the target operating system according to the target operating system information;
[0037] Based on the current operating system information, determine whether the current operating system is the target operating system;
[0038] If the current operating system is the target operating system, then configure the sub - operating system in the current operating system.
[0039] Optionally, the if the current operating system is the target operating system, then configuring the sub - operating system in the current operating system specifically includes:
[0040] If the current operating system is the target operating system, then generate a download instruction corresponding to the sub - operating system;
[0041] Send the download instruction to the server so that the server feeds back a download link corresponding to the sub - operating system based on the download instruction;
[0042] Receive the download link and download the installation package file of the sub - operating system according to the download link;
[0043] Install the sub - operating system in the current operating system according to the installation package file and configure the sub - operating system according to the configuration requirement information.
[0044] Optionally, finding a target emulator corresponding to the sub-operating system and installing the target emulator in the sub-operating system specifically includes:
[0045] Finding multiple candidate emulators corresponding to the sub-operating system;
[0046] Generating an emulator selection interface according to the candidate emulators;
[0047] Displaying the emulator selection interface;
[0048] When receiving a selection instruction input by the user based on the emulator selection interface, selecting a target emulator from the candidate emulators according to the selection instruction;
[0049] Finding installation information corresponding to the target emulator and selecting target installation information corresponding to the sub-operating system from the installation information;
[0050] Installing the target emulator in the sub-operating system according to the target installation information.
[0051] Optionally, creating a plurality of virtualized devices in the target emulator according to the test requirement information specifically includes:
[0052] Extracting device quantity information and device configuration information from the test requirement information;
[0053] Creating a plurality of virtualized devices in the target emulator according to the device quantity information and the device configuration information.
[0054] Optionally, before creating a plurality of virtualized devices in the target emulator according to the device quantity information and the device configuration information, further includes:
[0055] Determining a target occupied memory according to the device quantity information and the device configuration information, and obtaining the current free memory of the target emulator;
[0056] Judging whether the current free memory is greater than the target occupied memory;
[0057] If the current free memory is greater than the target occupied memory, performing the step of creating a plurality of virtualized devices in the target emulator according to the device quantity information and the device configuration information.
[0058] Optionally, the virtualized device is a mobile device virtual machine;
[0059] The creating a plurality of virtualized devices in the target emulator according to the device quantity information and the device configuration information specifically includes:
[0060] Extract the mobile device configuration information from the device configuration information;
[0061] Create a plurality of mobile device virtual machines in the target simulator according to the device quantity information and the mobile device configuration information.
[0062] Optionally, after creating a plurality of virtualized devices in the target simulator according to the test requirement information, the method further includes:
[0063] When receiving an attribute modification instruction, extract the attribute modification information from the attribute modification instruction;
[0064] Modify the virtualized device according to the attribute modification information, and use the modified virtualized device as a new virtualized device.
[0065] Optionally, after finding a corresponding test case according to the test type and testing the virtualized device according to the test case, the method further includes:
[0066] Back up the virtualized device to obtain a backup virtualized device;
[0067] Store the backup virtualized device in a preset database;
[0068] When detecting that a virtualized device is damaged, use the damaged virtualized device as a virtualized device to be processed;
[0069] Select a target backup virtualized device corresponding to the virtualized device to be processed from the preset database;
[0070] Restore the virtualized device to be processed according to the target backup virtualized device.
[0071] Optionally, after storing the backup virtualized device in a preset database, the method further includes:
[0072] When receiving a device acquisition request sent by a terminal device, select a backup virtualized device to be processed corresponding to the device acquisition request from the preset database;
[0073] Generate a virtualized device template according to the backup virtualized device to be processed;
[0074] Send the virtualized device template to the terminal device so that the terminal device creates a device based on the virtualized device template.
[0075] In addition, to achieve the above object, the present invention further provides a cloud virtualization test device, and the cloud virtualization test device includes:
[0076] An information extraction module, configured to extract test requirement information from the test instruction when receiving the test instruction;
[0077] A device creation module, configured to create a plurality of virtualized devices in a target simulator according to the test requirement information;
[0078] A type extraction module, configured to extract the test type corresponding to the virtualized device from the test instruction;
[0079] A device test module, configured to find a corresponding test case according to the test type, and test the virtualized device according to the test case.
[0080] Optionally, the cloud virtualization test device further includes a simulator installation module;
[0081] The simulator installation module is configured to configure a sub-operating system in the current operating system based on the system configuration instruction when receiving the system configuration instruction;
[0082] The simulator installation module is further configured to find a target simulator corresponding to the sub-operating system, and install the target simulator in the sub-operating system.
[0083] Optionally, the cloud virtualization test device further includes a device recovery module;
[0084] The device recovery module is configured to back up the virtualized device to obtain a backup virtualized device;
[0085] The device recovery module is further configured to store the backup virtualized device in a preset database;
[0086] The device recovery module is further configured to use the damaged virtualized device as a virtualized device to be processed when detecting that the virtualized device is damaged;
[0087] The device recovery module is further configured to select a target backup virtualized device corresponding to the virtualized device to be processed from the preset database;
[0088] The device recovery module is further configured to perform device recovery on the virtualized device to be processed according to the target backup virtualized device.
[0089] In addition, to achieve the above object, the present invention further provides a cloud virtualization test device, the cloud virtualization test device includes: a memory, a processor, and a cloud virtualization test program stored on the memory and executable on the processor, the cloud virtualization test program is configured to implement the steps of the cloud virtualization test method as described above.
[0090] In addition, to achieve the above object, the present invention also provides a storage medium, on which a cloud virtualization test program is stored. When the cloud virtualization test program is executed by a processor, the steps of the cloud virtualization test method described above are implemented.
[0091] The cloud virtualization test method provided by the present invention extracts test requirement information from the test instruction when receiving the test instruction; creates a plurality of virtual devices in a target simulator according to the test requirement information; extracts the test type corresponding to the virtual device from the test instruction; searches for a corresponding test case according to the test type, and tests the virtual device according to the test case. Thus, by creating virtual devices in the target simulator and searching for corresponding test cases for testing, the test of physical devices is transformed into the test of virtual devices, saving test costs and improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 is a schematic structural diagram of a cloud virtualization test device for the hardware operating environment involved in the embodiment of the present invention;
[0093] Figure 2 is a schematic flowchart of the first embodiment of the cloud virtualization test method of the present invention;
[0094] Figure 3 is a schematic flowchart of the second embodiment of the cloud virtualization test method of the present invention;
[0095] Figure 4 is a schematic flowchart of the third embodiment of the cloud virtualization test method of the present invention;
[0096] Figure 5 is a schematic flowchart of the fourth embodiment of the cloud virtualization test method of the present invention;
[0097] Figure 6 is an effect diagram of a virtual device in the fourth embodiment of the cloud virtualization test method of the present invention;
[0098] Figure 7 is a schematic flowchart of the fifth embodiment of the cloud virtualization test method of the present invention;
[0099] Figure 8 is a schematic diagram of functional modules of the first embodiment of the cloud virtualization test device of the present invention.
[0100] The implementation, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0101] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0102] Reference Figure 1 , Figure 1 is a schematic structural diagram of a cloud virtualization test device for the hardware operating environment involved in the solution of the embodiment of the present invention.
[0103] As Figure 1 shown, the cloud virtualization test device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a button, and optionally the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally also be a storage device independent of the aforementioned processor 1001.
[0104] Those skilled in the art can understand that Figure 1 the device structure shown in
[0105] does not constitute a limitation on the cloud virtualization test device, and may include more or fewer components than shown, or combine some components, or have a different component arrangement. Figure 1 As
[0106] shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a cloud virtualization test program. Figure 1 In the cloud virtualization test device shown in
[0107] , the network interface 1004 is mainly used to connect to the external network and communicate with other network devices; the user interface 1003 is mainly used to connect to the user device and communicate with the user device; the device of the present invention calls the cloud virtualization test program stored in the memory 1005 through the processor 1001 and executes the cloud virtualization test method provided by the embodiment of the present invention.
[0108] Reference Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the cloud virtualization test method of the present invention.
[0109] In the first embodiment, the cloud virtualization testing method includes the following steps:
[0110] Step S10, when a test instruction is received, extract test requirement information from the test instruction.
[0111] It should be noted that the execution entity of this embodiment can be a cloud virtualization testing device, or other devices that can achieve the same or similar functions. This embodiment does not limit this. The cloud virtualization testing device can be a computer device such as a desktop computer, a laptop computer, or a tablet computer, or other terminal devices. This embodiment does not limit this.
[0112] It should be understood that cloud virtualization refers to creating virtual devices through an emulator on a computer device. Therefore, multiple qualified virtual devices can be created according to test requirements.
[0113] In a specific implementation, the hardware / software environment of the cloud virtualization testing device can be: CPU: I7 8700; memory: 32G; graphics card: GTX 1050; hard disk: SSD; system: WIN10. It can also be other environmental configurations. This embodiment does not limit this. In this embodiment, the above environmental configuration is used as an example for illustration.
[0114] It can be understood that the more cores and threads the CPU has, the more conducive it is to the stable operation of multiple emulators. The larger and higher-frequency the memory is, the greater the bandwidth for communicating with the CPU, indirectly improving the system efficiency. Moreover, emulators are memory-intensive and require the graphics card for rendering. The ideal graphics card is GTX 1050 or a higher model.
[0115] It should be understood that when a test instruction is received, test requirement information can be extracted from the test instruction. According to the test requirement information, the device quantity information of the virtual devices to be created and the device configuration information of each virtual device can be determined.
[0116] Step S20, create multiple virtual devices in the target emulator according to the test requirement information.
[0117] It should be noted that after obtaining the test requirement information, the device quantity information and device configuration information of the virtual devices can be extracted from the test requirement information, and multiple virtual devices can be created in the target emulator according to the device quantity information and device configuration information.
[0118] It should be understood that the target emulator can be the XiaoYao emulator or other emulators. This embodiment does not limit this. In this embodiment, the target emulator is taken as the XiaoYao emulator for illustration, and the target emulator has been pre-configured on the cloud virtualization testing device.
[0119] In a specific implementation, when the device quantity information is 10, 10 virtual devices are created; when the device quantity information is 5, 5 virtual devices are created. These virtual devices can have the same configuration or different configurations. The specific situation is determined according to the test instruction, and this embodiment does not limit this.
[0120] Step S30: Extract the test type corresponding to the virtual device from the test instruction.
[0121] It can be understood that during the test process, various tests can be performed on the device. These tests are divided into different test types. Therefore, the test type corresponding to the created virtual device can be extracted from the test instruction, so as to determine what tests these virtual devices are used for.
[0122] Step S40: Search for the corresponding test case according to the test type, and test the virtual device according to the test case.
[0123] It should be understood that each test type has a corresponding test case. The test case is written in advance after testing for each test type. The virtual device can be conveniently tested according to the test case.
[0124] It can be understood that when the test types of the virtual devices are the same, the same test case can be used to test the virtual devices; when the test types of the virtual devices are different, a corresponding test case is assigned to each virtual device for testing.
[0125] In this embodiment, when receiving the test instruction, the test requirement information is extracted from the test instruction; multiple virtual devices are created in the target simulator according to the test requirement information; the test type corresponding to the virtual device is extracted from the test instruction; the corresponding test case is searched according to the test type, and the virtual device is tested according to the test case. Thus, the test of the physical device is converted into the test of the virtual device, saving the test cost and improving the test efficiency.
[0126] In an embodiment, as Figure 3 shown, based on the first embodiment, the second embodiment of the cloud virtualization test method of the present invention is proposed. The step S40 includes:
[0127] Step S401: When the test type is an application test, search for the application test case corresponding to the application test.
[0128] It should be understood that application testing is a type of testing. Application testing is testing related to application programs. When the testing type is application testing, find the corresponding application test cases.
[0129] It can be understood that different testing types correspond to different test cases, and application testing corresponds to application test cases.
[0130] Step S402, select a target test case from the application test cases.
[0131] It should be understood that application testing may correspond to multiple application test cases. Therefore, it is necessary to select a target test case from the application test cases according to the test instruction, and test the virtualization device according to the target test case.
[0132] Step S403, determine the target application program and the test process according to the target test case.
[0133] It can be understood that the target test case records the corresponding target application program and the test process. The target application program is the object of application testing, and the test process is the specific test steps. Therefore, the target application program and the test process can be determined according to the target test case, and the virtualization device can be tested through these.
[0134] Step S404, install the target application program in the virtualization device, and test the virtualization device according to the test process.
[0135] Further, the test process includes response time testing. The step S404 includes:
[0136] Obtain the program installation file corresponding to the target application program;
[0137] Transmit the program installation file to the virtualization device, so that the virtualization device installs the target application program according to the program installation file and starts the target application program;
[0138] Detect the installation duration of the target application program installed in the virtualization device and the startup duration of starting the target application program;
[0139] Compare the installation duration with a preset installation duration threshold to obtain an installation time test result;
[0140] Compare the startup duration with a preset startup duration threshold to obtain a startup time test result;
[0141] Determine the response time test result according to the installation time test result and the startup time test result.
[0142] It should be noted that the test process includes response time testing. Response time testing refers to testing the installation duration of installing an application program on a virtualized device and the startup duration of starting the application program. Among them, the installation duration refers to the time from the start of installation to the end of installation, and the startup duration refers to the time from the start of startup to the end of startup. By comparing the installation duration with a preset installation duration threshold, the installation time test result can be obtained. By comparing the startup duration with a preset startup duration threshold, the startup time test result can be obtained. The installation time test result and the startup time test result are used as the response time test result.
[0143] It can be understood that the preset installation duration and the preset startup duration are preset thresholds, which can be set according to test conclusions through multiple tests or directly set by technical personnel. This embodiment does not limit this.
[0144] It can be understood that the installation duration and the startup duration can be respectively compared with the preset installation duration threshold and the preset startup duration threshold to judge the size relationship between the installation duration and the preset installation duration threshold, and the size relationship between the startup duration and the preset startup duration threshold. For example, when the installation duration is less than the preset installation duration threshold, the installation time test result is qualified, otherwise it is unqualified; when the startup duration is less than the preset startup duration threshold, the startup time test result is qualified, otherwise it is unqualified; then when both the installation time test result and the startup time test result are qualified, the response time test result is qualified; when one of the installation time test result and the startup time test result is unqualified, the response time test result is unqualified.
[0145] It should be understood that in addition to the above comparison method, the installation difference between the installation duration and the preset installation duration threshold and the startup difference between the startup duration and the preset startup duration threshold can also be calculated respectively. The installation time test result and the startup time test result are determined according to the installation difference and the startup difference, and further the response time test result is determined according to the installation time test result and the startup time test result.
[0146] It should be understood that in addition to being qualified or unqualified, the test results can also be set with grades. For example, unqualified at the first level, unqualified at the second level, unqualified at the third level, etc. Here, taking the installation time test result determined according to the installation duration as an example, calculate the installation difference between the installation duration and the preset installation duration threshold. When the installation difference is less than or equal to the preset qualified threshold, it is determined that the installation time test result is qualified; when the installation difference is greater than the preset qualified threshold, it is judged whether the installation difference is greater than the preset first-level threshold; when the installation difference is less than or equal to the first-level threshold, it is determined that the installation time test result is unqualified at the first level; when the installation difference is greater than the first-level threshold, it is judged whether the installation difference is greater than the preset second-level threshold. When the installation difference is less than or equal to the second-level threshold, it is determined that the installation time test result is unqualified at the second level; when the installation difference is greater than the preset second-level threshold, it is determined that the installation time test result is unqualified at the third level. There can also be other judgment methods or other grade divisions, which are not limited in this embodiment.
[0147] It can be understood that the method for determining the startup time test result according to the startup duration can be the same as the method for determining the installation time test result according to the installation duration, and will not be elaborated here.
[0148] In specific implementation, when one of the installation time test result and the startup time test result is unqualified, it is determined that the response time test result is unqualified, and the lower grade among the installation time test result and the startup time test result is taken as the grade of the response time test result. For example, when the installation time test result and the startup time test result are unqualified at the first level, it is determined that the response time test result is unqualified at the first level; when the installation time test result is unqualified at the first level and the startup time test result is unqualified at the second level, it is determined that the response time test result is unqualified at the second level.
[0149] Further, the test process further includes a running performance test. After determining the response time test result according to the installation time test result and the startup time test result, it further includes:
[0150] Obtain the running time of the virtualization device running the target application;
[0151] Judge whether the running time is equal to the preset time threshold;
[0152] When the running time is equal to the preset time threshold, detect the current device information of the virtualization device;
[0153] Compare the current device information with the preset device information to obtain the running performance test result.
[0154] It should be noted that the test process also includes running performance tests. That is, after performing response time tests, running performance tests can be further conducted to obtain the running time of the virtualized device running the target application. Here, the running time refers to the time from the startup of the target application to the current time. For example, if the target application is started at 1:00 and the current time is 2:00, then the running time is 1 hour.
[0155] It should be understood that a preset time threshold can be set in advance. When this time threshold is reached, the current device information of the virtualized device is detected, and then the current device information is compared with the preset device information to obtain the running performance test result. Here, the current device information includes at least one or more of the following information: memory occupancy rate information, processor occupancy rate information, and frame rate information.
[0156] In this embodiment, when the test type is an application test, the application test cases corresponding to the application test are found; the target test cases are selected from the application test cases; the target application and the test process are determined according to the target test cases; the target application is installed in the virtualized device, and the virtualized device is tested according to the test process, thereby facilitating the application test of the virtualized device and improving the test efficiency.
[0157] In one embodiment, as Figure 4 shown, based on the first embodiment or the second embodiment, the third embodiment of the cloud virtualization test method of the present invention is proposed. In this embodiment, based on the first embodiment, before the step S10, it further includes:
[0158] Step S001, when receiving a system configuration instruction, configure a sub - operating system in the current operating system based on the system configuration instruction.
[0159] Further, the step S001 includes:
[0160] When receiving a system configuration instruction, determine the sub - operating system according to the system configuration instruction; find the configuration requirement information corresponding to the sub - operating system, and obtain the current operating system information of the current operating system; extract the target operating system information from the configuration requirement information, and determine the target operating system according to the target operating system information; judge whether the current operating system is the target operating system based on the current operating system information; if the current operating system is the target operating system, then configure the sub - operating system in the current operating system.
[0161] It should be noted that the sub - operating system can be Ubuntu or other sub - operating systems. This embodiment does not limit this. When it is determined that the sub - operating system is Ubuntu according to the system configuration instruction, the configuration requirement information corresponding to Ubuntu is searched for, and the current operating system information of the current operating system is obtained. Then, the target operating system is determined according to the configuration requirement information, and the current operating system is determined according to the current operating system information. Then, when the current operating system is the target operating system, the sub - operating system is configured in the current operating system.
[0162] It should be understood that each sub - operating system has its own configuration requirements. For example, the configuration requirements of Ubuntu can be to configure on Win10. Therefore, the target operating system can be determined as Win10 according to the configuration requirement information. If the current operating system is Win10, then the current operating system meets the configuration requirements of Ubuntu, and the sub - operating system is configured in the current operating system; if the current operating system is not Win10, then the current operating system does not meet the configuration requirements of Ubuntu, and the configuration operation is stopped.
[0163] Further, the step of, if the current operating system is the target operating system, then configuring the sub - operating system in the current operating system includes:
[0164] If the current operating system is the target operating system, then a download instruction corresponding to the sub - operating system is generated; the download instruction is sent to the server so that the server feeds back a download link corresponding to the sub - operating system based on the download instruction; the download link is received, and an installation package file of the sub - operating system is downloaded according to the download link; the sub - operating system is installed in the current operating system according to the installation package file, and the sub - operating system is configured according to the configuration requirement information.
[0165] In a specific implementation, Ubuntu is downloaded in the Microsoft Store of the current operating system. And for Ubuntu to run properly, the following need to be turned on: ① Settings - Update & Security - Developer options - Developer mode; ② Settings - Apps - Programs and Features - Turn Windows features on or off - Windows Subsystem for Linux.
[0166] Step S002: Search for a target emulator corresponding to the sub - operating system and install the target emulator in the sub - operating system.
[0167] Further, the step S002 includes:
[0168] Find multiple candidate emulators corresponding to the sub - operating system; generate an emulator selection interface based on the candidate emulators; display the emulator selection interface; when receiving a selection instruction input by the user based on the emulator selection interface, select a target emulator from the candidate emulators; find the installation information corresponding to the target emulator, and select the target installation information corresponding to the sub - operating system from the installation information; install the target emulator in the sub - operating system according to the target installation information.
[0169] It should be noted that when finding multiple candidate emulators corresponding to the sub - operating system, these candidate emulators can all run under the sub - operating system. Therefore, an emulator selection interface is generated based on these candidate emulators for the user to select, a target emulator is selected from the candidate emulators, and the target emulator is installed in the sub - operating system.
[0170] In a specific implementation, when the sub - operating system is Ubuntu and the target emulator is the XiaoYao emulator, install the XiaoYao emulator in Ubuntu.
[0171] In this embodiment, when receiving a system configuration instruction, configure a sub - operating system in the current operating system based on the system configuration instruction; find a target emulator corresponding to the sub - operating system and install the target emulator in the sub - operating system, so as to perform device testing through the target emulator, with stable operation, and it can meet the properties that cannot be modified during real - device testing, reduce the testing cost, and improve the flexibility of testing.
[0172] In one embodiment, as Figure 5 shown, based on the first embodiment or the second embodiment, the fourth embodiment of the cloud virtualization testing method of the present invention is proposed. In this embodiment, an explanation is made based on the first embodiment, and the step S20 includes:
[0173] Step S201, extract the device quantity information and device configuration information from the test requirement information.
[0174] Further, before the step S202, it also includes:
[0175] Determine the target occupied memory according to the device quantity information and the device configuration information, and obtain the current free memory of the target emulator; judge whether the current free memory is greater than the target occupied memory; if the current free memory is greater than the target occupied memory, then execute the step of creating multiple virtualized devices in the target emulator according to the device quantity information and the device configuration information.
[0176] It should be understood that before creating a virtualized device, the target occupied memory is determined according to the device quantity information and the device configuration information, and then the current free memory of the target simulator is obtained. The step of creating the virtualized device is only executed when the current free memory is greater than the target occupied memory, thereby avoiding the situation of creation failure due to insufficient free memory, improving the success rate of creating the virtualized device, and further improving the success rate of testing.
[0177] Step S202: Create a plurality of virtualized devices in the target simulator according to the device quantity information and the device configuration information.
[0178] Furthermore, the virtualized device is a mobile device virtual machine, and the step S202 includes:
[0179] Extract the mobile device configuration information from the device configuration information; create a plurality of mobile device virtual machines in the target simulator according to the device quantity information and the mobile device configuration information.
[0180] It should be noted that the virtualized device can be a mobile device virtual machine, the mobile device virtual machine can be a mobile phone virtual machine, or can also be other devices, and this embodiment does not make any restrictions in this regard.
[0181] It should be understood that the mobile device configuration information is extracted from the device configuration information, and the mobile device configuration information includes at least one or more of the following information: mobile phone model information, International Mobile Equipment Identity (IMEI) information, operator information, and mobile phone number information. Then, a plurality of mobile device virtual machines are created according to the device quantity information and the mobile device configuration information.
[0182] Furthermore, after the step S20, it further includes:
[0183] When receiving an attribute modification instruction, extract the attribute modification information from the attribute modification instruction; modify the virtualized device according to the attribute modification information, and use the modified virtualized device as a new virtualized device.
[0184] It should be noted that after the virtualized device is created, when the attributes of the virtualized device need to be modified, only the attribute modification information needs to be extracted from the attribute modification instruction, the virtualized device is modified according to the attribute modification information, and the modified virtualized device is used as a new virtualized device. Thus, the attributes of the virtualized device can be conveniently modified according to the test requirements to meet different test requirements, which is more convenient and concise compared with real device testing.
[0185] In a specific implementation, 8 virtualized devices can be created in a computer, namely device A, device B, device C, device D, device E, device F, device G, and device H, and these virtualized devices are tested, such as Figure 6As shown Figure 6 is the effect diagram of the virtualized device.
[0186] In this embodiment, the device quantity information and the device configuration information are extracted from the test requirement information; multiple virtualized devices are created in the target simulator according to the device quantity information and the device configuration information, thereby completing the creation of the virtualized devices.
[0187] In one embodiment, as Figure 7 shown, a fifth embodiment of the cloud virtualization test method of the present invention is proposed based on the first embodiment or the second embodiment. In this embodiment, an explanation is made based on the first embodiment. After the step S40, the following steps are further included:
[0188] Step S501, backing up the virtualized device to obtain a backup virtualized device.
[0189] Step S502, storing the backup virtualized device in a preset database.
[0190] Step S503, when it is detected that the virtualized device is damaged, regarding the damaged virtualized device as a virtualized device to be processed.
[0191] Step S504, selecting a target backup virtualized device corresponding to the virtualized device to be processed from the preset database.
[0192] Step S505, performing device recovery on the virtualized device to be processed according to the target backup virtualized device.
[0193] It should be noted that after creating the virtualized device, the virtualized device can be backed up to obtain a backup virtualized device and stored in a preset database. When it is detected that the virtualized device is damaged, a target backup virtualized device corresponding to the damaged virtualized device can be selected from the preset database to perform device recovery on the damaged virtualized device, so that the damaged virtualized device can be conveniently recovered, reducing the operation and maintenance cost.
[0194] Furthermore, after the step S502, the following steps are further included:
[0195] When receiving a device acquisition request sent by a terminal device, selecting a backup virtualized device to be processed corresponding to the device acquisition request from the preset database; generating a virtualized device template according to the backup virtualized device to be processed; sending the virtualized device template to the terminal device so that the terminal device creates a device based on the virtualized device template.
[0196] It should be noted that when equipment migration is required or other terminal devices also need to create the virtualized device, the to-be-processed backup virtualized device corresponding to the device acquisition request is selected from the preset database, and a virtualized device template is generated. The virtualized device template is sent to the terminal device for device creation, so that equipment migration can be conveniently carried out.
[0197] In this embodiment, the virtualized device is backed up to obtain a backup virtualized device; the backup virtualized device is stored in the preset database; when it is detected that the virtualized device is damaged, the damaged virtualized device is used as the to-be-processed virtualized device; the target backup virtualized device corresponding to the to-be-processed virtualized device is selected from the preset database; and the to-be-processed virtualized device is restored according to the target backup virtualized device, so that the damaged virtualized device can be conveniently restored, reducing the operation and maintenance cost.
[0198] In addition, an embodiment of the present invention also provides a storage medium, on which a cloud virtualization test program is stored. When the cloud virtualization test program is executed by a processor, the steps of the cloud virtualization test method described above are implemented.
[0199] Since this storage medium adopts all the technical solutions of all the above embodiments, it at least has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be elaborated here one by one.
[0200] In addition, with reference to Figure 8 , an embodiment of the present invention also provides a cloud virtualization test device, which includes:
[0201] An information extraction module 10, configured to extract test requirement information from the test instruction when receiving the test instruction.
[0202] It should be understood that cloud virtualization refers to creating a virtualized device through an emulator on a computer device. Therefore, multiple qualified virtualized devices can be created according to test requirements.
[0203] In specific implementation, the hardware / software environment of the cloud virtualization test device can be: CPU: I7 8700; memory: 32G; graphics card: GTX 1050; hard disk: SSD; system: WIN10. It can also be other environment configurations, which are not limited in this embodiment. In this embodiment, the above environment configuration is taken as an example for illustration.
[0204] It is understandable that the more cores and threads the CPU has, the more conducive it is to stably run multiple emulators. The larger the memory and the higher the frequency, the greater the bandwidth for communicating with the CPU, indirectly improving the system efficiency. Moreover, emulators consume a lot of memory and require the graphics card for rendering. The ideal graphics card is the GTX 1050 or higher model.
[0205] It should be understood that when a test instruction is received, test requirement information can be extracted from the test instruction. According to the test requirement information, the device quantity information of the virtualization devices to be created and the device configuration information of each virtualization device can be determined.
[0206] The device creation module 20 is used to create multiple virtualization devices in the target emulator according to the test requirement information.
[0207] It should be noted that after obtaining the test requirement information, the device quantity information and device configuration information of the virtualization devices can be extracted from the test requirement information. Multiple virtualization devices are created in the target emulator according to the device quantity information and device configuration information.
[0208] It should be understood that the target emulator can be the Xiaoyao emulator or other emulators. This embodiment does not limit this. In this embodiment, taking the target emulator as the Xiaoyao emulator as an example for illustration, the target emulator has been pre-configured on the cloud virtualization test device.
[0209] In specific implementation, when the device quantity information is 10, 10 virtualization devices are created; when the device quantity information is 5, 5 virtualization devices are created. These virtualization devices can have the same configuration or different configurations. The specific situation is determined according to the test instruction. This embodiment does not limit this.
[0210] The type extraction module 30 is used to extract the test type corresponding to the virtualization device from the test instruction.
[0211] It is understandable that various tests can be performed on the device during the test. These tests are divided into different test types. Therefore, the test type corresponding to the created virtualization device can be extracted from the test instruction, so as to determine what tests these virtualization devices are used for.
[0212] The device test module 40 is used to find the corresponding test case according to the test type and test the virtualization device according to the test case.
[0213] It should be understood that each test type has a corresponding test case. The test case is written after pre-testing for each test type. The virtualization device can be conveniently tested according to the test case.
[0214] It can be understood that when the test types of virtualized devices are the same, the same test cases can be used to test the virtualized devices; when the test types of virtualized devices are different, corresponding test cases are assigned to each virtualized device for testing.
[0215] In this embodiment, when a test instruction is received, test requirement information is extracted from the test instruction; multiple virtualized devices are created in the target simulator according to the test requirement information; the test type corresponding to the virtualized device is extracted from the test instruction; the corresponding test case is found according to the test type, and the virtualized device is tested according to the test case. Thus, by creating virtualized devices in the target simulator and finding the corresponding test cases for testing, the testing of physical devices is transformed into the testing of virtualized devices, saving testing costs and improving testing efficiency.
[0216] For other embodiments or specific implementation methods of the cloud virtualization testing device of the present invention, reference may be made to the above method embodiments, which will not be elaborated here.
[0217] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.
[0218] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0219] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disc) as described above and includes several instructions for causing an intelligent device (which can be a mobile phone, computer, cloud virtualization testing device, air conditioner, or network cloud virtualization testing device, etc.) to execute the methods described in various embodiments of the present invention.
Claims
1. A cloud virtualization testing method, characterized in that, The cloud virtualization test method includes the following steps: When receiving a test instruction, extract test requirement information from the test instruction; Create multiple virtualized devices in a target simulator according to the test requirement information; Extract the test type corresponding to the virtualized device from the test instruction; Find the corresponding test case according to the test type, and test the virtualized device according to the test case; Before the step of extracting test requirement information from the test instruction when receiving the test instruction, it further includes: When receiving a system configuration instruction, determine the sub-operating system according to the system configuration instruction; Find the configuration requirement information corresponding to the sub-operating system, and obtain the current operating system information of the current operating system; Configure the sub-operating system in the current operating system based on the configuration requirement information and the current operating system information; Find the target simulator corresponding to the sub-operating system, and install the target simulator in the sub-operating system.
2. The cloud virtualization test method according to claim 1, wherein The step of finding the corresponding test case according to the test type and testing the virtualized device according to the test case specifically includes: When the test type is application test, find the application test case corresponding to the application test; Select a target test case from the application test cases; Determine the target application program and test process according to the target test case; Install the target application program in the virtualized device, and test the virtualized device according to the test process.
3. The cloud virtualization test method according to claim 2, wherein, The test process includes response time test; The step of installing the target application program in the virtualized device and testing the virtualized device according to the test process specifically includes: Obtain the program installation file corresponding to the target application program; Transmit the program installation file to the virtualized device, so that the virtualized device installs the target application program according to the program installation file and starts the target application program; Detect the installation duration of the virtualized device for installing the target application program and the startup duration of starting the target application program; Compare the installation duration with a preset installation duration threshold to obtain an installation time test result; Compare the startup duration with a preset startup duration threshold to obtain a startup time test result; Determine the response time test result according to the installation time test result and the startup time test result.
4. The cloud virtualization testing method according to claim 3, wherein The test process further includes running performance test; After determining the response time test result according to the installation time test result and the startup time test result, it further includes: Obtain the running time of the virtualized device running the target application program; Judge whether the running time is equal to a preset time threshold; When the running time is equal to the preset time threshold, detect the current device information of the virtualized device; Compare the current device information with the preset device information to obtain a running performance test result.
5. The cloud virtualization testing method according to claim 1, characterized in that, The step of configuring the sub-operating system in the current operating system based on the configuration requirement information and the current operating system information specifically includes: Extract the target operating system information from the configuration requirement information, and determine the target operating system according to the target operating system information; Based on the current operating system information, determine whether the current operating system is the target operating system; If the current operating system is the target operating system, configure the sub-operating system in the current operating system.
6. The cloud virtualization test method according to claim 5, wherein The step of if the current operating system is the target operating system, configure the sub-operating system in the current operating system specifically includes: If the current operating system is the target operating system, generate a download instruction corresponding to the sub-operating system; Send the download instruction to the server so that the server feeds back the download link corresponding to the sub-operating system based on the download instruction; Receive the download link, and download the installation package file of the sub-operating system according to the download link; Install the sub-operating system in the current operating system according to the installation package file, and configure the sub-operating system according to the configuration requirement information.
7. The cloud virtualization testing method according to claim 1, wherein, The step of finding the target simulator corresponding to the sub-operating system and installing the target simulator in the sub-operating system specifically includes: Find multiple candidate simulators corresponding to the sub-operating system; Generate a simulator selection interface according to the candidate simulators; Display the simulator selection interface; When receiving a selection instruction input by the user based on the simulator selection interface, select a target simulator from the candidate simulators according to the selection instruction; Find the installation information corresponding to the target simulator, and select the target installation information corresponding to the sub-operating system from the installation information; Install the target simulator in the sub-operating system according to the target installation information.
8. The cloud virtualization test method according to any one of claims 1 to 7, characterized in that The step of creating multiple virtual devices in the target simulator according to the test requirement information specifically includes: Extract the device quantity information and device configuration information from the test requirement information; Create multiple virtual devices in the target simulator according to the device quantity information and the device configuration information.
9. The cloud virtualization test method according to claim 8, wherein, Before the step of creating multiple virtual devices in the target simulator according to the device quantity information and the device configuration information, it further includes: Determine the target occupied memory according to the device quantity information and the device configuration information, and obtain the current free memory of the target simulator; Judge whether the current free memory is greater than the target occupied memory; If the current free memory is greater than the target occupied memory, execute the step of creating multiple virtual devices in the target simulator according to the device quantity information and the device configuration information.
10. The cloud virtualization test method according to claim 8, wherein, The virtual device is a mobile device virtual machine; The step of creating multiple virtual devices in the target simulator according to the device quantity information and the device configuration information specifically includes: Extract the mobile device configuration information from the device configuration information; Create multiple mobile device virtual machines in the target simulator according to the device quantity information and the mobile device configuration information.
11. The cloud virtualization testing method according to any one of claims 1 to 7, characterized in that, After the step of creating multiple virtual devices in the target simulator according to the test requirement information, it further includes: When receiving an attribute modification instruction, extract attribute modification information from the attribute modification instruction; Modify the virtualized device according to the attribute modification information, and use the modified virtualized device as a new virtualized device.
12. The cloud virtualization test method according to any one of claims 1 to 7, characterized in that After finding a corresponding test case according to the test type and testing the virtualized device according to the test case, it further includes: Back up the virtualized device to obtain a backup virtualized device; Store the backup virtualized device in a preset database; When detecting that a virtualized device is damaged, use the damaged virtualized device as a virtualized device to be processed; Select a target backup virtualized device corresponding to the virtualized device to be processed from the preset database; Restore the virtualized device to be processed according to the target backup virtualized device.
13. The cloud virtualization test method according to claim 12, wherein After storing the backup virtualized device in the preset database, it further includes: When receiving a device acquisition request sent by a terminal device, select a backup virtualized device to be processed corresponding to the device acquisition request from the preset database; Generate a virtualized device template according to the backup virtualized device to be processed; Send the virtualized device template to the terminal device so that the terminal device creates a device based on the virtualized device template.
14. A cloud virtualization test device, characterized in that, The cloud virtualization testing device includes: An information extraction module, configured to extract test requirement information from the test instruction when receiving the test instruction; A device creation module, configured to create a plurality of virtualized devices in a target simulator according to the test requirement information; A type extraction module, configured to extract the test type corresponding to the virtualized device from the test instruction; A device testing module, configured to find a corresponding test case according to the test type and test the virtualized device according to the test case; The cloud virtualization testing device further includes a simulator installation module; The simulator installation module is configured to determine a sub-operating system according to the system configuration instruction when receiving the system configuration instruction; find configuration requirement information corresponding to the sub-operating system, and obtain current operating system information of the current operating system; configure the sub-operating system in the current operating system based on the configuration requirement information and the current operating system information; the simulator installation module is further configured to find a target simulator corresponding to the sub-operating system and install the target simulator in the sub-operating system.
15. The cloud virtualization test device according to claim 14, characterized in that, The cloud virtualization testing device further includes a device recovery module; The device recovery module is configured to back up the virtualized device to obtain a backup virtualized device; The device recovery module is further configured to store the backup virtualized device in a preset database; The device recovery module is further configured to use the damaged virtualized device as a virtualized device to be processed when detecting that the virtualized device is damaged; The device recovery module is further configured to select a target backup virtualized device corresponding to the virtualized device to be processed from the preset database; The device recovery module is further configured to restore the virtualized device to be processed according to the target backup virtualized device.
16. A cloud virtualization test device, characterized in that The cloud virtualization test device includes: a memory, a processor, and a cloud virtualization test program stored on the memory and executable on the processor, and the cloud virtualization test program is configured to implement the steps of the cloud virtualization test method according to any one of claims 1 to 13.
17. A storage medium, characterized in that, A cloud virtualization test program is stored on the storage medium, and when the cloud virtualization test program is executed by a processor, the steps of the cloud virtualization test method according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Application testing method and system
CN105573902A
Software testing method, device and system
CN106484623A
Application program installation performance testing method and device, computing device and storage medium
CN107741910A