High-simulation-degree server BIOS automatic testing method and device, equipment and medium

Through BMC KVM channel and machine vision technology, high simulation test of server BIOS is realized, solving the problems of low simulation and poor versatility in the existing technology. It supports BIOS POST and Setup interface testing, and is suitable for a variety of scenarios and platforms.

CN119105920APending Publication Date: 2024-12-10DONGGUAN RAMAXEL MEMORY TECH LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411272163.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing server BIOS testing method has low simulation, and cannot test the BIOS POST and Setup interfaces. It depends on the manufacturer's interface and tools, and has poor versatility and cannot support machine testing without OS installed.

Method used

Automatic testing is carried out through the BMC KVM channel, screenshots and machine vision technology are used to parse BIOS interface information, extract valid information, and modify and set BIOS items through the KVM channel to achieve high simulation BIOS testing.

Benefits of technology

It realizes high simulation test of BIOS, supports BIOS POST and Setup interface testing, is highly versatile, does not rely on the Redfish interface or BIOS firmware tools, and is suitable for machines without OS.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105920A_ABST
    Figure CN119105920A_ABST
Patent Text Reader

Abstract

The invention relates to a high-simulation-degree server BIOS automatic testing method, device and equipment and a medium, and the method comprises the steps that initialization operation is executed, and a BMC KVM interface is entered; screenshot is carried out on the BMC KVM interface, and effective information is extracted from the screenshot; extracting condition information from the effective information, and checking the condition information; when the condition check is finished and the condition is established, executing the task according to the condition information; checking the task execution result to obtain a checking result; and storing the inspection result and clearing the temporary directory. According to the method, the BIOS is automatically tested in an out-of-band mode through the KVM channel provided by the BMC, so that not only can the BIOS be set / inquired, but also the POST and Setup interfaces of the BIOS can be tested; in addition, as long as the server provides a BMC KVM interface, BIOS testing can be supported, and universality is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server BIOS testing, and in particular to a highly simulated server BIOS automated testing method, device, equipment and medium. Background Art

[0002] Currently, there are three ways to test the BIOS (Basic Input Output System) in the server field:

[0003] The first method is to access the BIOS through the Redfish interface of the BMC. Redfish is an industry standard interface provided by the BMC, which can read and set BIOS information. However, this method has its limitations: first, it is not very universal and depends on the manufacturer's implementation of the Redfish interface. Different manufacturers have different levels of support for the Redfish interface; second, the supported test methods are limited, and can only support the query and setting of BIOS items.

[0004] The second method is to use the tools provided by the Firewall (firmware) manufacturer for automation. For example, AMI provides tools such as AFU (AMI Firmware Update, a firmware upgrade tool developed by AMI), AMI BCP (BIOS configuration program developed by AMI), AMI SDE (BIOS setup interface data extraction tool developed by AMI), and AMI SCE (BIOS Setup interface configuration and control tool developed by AMI), which support operations such as querying, modifying, and upgrading BIOS. However, this method also has limitations: first, it has poor versatility and relies on the tools provided by the manufacturer. Different manufacturers provide different tools and support different capabilities. If it is used to achieve automation, it is necessary to adapt the tools of different manufacturers; second, the test scenario is limited and must be tested in the OS (operating system) in-band mode. It cannot support machines without OS installed.

[0005] The third method is to test the BIOS through the BMC serial port channel, which can only read and does not support setting. However, this method can only be used as an auxiliary means.

[0006] In addition, the test simulation degrees of the above methods are all low, and they can only query and set the values ​​of corresponding BIOS items (the third method does not support settings yet), and cannot test the information of BIOS POST (BIOS power-on self-test) and Setup (settings) interfaces, nor can they test the time points of occurrence of key events. Summary of the invention

[0007] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a highly simulated server BIOS automated testing method, device, equipment and medium.

[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0009] In a first aspect, this embodiment provides a highly simulated server BIOS automated testing method, comprising the following steps:

[0010] Perform initialization operations and enter the BMC KVM interface;

