A server testing method, device, equipment and medium

By automating virtual machine deployment and test scripts, the problem of server testing relying on manual operations in the existing technology is solved, efficient and accurate server testing is achieved, and costs are reduced.

CN117520080BActive Publication Date: 2024-10-11NETTRIX INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311433776.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-10-11
Estimated Expiration
2043-10-31

Smart Images

  • Figure CN117520080B_ABST
    Figure CN117520080B_ABST
Patent Text Reader

Abstract

The present invention discloses a server testing method, device, equipment and medium. The method includes: determining the target operating system type of the virtual machine corresponding to the tested server according to the application scenario of the tested server; installing a preset number of virtual machines in the tested server through a virtual machine deployment script corresponding to the target operating system type, and configuring each virtual machine; detecting whether each virtual machine meets the preset test conditions; if so, determining the function to be tested of each virtual machine, testing the function to be tested of each virtual machine through a test script corresponding to the function to be tested, and obtaining the function test result; determining the test result of the tested server. The embodiment of the present invention can automatically install and configure multiple virtual machines in the server based on the application scenario and the virtual machine deployment script, virtualize the server, and can automatically test the functions of the virtual machines to determine whether the virtualized server can run stably.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a server testing method, device, equipment and medium. Background Art

[0002] Graphics Processing Unit (GPU) servers can be used to meet different image rendering or data computing requirements. Usually, GPU servers are virtualized, multiple virtual machines are installed and configured in the GPU server, and image rendering or data computing is performed in parallel based on each virtual machine, so as to improve the utilization efficiency of the GPU server and effectively utilize the hardware resources of the GPU server. In order to ensure the stability of the GPU server, the GPU server needs to be tested during the development phase of the GPU server to detect whether the virtualized GPU server can run stably.

[0003] In the related art, the commonly used server testing scheme is usually: the tester manually installs and configures multiple virtual machines in the GPU server, virtualizes the GPU server, and then detects the functions of each virtual machine, and determines whether the virtualized GPU server can run stably based on the function test results of each virtual machine. The server testing scheme in the related art relies on the manual operation of the tester, which will consume a lot of manpower and time costs, and the test efficiency is relatively low, and the test accuracy cannot be guaranteed. Summary of the invention

[0004] The present invention provides a server testing method, device, equipment and medium to solve the problem that the server testing scheme in the related art relies on the manual operation of the tester, consumes a lot of manpower cost and time cost, has low testing efficiency and cannot guarantee the testing accuracy.

[0005] According to one aspect of the present invention, there is provided a server testing method, comprising:

[0006] Determine the target operating system type corresponding to the server under test according to the application scenario of the server under test;

[0007] Installing a preset number of virtual machines in the tested server through a virtual machine deployment script corresponding to the target operating system type, and configuring each of the virtual machines; wherein the operating system type of each of the virtual machines is the target operating system type;

[0008] Detecting whether each of the virtual machines meets a preset test condition;

[0009] If each of the virtual machines meets the preset test conditions, then according to the target operating system type, the functions to be tested of each of the virtual machines are determined, and the functions to be tested of each of the virtual machines are tested by using a test script corresponding to the functions to be tested, so as to obtain the function test results of each of the virtual machines;

[0010] The test result of the tested server is determined according to the functional test results of each of the virtual machines.

[0011] The technical solution of the embodiment of the present invention can automatically install and configure multiple virtual machines in the server based on the application scenario of the server and the virtual machine deployment script, and virtualize the server. It can automatically detect whether each virtual machine in the server can perform functional testing. After determining that each virtual machine can perform functional testing, it can automatically determine the business functions that the virtual machine needs to use during operation according to the operating system type of the virtual machine, test the business functions that the virtual machine needs to use during operation, and determine whether the server after virtualization can run stably, thereby improving testing efficiency and testing accuracy and reducing labor costs and time costs.

[0012] Optionally, determining a target operating system type corresponding to the server under test according to an application scenario of the server under test includes:

[0013] Obtain the application scenario of the server under test input by the target user through the test management page;

[0014] If the application scenario is image rendering, determining that the target operating system type corresponding to the server under test is a first operating system type;

[0015] If the application scenario is data computing, it is determined that the target operating system type corresponding to the server under test is the second operating system type.

[0016] The technical solution of the embodiment of the present invention can obtain the application scenario of the server under test based on the interactive page, and can determine the operating system type of the virtual machine that needs to be installed and configured in the server under test according to the application scenario of the server under test.

[0017] Optionally, installing a preset number of virtual machines in the tested server through a virtual machine deployment script corresponding to the target operating system type, and configuring each of the virtual machines, includes:

[0018] Detecting whether there is a virtual machine deployment script corresponding to the target operating system type in the local database;

[0019] If so, a virtual machine deployment script corresponding to the target operating system type is obtained from the local database, a preset number of virtual machines are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0020] The technical solution of the embodiment of the present invention can, after determining the operating system type of the virtual machine that needs to be installed and configured in the server under test according to the application scenario of the server under test, obtain the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test from the local database, and can automatically install and configure multiple virtual machines in the server under test based on the virtual machine deployment script to virtualize the server under test.

[0021] Optionally, after detecting whether there is a virtual machine deployment script corresponding to the target operating system type in the local database, the method further includes:

[0022] If not, download the virtual machine deployment script corresponding to the target operating system type according to the script download address of the target operating system type, install a preset number of virtual machines in the tested server through the virtual machine deployment script, and configure each of the virtual machines.

[0023] The technical solution of the embodiment of the present invention can download the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test after determining the operating system type of the virtual machine that needs to be installed and configured in the server under test according to the application scenario of the server under test. Based on the virtual machine deployment script, multiple virtual machines can be automatically installed and configured in the server under test to virtualize the server under test.

[0024] Optionally, determining the function to be tested of each virtual machine according to the target operating system type, testing the function to be tested of each virtual machine by using a test script corresponding to the function to be tested, and obtaining a function test result of each virtual machine includes:

[0025] If the target operating system type is the first operating system type, determining that the function to be tested of each virtual machine is an image rendering function;

[0026] The image rendering function of each virtual machine is tested by using a test script corresponding to the image rendering function to obtain a test result of the image rendering function of each virtual machine.

[0027] The technical solution of the embodiment of the present invention can determine the business functions that the virtual machine needs to use during operation according to the operating system type of the virtual machine in the tested server. After determining that the business function that the virtual machine needs to use during operation is the image rendering function, the image rendering function of each virtual machine can be tested based on the test script corresponding to the image rendering function to determine whether the image rendering function of each virtual machine is normal.

[0028] Optionally, determining the function to be tested of each virtual machine according to the target operating system type, testing the function to be tested of each virtual machine by using a test script corresponding to the function to be tested, and obtaining a function test result of each virtual machine includes:

