CN115687146A - BIOS test method, device, computer equipment and storage medium - Google Patents

BIOS test method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN115687146A
CN115687146A CN202211425965.6A CN202211425965A CN115687146A CN 115687146 A CN115687146 A CN 115687146A CN 202211425965 A CN202211425965 A CN 202211425965A CN 115687146 A CN115687146 A CN 115687146A
Authority
CN
China
Prior art keywords
bios setting
setting option
target
bios
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211425965.6A
Other languages
Chinese (zh)
Inventor
胡剑峰
安子文
徐进康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Controllable Information Industry Co Ltd
Original Assignee
Zhongke Controllable Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Controllable Information Industry Co Ltd filed Critical Zhongke Controllable Information Industry Co Ltd
Priority to CN202211425965.6A priority Critical patent/CN115687146A/en
Publication of CN115687146A publication Critical patent/CN115687146A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

本申请涉及一种BIOS测试方法、装置、计算机设备和存储介质。该方法包括:响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果;即本申请中,通过软件的形式实现对待测设备的BIOS系统的远程控制测试,测试过程中,无需外接硬件电路,能够提高BIOS测试的便捷性,进而提高BIOS的测试效率。

Figure 202211425965

The application relates to a BIOS testing method, device, computer equipment and storage medium. The method includes: responding to the test instruction of the BIOS system of the device to be tested, entering the BMC webpage interface corresponding to the BIOS system through a browser testing tool; controlling the cursor on the BMC webpage interface to modify the target BIOS setting option, and based on the modified The target BIOS setting option controls the device under test to restart; determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test; that is, in this application, through the software The form realizes the remote control test of the BIOS system of the device under test. During the test process, no external hardware circuit is needed, which can improve the convenience of BIOS test and improve the efficiency of BIOS test.

Figure 202211425965

Description

BIOS测试方法、装置、计算机设备和存储介质BIOS testing method, device, computer equipment and storage medium

技术领域technical field

本申请涉及计算机技术领域,特别是涉及一种BIOS测试方法、装置、计算机设备和存储介质。The present application relates to the field of computer technology, in particular to a BIOS testing method, device, computer equipment and storage medium.

背景技术Background technique