[0011] Take a screenshot of the BMC KVM interface and extract valid information from the screenshot;

[0012] Extract conditional information from valid information and check the conditional information;

[0013] When the condition check is completed and the condition is met, the task is executed according to the condition information;

[0014] Check the task execution result to obtain the inspection result;

[0015] Save the check results and clear the temporary directory.

[0016] Its further technical solution is: the initialization operation includes importing a code library, setting parameters, generating a temporary directory and generating a context.

[0017] A further technical solution is: taking a screenshot of the BMC KVM interface and extracting valid information from the screenshot comprises the following steps:

[0018] Capture the image information of the BMC KVM interface to obtain the image;

[0019] Preprocess the image to obtain processing information;

[0020] Parsing and identifying the processed information to obtain identification information;

[0021] Determine whether the information analysis and identification has been completed;

[0022] If the parsing and identification of the processed information is completed, valid information is extracted from the image region of interest of the identification information.

[0023] A further technical solution is: extracting condition information from valid information and checking the condition information comprises the following steps:

[0024] Extract conditional information from valid information;

[0025] Determine whether the condition information adopts flexible condition check;

[0026] If the condition information adopts flexible condition check, it is determined whether the condition information satisfies the condition;

[0027] If the condition information satisfies the condition, the condition check ends.

[0028] A further technical solution is: the step of checking the task execution result to obtain the check result comprises the following steps:

[0029] Input the task execution result and obtain the keyword information in the task execution result;

[0030] Perform fuzzy check based on keyword information to obtain the check result.

[0031] In a second aspect, the present embodiment provides a highly simulated server BIOS automated testing device, including: an execution entry unit, a screenshot extraction unit, an extraction inspection unit, an execution unit, an inspection unit, and a storage and clearing unit;

[0032] The execution entry unit is used to execute the initialization operation and enter the BMC KVM interface;

[0033] The screenshot extraction unit is used to take a screenshot of the BMC KVM interface and extract valid information from the screenshot;

[0034] The extraction and inspection unit is used to extract condition information from the valid information and inspect the condition information;

[0035] The execution unit is used to execute the task according to the condition information when the condition check is completed and the condition is met;

[0036] The checking unit is used to check the task execution result to obtain the checking result;

[0037] The saving and clearing unit is used to save the inspection result and clear the temporary directory.

[0038] Its further technical solution is: the initialization operation includes importing a code library, setting parameters, generating a temporary directory, and generating a context.

[0039] Its further technical solution is: the screenshot extraction unit includes a screenshot module, a preprocessing module, a parsing and identification module, a first judgment module and an extraction module;

[0040] The screenshot module is used to capture the image information of the BMC KVM interface to obtain a picture;

[0041] The preprocessing module is used to preprocess the image to obtain processing information;

[0042] The parsing and identifying module is used to parse and identify the processed information to obtain identification information;

[0043] The first determination module is used to determine whether the parsing and identification of the processed information has been completed;

[0044] The extraction module is used to extract valid information from the image interest region of the identification information if the parsing and identification of the processed information is completed.

[0045] In a third aspect, this embodiment provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the highly simulated server BIOS automated testing method as described above is implemented.

[0046] In a fourth aspect, this embodiment provides a storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the highly-simulated server BIOS automated testing method as described above can be implemented.

[0047] Compared with the prior art, the beneficial effects of the present invention are as follows: the BIOS is automatically tested in an out-of-band manner through the KVM channel provided by the BMC, the BIOS interface is opened on the browser side through the BMC KVM channel on the test execution machine, the information of the BIOS interface is parsed, valid information is extracted from the screenshot, and then the value of the corresponding BIOS item is modified and set through the KVM channel, so that not only the BIOS can be set / queried, but also the BIOS POST and Setup interfaces can be tested; in addition, as long as the server provides the BMC KVM interface, the BIOS test can be supported, which is independent of the BMC Redfish interface and the interface tool provided by the BIOS firmware provider, and has high versatility.

[0048] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative labor.