[0029] If the target operating system type is the second operating system type, determining that the function to be tested of each virtual machine is a bandwidth function, a communication function and / or a computing function;

[0030] The bandwidth function, communication function and / or computing function of each virtual machine is tested by using test scripts corresponding to the bandwidth function, communication function and / or computing function to obtain the bandwidth function test results, communication function test results and / or computing function test results of each virtual machine.

[0031] The technical solution of the embodiment of the present invention can determine the business functions that the virtual machine needs to use during operation according to the operating system type of the virtual machine in the tested server. After determining that the business functions that the virtual machine needs to use during operation are bandwidth function, communication function and computing function, the bandwidth function, communication function and computing function of each virtual machine can be tested based on the test scripts corresponding to the bandwidth function, communication function and computing function to determine whether the bandwidth function, communication function and computing function of each virtual machine are normal.

[0032] Optionally, detecting whether each of the virtual machines meets a preset test condition includes:

[0033] According to the operating system type of each virtual machine, it is detected whether each virtual machine meets a preset test condition.

[0034] The technical solution of the embodiment of the present invention can automatically install and configure multiple virtual machines in the tested server based on the virtual machine deployment script, and then detect whether each virtual machine can perform functional testing according to the operating system type of each virtual machine.

[0035] According to another aspect of the present invention, there is provided a server testing device, comprising:

[0036] A type determination module, used to determine the target operating system type corresponding to the server under test according to the application scenario of the server under test;

[0037] A virtual machine deployment module, used to install a preset number of virtual machines in the tested server through a virtual machine deployment script corresponding to the target operating system type, and configure each of the virtual machines; wherein the operating system type of each of the virtual machines is the target operating system type;

[0038] A condition detection module, used to detect whether each of the virtual machines meets a preset test condition;

[0039] A functional testing module, configured to determine the functions to be tested of each virtual machine according to the target operating system type if each virtual machine meets the preset test conditions, test the functions to be tested of each virtual machine through a test script corresponding to the functions to be tested, and obtain functional test results of each virtual machine;

[0040] The result determination module is used to determine the test result of the tested server according to the functional test results of each virtual machine.

[0041] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:

[0042] at least one processor;

[0043] and a memory connected in network communication with the at least one processor;

[0044] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the server testing method described in any embodiment of the present invention.

[0045] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server testing method described in any embodiment of the present invention when executed.

[0046] The technical solution of the embodiment of the present invention determines the target operating system type corresponding to the server under test according to the application scenario of the server under test; then installs a preset number of virtual machines in the server under test through a virtual machine deployment script corresponding to the target operating system type, and configures each virtual machine; detects whether each virtual machine meets the preset test conditions; if each virtual machine meets the preset test conditions, determines the function to be tested of each virtual machine according to the target operating system type, tests the function to be tested of each virtual machine through a test script corresponding to the function to be tested, and obtains the function test result of each virtual machine; finally, determines the test result of the server under test according to the function test result of each virtual machine, thereby solving the problem that the server test solution in the related art depends on Manual operations by testers consume a lot of manpower and time costs, have low test efficiency, and cannot guarantee test accuracy. Based on the application scenarios of the server and virtual machine deployment scripts, multiple virtual machines can be automatically installed and configured in the server to virtualize the server. The server can be automatically detected to see whether each virtual machine in the server can perform functional testing. After determining that each virtual machine can perform functional testing, the business functions that need to be used by the virtual machine during operation can be automatically determined based on the operating system type of the virtual machine. The business functions that need to be used by the virtual machine during operation can be tested to determine whether the virtualized server can run stably, thereby improving test efficiency and accuracy and reducing manpower and time costs.

[0047] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0049] Figure 1 A flowchart of a server testing method provided in Embodiment 1 of the present invention.

[0050] Figure 2 A flow chart of a server testing method provided in Embodiment 2 of the present invention.

[0051] Figure 3 A flowchart of a server testing method provided in Embodiment 3 of the present invention.

[0052] Figure 4A schematic diagram of the structure of a server testing device provided in Embodiment 4 of the present invention.

[0053] Figure 5 A schematic diagram of the structure of an electronic device for implementing the server testing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0055] It should be noted that the terms "target", "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise", "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0056] Embodiment 1

[0057] Figure 1 This is a flow chart of a server testing method provided in Embodiment 1 of the present invention. This embodiment can be applied to testing a GPU server to detect whether the virtualized GPU server can run stably. The method can be executed by a server testing device, which can be implemented in the form of hardware and / or software, and the server testing device can be configured in the server under test. Figure 1 As shown, the method includes:

[0058] Step 101: Determine a target operating system type corresponding to the server under test according to an application scenario of the server under test.

[0059] Optionally, the server under test is a GPU server that needs to be tested. The application scenario of the server under test is information used to characterize the scenario in which the server under test is used. The application scenario of the server under test is image rendering or data computing. The application scenario of the server under test is image rendering, indicating that the scenario in which the server under test is used is image rendering, and the server under test is a GPU server for image rendering. The application scenario of the server under test is data computing, indicating that the scenario in which the server under test is used is data computing, and the server under test is a GPU server for data computing. The target operating system type corresponding to the server under test is the operating system type of the virtual machine that needs to be installed and configured in the server under test.

[0060] Optionally, based on the application scenario of the server under test, determining the target operating system type corresponding to the server under test, includes: obtaining the application scenario of the server under test input by the target user through the test management page; if the application scenario is image rendering, determining that the target operating system type corresponding to the server under test is the first operating system type; if the application scenario is data calculation, determining that the target operating system type corresponding to the server under test is the second operating system type.

[0061] Thus, the application scenario of the server under test can be obtained based on the interactive page, and the operating system type of the virtual machine that needs to be installed and configured in the server under test can be determined according to the application scenario of the server under test.

[0062] Optionally, the test management page is a page used to interact with the target user, obtain various types of information related to the server under test input by the target user, and display various types of information related to the test process of the server under test to the target user. The target user may be a tester responsible for managing the test process of the server under test. The target user can enter the application scenario of the server under test by filling in or selecting the application scenario of the server under test in the test management page.

[0063] Optionally, under normal circumstances, the operating system types of virtual machines that need to be installed and configured in servers of different application scenarios are also different. The first operating system type and the second operating system type are two different operating system types. A virtual machine whose operating system type is the first operating system type needs to be installed and configured in a GPU server for image rendering. A virtual machine whose operating system type is the first operating system type is suitable for image rendering. The first operating system type may be a Windows operating system. A virtual machine whose operating system type is the second operating system type needs to be installed and configured in a GPU server for data calculation. A virtual machine whose operating system type is the second operating system type is suitable for data calculation. The second operating system type may be an Ubuntu operating system. Therefore, the application scenario of the server under test input by the target user is obtained. If the application scenario is image rendering, it indicates that the server under test is a GPU server for image rendering, and a virtual machine whose operating system type is the first operating system type needs to be installed and configured, then it can be determined that the target operating system type corresponding to the server under test is the first operating system type. If the application scenario is data calculation, it indicates that the server under test is a GPU server for data calculation, and a virtual machine whose operating system type is the second operating system type needs to be installed and configured, then it can be determined that the target operating system type corresponding to the server under test is the second operating system type.