基本输入输出系统((Basic Input Output System,简称BIOS)是一组固化到计算机内只读存储器(Read-Only Memory,ROM)芯片上的程序,是计算机在开启时运行的第一个程序。BIOS系统中存储了计算机中最重要的基本输入输出程序、开机后自检程序和系统自启动程序。因此,对BIOS系统是否能够正常运行进行测试对于计算机来说至关重要。The basic input and output system (Basic Input Output System, referred to as BIOS) is a set of programs that are solidified on the read-only memory (ROM) chip in the computer. It is the first program that the computer runs when it is turned on. BIOS The system stores the most important basic input and output programs in the computer, the self-test program after power on and the system self-starting program. Therefore, it is very important for the computer to test whether the BIOS system can run normally.

传统方法中,对BIOS系统进行自动测试时,需要先将实现自动测试的硬件电路与计算机设备进行连接,然后再通过这些硬件电路对计算机设备的BIOS系统进行自动化测试。In the traditional method, when automatically testing the BIOS system, it is necessary to first connect the hardware circuits for realizing the automatic testing with the computer equipment, and then perform the automatic testing on the BIOS system of the computer equipment through these hardware circuits.

然而,目前的BIOS自动化测试方法,在对BIOS系统进行测试时,需要外接硬件电路,因此,对硬件的依赖性较高,导致对BIOS系统进行测试的便捷性较低。However, the current BIOS automated testing method requires an external hardware circuit when testing the BIOS system. Therefore, it is highly dependent on hardware, resulting in low convenience for testing the BIOS system.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种能够提高BIOS系统测试便捷性的BIOS测试方法、装置、计算机设备、计算机可读存储介质和计算机程序产品。Based on this, it is necessary to provide a BIOS testing method, device, computer equipment, computer readable storage medium and computer program product that can improve the convenience of BIOS system testing in order to address the above technical problems.

第一方面,本申请提供了一种BIOS测试方法。该方法包括:In a first aspect, the present application provides a BIOS testing method. The method includes:

响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;In response to the test instruction of the BIOS system of the device to be tested, enter the BMC web interface corresponding to the BIOS system through the browser test tool;

在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;Control the cursor on the BMC web interface to modify the target BIOS setting options, and control the restart of the device under test based on the modified target BIOS setting options;

确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。Determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

本实施例中,通过响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;接着,确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果;即本申请中,通过浏览器测试工具连接待测设备的BMC网页界面,进而通过识别和控制BMC网页界面中的目标BIOS设置选项,以实现通过软件的形式来对待测设备的BIOS系统进行远程控制测试,在对BIOS系统进行测试的过程中,无需外接硬件电路,也无需人工参与,自动执行测试过程,能够大大提高BIOS测试的便捷性,进而能够提高BIOS的测试效率。In this embodiment, by responding to the test instruction of the BIOS system of the equipment to be tested, enter the BMC webpage interface corresponding to the BIOS system through the browser testing tool; Control the cursor on the BMC webpage interface to modify the target BIOS setting option, and based on the modification The final target BIOS setting option controls the device under test to restart; then, determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test; that is, this application In the test, the BMC web interface of the device under test is connected through the browser test tool, and then by identifying and controlling the target BIOS setting options in the BMC web interface, the BIOS system of the device under test can be remotely controlled and tested in the form of software. In the process of testing the BIOS system, there is no need for external hardware circuits or manual participation, and the automatic execution of the testing process can greatly improve the convenience of BIOS testing, thereby improving the efficiency of BIOS testing.

在其中一个实施例中,在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启,包括:In one of the embodiments, the cursor is controlled on the BMC web page interface to modify the target BIOS setting option, and the device under test is controlled to restart based on the modified target BIOS setting option, including:

从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息;Obtain the target BIOS setting option and the location information of the target BIOS setting option on the BMC web interface from the BMC web interface;

根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启。According to the position information of the target BIOS setting option on the BMC web interface, the cursor is controlled to modify the target BIOS setting option, and the device under test is controlled to restart based on the modified target BIOS setting option.

本实施例中,通过从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息;并根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;即在本实施例中,计算机设备通过自动识别目标BIOS设置选项和目标BIOS设置选项的具体位置,以此来控制光标对目标BIOS设置选项进行修改,能够提高目标BIOS设置选项修改的准确性,避免对其他参数选项进行修改,导致选项修改错误,进而能够提高BIOS自动测试的可靠性和准确性。In the present embodiment, by obtaining the target BIOS setting option and the position information of the target BIOS setting option on the BMC web interface from the BMC web interface; and according to the position information of the target BIOS setting option on the BMC web interface, the cursor is set to the target BIOS The option is modified, and based on the modified target BIOS setting option, the device under test is controlled to restart; that is, in this embodiment, the computer device automatically recognizes the target BIOS setting option and the specific position of the target BIOS setting option, so as to control the cursor to the target BIOS setting option. Modifying the target BIOS setting option can improve the accuracy of the target BIOS setting option modification, avoid modifying other parameter options, resulting in incorrect option modification, and thereby improve the reliability and accuracy of the BIOS automatic test.

在其中一个实施例中,从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息,包括:In one of the embodiments, obtaining the target BIOS setting option and the position information of the target BIOS setting option on the BMC web interface from the BMC web interface, including:

响应于对BMC网页界面中的输入输出设备选项的触发指令,通过浏览器测试工具进入该输入输出设备选项对应的控制界面;In response to the trigger instruction to the input and output device option in the BMC web interface, enter the control interface corresponding to the input and output device option through the browser testing tool;

获取控制界面对应的界面图像;Obtain the interface image corresponding to the control interface;

从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息。The target BIOS setting option and the position information of the target BIOS setting option on the control interface are obtained from the interface image.

本实施例中,通过响应于对BMC网页界面中的输入输出设备选项的触发指令,通过浏览器测试工具进入该输入输出设备选项对应的控制界面,接着,获取控制界面对应的界面图像,进一步从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息;即本实施例中通过自动打开输入输出设备选项进入控制界面,进而通过图像捕获和识别的方式确定待修改的目标BIOS设置选项,通过采用该方式,无需借助硬件电路,即可实现对BIOS设置选项的定位和修改,能够提高BIOS测试的便捷性,进而提高BIOS测试的测试效率。In this embodiment, by responding to the trigger instruction to the input-output device option in the BMC web page interface, the control interface corresponding to the input-output device option is entered through the browser test tool, and then, the interface image corresponding to the control interface is obtained, and further obtained from Obtain the target BIOS setting option and the position information of the target BIOS setting option on the control interface in the interface image; that is, enter the control interface by automatically opening the input and output device options in this embodiment, and then determine the target to be modified by image capture and recognition BIOS setting options, by adopting this method, the positioning and modification of the BIOS setting options can be realized without resorting to hardware circuits, which can improve the convenience of BIOS testing and further improve the testing efficiency of BIOS testing.

在其中一个实施例中,从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息,包括:In one of the embodiments, the position information of the target BIOS setting option and the target BIOS setting option on the control interface is obtained from the interface image, including:

从界面图像中获取BIOS设置区域图像,并从BIOS设置区域图像中识别BIOS设置选项;Obtaining the BIOS setting area image from the interface image, and identifying the BIOS setting option from the BIOS setting area image;

针对各BIOS设置选项,判断BIOS设置选项是否在预设BIOS设置选项集内;For each BIOS setting option, determine whether the BIOS setting option is in the preset BIOS setting option set;

在BIOS设置选项在预设BIOS设置选项集内的情况下,将BIOS设置选项作为目标BIOS设置选项,以及,将BIOS设置选项在控制界面上的位置信息作为目标BIOS设置选项在控制界面上的位置信息。When the BIOS setting option is in the preset BIOS setting option set, the BIOS setting option is used as the target BIOS setting option, and the position information of the BIOS setting option on the control interface is used as the position of the target BIOS setting option on the control interface information.

本实施例中,通过从界面图像中获取BIOS设置区域图像,并从BIOS设置区域图像中识别BIOS设置选项;接着,针对各BIOS设置选项,判断BIOS设置选项是否在预设BIOS设置选项集内;在BIOS设置选项在预设BIOS设置选项集内的情况下,将BIOS设置选项作为目标BIOS设置选项,以及,将BIOS设置选项在控制界面上的位置信息作为目标BIOS设置选项在控制界面上的位置信息;采用本实施例中的方法,能够预先从界面图像中锁定BIOS设置区域,进而从BIOS设置区域中获取目标BIOS设置选项,能够提高目标BIOS设置选项的获取效率。In this embodiment, by obtaining the BIOS setting area image from the interface image, and identifying the BIOS setting option from the BIOS setting area image; then, for each BIOS setting option, determine whether the BIOS setting option is in the preset BIOS setting option set; When the BIOS setting option is in the preset BIOS setting option set, the BIOS setting option is used as the target BIOS setting option, and the position information of the BIOS setting option on the control interface is used as the position of the target BIOS setting option on the control interface Information: By using the method in this embodiment, the BIOS setting area can be locked in advance from the interface image, and then the target BIOS setting options can be obtained from the BIOS setting area, which can improve the efficiency of obtaining the target BIOS setting options.

在其中一个实施例中,从界面图像中获取BIOS设置区域图像,包括:In one of the embodiments, the BIOS setting area image is obtained from the interface image, including:

从界面图像中获取至少一个连通域;obtaining at least one connected domain from the interface image;

根据各连通域的面积和预设判断条件,从各连通域中确定满足预设判断条件的目标连通域,并将目标连通域作为BIOS设置区域图像。According to the area of each connected domain and the preset judgment condition, a target connected domain satisfying the preset judgment condition is determined from each connected domain, and the target connected domain is used as a BIOS setting area image.

本实施例中,通过采用面积法从界面图像中获取BIOS设置区域图像,能够提高整个算法的适应性和鲁棒性。In this embodiment, the adaptability and robustness of the entire algorithm can be improved by using the area method to obtain the BIOS setting area image from the interface image.

在其中一个实施例中,根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,包括:In one of the embodiments, the cursor is controlled according to the position information of the target BIOS setting option on the BMC web interface to modify the target BIOS setting option, including:

通过界面测试工具根据目标BIOS设置选项在控制界面上的位置信息,控制光标移动至目标BIOS设置选项;Control the cursor to move to the target BIOS setting option according to the position information of the target BIOS setting option on the control interface through the interface testing tool;

通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面。Modify the parameter value corresponding to the target BIOS setting option to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option through the interface testing tool, so as to update the control interface to obtain the target control interface.

本实施例中,通过界面测试工具模拟鼠标键盘实现对BIOS设置的修改和控制,能够提高软件操作的可实施性,进而提高BIOS测试的便捷性和自动化测试效率。In this embodiment, the modification and control of the BIOS setting can be realized by simulating the mouse and keyboard through the interface testing tool, which can improve the implementability of the software operation, and further improve the convenience of the BIOS test and the efficiency of the automated test.

在其中一个实施例中,在通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面之后,还包括:In one of the embodiments, after the parameter value corresponding to the target BIOS setting option is modified to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option through the interface testing tool to update the control interface to obtain the target control interface, Also includes:

从目标控制界面中获取新的BIOS设置区域图像,并从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值;Obtain a new BIOS setting area image from the target control interface, and identify the current parameter value corresponding to the target BIOS setting option from the new BIOS setting area image;

判断目标BIOS设置选项对应的当前参数值是否与目标BIOS设置选项对应的预设参数值一致;Judging whether the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option;

在目标BIOS设置选项对应的当前参数值与目标BIOS设置选项对应的预设参数值一致的情况下,确定目标BIOS设置选项修改成功。If the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option, it is determined that the modification of the target BIOS setting option is successful.

本实施例中,在通过界面测试工具完成对目标BIOS设置选项的参数值的修改之后,从目标控制界面中获取新的BIOS设置区域图像,并从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值;判断目标BIOS设置选项对应的当前参数值是否与目标BIOS设置选项对应的预设参数值一致;进而,在确定目标BIOS设置选项对应的当前参数值与目标BIOS设置选项对应的预设参数值一致的情况下,确定目标BIOS设置选项修改成功;本实施例中通过对参数修改后的目标BIOS设置选项的参数值进行判断,确定其是否修改成功,能够提高参数修改的准确性和可靠性,进而提高BIOS测试的可靠性和准确性。In this embodiment, after the modification of the parameter value of the target BIOS setting option is completed by the interface testing tool, a new BIOS setting area image is obtained from the target control interface, and the target BIOS setting option is identified from the new BIOS setting area image. whether the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option; If the parameter values are consistent, it is determined that the target BIOS setting option has been modified successfully; in this embodiment, by judging the parameter value of the target BIOS setting option after parameter modification, it is determined whether the modification is successful, which can improve the accuracy and accuracy of parameter modification. Reliability, thereby improving the reliability and accuracy of BIOS testing.

第二方面,本申请还提供了一种BIOS测试装置。该装置包括:In a second aspect, the present application also provides a BIOS testing device. The unit includes:

响应模块,用于响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;The response module is used to respond to the test instruction of the BIOS system of the device to be tested, and enter the BMC web interface corresponding to the BIOS system through the browser test tool;

控制模块,用于在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;The control module is used to control the cursor on the BMC web interface to modify the target BIOS setting options, and control the restart of the device under test based on the modified target BIOS setting options;

测试模块,用于判断修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。The test module is used to judge whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

第三方面,本申请还提供了一种计算机设备。该计算机设备包括存储器和处理器,该存储器存储有计算机程序,该处理器执行所述计算机程序时实现上述第一方面中的BIOS测试方法的步骤。In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the BIOS testing method in the first aspect when executing the computer program.

第四方面,本申请还提供了一种计算机可读存储介质。该计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述第一方面中的BIOS测试方法的步骤。In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the steps of the BIOS testing method in the above-mentioned first aspect are implemented.

第五方面,本申请还提供了一种计算机程序产品,该计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述第一方面中的BIOS测试方法的步骤。In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, implements the steps of the BIOS testing method in the first aspect above.

上述BIOS测试方法、装置、计算机设备、存储介质和计算机程序产品,计算机设备响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;接着,确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。即本申请中,通过浏览器测试工具连接待测设备的BMC网页界面,进而通过识别和控制BMC网页界面中的目标BIOS设置选项,以实现通过软件的形式来对待测设备的BIOS系统进行远程控制测试,在对BIOS系统进行测试的过程中,无需外接硬件电路,也无需人工参与,自动执行测试过程,能够大大提高BIOS测试的便捷性,进而能够提高BIOS的测试效率。Above-mentioned BIOS test method, device, computer equipment, storage medium and computer program product, computer equipment responds to the test instruction of the BIOS system of the equipment to be tested, enters the corresponding BMC webpage interface of BIOS system through browser testing tool; On BMC webpage interface Control the cursor to modify the target BIOS setting option, and control the restart of the device under test based on the modified target BIOS setting option; then, determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting , to obtain the BIOS test result of the device under test. That is, in this application, the BMC web interface of the device under test is connected through a browser testing tool, and then by identifying and controlling the target BIOS setting option in the BMC web interface, to realize remote control of the BIOS system of the device under test in the form of software Testing, in the process of testing the BIOS system, there is no need for external hardware circuits or manual participation, and the testing process is automatically executed, which can greatly improve the convenience of BIOS testing, and thus improve the efficiency of BIOS testing.

附图说明Description of drawings

图1为一个实施例中BIOS测试方法的应用环境图;Fig. 1 is the application environment diagram of BIOS test method in an embodiment;

图2为一个实施例中BIOS测试方法的流程示意图;Fig. 2 is the schematic flow sheet of BIOS test method in an embodiment;

图3为另一个实施例中BIOS测试方法的流程示意图;Fig. 3 is the schematic flow chart of BIOS test method in another embodiment;

图4为另一个实施例中BIOS测试方法的流程示意图;Fig. 4 is the schematic flow chart of BIOS testing method in another embodiment;

图5为另一个实施例中BIOS测试方法的流程示意图;Fig. 5 is the schematic flow chart of BIOS testing method in another embodiment;

图6为另一个实施例中BIOS测试方法的流程示意图;Fig. 6 is the schematic flow chart of BIOS testing method in another embodiment;

图7为另一个实施例中BIOS测试方法的流程示意图;Fig. 7 is the schematic flow chart of BIOS test method in another embodiment;

图8为另一个实施例中BIOS测试方法的流程示意图;Fig. 8 is a schematic flow chart of a BIOS testing method in another embodiment;

图9为另一个实施例中BIOS测试方法的流程示意图;Fig. 9 is a schematic flow chart of a BIOS testing method in another embodiment;

图10为一个实施例中BIOS测试装置的结构框图;Fig. 10 is a structural block diagram of a BIOS testing device in an embodiment;

图11为一个实施例中计算机设备的内部结构图。Figure 11 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

首先,在具体介绍本申请实施例的技术方案之前,先对本申请实施例基于的技术背景或者技术演进脉络进行介绍。通常情况下,在对计算机设备的BIOS系统进行自动化测试时,需要在计算机设备外额外连接用于对BIOS系统进行测试的硬件电路,如目前所使用的智能测试系统集线器(Intelligent Test System Hub,ITS)技术,该ITS技术为BIOS自动化测试能够提供两大功能:1)Simulator(模拟器)键鼠模拟服务,以实现修改和控制BIOS设置等操作;2)提供Graphic Capturer(图形捕获器)图像采集服务,能够实现截取图像,并对图像进行识别的功能。First of all, before specifically introducing the technical solution of the embodiment of the present application, the technical background or technological evolution context of the embodiment of the present application is firstly introduced. Usually, when the BIOS system of a computer device is automatically tested, an additional hardware circuit for testing the BIOS system needs to be connected outside the computer device, such as the currently used Intelligent Test System Hub (Intelligent Test System Hub, ITS ) technology, the ITS technology can provide two major functions for BIOS automated testing: 1) Simulator (simulator) keyboard and mouse simulation service to realize operations such as modification and control of BIOS settings; 2) Provide Graphic Capturer (graphics capturer) image acquisition The service can realize the functions of intercepting images and recognizing them.

然而,ITS技术虽然拥有强大的模拟键鼠、图像采集和图像识别等功能,但这种方式却有以下几大缺点:However, although ITS technology has powerful functions such as analog keyboard and mouse, image acquisition and image recognition, this method has the following major disadvantages:

1)在硬件方面,需要强大的硬件进行支撑,在测试时,需要进行硬件电路的连接,对新手测试人员不友好;1) In terms of hardware, powerful hardware is required for support. During testing, hardware circuit connections are required, which is not friendly to novice testers;

2)在软件方面,采用类C语言,这种语言使用领域较少,若开发新的测试用例,难度较大;2) In terms of software, a C-like language is used, which is rarely used in fields, and it is difficult to develop new test cases;

3)在价格方面,目前基于该硬件电路搭建的测试设备主要由英特尔(Intel)设计完成,价格昂贵。3) In terms of price, the current test equipment based on the hardware circuit is mainly designed by Intel (Intel), which is expensive.

因此,结合传统方法的各个缺点和其功能,本申请提出了一套完全基于软件的BIOS自动化批量测试方法。Therefore, combining each shortcoming and its function of traditional method, the application proposes a set of BIOS automatic batch testing method based on software completely.

下面结合本申请实施例所应用的场景,对本申请实施例涉及的技术方案进行介绍。The technical solution involved in the embodiment of the present application will be introduced below in combination with the application scenarios of the embodiment of the present application.