[0050] Figure 1 A flowchart of a highly simulated server BIOS automated testing method provided by an embodiment of the present invention;

[0051] Figure 2A test network diagram of a highly simulated server BIOS automated test method provided by an embodiment of the present invention;

[0052] Figure 3 A schematic block diagram of a highly simulated server BIOS automated testing device provided by an embodiment of the present invention;

[0053] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.

[0055] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0056] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0057] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0058] See also Figure 1 to Figure 2 In the specific embodiment shown, the present invention discloses a highly simulated server BIOS automated testing method, comprising the following steps:

[0059] S1, perform initialization operations and enter the BMC KVM interface;

[0060] Specifically, see Figure 2As shown, the BIOS is automatically tested out-of-band through the KVM (short for keyboard, monitor and mouse, which can connect the three to achieve remote access and control of the computer) channel provided by the BMC. On the Test Computer (test execution machine), the BIOS interface is opened on the browser side through the BMC KVM channel, the information on the BIOS interface is parsed using machine vision technology, and valid information is extracted from the screenshot using OCR technology, and then the value of the corresponding BIOS item is modified and set through the KVM channel.

[0061] Specifically, after the tool is started, it is initialized first, and the initialization operation includes importing the code library, parameter setting, generating a temporary directory, and generating a context. Among them, importing the code library is the basis of the automated testing process, which contains all the scripts, function libraries, configuration files, etc. required to perform the test; these code libraries provide necessary support and guidance for subsequent test steps, ensuring the continuity and accuracy of the test process; without the correct code library, automated testing will not be possible, and the quality and integrity of the code library directly affect the accuracy and reliability of the test results. Parameter setting is a key operation for configuring the test environment, which involves the setting of various parameters and configuration items that need to be used during the test; these parameters may include the server's IP address, port number, user credentials, default values ​​of BIOS settings, etc.; correct parameter setting is a prerequisite for ensuring that the test can proceed smoothly. If the parameter setting is wrong or omitted, it may cause the test to fail or fail to achieve the expected results. The purpose of generating a temporary directory is to store temporary files and data during the test process. These temporary files may include test logs, screenshots, intermediate results, etc. By storing them in a temporary directory, they can be easily cleaned up and archived after the test is completed. The generation and management of temporary directories helps to maintain the cleanliness and order of the test environment. At the same time, it also provides a mechanism to track and record key information during the test process, which is convenient for subsequent troubleshooting and result analysis. The purpose of generating a context is to establish the context environment during the test process, which includes setting the initial state of the test, simulating user operations, configuring the system environment, etc. By generating a context, it can be ensured that the test is performed in a consistent environment, reducing test errors caused by environmental differences. The stability and consistency of the context environment are crucial to the accuracy of the test results. If the context environment is improperly set or changes, it may cause deviations or failures in the test results.

[0062] S2, taking a screenshot of the BMC KVM interface and extracting valid information from the screenshot;

[0063] In one embodiment, taking a screenshot of the BMC KVM interface and extracting valid information from the screenshot comprises the following steps:

[0064] Capture the image information of the BMC KVM interface to obtain the image;

[0065] Preprocess the image to obtain processing information;

[0066] Specifically, preprocessing includes grayscale, denoising, binarization, shaping, etc. Grayscale refers to converting a color image into a grayscale image; denoising refers to filtering out noise on the image; binarization refers to binarizing the image; shaping refers to shaping the image and scaling it to the most appropriate size to more accurately obtain character information.

[0067] Parsing and identifying the processed information to obtain identification information;

[0068] Specifically, images contain information from many different fields. If characters are extracted directly from them, the information obtained will be disorganized. Machine vision technology is used to parse the information on the BIOS interface to circularly locate a region of interest in the image, thereby obtaining identification information.

[0069] Determine whether the parsing and identification of the processing information has been completed; if the parsing and identification of the processing information has not been completed, return to execute "parsing and identifying the processing information to obtain identification information";

[0070] If the parsing and identification of the processed information is completed, valid information is extracted from the image region of interest of the identification information.