[0064] Step 102: Install a preset number of virtual machines in the tested server using a virtual machine deployment script corresponding to the target operating system type, and configure each of the virtual machines.

[0065] The operating system type of each virtual machine is the target operating system type.

[0066] Optionally, the virtual machine deployment script corresponding to the target operating system type is a script that can be used to install a preset number of virtual machines whose operating system type is the target operating system type in the server and configure each virtual machine after it is run. When the virtual machine deployment script corresponding to the target operating system type is run, it will perform operations of installing a preset number of virtual machines whose operating system type is the target operating system type in the server and configuring each virtual machine. The preset number is greater than or equal to 2. The preset number can be set according to business needs. Configuring the virtual machine may refer to configuring the parameter values ​​of each parameter in the virtual machine to the expected parameter values ​​corresponding to each parameter. The expected parameter value corresponding to the parameter may be the parameter value specified for the parameter by the target user.

[0067] Optionally, a preset number of virtual machines are installed in the server under test through a virtual machine deployment script corresponding to the target operating system type, and each of the virtual machines is configured, including: detecting whether there is a virtual machine deployment script corresponding to the target operating system type in the local database; if so, obtaining the virtual machine deployment script corresponding to the target operating system type from the local database, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines.

[0068] Therefore, after determining the operating system type of the virtual machine that needs to be installed and configured in the server under test according to the application scenario of the server under test, the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test can be obtained from the local database. Based on the virtual machine deployment script, multiple virtual machines can be automatically installed and configured in the server under test to virtualize the server under test.

[0069] Optionally, after detecting whether there is a virtual machine deployment script corresponding to the target operating system type in the local database, it also includes: if not, downloading the virtual machine deployment script corresponding to the target operating system type according to the script download address of the target operating system type, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines.

[0070] Therefore, after determining the operating system type of the virtual machine that needs to be installed and configured in the server under test according to the application scenario of the server under test, the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test can be downloaded. Based on the virtual machine deployment script, multiple virtual machines can be automatically installed and configured in the server under test to virtualize the server under test.

[0071] Optionally, the electronic device can detect whether there is a virtual machine deployment script corresponding to the target operating system type in the local database according to the name of the virtual machine deployment script corresponding to the target operating system type. Detect whether there is a script with the same name as the virtual machine deployment script corresponding to the target operating system type stored in the local database. If so, it is determined that there is a virtual machine deployment script corresponding to the target operating system type in the local database; if not, it is determined that there is no virtual machine deployment script corresponding to the target operating system type in the local database. The script with the same name as the virtual machine deployment script corresponding to the target operating system type is the virtual machine deployment script corresponding to the target operating system type.

[0072] Optionally, if a virtual machine deployment script corresponding to the target operating system type exists in the local database, the virtual machine deployment script corresponding to the target operating system type is directly obtained from the local database. Then, the virtual machine deployment script corresponding to the target operating system type is run, so that a preset number of virtual machines whose operating system type is the target operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0073] Optionally, the script download address of the target operating system type is an address for downloading a virtual machine deployment script corresponding to the target operating system type. The script download address of the target operating system type is stored in the electronic device. If the virtual machine deployment script corresponding to the target operating system type does not exist in the local database, the virtual machine deployment script corresponding to the target operating system type is downloaded according to the script download address of the target operating system type. Then, the virtual machine deployment script corresponding to the target operating system type is run, so that a preset number of virtual machines whose operating system type is the target operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0074] Optionally, when the target operating system type is the first operating system type, a preset number of virtual machines are installed in the server under test through a virtual machine deployment script corresponding to the target operating system type, and each of the virtual machines is configured, including: detecting whether there is a virtual machine deployment script corresponding to the first operating system type in the local database; if so, obtaining the virtual machine deployment script corresponding to the first operating system type from the local database, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines; if not, downloading the virtual machine deployment script corresponding to the first operating system type according to the script download address of the first operating system type, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines.

[0075] Optionally, the virtual machine deployment script corresponding to the first operating system type is a script that can be used to install a preset number of virtual machines whose operating system type is the first operating system type in the server and configure each virtual machine after being run. When the virtual machine deployment script corresponding to the first operating system type is run, it will perform operations of installing a preset number of virtual machines whose operating system type is the first operating system type in the server and configuring each virtual machine.

[0076] Optionally, the electronic device detects whether a script having the same name as the virtual machine deployment script corresponding to the first operating system type is stored in the local database. If so, it is determined that the virtual machine deployment script corresponding to the first operating system type exists in the local database; if not, it is determined that the virtual machine deployment script corresponding to the first operating system type does not exist in the local database. The script having the same name as the virtual machine deployment script corresponding to the first operating system type is the virtual machine deployment script corresponding to the first operating system type.

[0077] Optionally, if a virtual machine deployment script corresponding to the first operating system type exists in the local database, the virtual machine deployment script corresponding to the first operating system type is directly obtained from the local database. Then, the virtual machine deployment script corresponding to the first operating system type is run, so that a preset number of virtual machines whose operating system type is the first operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0078] Optionally, the script download address of the first operating system type is an address for downloading a virtual machine deployment script corresponding to the first operating system type. The script download address of the first operating system type is stored in the electronic device. If the virtual machine deployment script corresponding to the first operating system type does not exist in the local database, the virtual machine deployment script corresponding to the first operating system type is downloaded according to the script download address of the first operating system type. Then, the virtual machine deployment script corresponding to the first operating system type is run, so that a preset number of virtual machines whose operating system type is the first operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0079] Optionally, when the target operating system type is the second operating system type, a preset number of virtual machines are installed in the server under test through a virtual machine deployment script corresponding to the target operating system type, and each of the virtual machines is configured, including: detecting whether there is a virtual machine deployment script corresponding to the second operating system type in the local database; if so, obtaining the virtual machine deployment script corresponding to the second operating system type from the local database, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines; if not, downloading the virtual machine deployment script corresponding to the second operating system type according to the script download address of the second operating system type, installing a preset number of virtual machines in the server under test through the virtual machine deployment script, and configuring each of the virtual machines.

[0080] Optionally, the virtual machine deployment script corresponding to the second operating system type is a script that can be used to install a preset number of virtual machines whose operating system type is the second operating system type in the server and configure each virtual machine after being run. When the virtual machine deployment script corresponding to the second operating system type is run, it will perform operations of installing a preset number of virtual machines whose operating system type is the second operating system type in the server and configuring each virtual machine.