本申请实施例提供的BIOS测试方法,可以应用于如图1所示的应用环境中。其中,计算机设备101通过网络与待测设备102连接,该计算机设备101可以作为对该待测设备102的BIOS系统进行自动化测试的测试设备,该计算机设备101可以通过纯软件形式远程控制待测设备102并对该待测设备102的BIOS系统进行自动化批量测试。其中,该计算机设备101可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。该待测设备102可以但不限于是各种安装有BIOS系统的终端设备或者服务器等。The BIOS testing method provided in the embodiment of the present application may be applied in the application environment shown in FIG. 1 . Wherein, the computer device 101 is connected with the device under test 102 through a network, and the computer device 101 can be used as a test device for automatically testing the BIOS system of the device under test 102, and the computer device 101 can remotely control the device under test through a pure software form 102 and perform an automated batch test on the BIOS system of the device under test 102. Among them, the computer device 101 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car equipment etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, and the like. The device under test 102 may be, but not limited to, various terminal devices or servers installed with a BIOS system.

在一个实施例中,如图2所示,提供了一种BIOS测试方法,以该方法应用于图1中的计算机设备为例进行说明,包括以下步骤:In one embodiment, as shown in Figure 2, a BIOS testing method is provided, and the method is applied to the computer equipment in Figure 1 as an example, including the following steps:

步骤201,响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面。Step 201 , in response to a test command of the BIOS system of the device to be tested, enter the BMC web interface corresponding to the BIOS system through a browser test tool.

其中,浏览器测试工具可以为Selenium工具,Selenium工具是一款采用Selenium技术实现的用于网页(Web)应用程序的自动化测试工具,Selenium技术是一个跨多平台(Linux、Windows等)并兼容多语言(python、Java等)的Web自动化测试技术。需要说明的是,本申请实施例对浏览器测试工具不做具体限定,只要该工具能够运行在浏览器中实现自动化测试即可,另外,该浏览器测试工具可以为基于任一种编程语言所开发的测试工具,本申请对此也不做具体限定。Wherein, the browser testing tool can be a Selenium tool, and the Selenium tool is an automated testing tool for a webpage (Web) application program implemented by using Selenium technology, and the Selenium technology is a multi-platform (Linux, Windows, etc.) Language (python, Java, etc.) web automation testing technology. It should be noted that the embodiment of the present application does not specifically limit the browser testing tool, as long as the tool can run in the browser to realize automated testing. In addition, the browser testing tool can be based on any programming language. The test tools developed are not specifically limited in this application.

可选地,可以通过浏览器测试工具实现BIOS系统对应的基板管理控制器(Baseboard Management Controller,BMC)网页界面的自动登录,其中,BMC网页界面也可以称之为BMC Web界面,即实现对BMC Web界面的自动登录,通过定位BMC网页相对应的网页(Web)元素,就能实现控制网页(Web)的自动登录。可选地,通过浏览器测试工具进入BIOS系统对应的BMC网页界面的流程可以包括:通过浏览器测试工具绑定计算机设备中的浏览器,并通过浏览器驱动自动打开该浏览器,接着,通过浏览器测试工具模拟输入待测设备的BIOS系统对应的BMC网页的登录账号和密码,并模拟点击登录以进入该待测设备的BIOS系统对应的BMC网页界面。Optionally, the automatic login of the baseboard management controller (Baseboard Management Controller, BMC) web interface corresponding to the BIOS system can be realized through a browser testing tool, wherein the BMC web interface can also be called the BMC Web interface, that is, to realize the BMC For the automatic login of the web interface, the automatic login of the control webpage (Web) can be realized by locating the corresponding webpage (Web) element of the BMC webpage. Optionally, the process of entering the corresponding BMC web interface of the BIOS system through the browser testing tool may include: binding the browser in the computer device through the browser testing tool, and automatically opening the browser through the browser driver, and then, through The browser testing tool simulates the login account number and password of the BMC web page corresponding to the BIOS system of the device under test, and simulates clicking on login to enter the BMC web page interface corresponding to the BIOS system of the device under test.

可选地,在借助计算机设备对待测设备的BIOS系统进行远程自动化测试时,可以先触发对待测设备的BIOS系统进行测试的测试操作,生成测试指令,例如:可以通过输入待测设备的BIOS系统对应的BMC网页的访问地址、登录账号和密码等参数,并点击开始测试控件,生成测试指令;接着,计算机设备响应该测试指令,通过调用浏览器测试工具以自动登录待测设备的BIOS系统对应的BMC网页,进入BIOS系统对应的BMC网页界面。Optionally, when the BIOS system of the device under test is used for remote automated testing by means of computer equipment, the test operation for testing the BIOS system of the device under test can be triggered first to generate test instructions, for example: by inputting the BIOS system of the device under test Corresponding parameters such as the access address of the BMC web page, login account and password, and click the start test control to generate a test command; then, the computer device responds to the test command, and automatically logs in to the BIOS system corresponding to the device under test by calling the browser test tool. Enter the BMC web interface corresponding to the BIOS system.

步骤202,在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启。Step 202: Control the cursor on the BMC web interface to modify the target BIOS setting options, and control the device under test to restart based on the modified target BIOS setting options.

其中,BIOS设置选项可以为BIOS Setup选项,该目标BIOS设置选项可以是预设的待测试的BIOS设置选项集(即BIOS Setup选项集)中的各个BIOS设置选项,在测试之前,可以先设置好需要测试的各个BIOS设置选项,以及各个BIOS设置选项对应到预设参数值。Wherein, the BIOS setting option can be a BIOS Setup option, and the target BIOS setting option can be each BIOS setting option in a preset BIOS setting option set to be tested (i.e. the BIOS Setup option set), before testing, it can be set earlier Each BIOS setting option that needs to be tested, and each BIOS setting option corresponds to a preset parameter value.

可选地,计算机设备在进入到待测设备的BIOS系统的BMC网页界面之后,可以通过软件实现模拟鼠标键盘功能,以控制该BMC网页界面中的光标移动并选择该预设的BIOS设置选项集中的目标BIOS设置选项,以及通过软件实现文字输入功能,根据所选择的目标BIOS设置选项对应到预设参数值,对所选择的目标BIOS设置选项的参数值进行修改,并保存修改。Optionally, after the computer device enters the BMC web interface of the BIOS system of the device under test, the simulated mouse and keyboard function can be realized by software to control the movement of the cursor in the BMC web interface and select the preset BIOS setting option set The target BIOS setting option of the selected target BIOS setting option, and realize the text input function through the software, correspond to the preset parameter value according to the selected target BIOS setting option, modify the parameter value of the selected target BIOS setting option, and save the modification.

需要说明的是,本实施例中所采用的软件测试方法可以实现批量测试,也就是说,可以一次性控制多个目标BIOS设置选项修改,以满足多个BIOS设置选项的批量测试。It should be noted that the software testing method adopted in this embodiment can realize batch testing, that is, it can control the modification of multiple target BIOS setting options at one time, so as to meet the batch testing of multiple BIOS setting options.

基于此,在针对预设的BIOS设置选项集中的各个目标BIOS设置选项,均完成对各目标BIOS设置选项的修改操作之后,基于各个修改后的目标BIOS设置选项控制待测设备重启。Based on this, after each target BIOS setting option in the preset BIOS setting option set has been modified for each target BIOS setting option, the device under test is controlled to restart based on each modified target BIOS setting option.

可选地,在进行批量测试时,还可以预先设置批量测试的BIOS设置选项数量,以控制计算机设备基于该预设的BIOS设置选项数量,从预设的BIOS设置选项集中选择当前次测试的多个目标BIOS设置选项,即多次执行批量测试,直至该预设的BIOS设置选项集中的BIOS设置选项被测试完成为止。例如:该批量测试的BIOS设置选项数量可以为10个,那么计算机设备在执行BIOS设置的批量测试时,按照顺序,每次从预设的BIOS设置选项集中确定待测试的10个目标BIOS设置选项,并对该10个目标BIOS设置选项进行修改测试。Optionally, when performing a batch test, the number of BIOS setting options for the batch test can also be preset, so as to control the computer device based on the preset number of BIOS setting options, and select the number of current tests from the preset BIOS setting option set. A target BIOS setting option, that is, execute the batch test multiple times until the BIOS setting options in the preset BIOS setting option set are tested. For example: the number of BIOS setting options for this batch test can be 10, then when the computer equipment performs the batch testing of BIOS settings, in order, each time determine 10 target BIOS setting options to be tested from the preset BIOS setting option set , and modify the 10 target BIOS setting options.

可选地,在进行批量测试时,还可以预设批量测试的多个目标BIOS设置选项,也就是说,用户可以任意选择想要测试的BIOS设置选项,以便计算机设备可以针对用户所选择的多个目标BIOS设置选项进行BIOS测试。本申请实施例对批量测试的测试方式不做具体限定。Optionally, when performing a batch test, multiple target BIOS setting options for the batch test can also be preset, that is to say, the user can arbitrarily select the BIOS setting option that the user wants to test, so that the computer device can be targeted at the multiple target BIOS settings selected by the user. A target BIOS setup option for BIOS testing. The embodiment of the present application does not specifically limit the test mode of the batch test.

步骤203,确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。Step 203, determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

可选地,计算机设备在控制待测设备重启之后,可以获取重启后的待测设备上的目标界面图像,进而,根据所获取到的目标界面图像确定修改后的目标BIOS设置选项所对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。Optionally, after the computer device controls the restart of the device under test, it can obtain the target interface image on the restarted device under test, and then determine the function corresponding to the modified target BIOS setting option according to the obtained target interface image Whether it can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

上述BIOS测试方法中,计算机设备通过响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;接着,确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果;即本申请中,通过浏览器测试工具连接待测设备的BMC网页界面,进而通过识别和控制BMC网页界面中的目标BIOS设置选项,以实现通过软件的形式来对待测设备的BIOS系统进行远程控制测试,在对BIOS系统进行测试的过程中,无需外接硬件电路,也无需人工参与,自动执行测试过程,能够大大提高BIOS测试的便捷性,进而能够提高BIOS的测试效率。In the above-mentioned BIOS testing method, the computer equipment enters the BMC webpage interface corresponding to the BIOS system through the browser testing tool by responding to the test instruction of the BIOS system of the equipment to be tested; the cursor is controlled on the BMC webpage interface to modify the target BIOS setting option, And control the device under test to restart based on the modified target BIOS setting option; then, determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test; That is, in this application, the BMC web interface of the device under test is connected through a browser testing tool, and then by identifying and controlling the target BIOS setting option in the BMC web interface, to realize remote control of the BIOS system of the device under test in the form of software Testing, in the process of testing the BIOS system, there is no need for external hardware circuits or manual participation, and the testing process is automatically executed, which can greatly improve the convenience of BIOS testing, and thus improve the efficiency of BIOS testing.

