A BIOS test method, device, equipment and medium
By automatically sending and identifying BIOS test instructions through the virtual machine that matches the server, it solves the problem of cumbersome manual operation of existing BIOS tests, improves test efficiency and reduces costs.
Patent Information
- Application Number
- CN202310166367.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-02-22
AI Technical Summary
The existing BIOS testing solution requires testers to perform repeated manual operations, which is time-consuming and labor-intensive, the operations are cumbersome, and the testing efficiency is low.
Send test instructions through the virtual machine that matches the server, control the server to execute the test instructions, identify the return value through screenshots, automatically compare the test results, and implement automated BIOS testing.
It greatly improves BIOS testing efficiency, reduces labor and time costs, and simplifies the testing process.
Smart Images

Figure CN116089307B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a BIOS testing method, device, equipment and medium. Background Art
[0002] The server's basic input and output system (BIOS) stores the server's most important basic input and output programs, self-check programs after power-on, and system self-starting programs. During the server testing process, it is often necessary to test the BIOS of multiple servers.
[0003] In the related art, the commonly used BIOS test scheme is: for each server that needs to be tested, the tester connects multiple hardware devices to the server, configures each hardware device, and tests the server's BIOS through the test tools running in different hardware devices. When testing the BIOS of multiple servers, the BIOS test scheme in the related art requires the tester to perform manual operations repeatedly, which is time-consuming and labor-intensive, cumbersome to operate, and has low test efficiency. Summary of the invention
[0004] The present invention provides a BIOS testing method, device, equipment and medium to solve the problem that the BIOS testing scheme in the related art requires testers to perform manual operations repeatedly, which is time-consuming and labor-intensive, cumbersome to operate and has low testing efficiency.
[0005] According to one aspect of the present invention, there is provided a BIOS testing method, comprising:
[0006] determining a virtual machine that matches at least one server under test;
[0007] Sending the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through a virtual machine matched with each server under test, controlling each server under test to execute the test instructions corresponding to each BIOS configuration option, displaying the test instruction return value corresponding to each BIOS configuration option on the screen, and feeding back a screenshot matching the test instruction return value corresponding to each BIOS configuration option;
[0008] Through a virtual machine matched with each of the servers under test, character recognition is performed on the screenshots fed back by each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, and the test instruction return value is compared with an expected test instruction return value corresponding to each BIOS configuration option to obtain a BIOS test result for each of the servers under test.
[0009] The technical solution of the embodiment of the present invention can control each server to execute the test instructions corresponding to each BIOS configuration option through a virtual machine matched with each server, feedback a screenshot matching the return value of the test instruction corresponding to each BIOS configuration option, and determine the BIOS test result of each server based on the screenshot fed back by each server, thereby realizing automatic control of multiple servers to perform BIOS testing through one electronic device, greatly improving the BIOS testing efficiency and reducing the manpower cost and time cost of BIOS testing.
[0010] Optionally, determining a virtual machine that matches at least one server under test includes:
[0011] A virtual machine is allocated to each server under test from all virtual machines running on the electronic device.
[0012] The technical solution of the embodiment of the present invention can allocate a virtual machine to each server under test, so as to facilitate the BIOS testing of multiple servers under test in parallel through the virtual machines running on the electronic device, and realize automatic control of multiple servers for BIOS testing through one electronic device, thereby greatly improving the BIOS testing efficiency and reducing the manpower cost and time cost of BIOS testing.
[0013] Optionally, the test instructions corresponding to each BIOS configuration option are sent to the baseboard management controller of each server under test through a virtual machine matching each server under test, each server under test is controlled to execute the test instructions corresponding to each BIOS configuration option, the test instruction return value corresponding to each BIOS configuration option is displayed on the screen, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back, including:
[0014] Perform the following operations on a virtual machine that matches each server under test:
[0015] Sending test instructions corresponding to each BIOS configuration option to the baseboard management controller of the server under test;
[0016] Controlling the baseboard management controller to send the test instructions corresponding to each BIOS configuration option to the server under test, so that the server under test executes the test instructions corresponding to each BIOS configuration option, displays the test instruction return value corresponding to each BIOS configuration option on the screen, and feeds back a screenshot matching the test instruction return value corresponding to each BIOS configuration option;
[0017] A screenshot of the tested server feedback sent by the baseboard management controller is obtained.
[0018] The technical solution of the embodiment of the present invention can connect the baseboard management controller of each server under test through a virtual machine matching each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feedback the screenshot matching the test instruction return value corresponding to each BIOS configuration option, so as to obtain the test instruction return value corresponding to each BIOS configuration option generated by each server under test according to the screenshot fed back by each server under test, determine the BIOS test result of each server under test, and realize automatic control of multiple servers to perform BIOS testing through one electronic device.
[0019] Optionally, performing character recognition on the screenshots fed back by each of the servers under test by using a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option includes:
[0020] Perform the following operations on a virtual machine that matches each server under test:
[0021] Optical character recognition technology is used to identify identification information of each BIOS configuration option in the screenshot fed back by the tested server and the test instruction return value corresponding to each BIOS configuration option.
[0022] The technical solution of the embodiment of the present invention can perform character recognition on the screenshots fed back by each server under test through a virtual machine matched with each server under test, and obtain the test instruction return value generated by each server under test and corresponding to each BIOS configuration option, so as to facilitate comparison of the test instruction return value generated by each server under test and corresponding to each BIOS configuration option with the expected test instruction return value corresponding to each BIOS configuration option, and obtain the BIOS test results of each server under test.
[0023] Optionally, comparing the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option to obtain the BIOS test result of each server under test includes:
[0024] Perform the following operations on a virtual machine that matches each server under test:
[0025] Detecting whether the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option;
[0026] If the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option, it is determined that the BIOS test result of the tested server is qualified;
[0027] If the test instruction return value is inconsistent with the expected test instruction return value corresponding to each BIOS configuration option, it is determined that the BIOS test result of the tested server is unqualified.
[0028] The technical solution of the embodiment of the present invention can compare the test instruction return value corresponding to each BIOS configuration option generated by each server under test with the expected test instruction return value corresponding to each BIOS configuration option through a virtual machine matched with each server under test, so as to obtain the BIOS test result of each server under test.
[0029] Optionally, before sending the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each of the servers under test, the method further includes:
[0030] From the test file, obtain the test instructions corresponding to each BIOS configuration option.
[0031] The technical solution of the embodiment of the present invention can uniformly manage the test instructions corresponding to each BIOS configuration option based on the test file, so as to facilitate testing the BIOS of multiple servers at the same time based on the test instructions corresponding to each BIOS configuration option.
[0032] Optionally, after performing character recognition on the screenshots fed back by each of the servers under test by means of a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, and comparing the test instruction return value with an expected test instruction return value corresponding to each BIOS configuration option to obtain a BIOS test result for each of the servers under test, the method further includes:
[0033] Generate a test result report corresponding to the BIOS test result of each of the tested servers;
[0034] The test result report is provided to a target user.
[0035] The technical solution of the embodiment of the present invention can intuitively provide the BIOS test results of each tested server to the target user through the test result report.
[0036] According to another aspect of the present invention, there is provided a BIOS testing device, comprising:
[0037] A virtual machine determination module, used to determine a virtual machine that matches at least one server under test;
[0038] An instruction sending module is used to send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through a virtual machine matched with each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option;
[0039] The result determination module is used to perform character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test, obtain a test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option, and obtain the BIOS test results of each of the servers under test.
[0040] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0041] at least one processor;
[0042] and a memory communicatively coupled to the at least one processor;
[0043] 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 BIOS testing method described in any embodiment of the present invention.
[0044] 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 BIOS test method described in any embodiment of the present invention when executed.
[0045] The technical solution of the embodiment of the present invention is to determine a virtual machine matching at least one server under test; then, through the virtual machines matching each server under test, send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option; finally, through the virtual machines matching each server under test, perform character recognition on the screenshot fed back by each server under test, obtain the test instruction return value corresponding to each BIOS configuration option, and match the test instruction return value with the test instruction return value corresponding to each BIOS configuration option. The expected test instruction return value is compared to obtain the BIOS test result of each server under test, which solves the problem that the BIOS test solution in the related technology requires testers to perform manual operations repeatedly, which is time-consuming and labor-intensive, cumbersome to operate, and has low testing efficiency. A virtual machine matching each server is obtained to control each server to execute the test instruction corresponding to each BIOS configuration option, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back. Based on the screenshots fed back by each server, the BIOS test result of each server is determined, and it is achieved that multiple servers are automatically controlled to perform BIOS testing through one electronic device, which greatly improves the BIOS testing efficiency and reduces the manpower and time costs of BIOS testing.
[0046] 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
[0047] 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.
[0048] Figure 1 A flowchart of a BIOS testing method provided in Embodiment 1 of the present invention.
[0049] Figure 2 A flowchart of a BIOS testing method provided in Embodiment 2 of the present invention.
[0050] Figure 3 This is a flowchart of a BIOS testing method provided in Embodiment 3 of the present invention.
[0051] Figure 4 A schematic diagram of the structure of a BIOS testing device provided in Embodiment 4 of the present invention.
[0052] Figure 5 A schematic diagram of the structure of an electronic device for implementing the BIOS testing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] 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.
[0054] 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.
[0055] Embodiment 1
[0056] Figure 1 A flowchart of a BIOS testing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of testing the BIOS of multiple servers. The method can be executed by a BIOS testing device. The BIOS testing device can be implemented in the form of hardware and / or software. The BIOS testing device can be configured in an electronic device. The electronic device can be a terminal device used by a target user. The target user can be a tester. Figure 1 As shown, the method includes:
[0057] Step 101: Determine a virtual machine that matches at least one server under test.
[0058] Optionally, the server under test is a server that needs to be tested for BIOS. The BIOS of the server under test includes multiple BIOS configuration options. Testing the BIOS of the server under test mainly tests each BIOS configuration option in the server under test to determine whether each BIOS configuration option of the server under test is normal.
[0059] Optionally, a plurality of virtual machines are running on the electronic device, and the number of the virtual machines running on the electronic device is greater than or equal to the number of the servers under test.
[0060] Optionally, determining a virtual machine that matches at least one server under test includes: allocating a virtual machine to each server under test from all virtual machines running on the electronic device.
[0061] Therefore, a virtual machine is allocated to each server under test, which facilitates the parallel BIOS testing of multiple servers under test through the virtual machines running on the electronic device, and realizes automatic control of multiple servers for BIOS testing through one electronic device, greatly improving the BIOS testing efficiency and reducing the manpower and time costs of BIOS testing.
[0062] Optionally, a virtual machine matching each tested server establishes a communication connection with a baseboard management controller (BMC) of each tested server, and information exchange can be performed based on the established communication connection, and each tested server can be controlled to perform a specified operation through the baseboard management controller of each tested server.
[0063] Step 102: Send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through a virtual machine matching each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option.
[0064] Optionally, the test instructions corresponding to each BIOS configuration option are instructions that the server under test needs to execute when testing each BIOS configuration option in the server under test.
[0065] Optionally, before sending the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test, the method further includes: acquiring the test instructions corresponding to each BIOS configuration option from a test file.
[0066] Therefore, the test instructions corresponding to each BIOS configuration option can be uniformly managed based on the test file, so that the BIOS of multiple servers can be tested simultaneously based on the test instructions corresponding to each BIOS configuration option.
[0067] Optionally, the test file is a file for storing test instructions corresponding to each BIOS configuration option. The target user uploads the test file to the electronic device. The electronic device obtains the test instructions corresponding to each BIOS configuration option from the test file.
[0068] Optionally, the test instructions corresponding to each BIOS configuration option are sent to the baseboard management controller of each server under test through a virtual machine matching each of the servers under test, each server under test is controlled to execute the test instructions corresponding to each BIOS configuration option, the test instruction return value corresponding to each BIOS configuration option is displayed on the screen, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back, including: performing the following operations through a virtual machine matching each server under test: sending the test instructions corresponding to each BIOS configuration option to the baseboard management controller of the server under test; controlling the baseboard management controller to send the test instructions corresponding to each BIOS configuration option to the server under test, so that the server under test executes the test instructions corresponding to each BIOS configuration option, the test instruction return value corresponding to each BIOS configuration option is displayed on the screen, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back; obtaining the screenshot fed back by the server under test sent by the baseboard management controller.
[0069] Therefore, through the virtual machines matching each server under test, the baseboard management controllers of each server under test are connected, each server under test is controlled to execute the test instructions corresponding to each BIOS configuration option, the test instruction return values corresponding to each BIOS configuration option are displayed on the screen, and the screenshots matching the test instruction return values corresponding to each BIOS configuration option are fed back. It is convenient to obtain the test instruction return values corresponding to each BIOS configuration option generated by each server under test according to the screenshots fed back by each server under test, determine the BIOS test results of each server under test, and realize automatic control of multiple servers for BIOS testing through one electronic device.
[0070] Optionally, for each server under test, a test instruction corresponding to each BIOS configuration option is sent to a baseboard management controller of the server under test through a virtual machine matched with the server under test. Then, the virtual machine matched with the server under test controls the baseboard management controller of the server under test to send the test instruction corresponding to each BIOS configuration option to the server under test. After receiving the test instruction corresponding to each BIOS configuration option, the server under test executes the test instruction corresponding to each BIOS configuration option in sequence.
[0071] Optionally, for each BIOS configuration option: the server under test executes the test instruction corresponding to the BIOS configuration option and generates the test instruction return value corresponding to the BIOS configuration option; the server under test displays the identification information of the BIOS configuration option and the test instruction return value corresponding to the BIOS configuration option on the screen, and takes a screenshot of the screen to obtain a screenshot matching the test instruction return value corresponding to the BIOS configuration option; wherein the screenshot matching the test instruction return value corresponding to the BIOS configuration option contains the identification information of the BIOS configuration option and the test instruction return value corresponding to the BIOS configuration option; the server under test feeds back the screenshot matching the test instruction return value corresponding to the BIOS configuration option to the baseboard management controller of the server under test, so that the baseboard management controller of the server under test sends the screenshot matching the test instruction return value corresponding to the BIOS configuration option to the virtual machine matching the server under test. Then the server under test continues to execute the test instruction corresponding to the next BIOS configuration option until all the test instructions corresponding to the BIOS configuration options are executed.
[0072] Optionally, the test instruction return value corresponding to the BIOS configuration option is a return value generated by the server under test after executing the test instruction corresponding to the BIOS configuration option.
[0073] Optionally, the identification information of the BIOS configuration option may be the name of the BIOS configuration option.
[0074] Optionally, the screenshot that matches the test instruction return value corresponding to each BIOS configuration option includes identification information of the BIOS configuration option and the test instruction return value corresponding to the BIOS configuration option.
[0075] Step 103: Perform character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with an expected test instruction return value corresponding to each BIOS configuration option, and obtain a BIOS test result of each of the servers under test.
[0076] Optionally, the process of performing character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option includes: performing the following operations through a virtual machine matched with each of the servers under test: using optical character recognition technology to identify identification information of each BIOS configuration option in the screenshots fed back by the server under test and a test instruction return value corresponding to each BIOS configuration option.
[0077] Therefore, through the virtual machine matched with each server under test, character recognition is performed on the screenshots fed back by each server under test, and the test instruction return value generated by each server under test and corresponding to each BIOS configuration option is obtained, so as to facilitate the comparison of the test instruction return value generated by each server under test and corresponding to each BIOS configuration option with the expected test instruction return value corresponding to each BIOS configuration option, so as to obtain the BIOS test result of each server under test.
[0078] Optionally, for each server under test, a virtual machine matching the server under test is used to perform character recognition on screenshots that match the test instruction return values corresponding to each BIOS configuration option and that are fed back by the server under test, to obtain test instruction return values corresponding to each BIOS configuration option generated by the server under test after executing the test instructions corresponding to each BIOS configuration option.
[0079] Optionally, for the screenshots matching the test instruction return value corresponding to each BIOS configuration option, optical character recognition technology is used to identify the identification information of the BIOS configuration option in the screenshots and the test instruction return value corresponding to the BIOS configuration option, thereby obtaining the test instruction return value corresponding to each BIOS configuration option generated by the tested server.
[0080] Optionally, the test instruction return value is compared with the expected test instruction return value corresponding to each BIOS configuration option to obtain the BIOS test result of each server under test, including: performing the following operations through a virtual machine matched with each server under test: detecting whether the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option; if the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option, determining that the BIOS test result of the server under test is qualified; if the test instruction return value is inconsistent with the expected test instruction return value corresponding to each BIOS configuration option, determining that the BIOS test result of the server under test is unqualified.
[0081] Thus, through the virtual machines matched with the servers under test, the test instruction return values corresponding to the BIOS configuration options generated by the servers under test are compared with the expected test instruction return values corresponding to the BIOS configuration options to obtain the BIOS test results of the servers under test.
[0082] Optionally, for each BIOS configuration option, the expected test instruction return value corresponding to the BIOS configuration option is a return value that will be generated by the server under test after executing the test instruction corresponding to the BIOS configuration option when the BIOS configuration option of the server under test is normal.
[0083] Optionally, for the test instruction return value corresponding to each BIOS configuration option generated by the server under test after executing the test instruction corresponding to each BIOS configuration option, detect whether the test instruction return value corresponding to the BIOS configuration option generated by the server under test is consistent with the expected test instruction return value corresponding to the BIOS configuration option.
[0084] Optionally, if the test instruction return value corresponding to each BIOS configuration option generated by the server under test is consistent with the expected test instruction return value corresponding to each BIOS configuration option, indicating that each BIOS configuration option of the server under test is normal, then the BIOS test result of the server under test is determined to be qualified.
[0085] Optionally, if the test instruction return value corresponding to the target BIOS configuration option generated by the server under test is inconsistent with the expected test instruction return value corresponding to the target BIOS configuration option, indicating that the target BIOS configuration option of the server under test is abnormal, then the BIOS test result of the server under test is determined to be unqualified. The target BIOS configuration option is one or more BIOS configuration options.
[0086] Optionally, after performing character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, and comparing the test instruction return value with an expected test instruction return value to obtain the BIOS test result of each of the servers under test, it also includes: generating a test result report corresponding to the BIOS test result of each of the servers under test; and providing the test result report to a target user.
[0087] Therefore, the BIOS test results of each tested server are intuitively provided to the target user through the test result report.
[0088] Optionally, the test result report corresponding to the BIOS test result of each of the tested servers may be a table for displaying the BIOS test result of each of the tested servers. Providing the test result report to a target user includes: displaying the test result report on a screen of an electronic device.
[0089] The technical solution of the embodiment of the present invention is to determine a virtual machine matching at least one server under test; then, through the virtual machines matching each server under test, send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option; finally, through the virtual machines matching each server under test, perform character recognition on the screenshot fed back by each server under test, obtain the test instruction return value corresponding to each BIOS configuration option, and match the test instruction return value with the test instruction return value corresponding to each BIOS configuration option. The expected test instruction return value is compared to obtain the BIOS test result of each server under test, which solves the problem that the BIOS test solution in the related technology requires testers to perform manual operations repeatedly, which is time-consuming and labor-intensive, cumbersome to operate, and has low testing efficiency. A virtual machine matching each server is obtained to control each server to execute the test instruction corresponding to each BIOS configuration option, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back. Based on the screenshots fed back by each server, the BIOS test result of each server is determined, and it is achieved that multiple servers are automatically controlled to perform BIOS testing through one electronic device, which greatly improves the BIOS testing efficiency and reduces the manpower and time costs of BIOS testing.
[0090] Embodiment 2
[0091] Figure 2 The flowchart of a BIOS test 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:
[0092] Step 201: Allocate a virtual machine to each server under test from all virtual machines running on the electronic device.
[0093] Step 202: Obtain test instructions corresponding to each BIOS configuration option from the test file.
[0094] Step 203: Send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through a virtual machine matching each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option.
[0095] Step 204: Perform character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with an expected test instruction return value corresponding to each BIOS configuration option, and obtain a BIOS test result for each of the servers under test.
[0096] Step 205: Generate a test result report corresponding to the BIOS test result of each of the tested servers.
[0097] Step 206: Provide the test result report to the target user.
[0098] The technical solution of the embodiment of the present invention can allocate a virtual machine to each server under test, and perform BIOS tests on multiple servers under test in parallel through the virtual machines running on the electronic device, so as to realize automatic control of multiple servers to perform BIOS tests through one electronic device, greatly improve the BIOS test efficiency, reduce the manpower cost and time cost of BIOS testing, and intuitively provide the BIOS test results of each server under test to the target user through the test result report.
[0099] Embodiment 3
[0100] Figure 3 A flowchart of a BIOS testing method provided in Embodiment 3 of the present invention includes the following steps:
[0101] Step 301: Allocate a virtual machine to each server under test from all virtual machines running on the electronic device.
[0102] Step 302: Obtain test instructions corresponding to each BIOS configuration option from the test file.
[0103] Step 303: Send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through the virtual machine matched with each server under test.
[0104] Step 304: Control the baseboard management controller of each server under test through the virtual machine matched with each server under test, and send the test instructions corresponding to each BIOS configuration option to each server under test, so that each server under test executes the test instructions corresponding to each BIOS configuration option, displays the test instruction return value corresponding to each BIOS configuration option on the screen, and feeds back a screenshot matching the test instruction return value corresponding to each BIOS configuration option.
[0105] Step 305: Obtain, through the virtual machines matched with the servers under test, the screenshots of the feedbacks from the servers under test sent by the baseboard management controllers.
[0106] Step 306: Perform character recognition on the screenshots fed back by each server under test through a virtual machine matched with each server under test to obtain a test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with an expected test instruction return value corresponding to each BIOS configuration option, and obtain a BIOS test result for each server under test.
[0107] Step 307: Generate a test result report corresponding to the BIOS test result of each tested server.
[0108] Step 308: Provide the test result report to the target user.
[0109] The technical solution of the embodiment of the present invention can control each server to execute the test instructions corresponding to each BIOS configuration option through a virtual machine matched with each server, feedback a screenshot matching the return value of the test instruction corresponding to each BIOS configuration option, and determine the BIOS test result of each server based on the screenshot fed back by each server, thereby realizing automatic control of multiple servers to perform BIOS testing through one electronic device, greatly improving the BIOS testing efficiency and reducing the manpower cost and time cost of BIOS testing.
[0110] Embodiment 4
[0111] Figure 4 The structure diagram of a BIOS test device provided in the fourth embodiment of the present invention is shown in FIG. The device can be configured in an electronic device. Figure 4 As shown, the device includes: a virtual machine determination module 401, an instruction sending module 402 and a result determination module 403.
[0112] Among them, the virtual machine determination module 401 is used to determine a virtual machine that matches at least one server under test; the instruction sending module 402 is used to send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test through the virtual machine that matches each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot that matches the test instruction return value corresponding to each BIOS configuration option; the result determination module 403 is used to perform character recognition on the screenshots fed back by each server under test through the virtual machine that matches each server under test, obtain the test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option, and obtain the BIOS test result of each server under test.
[0113] The technical solution of the embodiment of the present invention is to determine a virtual machine matching at least one server under test; then, through the virtual machines matching each server under test, send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option; finally, through the virtual machines matching each server under test, perform character recognition on the screenshot fed back by each server under test, obtain the test instruction return value corresponding to each BIOS configuration option, and match the test instruction return value with the test instruction return value corresponding to each BIOS configuration option. The expected test instruction return value is compared to obtain the BIOS test result of each server under test, which solves the problem that the BIOS test solution in the related technology requires testers to perform manual operations repeatedly, which is time-consuming and labor-intensive, cumbersome to operate, and has low testing efficiency. A virtual machine matching each server is obtained to control each server to execute the test instruction corresponding to each BIOS configuration option, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back. Based on the screenshots fed back by each server, the BIOS test result of each server is determined, and it is achieved that multiple servers are automatically controlled to perform BIOS testing through one electronic device, which greatly improves the BIOS testing efficiency and reduces the manpower and time costs of BIOS testing.
[0114] In an optional implementation of the embodiment of the present invention, optionally, the virtual machine determination module 401 is specifically used to: allocate a virtual machine to each server under test from all virtual machines running on the electronic device.
[0115] In an optional implementation of an embodiment of the present invention, optionally, the instruction sending module 402 is specifically used to: perform the following operations through a virtual machine that matches each server under test: send the test instructions corresponding to each BIOS configuration option to the baseboard management controller of the server under test; control the baseboard management controller to send the test instructions corresponding to each BIOS configuration option to the server under test, so that the server under test executes the test instructions corresponding to each BIOS configuration option, displays the test instruction return value corresponding to each BIOS configuration option on the screen, and feeds back a screenshot that matches the test instruction return value corresponding to each BIOS configuration option; obtains the screenshot fed back by the server under test sent by the baseboard management controller.
[0116] In an optional implementation of an embodiment of the present invention, optionally, when the result determination module 403 performs an operation of performing character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, it is specifically used to: perform the following operations through a virtual machine matched with each server under test: use optical character recognition technology to identify the identification information of each BIOS configuration option in the screenshots fed back by the server under test and the test instruction return value corresponding to each BIOS configuration option.
[0117] In an optional implementation of an embodiment of the present invention, optionally, when the result determination module 403 performs the operation of comparing the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option to obtain the BIOS test result of each of the servers under test, it is specifically used to: perform the following operations through a virtual machine matched with each server under test: detect whether the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option; if the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option, determine that the BIOS test result of the server under test is qualified; if the test instruction return value is inconsistent with the expected test instruction return value corresponding to each BIOS configuration option, determine that the BIOS test result of the server under test is unqualified.
[0118] In an optional implementation of the embodiment of the present invention, optionally, the instruction sending module 402 is further used to: obtain a test instruction corresponding to each BIOS configuration option from a test file.
[0119] In an optional implementation of the embodiment of the present invention, optionally, the BIOS testing device further includes: a report generating module, used to generate a test result report corresponding to the BIOS test result of each of the tested servers; and a report providing module, used to provide the test result report to a target user.
[0120] 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.
[0121] The above-mentioned BIOS testing device can execute the BIOS testing method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the BIOS testing method.
[0122] Embodiment 5
[0123] Figure 5 The structure diagram of the electronic device 10 that can be used to implement the BIOS test method of the embodiment of the present invention is shown. The components shown herein, their connections and relationships, and their functions are only for example, and are not intended to limit the implementation of the present invention described and / or required herein.
[0124] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, 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, the ROM 12, and the 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.
[0125] 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.
[0126] 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 a BIOS test method.
[0127] In some embodiments, the BIOS 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 BIOS test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the BIOS test method in any other appropriate manner (e.g., by means of firmware).
[0128] 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.
[0129] The computer program for implementing the BIOS test method of the present invention can be written in any combination of one or more programming languages. These computer programs can 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 can be executed completely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or completely on a remote machine or server.
[0130] 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.
[0131] 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).
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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 BIOS testing method, It is characterized in that include: Allocate a virtual machine to each server under test from all virtual machines running on the electronic device, so that each virtual machine running on the electronic device can perform BIOS tests on multiple servers under test in parallel; wherein the number of virtual machines running on the electronic device is greater than or equal to the number of servers under test, and the electronic device is a terminal device used by a target user; The test instructions corresponding to each BIOS configuration option obtained from the test file are sent to the baseboard management controller of each server under test through a virtual machine matched with each server under test, and each server under test is controlled to execute the test instructions corresponding to each BIOS configuration option, and the test instruction return value corresponding to each BIOS configuration option is displayed on the screen, and a screenshot matching the test instruction return value corresponding to each BIOS configuration option is fed back; Through a virtual machine matched with each of the servers under test, character recognition is performed on the screenshots fed back by each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option, and the test instruction return value is compared with an expected test instruction return value corresponding to each BIOS configuration option to obtain a BIOS test result for each of the servers under test.
2. The method according to claim 1, It is characterized in that The method includes sending the test instructions corresponding to each BIOS configuration option obtained from the test file to the baseboard management controller of each server under test through a virtual machine matched with each server under test, controlling each server under test to execute the test instructions corresponding to each BIOS configuration option, displaying the test instruction return value corresponding to each BIOS configuration option on the screen, and feeding back a screenshot matching the test instruction return value corresponding to each BIOS configuration option, including: Perform the following operations on a virtual machine that matches each server under test: Sending test instructions corresponding to each BIOS configuration option to the baseboard management controller of the server under test; Controlling the baseboard management controller to send the test instructions corresponding to each BIOS configuration option to the server under test, so that the server under test executes the test instructions corresponding to each BIOS configuration option, displays the test instruction return value corresponding to each BIOS configuration option on the screen, and feeds back a screenshot matching the test instruction return value corresponding to each BIOS configuration option; A screenshot of the tested server feedback sent by the baseboard management controller is obtained.
3. The method according to claim 1, It is characterized in that The method of performing character recognition on the screenshots fed back by each of the servers under test by using a virtual machine matched with each of the servers under test to obtain a test instruction return value corresponding to each BIOS configuration option includes: Perform the following operations on a virtual machine that matches each server under test: Optical character recognition technology is used to identify identification information of each BIOS configuration option in the screenshot fed back by the tested server and the test instruction return value corresponding to each BIOS configuration option.
4. The method according to claim 1, It is characterized in that The step of comparing the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option to obtain the BIOS test result of each server under test includes: Perform the following operations on a virtual machine that matches each server under test: Detecting whether the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option; If the test instruction return value is consistent with the expected test instruction return value corresponding to each BIOS configuration option, it is determined that the BIOS test result of the tested server is qualified; If the test instruction return value is inconsistent with the expected test instruction return value corresponding to each BIOS configuration option, it is determined that the BIOS test result of the tested server is unqualified.
5. The method according to claim 1, It is characterized in that After character recognition is performed on the screenshots fed back by each of the servers under test by means of a virtual machine matched with each of the servers under test, a test instruction return value corresponding to each BIOS configuration option is obtained, and the test instruction return value is compared with an expected test instruction return value corresponding to each of the BIOS configuration options to obtain a BIOS test result of each of the servers under test, the method further includes: Generate a test result report corresponding to the BIOS test result of each of the tested servers; The test result report is provided to a target user.
6. A BIOS testing device, It is characterized in that include: A virtual machine determination module, used to allocate a virtual machine to each tested server from all virtual machines running on the electronic device, so that each virtual machine running on the electronic device can perform BIOS tests on multiple tested servers in parallel; wherein the number of virtual machines running on the electronic device is greater than or equal to the number of servers under test, and the electronic device is a terminal device used by a target user; An instruction sending module is used to send the test instructions corresponding to each BIOS configuration option obtained from the test file to the baseboard management controller of each server under test through a virtual machine matching each server under test, control each server under test to execute the test instructions corresponding to each BIOS configuration option, display the test instruction return value corresponding to each BIOS configuration option on the screen, and feed back a screenshot matching the test instruction return value corresponding to each BIOS configuration option; The result determination module is used to perform character recognition on the screenshots fed back by each of the servers under test through a virtual machine matched with each of the servers under test, obtain a test instruction return value corresponding to each BIOS configuration option, compare the test instruction return value with the expected test instruction return value corresponding to each BIOS configuration option, and obtain the BIOS test results of each of the servers under test.
7. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; 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 BIOS testing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the BIOS testing method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
BIOS test method and system, storage medium and equipment
CN113986635A
Network card testing method and device, server, medium and computer program product
CN114465937A
Server status monitoring system and method using baseboard management controller
US20210133081A1