[0081] Optionally, the electronic device detects whether a script having the same name as the virtual machine deployment script corresponding to the second operating system type is stored in the local database. If so, it is determined that the virtual machine deployment script corresponding to the second operating system type exists in the local database; if not, it is determined that the virtual machine deployment script corresponding to the second operating system type does not exist in the local database. The script having the same name as the virtual machine deployment script corresponding to the second operating system type is the virtual machine deployment script corresponding to the second operating system type.

[0082] Optionally, if a virtual machine deployment script corresponding to the second operating system type exists in the local database, the virtual machine deployment script corresponding to the second operating system type is directly obtained from the local database. Then, the virtual machine deployment script corresponding to the second operating system type is run, so that a preset number of virtual machines whose operating system type is the second operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0083] Optionally, the script download address of the second operating system type is an address for downloading a virtual machine deployment script corresponding to the second operating system type. The script download address of the second operating system type is stored in the electronic device. If the virtual machine deployment script corresponding to the second operating system type does not exist in the local database, the virtual machine deployment script corresponding to the second operating system type is downloaded according to the script download address of the second operating system type. Then, the virtual machine deployment script corresponding to the second operating system type is run, so that a preset number of virtual machines whose operating system type is the second operating system type are installed in the tested server through the virtual machine deployment script, and each of the virtual machines is configured.

[0084] Step 103: Detect whether each of the virtual machines meets a preset test condition.

[0085] Optionally, the preset test condition is a condition used to determine whether the virtual machine can perform a functional test. The preset test condition may be that the operating system type of the virtual machine is the target operating system type. Normally, if the operating system type of the virtual machine is the target operating system type, it indicates that the virtual machine has been successfully installed and configured successfully, and a functional test can be performed. If the operating system type of the virtual machine is not the target operating system type, it indicates that the virtual machine has failed to be installed or configured, and a functional test cannot be performed. If the virtual machine meets the preset test condition, that is, the operating system type of the virtual machine is the target operating system type, it can be determined that the virtual machine can perform a functional test. If the virtual machine does not meet the preset test condition, that is, the operating system type of the virtual machine is not the target operating system type, it can be determined that the virtual machine cannot perform a functional test.

[0086] Optionally, detecting whether each of the virtual machines meets a preset test condition includes: detecting whether each of the virtual machines meets a preset test condition according to an operating system type of each of the virtual machines.

[0087] Therefore, after multiple virtual machines are automatically installed and configured in the tested server based on the virtual machine deployment script, it is possible to detect whether each virtual machine can be functionally tested according to the operating system type of each virtual machine.

[0088] Optionally, based on the operating system type of each virtual machine, detect whether each virtual machine meets the preset test conditions, including: performing the following operations for each virtual machine: detect whether the operating system type of the virtual machine is the target operating system type; if so, determine that the virtual machine meets the preset test conditions; if not, determine that the virtual machine does not meet the preset test conditions.

[0089] Optionally, if any virtual machine does not meet the preset test condition, an abnormal prompt information is sent to the terminal device of the target user. The abnormal prompt information is information used to prompt that there is a virtual machine in the tested server that cannot perform functional testing. The terminal device of the target user is a terminal device used by the target user.

[0090] Step 104: If each of the virtual machines meets the preset test conditions, determine the functions to be tested of each of the virtual machines according to the target operating system type, test the functions to be tested of each of the virtual machines through a test script corresponding to the functions to be tested, and obtain functional test results of each of the virtual machines.

[0091] Optionally, if each of the virtual machines meets the preset test conditions, indicating that all virtual machines are successfully installed and configured, and functional testing can be performed, then continue to test the functions of all virtual machines, and determine whether the functions of the virtualized server under test are stable based on the functional test results of all virtual machines.

[0092] Optionally, the function to be tested of the virtual machine is a business function that the virtual machine needs to use during operation. The test script corresponding to the function to be tested is a script used to test whether the function to be tested of the virtual machine is normal.

[0093] Optionally, the functions to be tested of the virtual machines in the servers of different application scenarios are also different. The function to be tested of the virtual machine in the GPU server whose application scenario is image rendering is the image rendering function. The image rendering function may be a function of performing image rendering. The functions to be tested of the virtual machine in the GPU server whose application scenario is data calculation are the bandwidth function, the communication function and / or the calculation function. The bandwidth function may be a function of adjusting the communication bandwidth. The communication function may be a function of communicating with other components or devices. The calculation function may be a function of performing matrix calculation and general calculation.

[0094] Optionally, according to the target operating system type, the function to be tested of each virtual machine is determined, and the function to be tested of each virtual machine is tested by a test script corresponding to the function to be tested, so as to obtain the functional test result of each virtual machine, including: if the target operating system type is the first operating system type, then determining that the function to be tested of each virtual machine is an image rendering function; and testing the image rendering function of each virtual machine by a test script corresponding to the image rendering function, so as to obtain the image rendering function test result of each virtual machine.

[0095] Therefore, the business functions that the virtual machine needs to use during operation can be determined according to the operating system type of the virtual machine in the server under test. After determining that the business function that the virtual machine needs to use during operation is the image rendering function, the image rendering function of each virtual machine can be tested based on the test script corresponding to the image rendering function to determine whether the image rendering function of each virtual machine is normal.

[0096] Optionally, if the target operating system type is the first operating system type, indicating that the server under test is a GPU server whose application scenario is image rendering, it can be determined that the function to be tested of each virtual machine is an image rendering function.

[0097] Optionally, the image rendering function of each virtual machine is tested by a test script corresponding to the image rendering function to obtain a test result of the image rendering function of each virtual machine, including: performing the following operations for each virtual machine: obtaining the test script corresponding to the image rendering function from a local database; running the test script corresponding to the image rendering function in the virtual machine; if the test script corresponding to the image rendering function runs successfully, it is determined that the test result of the image rendering function of the virtual machine is normal; if the test script corresponding to the image rendering function fails to run, it is determined that the test result of the image rendering function of the virtual machine is abnormal.

[0098] Optionally, the test script corresponding to the image rendering function is a script used to detect whether the image rendering function of the virtual machine is normal after running. Normally, the test script corresponding to the image rendering function is run in the virtual machine. If the test script corresponding to the image rendering function runs successfully, it indicates that the image rendering function of the virtual machine is normal. If the test script corresponding to the image rendering function fails to run, it indicates that the image rendering function of the virtual machine is abnormal. The local database of the electronic device stores the test script corresponding to the image rendering function. The electronic device can obtain the test script corresponding to the image rendering function from the local database and run the test script corresponding to the image rendering function in the virtual machine.