图3为另一个实施例中BIOS测试方法的流程示意图。本实施例涉及的是计算机设备在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启的一种可选的实现过程,在上述实施例的基础上,如图3所示,上述步骤202包括:Fig. 3 is a schematic flowchart of a BIOS testing method in another embodiment. This embodiment relates to an optional implementation process in which the computer device controls the cursor on the BMC web interface to modify the target BIOS setting options, and controls the restart of the device under test based on the modified target BIOS setting options. In the above-mentioned embodiment On the basis of, as shown in Figure 3, the above step 202 includes:

步骤301,从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息。Step 301 , acquiring target BIOS setting options and location information of the target BIOS setting options on the BMC web interface from the BMC web interface.

其中,BMC网页界面可以包括进入BMC网页后的初始界面,也可以包括基于该BMC网页的初始界面中的参数选项所进入的与该参数选项对应的界面;也就是说,该目标BIOS设置选项可以在BMC网页的初始界面,也可以在该BMC网页中的任一参数选项对应的界面,例如:该BMC网页界面中可以包括输入输出设备选项,该输入输出设备选项可以为用于控制键盘、视频、鼠标等输入输出设备的功能的选项,如键盘-视频-鼠标(Keyboard-Video-Mouse,KVM)选项,通过触发该输入输出设备选项可以进入输入输出设备选项对应的界面,如KVM界面,该KVM界面中也可以包括待修改的目标BIOS设置选项。Wherein, the BMC webpage interface can include the initial interface after entering the BMC webpage, and can also include an interface corresponding to the parameter option entered based on the parameter option in the initial interface of the BMC webpage; that is to say, the target BIOS setting option can be On the initial interface of the BMC web page, it can also be on the interface corresponding to any parameter option in the BMC web page, for example: the BMC web page interface can include input and output device options, and the input and output device options can be used to control the keyboard, video , mouse and other input and output device function options, such as keyboard-video-mouse (Keyboard-Video-Mouse, KVM) option, by triggering the input and output device option, you can enter the interface corresponding to the input and output device option, such as the KVM interface, the The target BIOS setting option to be modified may also be included in the KVM interface.

可选地,计算机设备在进入BMC网页界面之后,可以通过识别该BMC网页界面中的各个参数选项,并分别判断各参数选项是否为待修改的目标BIOS设置选项,并在确定出目标BIOS设置选项之后,进一步确定该目标BIOS设置选项在该BMC网页界面上的位置信息;可选地,目标BIOS设置选项在该BMC网页界面上的位置信息可以包括所在界面的标识、所在界面中的具体位置坐标等。Optionally, after the computer device enters the BMC web interface, it can identify each parameter option in the BMC web interface, and judge whether each parameter option is the target BIOS setting option to be modified, and determine the target BIOS setting option Afterwards, further determine the location information of the target BIOS setting option on the BMC web interface; Optionally, the location information of the target BIOS setting option on the BMC web interface can include the identifier of the interface, the specific location coordinates in the interface wait.

可选地,计算机设备可以获取BMC网页界面的界面图像,并通过图像识别算法或者文字识别算法,识别该BMC网页界面的界面图像中的各个参数选项;需要说明的是,计算机设备可以分别获取BMC网页的初始界面图像以及该BMC网页中的各个参数选项对应的界面图像等,从各界面图像中识别待修改的目标BIOS设置选项,以获取到多个目标BIOS设置选项以及各目标BIOS设置选项对应的位置信息,实现BIOS系统的批量参数测试。Optionally, the computer device can obtain the interface image of the BMC web interface, and identify each parameter option in the interface image of the BMC web interface through an image recognition algorithm or a text recognition algorithm; it should be noted that the computer device can respectively obtain the BMC The initial interface image of the web page and the interface image corresponding to each parameter option in the BMC web page, etc., identify the target BIOS setting option to be modified from each interface image, so as to obtain a plurality of target BIOS setting options and corresponding to each target BIOS setting option location information to realize batch parameter testing of the BIOS system.

步骤302,根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启。Step 302, controlling the cursor to modify the target BIOS setting option according to the position information of the target BIOS setting option on the BMC web interface, and controlling the restart of the device under test based on the modified target BIOS setting option.

可选地,计算机设备可以在获取到目标BIOS设置选项在BMC网页界面上的位置信息之后,基于该位置信息,通过软件模拟该计算机设备的鼠标键盘以控制光标移动至该目标BIOS设置选项位置处,进而,以选中目标BIOS设置选项,并对该目标BIOS设置选项进行修改;当然,计算机设备还可以在获取到所有的目标BIOS设置选项在BMC网页界面上的位置信息之后,再针对各目标BIOS设置选项,通过模拟鼠标键盘依次控制光标移动至各目标BIOS设置选项位置处,并分别对各目标BIOS设置选项进行修改。Optionally, after the computer device obtains the position information of the target BIOS setting option on the BMC web interface, based on the position information, the mouse and keyboard of the computer device can be simulated by software to control the cursor to move to the target BIOS setting option position , and further, to select the target BIOS setting option, and modify the target BIOS setting option; of course, the computer device can also target each target BIOS after obtaining the location information of all target BIOS setting options on the BMC web interface. Setting options, controlling the cursor to move to the position of each target BIOS setting option in sequence by simulating the mouse and keyboard, and modifying each target BIOS setting option respectively.

可选地,在修改目标BIOS设置选项的参数时,计算机设备可以根据该目标BIOS设置选项对应的预设参数值,将该目标BIOS设置选项的参数值修改为该预设参数值;进而,在计算机设备完成对所有目标BIOS设置选项的参数修改之后,模拟点击确认以进行保存,接着,可以控制待测设备重启,以使待测设备能够基于修改后的目标BIOS设置选项进行设备重启。Optionally, when modifying the parameter of the target BIOS setting option, the computer device can modify the parameter value of the target BIOS setting option to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option; After the computer device finishes modifying the parameters of all target BIOS setting options, it simulates clicking to confirm to save, and then, it can control the restart of the device under test, so that the device under test can restart the device based on the modified target BIOS setting options.

本实施例中,计算机设备通过从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息;并根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;即在本实施例中,计算机设备通过自动识别目标BIOS设置选项和目标BIOS设置选项的具体位置,以此来控制光标对目标BIOS设置选项进行修改,能够提高目标BIOS设置选项修改的准确性,避免对其他参数选项进行修改,导致选项修改错误,进而能够提高BIOS自动测试的可靠性和准确性。In this embodiment, the computer device obtains the position information of the target BIOS setting option and the target BIOS setting option on the BMC web interface from the BMC web interface; and controls the cursor to the target according to the position information of the target BIOS setting option on the BMC web interface. The BIOS setting option is modified, and the device under test is controlled to restart based on the modified target BIOS setting option; that is, in this embodiment, the computer device automatically identifies the target BIOS setting option and the specific location of the target BIOS setting option to control The cursor modifies the target BIOS setting option, which can improve the accuracy of the modification of the target BIOS setting option, avoid modifying other parameter options, and cause option modification errors, thereby improving the reliability and accuracy of the BIOS automatic test.

图4为另一个实施例中BIOS测试方法的流程示意图。本实施例涉及的是计算机设备从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息的一种可选的实现过程,在上述实施例的基础上,如图4所示,上述步骤301包括:Fig. 4 is a schematic flowchart of a BIOS testing method in another embodiment. What this embodiment relates to is a kind of optional realization process that computer equipment acquires the target BIOS setting option and the location information of the target BIOS setting option on the BMC web interface from the BMC web interface. On the basis of the above-mentioned embodiments, as shown in FIG. 4, the above step 301 includes:

步骤401,响应于对BMC网页界面中的输入输出设备选项的触发指令,通过浏览器测试工具进入该输入输出设备选项对应的控制界面。Step 401, in response to a trigger instruction for the input and output device option in the BMC web interface, enter the control interface corresponding to the input and output device option through the browser testing tool.

其中,输入输出设备选项可以是BMC网页界面中打开KVM界面的功能选项,KVM功能是让系统管理员可以通过一组键盘、视频、鼠标控制多台服务器或电脑主机的计算机外围设备。打开输入输出设备选项,即可进入输入输出设备选项对应的控制界面,也就是KVM控制界面,该控制界面中包括BIOS设置界面区域,BIOS设置界面区域中包括多个BIOS设置选项。Wherein, the input and output device option can be the function option of opening the KVM interface in the BMC web interface. The KVM function is to allow the system administrator to control the computer peripherals of multiple servers or computer hosts through a group of keyboards, videos, and mice. Open the input and output device option to enter the control interface corresponding to the input and output device option, that is, the KVM control interface. The control interface includes the BIOS setting interface area, and the BIOS setting interface area includes multiple BIOS setting options.

可选地,本实施例中,可以通过浏览器测试工具模拟点击输入输出设备选项,以打开输入输出设备功能,进入输入输出设备选项对应的控制界面;即在通过浏览器测试工具模拟触发BMC网页界面中的输入输出设备选项之后,计算机设备响应于对该输入输出设备选项的触发指令,打开输入输出设备选项对应的控制界面。Optionally, in this embodiment, the input and output device option can be clicked through the browser testing tool simulation to open the input and output device function and enter the corresponding control interface of the input and output device option; After selecting the input and output device options in the interface, the computer device opens the control interface corresponding to the input and output device options in response to a trigger instruction for the input and output device options.

步骤402,获取控制界面对应的界面图像。Step 402, acquiring an interface image corresponding to the control interface.

可选地,本实施例中可以通过Python图像处理库(Python Imaging Library,PIL)模块来获取控制界面对应的界面图像,其中,Python图像处理库模块是一个图像领域常用的模块,能够实现较多的图像操作,例如,图像采集操作;本实施例中可以通过Python图像处理库模块中的ImageGrab函数来获取控制界面对应的界面图像。Optionally, in this embodiment, the interface image corresponding to the control interface can be obtained through the Python Image Processing Library (Python Imaging Library, PIL) module, wherein the Python Image Processing Library module is a commonly used module in the image field, which can realize more Image operation, for example, image acquisition operation; in this embodiment, the interface image corresponding to the control interface can be acquired through the ImageGrab function in the Python image processing library module.

步骤403,从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息。Step 403, acquiring the target BIOS setting option and the location information of the target BIOS setting option on the control interface from the interface image.

其中,目标BIOS设置选项可以是BMC测试过程中预设的BIOS设置选项。Wherein, the target BIOS setting option may be a preset BIOS setting option during the BMC test.

可选地,本实施例中可以通过开发式的计算机视觉(Open Computer Vision,OpenCV)工具对界面图像进行处理,并从界面图像中识别出目标BIOS设置选项以及目标BIOS设置选项在控制界面上的位置信息。其中,OpenCV工具是一个跨平台的图像处理和机器学习开源库,其内部集成了众多传统的图像算法,如图像二值化、灰度化以及形态学等优秀的图像处理操作。Optionally, in this embodiment, an open computer vision (Open Computer Vision, OpenCV) tool may be used to process the interface image, and identify the target BIOS setting option and the position of the target BIOS setting option on the control interface from the interface image. location information. Among them, the OpenCV tool is a cross-platform image processing and machine learning open source library, which integrates many traditional image algorithms, such as image binarization, grayscale and morphology, and other excellent image processing operations.