[0071] Specifically, OCR (Optical Character Recognition) technology is used to extract text information from the recognition information (ie, to extract valid information from the image region of interest).

[0072] S3, extracting condition information from valid information and checking the condition information;

[0073] Specifically, the information of the BIOS page in the KVM channel is identified by using the Web browser automatic control technology. The DOM (Document Object Model) element presentation of the Web browser allows people to intuitively see the actual content, but the time point when the DOM element is finally presented is uncertain. There are many uncertain factors, such as network delay, network jitter, long web page control loading time, loading order of each control on the web page (such as there are multiple controls at the same coordinate point, and the control that needs to be located within a certain time period is covered by other controls), etc., which will cause the time point when the DOM element is available to be uncertain.

[0074] In one embodiment, extracting condition information from valid information and checking the condition information includes the following steps:

[0075] Extract conditional information from valid information;

[0076] Specifically, set the extraction conditions, and then extract the conditional information from the valid information according to the extraction conditions. That is, for the extraction conditions, it is necessary to define clear rules or patterns so that relevant information can be identified and extracted; then write a script or program to traverse the valid information and extract all the information that meets the conditions.

[0077] Determine whether the condition information adopts flexible condition check; if the condition information does not adopt flexible condition check, adopt ordinary check, and check whether the condition information satisfies the condition. If the condition information satisfies the condition, end the condition check; if the condition information does not meet the condition, generate error information, enter the error handling link and report the error information.

[0078] Specifically, ordinary checking algorithms do not consider various factors that affect the availability of DOM elements. They simply determine whether the conditions are met. The final impression given is that a certain control is sometimes available quickly, but sometimes takes a long time to load.

[0079] If the condition information adopts flexible condition check, then determine whether the condition information satisfies the condition; if the condition information does not satisfy the condition, then determine whether the waiting time is exhausted; if the waiting time is exhausted, then determine whether the maximum number of retries is reached; if the maximum number of retries is reached, then execute "generate error information, transfer to error handling link and report error information"; if the waiting time is not exhausted, then wait for the polling time to continue polling; if the maximum number of retries is not reached, then reset to continue polling;

[0080] Specifically, the flexible conditional check algorithm can fully consider various factors that affect the availability of DOM elements. The industry usually solves this problem by delaying for a fixed time t. However, if the time t is too short, the control will time out before loading; if t is too long, the test efficiency will be reduced. Compared with the "stereotyped" conventional methods in the industry, the flexible conditional detection algorithm is more flexible and efficient. The condition information here is a highly abstract concept, and the condition refers to the state of reaching a certain state / threshold. For example: the conditional information can be set to the appearance of the "F1: System Setup" hotkey on the BIOS Post interface, or the login button on the browser interface can be used. The software function that implements the algorithm will periodically loop to check whether the condition is met. If it is met, the conditional check will end; if the condition is not met in this round of checks, but there is still a chance to check, it will continue to poll and conduct the next round of checks; if the conditions of all rounds of checks are not met, the condition is returned as not met (that is, an error message is generated, and the error handling link is transferred and the error message is reported). The algorithm has the following advantages: it abstracts common conditions and is suitable for various scenarios that require periodic adjustment and judgment; by adjusting three parameters, namely, polling time (e.g., 0.5 seconds), waiting time (e.g., 30 seconds), and maximum number of retries (e.g., 3 times), it can detect conditions efficiently and accurately. Once the conditions are met, they are immediately detected and returned without spending extra time waiting. The elastic condition check algorithm has multiple rounds of checks, and the specific rounds are determined by the set parameters. If the result of the current round of checks is that the conditions are not met and the upper limit of the check round has not been reached, polling will continue for the next round of condition checks.

[0081] If the condition information satisfies the condition, the condition check ends.

[0082] S4, when the condition check is completed and the condition is met, the task is executed according to the condition information; when the condition check is completed and the condition is not met, an error message will be reported and recorded.