[0099] Optionally, the image rendering function test result of the virtual machine is information used to characterize whether the image rendering function of the virtual machine is normal. The image rendering function test result of the virtual machine is normal or abnormal. If the image rendering function test result of the virtual machine is normal, it indicates that the image rendering function of the virtual machine is normal. If the image rendering function test result of the virtual machine is abnormal, it indicates that the image rendering function of the virtual machine is abnormal. Therefore, the test script corresponding to the image rendering function is run in the virtual machine. If the test script corresponding to the image rendering function runs successfully, that is, the image rendering function of the virtual machine is normal, then it can be determined that the image rendering function test result of the virtual machine is normal. If the test script corresponding to the image rendering function fails to run, that is, the image rendering function of the virtual machine is abnormal, then it can be determined that the image rendering function test result of the virtual machine is abnormal.

[0100] Optionally, according to the target operating system type, the function to be tested of each virtual machine is determined, and the function to be tested of each virtual machine is tested by a test script corresponding to the function to be tested, so as to obtain the functional test result of each virtual machine, including: if the target operating system type is the second operating system type, then it is determined that the function to be tested of each virtual machine is a bandwidth function, a communication function and / or a computing function; and the bandwidth function, communication function and / or computing function of each virtual machine is tested by a test script corresponding to the bandwidth function, communication function and / or computing function, so as to obtain the bandwidth function test result, communication function test result and / or computing function test result of each virtual machine.

[0101] Therefore, the business functions that the virtual machine needs to use during operation can be determined according to the operating system type of the virtual machine in the tested server. After determining that the business functions that the virtual machine needs to use during operation are bandwidth function, communication function and computing function, the bandwidth function, communication function and computing function of each virtual machine can be tested based on the test scripts corresponding to the bandwidth function, communication function and computing function to determine whether the bandwidth function, communication function and computing function of each virtual machine are normal.

[0102] Optionally, if the target operating system type is the second operating system type, indicating that the server under test is a GPU server whose application scenario is data computing, it can be determined that the functions to be tested of each virtual machine are bandwidth function, communication function and / or computing function.

[0103] Optionally, the bandwidth function of each virtual machine is tested by a test script corresponding to the bandwidth function to obtain a test result of the bandwidth function of each virtual machine, including: performing the following operations for each virtual machine: obtaining the test script corresponding to the bandwidth function from a local database; running the test script corresponding to the bandwidth function in the virtual machine; if the test script corresponding to the bandwidth function runs successfully, determining that the test result of the bandwidth function of the virtual machine is normal; if the test script corresponding to the bandwidth function fails to run, determining that the test result of the bandwidth function of the virtual machine is abnormal.

[0104] Optionally, the test script corresponding to the bandwidth function is a script used to detect whether the bandwidth function of the virtual machine is normal after running. Normally, the test script corresponding to the bandwidth function is run in the virtual machine. If the test script corresponding to the bandwidth function runs successfully, it indicates that the bandwidth function of the virtual machine is normal. If the test script corresponding to the bandwidth function fails to run, it indicates that the bandwidth function of the virtual machine is abnormal. The test script corresponding to the bandwidth function is stored in the local database of the electronic device. The electronic device can obtain the test script corresponding to the bandwidth function from the local database and run the test script corresponding to the bandwidth function in the virtual machine.

[0105] Optionally, the bandwidth function test result of the virtual machine is information used to characterize whether the bandwidth function of the virtual machine is normal. The bandwidth function test result of the virtual machine is normal or abnormal. If the bandwidth function test result of the virtual machine is normal, it indicates that the bandwidth function of the virtual machine is normal. If the bandwidth function test result of the virtual machine is abnormal, it indicates that the bandwidth function of the virtual machine is abnormal. Therefore, run the test script corresponding to the bandwidth function in the virtual machine. If the test script corresponding to the bandwidth function runs successfully, that is, the bandwidth function of the virtual machine is normal, then it can be determined that the bandwidth function test result of the virtual machine is normal; if the test script corresponding to the bandwidth function fails to run, that is, the bandwidth function of the virtual machine is abnormal, then it can be determined that the bandwidth function test result of the virtual machine is abnormal.

[0106] Optionally, the communication function of each virtual machine is tested by a test script corresponding to the communication function to obtain a communication function test result of each virtual machine, including: performing the following operations for each virtual machine: obtaining the test script corresponding to the communication function from a local database; running the test script corresponding to the communication function in the virtual machine; if the test script corresponding to the communication function runs successfully, it is determined that the communication function test result of the virtual machine is normal; if the test script corresponding to the communication function fails to run, it is determined that the communication function test result of the virtual machine is abnormal.

[0107] Optionally, the test script corresponding to the communication function is a script used to detect whether the communication function of the virtual machine is normal after running. Normally, the test script corresponding to the communication function is run in the virtual machine. If the test script corresponding to the communication function runs successfully, it indicates that the communication function of the virtual machine is normal. If the test script corresponding to the communication function fails to run, it indicates that the communication function of the virtual machine is abnormal. The local database of the electronic device stores the test script corresponding to the communication function. The electronic device can obtain the test script corresponding to the communication function from the local database and run the test script corresponding to the communication function in the virtual machine.

[0108] Optionally, the communication function test result of the virtual machine is information used to characterize whether the communication function of the virtual machine is normal. The communication function test result of the virtual machine is normal or abnormal. If the communication function test result of the virtual machine is normal, it indicates that the communication function of the virtual machine is normal. If the communication function test result of the virtual machine is abnormal, it indicates that the communication function of the virtual machine is abnormal. Therefore, the test script corresponding to the communication function is run in the virtual machine. If the test script corresponding to the communication function runs successfully, that is, the communication function of the virtual machine is normal, then it can be determined that the communication function test result of the virtual machine is normal; if the test script corresponding to the communication function fails to run, that is, the communication function of the virtual machine is abnormal, then it can be determined that the communication function test result of the virtual machine is abnormal.

[0109] Optionally, the computing function of each virtual machine is tested by a test script corresponding to the computing function to obtain the computing function test result of each virtual machine, including: performing the following operations for each virtual machine: obtaining the test script corresponding to the computing function from a local database; running the test script corresponding to the computing function in the virtual machine; if the test script corresponding to the computing function runs successfully, it is determined that the computing function test result of the virtual machine is normal; if the test script corresponding to the computing function fails to run, it is determined that the computing function test result of the virtual machine is abnormal.

[0110] Optionally, the test script corresponding to the computing function is a script used to detect whether the computing function of the virtual machine is normal after running. Normally, the test script corresponding to the computing function is run in the virtual machine. If the test script corresponding to the computing function runs successfully, it indicates that the computing function of the virtual machine is normal. If the test script corresponding to the computing function fails to run, it indicates that the computing function of the virtual machine is abnormal. The local database of the electronic device stores the test script corresponding to the computing function. The electronic device can obtain the test script corresponding to the computing function from the local database and run the test script corresponding to the computing function in the virtual machine.