示例性地,可以通过OpenCV工具对界面图像中的各个选项进行区域识别,接着,可以通过光学字符识别(Optical Character Recognition,OCR)库对各个区域中的文字进行识别,确定出目标BIOS设置选项,以及目标BIOS设置选项对应的区域在控制界面上的位置信息,作为目标BIOS设置选项在控制界面上的位置信息。Exemplarily, the OpenCV tool can be used to perform area recognition on each option in the interface image, and then, the text in each area can be identified through an optical character recognition (Optical Character Recognition, OCR) library to determine the target BIOS setting option, And the position information of the area corresponding to the target BIOS setting option on the control interface is used as the position information of the target BIOS setting option on the control interface.

本实施例中,计算机设备通过响应于对BMC网页界面中的输入输出设备选项的触发指令,通过浏览器测试工具进入该输入输出设备选项对应的控制界面,接着,获取控制界面对应的界面图像,进一步从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息;即本实施例中通过自动打开输入输出设备选项进入控制界面,进而通过图像捕获和识别的方式确定待修改的目标BIOS设置选项,通过采用该方式,无需借助硬件电路,即可实现对BIOS设置选项的定位和修改,能够提高BIOS测试的便捷性,进而提高BIOS测试的测试效率。In this embodiment, the computer device enters the control interface corresponding to the input and output device option through the browser testing tool by responding to the trigger instruction to the input and output device option in the BMC web page interface, and then obtains the corresponding interface image of the control interface, Further obtain the target BIOS setting option and the position information of the target BIOS setting option on the control interface from the interface image; that is, enter the control interface by automatically opening the input and output device option in the present embodiment, and then determine to be modified by means of image capture and recognition By adopting this method, the positioning and modification of the BIOS setting options can be realized without resorting to hardware circuits, which can improve the convenience of BIOS testing and further improve the testing efficiency of BIOS testing.

图5为另一个实施例中BIOS测试方法的流程示意图。本实施例涉及的是计算机设备从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息的一种可选的实现过程,在上述实施例的基础上,如图5所示,上述步骤403包括:Fig. 5 is a schematic flowchart of a BIOS testing method in another embodiment. This embodiment relates to an optional implementation process for a computer device to obtain the target BIOS setting option and the position information of the target BIOS setting option on the control interface from the interface image. On the basis of the above embodiment, as shown in FIG. 5 As shown, the above step 403 includes:

步骤501,从界面图像中获取BIOS设置区域图像,并从BIOS设置区域图像中识别BIOS设置选项。Step 501, acquire a BIOS setting area image from an interface image, and identify BIOS setting options from the BIOS setting area image.

其中,输入输出设备选项对应的控制界面中包括BIOS设置界面区域。Wherein, the control interface corresponding to the input and output device options includes a BIOS setting interface area.

可选地,在通过OpenCV工具对界面图像进行处理的过程中,可以先通过OpenCV工具从输入输出设备选项对应的界面图像中获取BIOS设置区域图像,进而再从所获取到的BIOS设置区域图像中识别BIOS设置选项。可选地,计算机设备可以采用面积法从界面图像中获取BIOS设置区域图像,即从界面图像中获取至少一个连通域,并确定各连通域的面积,接着,根据各连通域的面积和预设判断条件,从各连通域中确定满足预设判断条件的目标连通域,并将目标连通域作为BIOS设置区域图像;其中,该预设判断条件用于从界面图像中的各个区域中筛选出BIOS设置所在的区域,在实际应用中,可以根据控制界面中的各个区域的面积大小关系,确定该预设判断条件;例如:该预设判断条件可以为面积最大,也可以为按照大小排序后的预设排序位置。本实施例中,通过采用面积法获取BIOS设置区域图像,能够提高整个算法的适应性和鲁棒性。Optionally, in the process of processing the interface image through the OpenCV tool, the BIOS setting area image can be obtained from the interface image corresponding to the input and output device options through the OpenCV tool, and then from the obtained BIOS setting area image Identify BIOS setup options. Optionally, the computer device can use the area method to obtain the BIOS setting area image from the interface image, that is, obtain at least one connected domain from the interface image, and determine the area of each connected domain, and then, according to the area of each connected domain and the preset The judgment condition is to determine the target connected domain satisfying the preset judgment condition from each connected domain, and use the target connected domain as the BIOS setting area image; wherein, the preset judgment condition is used to screen out the BIOS from each area in the interface image. Set the area where the area is located. In practical applications, the preset judgment condition can be determined according to the size relationship of each area in the control interface; for example, the preset judgment condition can be the largest area, or sorted by size. Default sort position. In this embodiment, the adaptability and robustness of the entire algorithm can be improved by using the area method to obtain the image of the BIOS setting area.

示例性地,在通过OpenCV工具从界面图像中获取BIOS设置区域图像时,可以先采用OpenCV工具中的threshold函数对获取的界面图像进行二值化处理,接着,通过OpenCV工具中的findContours函数和rectangle函数来执行面积法判断操作,即通过BIOS设置区域图像的面积在整个界面图像中所有区域分块中的大小,来确定BIOS设置区域图像的位置,并从界面图像中裁剪出BIOS设置区域图像;进一步地,对于裁剪得到的BIOS设置区域图像,还可以采用OpenCV工具中的resize函数对裁剪得到的BIOS设置区域图像进行放大处理,有利于后续从BIOS设置区域图像中识别各个目标BIOS设置选项,提高目标BIOS设置选项的识别准确性和完整性。Exemplarily, when using the OpenCV tool to obtain the BIOS setting area image from the interface image, the threshold function in the OpenCV tool can be used to binarize the acquired interface image, and then, through the findContours function and the rectangle in the OpenCV tool function to perform the area method judgment operation, that is, determine the position of the BIOS setting area image by the size of the area of the BIOS setting area image in all area blocks in the entire interface image, and cut out the BIOS setting area image from the interface image; Further, for the BIOS setting area image obtained by cutting, the resize function in the OpenCV tool can also be used to enlarge the BIOS setting area image obtained by cutting, which is conducive to identifying each target BIOS setting option from the BIOS setting area image and improving Identification accuracy and completeness of target BIOS setup options.

可选地,在从BIOS设置区域图像中识别BIOS设置选项时,在BIOS设置区域图像为彩色图像的情况下,可以通过OpenCV工具中的threshold函数对该BIOS设置区域图像进行二值化处理;另外,由于图像在二值化处理过程时,可能存在一些离散的杂点(即噪声点),也可以采用图像中的形态学开闭运算来实现去噪,即通过形态学开闭运算对二值化后的BIOS设置区域图像进行去噪处理,得到高质量的清晰BIOS设置区域图像,为后续的OCR识别提供保证,有利于提高BIOS设置选项的识别准确性和识别完整性。Optionally, when identifying the BIOS setting option from the BIOS setting area image, in the case that the BIOS setting area image is a color image, the BIOS setting area image can be binarized by the threshold function in the OpenCV tool; in addition , since there may be some discrete noise points (i.e. noise points) in the image during the binarization process, the morphological opening and closing operation in the image can also be used to achieve denoising, that is, the binary The image of the optimized BIOS setting area is denoised to obtain a high-quality and clear image of the BIOS setting area, which provides a guarantee for the subsequent OCR recognition and is conducive to improving the recognition accuracy and integrity of the BIOS setting options.

进一步地,在完成上述对BIOS设置区域图像的一系列图像处理操作之后,可以采用tesseract库来完成对BIOS设置区域图像中相应文字的识别,以得到多个BIOS设置选项;其中,tesseract库是一个OCR库,是目前公认的优秀和精确的开源OCR库,该库可识别多种语言,包括英语和汉语。需要说明的是,在识别BIOS设置选项文字时,也可以根据BIOS设置的字体特点,专门训练用于识别该类字体特点的深度学习网络,例如:连接文本建议网络(Connectionist Text Proposal Network,简称CTPN)、卷积循环神经网络(ConvolutionalRecurrent Neural Network,简称CRNN)等文本检测网络,本申请实施例对此并不做具体限定。Further, after completing the above-mentioned series of image processing operations on the image of the BIOS setting area, the tesseract library can be used to complete the recognition of the corresponding characters in the image of the BIOS setting area, so as to obtain multiple BIOS setting options; wherein, the tesseract library is a The OCR library is currently recognized as an excellent and accurate open source OCR library, which can recognize multiple languages, including English and Chinese. It should be noted that, when recognizing the BIOS setting option text, it is also possible to specially train a deep learning network for recognizing the font characteristics according to the font characteristics set by the BIOS, for example: Connectionist Text Proposal Network (CTPN for short) ), convolutional recurrent neural network (Convolutional Recurrent Neural Network, CRNN for short) and other text detection networks, which are not specifically limited in this embodiment of the present application.

步骤502,针对各BIOS设置选项,判断BIOS设置选项是否在预设BIOS设置选项集内。Step 502, for each BIOS setting option, determine whether the BIOS setting option is in the preset BIOS setting option set.

其中,该预设BIOS设置选项集中可以包括多个待修改的BIOS设置选项,也即对BIOS进行测试过程中需要进行参数修改的BIOS设置选项。Wherein, the set of preset BIOS setting options may include multiple BIOS setting options to be modified, that is, BIOS setting options whose parameters need to be modified during the BIOS testing process.

步骤503,在BIOS设置选项在预设BIOS设置选项集内的情况下,将BIOS设置选项作为目标BIOS设置选项,以及,将BIOS设置选项在控制界面上的位置信息作为目标BIOS设置选项在控制界面上的位置信息。Step 503, when the BIOS setting option is in the preset BIOS setting option set, use the BIOS setting option as the target BIOS setting option, and use the position information of the BIOS setting option on the control interface as the target BIOS setting option on the control interface location information on .

本实施例中,计算机设备通过从界面图像中获取BIOS设置区域图像,并从BIOS设置区域图像中识别BIOS设置选项;接着,针对各BIOS设置选项,判断BIOS设置选项是否在预设BIOS设置选项集内;在BIOS设置选项在预设BIOS设置选项集内的情况下,将BIOS设置选项作为目标BIOS设置选项,以及,将BIOS设置选项在控制界面上的位置信息作为目标BIOS设置选项在控制界面上的位置信息;采用本实施例中的方法,能够预先从界面图像中锁定BIOS设置区域,进而从BIOS设置区域中获取目标BIOS设置选项,能够提高目标BIOS设置选项的获取效率。In this embodiment, the computer device obtains the BIOS setting area image from the interface image, and recognizes the BIOS setting option from the BIOS setting area image; then, for each BIOS setting option, it is judged whether the BIOS setting option is in the preset BIOS setting option set In the case that the BIOS setting option is in the preset BIOS setting option set, the BIOS setting option is used as the target BIOS setting option, and the position information of the BIOS setting option on the control interface is used as the target BIOS setting option on the control interface location information; adopt the method in this embodiment, can lock the BIOS setting area from the interface image in advance, and then obtain the target BIOS setting option from the BIOS setting area, can improve the acquisition efficiency of the target BIOS setting option.