[0083] Specifically, executing tasks includes executing each task serially or concurrently. Serial execution means that tasks are executed one by one in order, that is, after one task is completed, the next task will be started; in this mode, only one task is executed at the same time. Concurrent execution means that multiple tasks can be executed alternately in the same time period, but each task is not necessarily executed at the same time. Concurrency usually involves multiple coroutines, threads, or processes.

[0084] S5, checking the task execution result to obtain the inspection result;

[0085] In one embodiment, the step of checking the task execution result to obtain the check result includes the following steps:

[0086] Input the task execution result and obtain the keyword information in the task execution result;

[0087] Specifically, if the task execution result is relatively simple, it can be directly input into a document, database or application manually through a keyboard or touch screen. For the input of large amounts of data, automated tools (such as scripts, API interfaces, etc.) can be used to implement it. In addition, specialized text analysis tools or software (such as TextRazor, AlchemyAPI, etc.) can be used to extract keyword information from the task execution results.

[0088] Perform fuzzy check based on keyword information to obtain the check result.

[0089] Specifically, the result check supports two types of algorithms: precise check and fuzzy check. Precise check directly checks and determines the results based on the task execution results. However, since the information obtained may have certain errors, the pass rate of the precise check algorithm is often low. In order to improve the accuracy of the check and obtain more reasonable results, the fuzzy check algorithm is used. This algorithm uses a fuzzy judgment mechanism and supports 4 fuzzy check algorithms, as shown in the following table:

[0090]

[0091]

[0092] Among them, the four fuzzy check algorithms check conditions in the order of "include any keyword algorithm" -> "include all keywords algorithm" -> "partial keyword sequence algorithm" -> "all keyword sequence algorithm" gradually, and the corresponding check results are more accurate.

[0093] S6, save the inspection results and clear the temporary directory.

[0094] Specifically, after the task is executed, the inspection results are saved and the temporary directory and context are cleared.

[0095] Among them, through the inspection results, you can clearly understand whether the task is completed as expected and the quality of the completion. If the task execution fails or the result does not meet expectations, the saved inspection results can be used as a basis for problem tracking and resolution. Developers or operation and maintenance personnel can quickly locate the problem based on these results and take appropriate measures to fix it. In some cases, the inspection results may contain important business data or status information. By saving these results, data can be backed up or restored when needed to ensure business continuity and stability.

[0096] Among them, temporary directories are usually used to store temporary files and data generated during task execution. These files are usually no longer needed after the task is completed, so timely clearing can free up disk space and avoid unnecessary resource occupation. Temporary files may contain sensitive information or unencrypted data. If these files are retained for a long time, the risk of data leakage may increase. Therefore, clearing temporary directories is one of the important measures to protect system security. Over time, a large number of temporary files and directories may accumulate in the system. These files and directories not only take up disk space, but may also affect the neatness and maintainability of the system. By regularly clearing temporary directories, the system can be kept clean and efficient.

[0097] Among them, during the task execution process, some context environments (such as database connections, file handles, etc.) may be created. These context environments need to be properly closed or released after the task is completed to avoid resource leakage. Clearing the context is the process of ensuring that these resources are properly handled. The context environment usually occupies a certain amount of memory resources. By clearing the context, these memory resources can be released to provide more memory space for other tasks or processes. In some cases, the context environment may contain data or status information that is not related to the current task. If these context environments are not cleared in time, they may pollute or interfere with the data. Therefore, clearing the context is one of the important measures to ensure data accuracy and consistency.

[0098] See also Figure 2 As shown, the present invention has the following advantages compared with the three old methods in the industry:

[0099] 1. High simulation degree, can highly simulate the test method of manual through human-computer interaction interface, not only can set / query the BIOS, but also can test the BIOS POST and Setup interface. Other methods cannot cover the display test of BIOS POST or Setup interface.

[0100] 2. Support multiple test scenarios. In contrast to mode 2, mode 2 can only support in-band mode, that is, the tool must be installed on the OS of the local machine and log in to the OS for testing. The present invention uses an out-of-band test mode to test the machine under test through the test execution machine. The machine under test can be tested even if the OS is not installed.