[0111] Optionally, the computing function test result of the virtual machine is information used to characterize whether the computing function of the virtual machine is normal. The computing function test result of the virtual machine is normal or abnormal. If the computing function test result of the virtual machine is normal, it indicates that the computing function of the virtual machine is normal. If the computing function test result of the virtual machine is abnormal, it indicates that the computing function of the virtual machine is abnormal. Therefore, the test script corresponding to the computing function is run in the virtual machine. If the test script corresponding to the computing function runs successfully, that is, the computing function of the virtual machine is normal, then it can be determined that the computing function test result of the virtual machine is normal; if the test script corresponding to the computing function fails to run, that is, the computing function of the virtual machine is abnormal, then it can be determined that the computing function test result of the virtual machine is abnormal.

[0112] Optionally, the bandwidth function, communication function and computing function of each virtual machine are tested by using test scripts corresponding to the bandwidth function, communication function and computing function to obtain the bandwidth function test result, communication function test result and computing function test result of each virtual machine, including: performing the following operations for each virtual machine: obtaining the test script corresponding to the bandwidth function from a local database; running the test script corresponding to the bandwidth function in the virtual machine; if the test script corresponding to the bandwidth function runs successfully, determining that the bandwidth function test result of the virtual machine is normal; if the test script corresponding to the bandwidth function fails to run, determining that the bandwidth function test result of the virtual machine is abnormal; and Obtain a test script corresponding to the communication function from the local database; run the test script corresponding to the communication function in the virtual machine; if the test script corresponding to the communication function runs successfully, determine that the test result of the communication function of the virtual machine is normal; if the test script corresponding to the communication function fails to run, determine that the test result of the communication function of the virtual machine is abnormal; obtain a test script corresponding to the computing function from the local database; run the test script corresponding to the computing function in the virtual machine; if the test script corresponding to the computing function runs successfully, determine that the test result of the computing function of the virtual machine is normal; if the test script corresponding to the computing function fails to run, determine that the test result of the computing function of the virtual machine is abnormal.

[0113] Step 105: Determine the test result of the tested server according to the functional test results of each of the virtual machines.

[0114] Optionally, the test result of the server under test is determined based on the functional test results of each of the virtual machines, including: detecting whether the functional test results of each of the virtual machines are normal; if the functional test results of each of the virtual machines are normal, determining that the test result of the server under test is qualified; if any one of the functional test results of each of the virtual machines is abnormal, determining that the test result of the server under test is unqualified.

[0115] Optionally, if the functional test results of each virtual machine are normal, it indicates that after the server under test is virtualized, the functions of each virtual machine in the server under test are normal, and the server under test can run stably. If any functional test result of each virtual machine is abnormal, it indicates that after the server under test is virtualized, there is an abnormally functional virtual machine in the server under test, and the server under test cannot run stably.

[0116] Optionally, the test result of the server under test is information used to characterize whether the server under test can run stably after virtualization. If the test result of the server under test is qualified, it indicates that the server under test can run stably after virtualization. If the test result of the server under test is unqualified, it indicates that the server under test cannot run stably after virtualization. Therefore, if the functional test results of each of the virtual machines are normal, it indicates that after the server under test is virtualized, the functions of each virtual machine in the server under test are normal, and the server under test can run stably, then it can be determined that the test result of the server under test is qualified. If any of the functional test results of the virtual machines is abnormal, it indicates that after the server under test is virtualized, there are virtual machines with abnormal functions in the server under test, and the server under test cannot run stably, then it can be determined that the test result of the server under test is unqualified.

[0117] Optionally, if the application scenario of the server under test is image rendering, the functional test results of each of the virtual machines are the image rendering function test results of each of the virtual machines. Check whether the image rendering function test results of each of the virtual machines are normal. If the image rendering function test results of each of the virtual machines are normal, it indicates that after the server under test is virtualized, the image rendering function of each virtual machine in the server under test is normal, and the server under test can run stably, then it can be determined that the test result of the server under test is qualified. If any of the image rendering function test results of the virtual machines is abnormal, it indicates that after the server under test is virtualized, there is a virtual machine with an abnormal image rendering function in the server under test, and the server under test cannot run stably, then it can be determined that the test result of the server under test is unqualified.

[0118] Optionally, if the application scenario of the server under test is data calculation, the functional test results of each virtual machine are the bandwidth functional test results, communication functional test results and / or computing functional test results of each virtual machine. Check whether the functional test results of each virtual machine are normal. If the functional test results of each virtual machine are normal, it indicates that after the server under test is virtualized, the functions of each virtual machine in the server under test are normal, and the server under test can run stably, then it can be determined that the test result of the server under test is qualified. If any one of the functional test results of each virtual machine is abnormal, it indicates that after the server under test is virtualized, there are virtual machines with abnormal functions in the server under test, and the server under test cannot run stably, then it can be determined that the test result of the server under test is unqualified.

[0119] The technical solution of the embodiment of the present invention determines the target operating system type corresponding to the server under test according to the application scenario of the server under test; then installs a preset number of virtual machines in the server under test through a virtual machine deployment script corresponding to the target operating system type, and configures each virtual machine; detects whether each virtual machine meets the preset test conditions; if each virtual machine meets the preset test conditions, determines the function to be tested of each virtual machine according to the target operating system type, tests the function to be tested of each virtual machine through a test script corresponding to the function to be tested, and obtains the function test result of each virtual machine; finally, determines the test result of the server under test according to the function test result of each virtual machine, thereby solving the problem that the server test solution in the related art depends on Manual operations by testers consume a lot of manpower and time costs, have low test efficiency, and cannot guarantee test accuracy. Based on the application scenarios of the server and virtual machine deployment scripts, multiple virtual machines can be automatically installed and configured in the server to virtualize the server. The server can be automatically detected to see whether each virtual machine in the server can perform functional testing. After determining that each virtual machine can perform functional testing, the business functions that need to be used by the virtual machine during operation can be automatically determined based on the operating system type of the virtual machine. The business functions that need to be used by the virtual machine during operation can be tested to determine whether the virtualized server can run stably, thereby improving test efficiency and accuracy and reducing manpower and time costs.

[0120] Embodiment 2

[0121] Figure 2 The flowchart of a server testing method provided in the second embodiment of the present invention. The embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. Figure 2 As shown, the method includes:

[0122] Step 201: Determine a target operating system type corresponding to the server under test according to an application scenario of the server under test.

[0123] Step 202 , check whether there is a virtual machine deployment script corresponding to the target operating system type in the local database: if so, execute step 203 ; if not, execute step 204 .

[0124] Step 203: Obtain a virtual machine deployment script corresponding to the target operating system type from the local database, install a preset number of virtual machines in the tested server using the virtual machine deployment script, and configure each of the virtual machines. After step 203 is completed, step 205 is executed.