图6为另一个实施例中BIOS测试方法的流程示意图。本实施例涉及的是计算机设备根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改的一种可选的实现过程,在上述实施例的基础上,如图6所示,上述步骤302包括:Fig. 6 is a schematic flowchart of a BIOS testing method in another embodiment. What this embodiment relates to is a kind of optional implementation process that the computer equipment controls the cursor to revise the target BIOS setting option according to the position information of the target BIOS setting option on the BMC web page interface, on the basis of the above-mentioned embodiment, as shown in Figure 6 As shown, the above step 302 includes:

步骤601,通过界面测试工具根据目标BIOS设置选项在控制界面上的位置信息,控制光标移动至目标BIOS设置选项。Step 601, control the cursor to move to the target BIOS setting option according to the position information of the target BIOS setting option on the control interface through the interface testing tool.

步骤602,通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面。Step 602: Modify the parameter value corresponding to the target BIOS setting option to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option through the interface testing tool, so as to update the control interface to obtain the target control interface.

其中,该界面测试工具可以为Pyautogui工具,Pyautogui工具是一个基于Python语言的图形用户界面(Graphical User Interface,GUI)自动化工具,支持多平台,通过Pyautogui工具可以让程序自动控制鼠标和键盘等一系列操作来达到自动化测试的目的。需要说明的是,本申请实施例对界面测试工具不做具体限定,只要该工具能够自动实现界面相关操作即可,另外,该界面测试工具可以为基于任一种编程语言所开发的测试工具,本申请对此也不做具体限定。Wherein, the interface testing tool can be a Pyautogui tool, and the Pyautogui tool is a graphical user interface (Graphical User Interface, GUI) automation tool based on the Python language, which supports multiple platforms, and a series of programs such as a mouse and a keyboard can be automatically controlled by the Pyautogui tool. Operation to achieve the purpose of automated testing. It should be noted that the embodiment of the present application does not specifically limit the interface testing tool, as long as the tool can automatically realize interface-related operations. In addition, the interface testing tool can be a testing tool developed based on any programming language. This application does not specifically limit it.

本实施例中,通过界面测试工具可以实现以下两个主要功能:(1)模拟键盘按键寻找需要设置的目标BIOS设置选项;(2)修改相应的目标BIOS设置选项的参数值。可选地,实现这两个功能可以采用pyautogui工具中的press函数和typewrite函数,其中,press函数主要用于控制BIOS设置的选中条上下移、左右移以及确定键,即选中目标BIOS设置选项,typewrite函数主要用于在测试过程中输入需要测试的文字,即修改目标BIOS设置选项的参数值。In this embodiment, the following two main functions can be realized through the interface testing tool: (1) simulate keyboard keys to find the target BIOS setting option to be set; (2) modify the parameter value of the corresponding target BIOS setting option. Optionally, the press function and typewrite function in the pyautogui tool can be used to realize these two functions, wherein the press function is mainly used to control the up and down, left and right movement of the selected bar of the BIOS setting and the OK key, that is, to select the target BIOS setting option, The typewrite function is mainly used to input the text to be tested during the test, that is, to modify the parameter value of the target BIOS setting option.

计算机设备通过界面测试工具根据目标BIOS设置选项在控制界面上的位置信息,控制光标移动至目标BIOS设置选项;以及通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面;即本实施例中,通过界面测试工具模拟鼠标键盘实现对BIOS设置的修改和控制,能够提高软件操作的可实施性,进而提高BIOS测试的便捷性和自动化测试效率。The computer device controls the cursor to move to the target BIOS setting option according to the position information of the target BIOS setting option on the control interface through the interface testing tool; and sets the target BIOS setting option according to the preset parameter value corresponding to the target BIOS setting option through the interface testing tool Corresponding parameter values are modified to preset parameter values to update the control interface to obtain the target control interface; that is, in this embodiment, the modification and control of the BIOS settings can be realized by simulating the mouse and keyboard through the interface test tool, which can improve the implementability of the software operation , thereby improving the convenience of BIOS testing and the efficiency of automated testing.

图7为另一个实施例中BIOS测试方法的流程示意图。本实施例涉及的是计算机设备对目标BIOS设置选项的参数值进行修改后进一步验证其是否修改成功的一种可选的实现过程,在上述实施例的基础上,如图7所示,上述步骤602之后还包括:Fig. 7 is a schematic flowchart of a BIOS testing method in another embodiment. This embodiment relates to an optional implementation process for a computer device to further verify whether the modification is successful after modifying the parameter value of the target BIOS setting option. On the basis of the above embodiment, as shown in FIG. 7, the above steps After 602 also includes:

步骤701,从目标控制界面中获取新的BIOS设置区域图像,并从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值。Step 701, acquire a new BIOS setting area image from the target control interface, and identify the current parameter value corresponding to the target BIOS setting option from the new BIOS setting area image.

可选地,计算机设备在通过界面测试工具对目标BIOS设置选项的参数值进行修改之后,保存参数修改,也就相当于更新了控制界面;基于此,计算机设备可以通过PIL工具重新获取更新后的目标控制界面对应的新的界面图像,接着,通过OpenCV工具从新的界面图像中获取新的BIOS设置区域图像,以及通过tesseract库从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值;其具体实现手段可以参照上述步骤501中的相关内容描述,在此不再赘述。Optionally, after the computer device modifies the parameter value of the target BIOS setting option through the interface testing tool, it saves the parameter modification, which is equivalent to updating the control interface; based on this, the computer device can reacquire the updated A new interface image corresponding to the target control interface, then, obtain a new BIOS setting area image from the new interface image through the OpenCV tool, and identify the current parameter value corresponding to the target BIOS setting option from the new BIOS setting area image through the tesseract library; Its specific implementation means can refer to the relevant content description in the above step 501, which will not be repeated here.

步骤702,判断目标BIOS设置选项对应的当前参数值是否与目标BIOS设置选项对应的预设参数值一致。Step 702, judging whether the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option.

也就是说,判断目标BIOS设置选项对应的修改后的参数值是否与预设参数值一致,这里,可以通过判断目标BIOS设置选项对应的当前参数值与该目标BIOS设置选项对应的预设参数值是否相同,来确定两者是否一致。That is to say, it is determined whether the modified parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value. Here, the current parameter value corresponding to the target BIOS setting option can be judged to be the preset parameter value corresponding to the target BIOS setting option Whether they are the same, to determine whether the two are consistent.

步骤703,在目标BIOS设置选项对应的当前参数值与目标BIOS设置选项对应的预设参数值一致的情况下,确定目标BIOS设置选项修改成功。Step 703 , if the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option, determine that the modification of the target BIOS setting option is successful.

可选地,在目标BIOS设置选项对应的当前参数值和预设参数值相同的情况下,可以确定两者一致,也就说明该目标BIOS设置选项修改成功;相反的,在目标BIOS设置选项对应的当前参数值和预设参数值不相同的情况下,可以确定目标BIOS设置选项修改失败。Optionally, when the current parameter value corresponding to the target BIOS setting option is the same as the preset parameter value, it can be determined that the two are consistent, which means that the target BIOS setting option has been successfully modified; on the contrary, if the target BIOS setting option corresponds to If the current parameter value and the preset parameter value are not the same, it can be determined that the modification of the target BIOS setting option has failed.

进一步地,基于本实施例,计算机设备可以在确定各目标BIOS设置选项均修改成功的情况下,基于修改后的各目标BIOS设置选项对待测设备进行重启。Further, based on this embodiment, the computer device may restart the device under test based on the modified target BIOS setting options when it is determined that all target BIOS setting options have been successfully modified.

本实施例中,计算机设备在通过界面测试工具完成对目标BIOS设置选项的参数值的修改之后,接着,从目标控制界面中获取新的BIOS设置区域图像,并从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值;判断目标BIOS设置选项对应的当前参数值是否与目标BIOS设置选项对应的预设参数值一致;进而,在确定目标BIOS设置选项对应的当前参数值与目标BIOS设置选项对应的预设参数值一致的情况下,确定目标BIOS设置选项修改成功;本实施例中通过对参数修改后的目标BIOS设置选项的参数值进行判断,确定其是否修改成功,能够提高参数修改的准确性和可靠性,进而提高BIOS测试的可靠性和准确性。In this embodiment, after the computer device completes the modification of the parameter value of the target BIOS setting option through the interface testing tool, then, obtains a new BIOS setting area image from the target control interface, and identifies the target from the new BIOS setting area image The current parameter value corresponding to the BIOS setup option; whether the current parameter value corresponding to the target BIOS setup option is consistent with the preset parameter value corresponding to the target BIOS setup option; In the case where the preset parameter values corresponding to the options are consistent, it is determined that the target BIOS setting option is modified successfully; in this embodiment, by judging the parameter value of the target BIOS setting option after parameter modification, it is determined whether the modification is successful, which can improve the parameter modification. The accuracy and reliability of the BIOS test, thereby improving the reliability and accuracy of the BIOS test.

在一个实施例中,提供了一种BIOS测试方法的完整流程,该流程可以通过四个主要模块来实现,包括:模块1:通过Selenium工具实现BMC网页界面(即BMC Web界面)的自动登录和输入输出设备选项(即KVM选项)的自动打开;模块2:通过Pyautogui工具模拟鼠标键盘通过KVM实现修改和控制BIOS Setup选项;模块3:通过PIL工具和OpenCV工具完成KVM界面图像的获取和KVM界面图像的预处理,为后续的BIOS文字识别获得更好的效果;模块4:将预处理后的图像,即BIOS Setup区域图像,通过tesseract工具来实现BIOS Setup文字的识别,最后将识别后的值和期望的值进行对比;在确定修改成功后,即可控制待测设备重启,实现对待测设备的BIOS系统的自动化测试。具体地,该BIOS测试方法包括:In one embodiment, a kind of complete process of BIOS test method is provided, and this process can be realized by four main modules, including: Module 1: realize the automatic login and the automatic login of BMC webpage interface (being BMC Web interface) by Selenium tool The automatic opening of the input and output device options (that is, the KVM option); Module 2: Simulate the mouse and keyboard through the Pyautogui tool to modify and control the BIOS Setup option through KVM; Module 3: Complete the acquisition of the KVM interface image and the KVM interface through the PIL tool and the OpenCV tool Image preprocessing, to obtain better results for the subsequent BIOS text recognition; module 4: use the preprocessed image, that is, the BIOS Setup area image, to recognize the BIOS Setup text through the tesseract tool, and finally convert the recognized value Compare with the expected value; after confirming that the modification is successful, the device under test can be controlled to restart, and the automatic test of the BIOS system of the device under test can be realized. Specifically, the BIOS testing method includes:

步骤1,采用Selenium工具实现BMC Web界面的自动登录和KVM选项的自动打开。Step 1, use Selenium tool to realize automatic login of BMC web interface and automatic opening of KVM option.

该步骤的具体流程可以参照图8所示,可以包括:通过Selenium工具绑定浏览器,且Selenium工具可以通过浏览器驱动来自动打开浏览器,接着,通过Selenium工具模拟输入待测设备对应的进入BMC Web界面的账号和密码,并模拟点击登录以进入BMC Web界面,再接着,通过Selenium工具模拟点击KVM选项,打开KVM,进入KVM控制界面。The specific flow of this step can be shown in Fig. 8 with reference to, can comprise: bind browser by Selenium tool, and Selenium tool can be driven by browser to automatically open browser, then, simulate input device under test corresponding entry by Selenium tool The account number and password of the BMC Web interface, and simulate clicking to log in to enter the BMC Web interface, and then simulate clicking the KVM option through the Selenium tool to open KVM and enter the KVM control interface.

步骤2,通过PIL工具和OpenCV工具获取KVM界面图像,并从KVM界面图像中获取BIOS Setup区域图像,通过tesseract工具识别BIOS Setup区域图像中的文字,获取目标BIOS Setup选项和对应的位置信息。Step 2, obtain the KVM interface image through the PIL tool and the OpenCV tool, and obtain the BIOS Setup area image from the KVM interface image, identify the text in the BIOS Setup area image through the tesseract tool, and obtain the target BIOS Setup option and corresponding location information.

该步骤的具体流程可以参照图9所示,可以包括:通过PIL工具获取整个KVM控制界面的图像,得到KVM界面图像,通过OpenCV模块中的threshold函数对KVM界面图像进行二值化处理,采用面积法从KVM界面图像中获取BIOS Setup区域图像,接着,通过OpenCV中的resize函数对BIOS Setup区域图像进行放大处理,以及对放大后的BIOS Setup区域图像进行二值化和数学形态学去噪处理,得到预处理后的BIOS Setup区域图像。The specific flow of this step can be shown in Fig. 9 with reference to, can comprise: obtain the image of whole KVM control interface by PIL tool, obtain KVM interface image, carry out binarization processing to KVM interface image by the threshold function in OpenCV module, adopt area The method obtains the BIOS Setup area image from the KVM interface image, and then, through the resize function in OpenCV, the BIOS Setup area image is enlarged, and the enlarged BIOS Setup area image is binarized and mathematically morphologically denoised. Obtain the preprocessed image of the BIOS Setup area.

步骤3,通过Pyautogui工具模拟鼠标键盘,根据目标BIOS Setup选项的位置信息,控制目标BIOS Setup选项进行参数修改。Step 3, simulate the mouse and keyboard through the Pyautogui tool, and control the target BIOS Setup option to modify parameters according to the position information of the target BIOS Setup option.

具体地,通过Pyautogui工具中的press函数控制BIOS Setup的选中条上下移动、左右移动以及确定键选择,以选择目标BIOS Setup选项,接着,通过typewrite函数修改目标BIOS Setup选项的参数值为预设参数值。Specifically, through the press function in the Pyautogui tool, the selected bar of BIOS Setup is controlled to move up and down, move left and right, and select the OK key to select the target BIOS Setup option. Then, modify the parameter value of the target BIOS Setup option through the typewrite function to be a preset parameter value.

步骤4,通过PIL工具和OpenCV工具重新获取KVM界面图像,并从新的KVM界面图像中获取新的BIOS Setup区域图像,以及通过tesseract工具识别新的BIOS Setup区域图像中的目标BIOS Setup选项的当前参数值。Step 4, reacquire the KVM interface image through the PIL tool and the OpenCV tool, and obtain the new BIOS Setup area image from the new KVM interface image, and identify the current parameters of the target BIOS Setup option in the new BIOS Setup area image through the tesseract tool value.

步骤5,对比目标BIOS Setup选项的当前参数值和目标BIOS Setup选项的预设参数值,若一致,则说明参数修改成功,BIOS Setup选项的相应功能正常,反之则不正常。Step 5. Compare the current parameter value of the target BIOS Setup option with the preset parameter value of the target BIOS Setup option. If they are consistent, the parameter modification is successful, and the corresponding function of the BIOS Setup option is normal. Otherwise, it is not normal.

步骤6,基于修改后的目标BIOS Setup选项控制待测设备重启,判断修改后的目标BIOS Setup选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。Step 6, control the device under test to restart based on the modified target BIOS Setup option, judge whether the function corresponding to the modified target BIOS Setup option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

本实施例中的BIOS测试方法,能够实现BIOS相应功能的自动化测试,当然也可以将多个功能组合起来实现自动化批量测试,即同时修改多个目标BIOS Setup选项对应的参数值;另外,本申请实施例所提供的BIOS测试方法完全依赖于软件执行,而无需硬件的支持,也无需额外连接硬件电路,测试成本低;再者,由于本申请实施例所提供的BIOS测试方法采用了较多的基于python语言的工具,在开发新的测试用例时,相比C语言而言,开发难度较低。The BIOS testing method in this embodiment can realize the automated testing of corresponding BIOS functions, and of course multiple functions can be combined to realize automated batch testing, that is, modify the corresponding parameter values of multiple target BIOS Setup options at the same time; in addition, the present application The BIOS test method provided by the embodiment is completely dependent on software execution, without the support of hardware, and without additional connection of hardware circuits, and the test cost is low; moreover, because the BIOS test method provided by the embodiment of the present application uses more Tools based on python language, when developing new test cases, compared with C language, the development difficulty is lower.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above-mentioned embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be performed at different times For execution, the execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的BIOS测试方法的BIOS测试装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个BIOS测试装置实施例中的具体限定可以参见上文中对于BIOS测试方法的限定,在此不再赘述。Based on the same inventive concept, an embodiment of the present application further provides a BIOS testing device for implementing the above-mentioned BIOS testing method. The solution to the problem provided by the device is similar to the implementation described in the above method, so for the specific limitations in one or more BIOS test device embodiments provided below, please refer to the above definition for the BIOS test method, I won't repeat them here.

在一个实施例中,如图10所示,提供了一种BIOS测试装置,包括:响应模块1001、控制模块1002和测试模块1003,其中:In one embodiment, as shown in Figure 10, a kind of BIOS testing device is provided, including: response module 1001, control module 1002 and test module 1003, wherein:

响应模块1001,用于响应于对待测设备的BIOS系统的测试指令,通过浏览器测试工具进入BIOS系统对应的BMC网页界面;Response module 1001, for responding to the test command of the BIOS system of the equipment to be tested, enters the BMC web page interface corresponding to the BIOS system through the browser test tool;

控制模块1002,用于在BMC网页界面上控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启;The control module 1002 is used to control the cursor on the BMC web interface to modify the target BIOS setting options, and control the restart of the device under test based on the modified target BIOS setting options;

测试模块1003,用于确定修改后的目标BIOS设置选项对应的功能是否能够在重启后的待测设备上正常运行,得到待测设备的BIOS测试结果。The testing module 1003 is used to determine whether the function corresponding to the modified target BIOS setting option can run normally on the device under test after restarting, and obtain the BIOS test result of the device under test.

在其中一个实施例中,上述控制模块1002包括获取单元和控制单元;其中,获取单元,用于从BMC网页界面中获取目标BIOS设置选项及目标BIOS设置选项在BMC网页界面上的位置信息;控制单元,用于根据目标BIOS设置选项在BMC网页界面上的位置信息控制光标对目标BIOS设置选项进行修改,并基于修改后的目标BIOS设置选项控制待测设备重启。In one of the embodiments, the above-mentioned control module 1002 includes an acquisition unit and a control unit; wherein the acquisition unit is used to acquire the target BIOS setting option and the position information of the target BIOS setting option on the BMC web interface from the BMC web interface; control The unit is used to control the cursor to modify the target BIOS setting option according to the position information of the target BIOS setting option on the BMC web interface, and control the restart of the device under test based on the modified target BIOS setting option.

在其中一个实施例中,所述获取单元包括触发单元、第一获取子单元和第二获取子单元;其中,触发单元,用于响应于对BMC网页界面中输入输出设备选项的触发指令,通过浏览器测试工具进入该输入输出设备选项对应的控制界面;第一获取子单元,用于获取控制界面对应的界面图像;第二获取子单元,用于从界面图像中获取目标BIOS设置选项及目标BIOS设置选项在控制界面上的位置信息。In one of the embodiments, the acquisition unit includes a trigger unit, a first acquisition subunit and a second acquisition subunit; wherein the trigger unit is used to respond to the trigger instruction of the input and output device options in the BMC web page interface, through The browser testing tool enters the control interface corresponding to the input and output device option; the first acquisition subunit is used to acquire the interface image corresponding to the control interface; the second acquisition subunit is used to acquire the target BIOS setting option and target from the interface image The location information of the BIOS setup option on the control interface.

在其中一个实施例中,上述第二获取子单元,用于从界面图像中获取BIOS设置区域图像,并从BIOS设置区域图像中识别BIOS设置选项;针对各BIOS设置选项,判断BIOS设置选项是否在预设BIOS设置选项集内;在BIOS设置选项在预设BIOS设置选项集内的情况下,将BIOS设置选项作为目标BIOS设置选项,以及,将BIOS设置选项在控制界面上的位置信息作为目标BIOS设置选项在控制界面上的位置信息。In one of the embodiments, the above-mentioned second acquiring subunit is used to acquire the BIOS setting area image from the interface image, and identify the BIOS setting option from the BIOS setting area image; for each BIOS setting option, determine whether the BIOS setting option is in In the preset BIOS setting option set; when the BIOS setting option is in the preset BIOS setting option set, the BIOS setting option is used as the target BIOS setting option, and the position information of the BIOS setting option on the control interface is used as the target BIOS Set the position information of the option on the control interface.

在其中一个实施例中,上述第二获取子单元,用于从界面图像中获取至少一个连通域;根据各连通域的面积和预设判断条件,从各连通域中确定满足预设判断条件的目标连通域,并将目标连通域作为BIOS设置区域图像。In one of the embodiments, the above-mentioned second acquisition subunit is used to acquire at least one connected domain from the interface image; according to the area of each connected domain and the preset judgment condition, determine from each connected domain that satisfies the preset judgment condition The target connected domain, and use the target connected domain as the image of the BIOS setting area.

在其中一个实施例中,上述控制单元包括控制子单元和修改子单元;其中,控制子单元,用于通过界面测试工具根据目标BIOS设置选项在控制界面上的位置信息,控制光标移动至目标BIOS设置选项;修改子单元,用于通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面。In one of the embodiments, the control unit includes a control subunit and a modification subunit; wherein the control subunit is used to control the cursor to move to the target BIOS through the interface test tool according to the position information of the target BIOS setting option on the control interface. Setting options; modifying subunits, which are used to modify the parameter values corresponding to the target BIOS setting options to preset parameter values through the interface testing tool according to the corresponding preset parameter values of the target BIOS setting options, so as to update the control interface to obtain the target control interface.