[0101] 3. Supports multiple types of test items, not only supports reading and setting BIOS items and values, but also supports BIOS POST and Setup interface tests, page jump tests, BIOS entry time tests, etc.

[0102] 4. High versatility. In method 1, the redfish interfaces supported by different machines may also be different; in method 2, the interface tools provided by different BIOS providers are different. Both methods are not very universal. As long as the server provides a BMC KVM interface, the present invention can support BIOS testing, and is independent of the BMC Redfish interface and the interface tools provided by the BIOS Fireware provider. Currently, BMC is an essential key component of the server, and the BMC module supports the remote KVM function, so it has strong versatility and can be compatible with servers of various platforms and manufacturers from the aspect of solution design.

[0103] See also Figure 3 As shown, the present invention also discloses a highly simulated server BIOS automated testing device, comprising: an execution entry unit 10, a screenshot extraction unit 20, an extraction inspection unit 30, an execution unit 40, an inspection unit 50 and a storage and clearing unit 60;

[0104] The execution entry unit 10 is used to execute the initialization operation and enter the BMC KVM interface;

[0105] The screenshot extraction unit 20 is used to take a screenshot of the BMC KVM interface and extract valid information from the screenshot;

[0106] The extraction and inspection unit 30 is used to extract condition information from the valid information and inspect the condition information;

[0107] The execution unit 40 is used to execute the task according to the condition information when the condition check is completed and the condition is met;

[0108] The checking unit 50 is used to check the task execution result to obtain the checking result;

[0109] The saving and clearing unit 60 is used to save the inspection result and clear the temporary directory.

[0110] In one embodiment, the initialization operation includes importing a code base, setting parameters, generating a temporary directory, and generating a context.

[0111] In one embodiment, the screenshot extraction unit 20 includes a screenshot module, a preprocessing module, a parsing and identification module, a first judgment module and an extraction module;

[0112] The screenshot module is used to capture the image information of the BMC KVM interface to obtain a picture;

[0113] The preprocessing module is used to preprocess the image to obtain processing information;

[0114] The parsing and identifying module is used to parse and identify the processed information to obtain identification information;

[0115] The first determination module is used to determine whether the parsing and identification of the processed information has been completed;

[0116] The extraction module is used to extract valid information from the image interest region of the identification information if the parsing and identification of the processed information is completed.

[0117] In one embodiment, the extraction inspection unit 30 includes an extraction module, a second judgment module, a third judgment module and an end module;

[0118] The extraction module is used to extract condition information from valid information;

[0119] The second determination module is used to determine whether the condition information adopts a flexible condition check;

[0120] The third judgment module is used to judge whether the condition information satisfies the condition if the condition information adopts the flexible condition check;

[0121] The end module is used to end the condition check if the condition information satisfies the condition.

[0122] In one embodiment, the inspection unit 50 includes an acquisition module and an inspection module;

[0123] The acquisition module is used to input the task execution result and obtain the keyword information in the task execution result;

[0124] The checking module is used to perform fuzzy checking according to the keyword information to obtain a checking result.

[0125] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned high-simulation server BIOS automated testing device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0126] The above-mentioned high-simulation server BIOS automated testing device can be implemented in the form of a computer program, which can be used in Figure 4 Runs on the computer device shown.

[0127] See also Figure 4 , Figure 4is a schematic block diagram of a computer device provided in an embodiment of the present application; the computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0128] See also Figure 4 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0129] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a highly simulated server BIOS automated testing method.

[0130] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0131] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a highly simulated server BIOS automatic testing method.

[0132] The network interface 505 is used to communicate with other devices over the network. Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0133] The processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:

[0134] Perform initialization operations and enter the BMC KVM interface; take a screenshot of the BMC KVM interface and extract valid information from the screenshot; extract condition information from the valid information and check the condition information; when the condition check is completed and the condition is met, execute the task according to the condition information; check the task execution result to obtain the check result; save the check result and clear the temporary directory.