[0125] Step 204: download a virtual machine deployment script corresponding to the target operating system type according to the script download address of the target operating system type, install a preset number of virtual machines in the tested server through the virtual machine deployment script, and configure each of the virtual machines.

[0126] The operating system type of each virtual machine is the target operating system type.

[0127] Step 205: Detect whether each of the virtual machines meets a preset test condition.

[0128] Step 206: If each of the virtual machines meets the preset test conditions, determine the functions to be tested of each of the virtual machines according to the target operating system type, test the functions to be tested of each of the virtual machines through a test script corresponding to the functions to be tested, and obtain functional test results of each of the virtual machines.

[0129] Step 207: Determine the test result of the tested server according to the functional test results of each of the virtual machines.

[0130] The technical solution of the embodiment of the present invention can directly obtain the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test from the local database when the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test is stored in the local database; can automatically download the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test when the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server under test is not stored in the local database; and can automatically install and configure multiple virtual machines in the server under test based on the virtual machine deployment script to virtualize the server under test.

[0131] Embodiment 3

[0132] Figure 3 A flow chart of a server testing method provided in Embodiment 3 of the present invention includes the following steps:

[0133] Step 301 , according to the application scenario of the server under test, determine the target operating system type of the virtual machine corresponding to the server under test: if the application scenario is image rendering, execute step 302 ; if the application scenario is data calculation, execute step 307 .

[0134] Step 302: Determine that the target operating system type of the virtual machine corresponding to the server under test is the first operating system type.

[0135] Step 303: Install a preset number of virtual machines in the tested server using a virtual machine deployment script corresponding to the first operating system type, and configure each virtual machine.

[0136] The operating system type of each virtual machine is the first operating system type.

[0137] Step 304: Detect whether each virtual machine meets a preset test condition according to the operating system type of each virtual machine.

[0138] Step 305: If each virtual machine meets the preset test conditions, it is determined that the function to be tested of each virtual machine is an image rendering function, and the image rendering function of each virtual machine is tested by a test script corresponding to the image rendering function to obtain the image rendering function test result of each virtual machine.

[0139] Step 306: Determine the test result of the server under test according to the image rendering function test results of each virtual machine.

[0140] Step 307: Determine that the target operating system type of the virtual machine corresponding to the server under test is the second operating system type.

[0141] Step 308: Install a preset number of virtual machines in the tested server using a virtual machine deployment script corresponding to the second operating system type, and configure each virtual machine.

[0142] The operating system type of each virtual machine is the second operating system type.

[0143] Step 309: Detect whether each virtual machine meets a preset test condition according to the operating system type of each virtual machine.

[0144] Step 310: If each virtual machine meets the preset test conditions, it is determined that the function to be tested of each virtual machine is the bandwidth function, the communication function and / or the computing function, and the bandwidth function, communication function and / or computing function of each virtual machine are tested by using the test script corresponding to the bandwidth function, communication function and / or computing function to obtain the bandwidth function test result, communication function test result and / or computing function test result of each virtual machine.

[0145] Step 311: Determine the test result of the server under test according to the bandwidth function test result, the communication function test result and / or the computing function test result of each virtual machine.

[0146] According to the technical solution of the embodiment of the present invention, after determining the operating system type of the virtual machine that needs to be installed and configured in the server according to the application scenario of the server, multiple virtual machines can be automatically installed and configured in the server based on the virtual machine deployment script corresponding to the operating system type of the virtual machine that needs to be installed and configured in the server to virtualize the server, and whether each virtual machine can be functionally tested can be detected according to the operating system type of each virtual machine. After determining that each virtual machine can be functionally tested, the business function that each virtual machine needs to use during operation can be determined according to the operating system type of each virtual machine. After determining that the business function that the virtual machine needs to use during operation is the image rendering function, the image rendering function of each virtual machine can be tested based on the test script corresponding to the image rendering function to determine whether the image rendering function of each virtual machine is normal and whether the server after virtualization can run stably. After determining that the business function that the virtual machine needs to use during operation is the bandwidth function, communication function and computing function, the bandwidth function, communication function and computing function of each virtual machine can be tested based on the test script corresponding to the bandwidth function, communication function and computing function to determine whether the bandwidth function, communication function and computing function of each virtual machine are normal and whether the server after virtualization can run stably.

[0147] Embodiment 4

[0148] Figure 4 This is a schematic diagram of the structure of a server testing device provided in Embodiment 4 of the present invention. The device can be configured in an electronic device. Figure 4 As shown, the device includes: a type determination module 401, a virtual machine deployment module 402, a condition detection module 403, a function test module 404 and a result determination module 405.

[0149] Among them, the type determination module 401 is used to determine the target operating system type corresponding to the server under test according to the application scenario of the server under test; the virtual machine deployment module 402 is used to install a preset number of virtual machines in the server under test through a virtual machine deployment script corresponding to the target operating system type, and configure each of the virtual machines; wherein the operating system type of each of the virtual machines is the target operating system type; the condition detection module 403 is used to detect whether each of the virtual machines meets the preset test conditions; the function testing module 404 is used to determine the function to be tested of each of the virtual machines according to the target operating system type if each of the virtual machines meets the preset test conditions, test the function to be tested of each of the virtual machines through a test script corresponding to the function to be tested, and obtain the function test result of each of the virtual machines; the result determination module 405 is used to determine the test result of the server under test according to the function test result of each of the virtual machines.

[0150] The technical solution of the embodiment of the present invention determines the target operating system type corresponding to the server under test according to the application scenario of the server under test; then installs a preset number of virtual machines in the server under test through a virtual machine deployment script corresponding to the target operating system type, and configures each virtual machine; detects whether each virtual machine meets the preset test conditions; if each virtual machine meets the preset test conditions, determines the function to be tested of each virtual machine according to the target operating system type, tests the function to be tested of each virtual machine through a test script corresponding to the function to be tested, and obtains the function test result of each virtual machine; finally, determines the test result of the server under test according to the function test result of each virtual machine, thereby solving the problem that the server test solution in the related art depends on Manual operations by testers consume a lot of manpower and time costs, have low test efficiency, and cannot guarantee test accuracy. Based on the application scenarios of the server and virtual machine deployment scripts, multiple virtual machines can be automatically installed and configured in the server to virtualize the server. The server can be automatically detected to see whether each virtual machine in the server can perform functional testing. After determining that each virtual machine can perform functional testing, the business functions that need to be used by the virtual machine during operation can be automatically determined based on the operating system type of the virtual machine. The business functions that need to be used by the virtual machine during operation can be tested to determine whether the virtualized server can run stably, thereby improving test efficiency and accuracy and reducing manpower and time costs.

[0151] In an optional implementation of an embodiment of the present invention, optionally, the type determination module 401 is specifically used to: obtain the application scenario of the server under test input by the target user through the test management page; if the application scenario is image rendering, determine that the target operating system type corresponding to the server under test is the first operating system type; if the application scenario is data calculation, determine that the target operating system type corresponding to the server under test is the second operating system type.