在其中一个实施例中,该装置还包括判断模块,该判断模块,用于在通过界面测试工具根据目标BIOS设置选项对应的预设参数值,将目标BIOS设置选项对应的参数值修改为预设参数值,以更新控制界面得到目标控制界面之后,从目标控制界面中获取新的BIOS设置区域图像,并从新的BIOS设置区域图像中识别目标BIOS设置选项对应的当前参数值;判断目标BIOS设置选项对应的当前参数值是否与目标BIOS设置选项对应的预设参数值一致;在目标BIOS设置选项对应的当前参数值与目标BIOS设置选项对应的预设参数值一致的情况下,确定目标BIOS设置选项修改成功。In one of the embodiments, the device further includes a judging module, the judging module is used to modify the parameter value corresponding to the target BIOS setting option to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option through the interface test tool. Parameter value, after obtaining target control interface with updating control interface, obtain new BIOS setting area image from target control interface, and identify the current parameter value corresponding to target BIOS setting option from new BIOS setting area image; Judge target BIOS setting option Whether the corresponding current parameter value is consistent with the preset parameter value corresponding to the target BIOS setting option; if the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option, determine the target BIOS setting option Successfully modified.

上述BIOS测试装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned BIOS testing device can be fully or partially realized by software, hardware and combinations thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图11所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种BIOS测试方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure may be as shown in FIG. 11 . The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. When the computer program is executed by the processor, a BIOS testing method is realized. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the casing of the computer device , and can also be an external keyboard, touchpad, or mouse.

本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 11 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各个实施例中的BIOS测试方法的步骤。In one embodiment, a computer device is provided, including a memory and a processor, a computer program is stored in the memory, and the processor implements the steps of the BIOS testing method in each of the above embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各个实施例中的BIOS测试方法的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the BIOS testing method in the above-mentioned embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各个实施例中的BIOS测试方法的步骤。In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the BIOS testing method in the above-mentioned embodiments are implemented.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the computer programs can be stored in a non-volatile computer-readable memory In the medium, when the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. The volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory. As an illustration and not a limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims (10)

1. A BIOS testing method, the method comprising:
responding to a test instruction of a BIOS (basic input/output system) of equipment to be tested, and entering a BMC (baseboard management controller) webpage interface corresponding to the BIOS through a browser test tool;
modifying the target BIOS setting option by controlling a cursor on the BMC webpage interface, and controlling the device to be tested to restart based on the modified target BIOS setting option;
and determining whether the function corresponding to the modified target BIOS setting option can normally run on the restarted device to be tested, and obtaining a BIOS test result of the device to be tested.
2. The method of claim 1, wherein the controlling a cursor on the BMC web interface to modify the target BIOS setting option and controlling the device under test to restart based on the modified target BIOS setting option comprises:
acquiring a target BIOS setting option and the position information of the target BIOS setting option on the BMC webpage interface from the BMC webpage interface;
and controlling a cursor to modify the target BIOS setting option according to the position information of the target BIOS setting option on the BMC webpage interface, and controlling the restart of the device to be tested based on the modified target BIOS setting option.
3. The method of claim 2, wherein the obtaining the target BIOS setting option from the BMC web interface and the location information of the target BIOS setting option on the BMC web interface comprises:
responding to a trigger instruction of an input and output equipment option in the BMC webpage interface, and entering a control interface corresponding to the input and output equipment option through a browser test tool;
acquiring an interface image corresponding to the control interface;
and acquiring a target BIOS setting option and the position information of the target BIOS setting option on the control interface from the interface image.
4. The method of claim 3, wherein the obtaining the target BIOS setting option and the location information of the target BIOS setting option on the control interface from the interface image comprises:
acquiring a BIOS setting area image from the interface image, and identifying BIOS setting options from the BIOS setting area image;
for each BIOS setting option, judging whether the BIOS setting option is in a preset BIOS setting option set or not;
if yes, the BIOS setting option is used as a target BIOS setting option, and the position information of the BIOS setting option on the control interface is used as the position information of the target BIOS setting option on the control interface.
5. The method of claim 4, wherein the obtaining the BIOS setting area image from the interface image comprises:
acquiring at least one connected domain from the interface image;
and determining a target connected domain meeting the preset judgment condition from each connected domain according to the area of each connected domain and a preset judgment condition, and taking the target connected domain as the BIOS setting region image.
6. The method of claim 3, wherein the modifying the target BIOS setting option by controlling a cursor according to the location information of the target BIOS setting option on the BMC web interface comprises:
controlling a cursor to move to the target BIOS setting option according to the position information of the target BIOS setting option on the control interface through an interface testing tool;
and modifying the parameter value corresponding to the target BIOS setting option into the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option through the interface testing tool so as to update the control interface to obtain a target control interface.
7. The method of claim 6, wherein after the interface test tool modifies the parameter value corresponding to the target BIOS setting option to the preset parameter value according to the preset parameter value corresponding to the target BIOS setting option to update the control interface to obtain the target control interface, the method further comprises:
acquiring a new BIOS setting area image from the target control interface, and identifying a current parameter value corresponding to the target BIOS setting option from the new BIOS setting area image;
judging whether the current parameter value corresponding to the target BIOS setting option is consistent with the preset parameter value corresponding to the target BIOS setting option;
and if so, determining that the target BIOS setting option is successfully modified.
8. A BIOS test apparatus, the apparatus comprising:
the response module is used for responding to a test instruction of a BIOS system of the equipment to be tested and entering a BMC webpage interface corresponding to the BIOS system through a browser test tool;
the control module is used for controlling a cursor on the BMC web interface to modify the target BIOS setting option and controlling the device to be tested to restart based on the modified target BIOS setting option;
and the test module is used for judging whether the function corresponding to the modified target BIOS setting option can normally run on the restarted device to be tested or not to obtain a BIOS test result of the device to be tested.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202211425965.6A 2022-11-15 2022-11-15 BIOS test method, device, computer equipment and storage medium Pending CN115687146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211425965.6A CN115687146A (en) 2022-11-15 2022-11-15 BIOS test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211425965.6A CN115687146A (en) 2022-11-15 2022-11-15 BIOS test method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115687146A true CN115687146A (en) 2023-02-03

Family

ID=85051951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211425965.6A Pending CN115687146A (en) 2022-11-15 2022-11-15 BIOS test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115687146A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166557A (en) * 2023-02-24 2023-05-26 合肥联宝信息技术有限公司 Processing method, device, equipment and storage medium of guiding system
CN117789192A (en) * 2024-02-26 2024-03-29 浪潮计算机科技有限公司 Setting item management method, device, equipment and media of basic input and output system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823758A (en) * 2014-03-13 2014-05-28 北京金山网络科技有限公司 Browser testing method and device
CN111767180A (en) * 2020-06-29 2020-10-13 西安易朴通讯技术有限公司 Stress testing method, apparatus, equipment and storage medium
CN113220332A (en) * 2021-06-07 2021-08-06 宁畅信息产业(北京)有限公司 BIOS (basic input output System) firmware refreshing test method and device, electronic equipment and storage medium
US11169740B1 (en) * 2020-01-22 2021-11-09 American Megatrends International, Llc Simultaneous initiation of multiple commands for configuring multi-mode DIMMS using a BMC
CN113791974A (en) * 2021-08-25 2021-12-14 微梦创科网络科技(中国)有限公司 A user interface UI element explicit waiting method and device
CN114037672A (en) * 2021-11-02 2022-02-11 联宝(合肥)电子科技有限公司 Image defect detection method and device and computer readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823758A (en) * 2014-03-13 2014-05-28 北京金山网络科技有限公司 Browser testing method and device
US11169740B1 (en) * 2020-01-22 2021-11-09 American Megatrends International, Llc Simultaneous initiation of multiple commands for configuring multi-mode DIMMS using a BMC
CN111767180A (en) * 2020-06-29 2020-10-13 西安易朴通讯技术有限公司 Stress testing method, apparatus, equipment and storage medium
CN113220332A (en) * 2021-06-07 2021-08-06 宁畅信息产业(北京)有限公司 BIOS (basic input output System) firmware refreshing test method and device, electronic equipment and storage medium
CN113791974A (en) * 2021-08-25 2021-12-14 微梦创科网络科技(中国)有限公司 A user interface UI element explicit waiting method and device
CN114037672A (en) * 2021-11-02 2022-02-11 联宝(合肥)电子科技有限公司 Image defect detection method and device and computer readable medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116166557A (en) * 2023-02-24 2023-05-26 合肥联宝信息技术有限公司 Processing method, device, equipment and storage medium of guiding system
CN117789192A (en) * 2024-02-26 2024-03-29 浪潮计算机科技有限公司 Setting item management method, device, equipment and media of basic input and output system
CN117789192B (en) * 2024-02-26 2024-06-11 浪潮计算机科技有限公司 Basic input and output system setting item management method, device, equipment and medium

Similar Documents

Publication Publication Date Title
EP3884389B1 (en) Testing user interfaces using machine vision
US20150378876A1 (en) Visual graphical user interface verification
CN111767228A (en) Interface testing method, device, equipment and medium based on artificial intelligence
US20170277374A1 (en) Visual regression analysis
US11288169B2 (en) Method of, and apparatus for, handling reference images for an automated test of software with a graphical user interface
CN109828906B (en) UI (user interface) automatic testing method and device, electronic equipment and storage medium
CN113609028A (en) Page testing method, computing device and readable storage medium
US10929159B2 (en) Automation tool
CN103984626A (en) Method and device for generating test-case script
CN112506778A (en) WEB user interface automatic test method, device, equipment and storage medium
CN111414309A (en) Automated testing method, computer equipment and storage medium for application programs
CN115687146A (en) BIOS test method, device, computer equipment and storage medium
CN115631374A (en) Control operation method, control detection model training method, device and equipment
CN105630674A (en) Test method and device capable of aiming at interface
CN110727595B (en) Application login interface identification method, intelligent terminal and storage medium
CN111949510A (en) Test processing method, apparatus, electronic device, and readable storage medium
CN117914737A (en) Mirror image resource testing method and device for network target range
CN119166526A (en) Agent-based testing method, device, electronic device and storage medium
CN116524986A (en) System-level testing method and system for storage products
CN116881121A (en) Test method, test device, electronic equipment and computer readable storage medium
CN114064010A (en) Front-end code generation method, device, system and storage medium
CN115220978A (en) Chip startup method and device, chip and device including in-circuit debugging mode
CN116431461A (en) Desktop application testing method, device, electronic equipment and program product
Chu et al. Automated GUI testing for Android news applications
CN119126755B (en) Automatic test method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20230203

RJ01 Rejection of invention patent application after publication