[0135] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0136] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0137] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned high-simulation server BIOS automated testing method can be implemented. The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the above-mentioned method can be implemented. The program instructions include the following steps:

[0138] Perform initialization operations and enter the BMC KVM interface; take a screenshot of the BMC KVM interface and extract valid information from the screenshot; extract condition information from the valid information and check the condition information; when the condition check is completed and the condition is met, execute the task according to the condition information; check the task execution result to obtain the check result; save the check result and clear the temporary directory.

[0139] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0140] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0141] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or skipped.

[0142] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0144] The above embodiments are preferred implementation schemes of the present invention. In addition, the present invention may also be implemented in other ways. Any obvious replacement without departing from the concept of the present technical solution is within the protection scope of the present invention.

Claims

1. A highly simulated server BIOS automated testing method, characterized in that: The following steps are involved: Perform initialization operations and enter the BMC KVM interface; Take a screenshot of the BMC KVM interface and extract valid information from the screenshot; Extract conditional information from valid information and check the conditional information; When the condition check is completed and the condition is met, the task is executed according to the condition information; Check the task execution result to obtain the inspection result; Save the check results and clear the temporary directory.

2. The highly simulated server BIOS automated testing method according to claim 1, characterized in that: The initialization operation includes importing a code base, setting parameters, generating a temporary directory, and generating a context.

3. The highly simulated server BIOS automated testing method according to claim 1, characterized in that: The method of taking a screenshot of the BMC KVM interface and extracting valid information from the screenshot includes the following steps: Capture the image information of the BMC KVM interface to obtain the image; Preprocess the image to obtain processing information; Parsing and identifying the processed information to obtain identification information; Determine whether the information analysis and identification has been completed; If the parsing and identification of the processed information is completed, valid information is extracted from the image region of interest of the identification information.

4. The highly simulated server BIOS automated testing method according to claim 1, characterized in that: The step of extracting condition information from valid information and checking the condition information comprises the following steps: Extract conditional information from valid information; Determine whether the condition information adopts flexible condition check; If the condition information adopts flexible condition check, it is determined whether the condition information satisfies the condition; If the condition information satisfies the condition, the condition check ends.

5. The highly simulated server BIOS automated testing method according to claim 1, characterized in that: The step of checking the task execution result to obtain the check result comprises the following steps: Input the task execution result and obtain the keyword information in the task execution result; Perform fuzzy check based on keyword information to obtain the check result.

6. A highly simulated server BIOS automated testing device, characterized in that: include: Execution entry unit, screenshot extraction unit, extraction inspection unit, execution unit, inspection unit and storage and clearing unit; The execution entry unit is used to execute the initialization operation and enter the BMC KVM interface; The screenshot extraction unit is used to take a screenshot of the BMC KVM interface and extract valid information from the screenshot; The extraction and inspection unit is used to extract condition information from the valid information and inspect the condition information; The execution unit is used to execute the task according to the condition information when the condition check is completed and the condition is met; The checking unit is used to check the task execution result to obtain the checking result; The saving and clearing unit is used to save the inspection result and clear the temporary directory.

7. The highly simulating server BIOS automated testing device according to claim 6, characterized in that: The initialization operation includes importing a code base, setting parameters, generating a temporary directory, and generating a context.

8. The highly simulating server BIOS automated testing device according to claim 6, characterized in that: The screenshot extraction unit includes a screenshot module, a preprocessing module, a parsing and identification module, a first judgment module and an extraction module; The screenshot module is used to capture the image information of the BMC KVM interface to obtain a picture; The preprocessing module is used to preprocess the image to obtain processing information; The parsing and identifying module is used to parse and identify the processed information to obtain identification information; The first determination module is used to determine whether the parsing and identification of the processed information has been completed; The extraction module is used to extract valid information from the image interest region of the identification information if the parsing and identification of the processed information is completed.

9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the highly simulated server BIOS automated testing method according to any one of claims 1 to 5 when executing the computer program.

10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the highly simulated server BIOS automated testing method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • BIOS automatic configuration method for large-scale server cluster

    CN121833068A