[0152] In an optional implementation of an embodiment of the present invention, optionally, the virtual machine deployment module 402 is specifically used to: detect whether there is a virtual machine deployment script corresponding to the target operating system type in the local database; if so, obtain the virtual machine deployment script corresponding to the target operating system type from the local database, install a preset number of virtual machines in the tested server through the virtual machine deployment script, and configure each of the virtual machines.

[0153] In an optional implementation of an embodiment of the present invention, optionally, the virtual machine deployment module 402 is also used to: if not, download the virtual machine deployment script corresponding to the target operating system type according to the script download address of the target operating system type, install a preset number of virtual machines in the tested server through the virtual machine deployment script, and configure each of the virtual machines.

[0154] In an optional implementation of an embodiment of the present invention, optionally, the functional testing module 404 is specifically used to: if the target operating system type is the first operating system type, determine that the function to be tested of each of the virtual machines is an image rendering function; test the image rendering function of each of the virtual machines through a test script corresponding to the image rendering function, and obtain the image rendering function test results of each of the virtual machines.

[0155] In an optional implementation of the embodiment of the present invention, optionally, the functional testing module 404 is specifically used to: if the target operating system type is the second operating system type, determine that the function to be tested of each of the virtual machines is a bandwidth function, a communication function and / or a computing function; test the bandwidth function, communication function and / or computing function of each of the virtual machines through a test script corresponding to the bandwidth function, communication function and / or computing function, and obtain a bandwidth function test result, a communication function test result and / or a computing function test result of each of the virtual machines.

[0156] In an optional implementation of the embodiment of the present invention, optionally, the condition detection module 403 is specifically used to: detect whether each of the virtual machines meets a preset test condition according to the operating system type of each of the virtual machines.

[0157] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0158] The server testing device can execute the server testing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the server testing method.

[0159] Embodiment 5

[0160] Figure 5 The structure diagram of the electronic device 10 that can be used to implement the server testing method of the embodiment of the present invention is shown. The components, their connections and relationships, and their functions shown herein are only examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0161] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11 in network communication, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program built from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0162] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0163] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the server testing method.

[0164] In some embodiments, the server test method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is built into the RAM 13 and executed by the processor 11, one or more steps of the server test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the server test method in any other appropriate manner (e.g., by means of firmware).

[0165] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0166] The computer programs for implementing the server testing method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0167] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0168] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0169] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0170] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0171] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0172] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A server testing method, characterized in that: include: Determine the target operating system type corresponding to the server under test according to the application scenario of the server under test; Installing a preset number of virtual machines in the tested server using a virtual machine deployment script corresponding to the target operating system type and configuring each of the virtual machines; wherein the operating system type of each of the virtual machines is the target operating system type; the virtual machine deployment script corresponding to the target operating system type is a script that, after being run, is used to install a preset number of virtual machines whose operating system type is the target operating system type in the server and configure each of the virtual machines; Detecting whether each of the virtual machines meets a preset test condition; If each virtual machine meets the preset test conditions, determining the function to be tested of each virtual machine according to the target operating system type, testing the function to be tested of each virtual machine using a test script corresponding to the function to be tested, and obtaining a functional test result of each virtual machine; The test result of the server under test is determined according to the functional test results of each virtual machine.

2. The server testing method according to claim 1, wherein: Determine the target operating system type corresponding to the server under test based on the application scenario of the server under test, including: Obtain the application scenario of the server under test input by the target user through the test management page; If the application scenario is image rendering, determining that the target operating system type corresponding to the server under test is a first operating system type; If the application scenario is data calculation, it is determined that the target operating system type corresponding to the server under test is the second operating system type.

3. The server testing method according to claim 1, wherein: Installing a preset number of virtual machines in the server under test using a virtual machine deployment script corresponding to the target operating system type and configuring each of the virtual machines includes: Detecting whether a virtual machine deployment script corresponding to the target operating system type exists in a local database; If so, a virtual machine deployment script corresponding to the target operating system type is obtained from the local database, a preset number of virtual machines are installed in the server under test using the virtual machine deployment script, and each of the virtual machines is configured.

4. The server testing method according to claim 3, wherein: After detecting whether a virtual machine deployment script corresponding to the target operating system type exists in the local database, the method further includes: If not, download the virtual machine deployment script corresponding to the target operating system type according to the script download address of the target operating system type, install a preset number of virtual machines in the tested server through the virtual machine deployment script, and configure each of the virtual machines.

5. The server testing method according to claim 2, wherein: Determining, according to the target operating system type, a function to be tested of each virtual machine, testing the function to be tested of each virtual machine using a test script corresponding to the function to be tested, and obtaining a function test result of each virtual machine, including: If the target operating system type is the first operating system type, determining that the function to be tested of each virtual machine is an image rendering function; The image rendering function of each virtual machine is tested using a test script corresponding to the image rendering function to obtain a test result of the image rendering function of each virtual machine.

6. The server testing method according to claim 2, wherein: Determining, according to the target operating system type, a function to be tested of each virtual machine, testing the function to be tested of each virtual machine using a test script corresponding to the function to be tested, and obtaining a function test result of each virtual machine, including: If the target operating system type is the second operating system type, determining whether the function to be tested of each virtual machine is a bandwidth function, a communication function and / or a computing function; The bandwidth function, communication function and / or computing function of each virtual machine is tested using test scripts corresponding to the bandwidth function, communication function and / or computing function to obtain the bandwidth function test results, communication function test results and / or computing function test results of each virtual machine.

7. The server testing method according to claim 1, wherein: Detecting whether each virtual machine meets a preset test condition includes: According to the operating system type of each virtual machine, it is detected whether each virtual machine meets the preset test conditions.

8. A server testing device, characterized in that: include: A type determination module, configured to determine a target operating system type corresponding to the server under test according to an application scenario of the server under test; a virtual machine deployment module, configured to install a preset number of virtual machines in the tested server using a virtual machine deployment script corresponding to the target operating system type, and to configure each of the virtual machines; wherein the operating system type of each of the virtual machines is the target operating system type; and the virtual machine deployment script corresponding to the target operating system type is a script that, after being executed, is used to install a preset number of virtual machines whose operating system type is the target operating system type in the server, and to configure each of the virtual machines; A condition detection module, used to detect whether each of the virtual machines meets a preset test condition; a functional testing module, configured to, if each virtual machine satisfies the preset test conditions, determine the function to be tested of each virtual machine according to the target operating system type, test the function to be tested of each virtual machine using a test script corresponding to the function to be tested, and obtain a functional test result of each virtual machine; The result determination module is used to determine the test result of the tested server according to the functional test results of each virtual machine.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory connected in network communication with the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the server testing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server testing method according to any one of claims 1 to 7 when executed.