BMC testing method and device, medium and program product

By introducing pre-defined mapping relationships and log classification models into BMC testing, test case sharing and automated diagnosis are achieved, solving the problem of repetitive development of BMC test cases, reducing costs and improving testing efficiency.

CN122064540APending Publication Date: 2026-05-19NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGCHANG INFORMATION TECH (HANGZHOU) CO LTD
Filing Date
2026-01-06
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, a set of test scripts needs to be developed and maintained independently for each specific BMC model, resulting in high costs for repeated development and maintenance of test cases. Furthermore, the lack of a unified management platform exacerbates the high costs associated with test case development and maintenance.

Method used

By introducing a pre-defined mapping relationship, test cases are decoupled from specific BMC models, test strategies are obtained using hardware identifiers, test cases are shared, and error diagnosis is automated and accurate through a log classification model. Combined with containers and continuous integration tools, test management is carried out, reducing development and maintenance costs.

Benefits of technology

It enables the reuse of test cases and decoupling between platforms, reduces test development and maintenance costs, improves the automation, accuracy and efficiency of testing, and reduces the impact of human intervention and misoperation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122064540A_ABST
    Figure CN122064540A_ABST
Patent Text Reader

Abstract

The invention provides a BMC testing method and device, a medium and a program product, and relates to the technical field of automated test.The method comprises the steps that a to-be-tested management controller BMC is accessed, hardware information of the BMC is obtained, Hash calculation is conducted on the hardware information, a hardware identifier is obtained, a testing strategy corresponding to the hardware identifier is obtained according to a preset mapping relation, and the testing strategy is used for testing the BMC. And loading the test case according to the test strategy for testing the BMC. By introducing the preset mapping relation, the test case and the specific BMC model are decoupled, the test case can be reused and can be shared among different BMCs, a set of test script does not need to be set for each type of BMC, and the development and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of automated testing technology, and more specifically, to a BMC testing method, apparatus, medium, and program product. Background Technology

[0002] After developing the Baseboard Management Controller (BMC) functionalities, or during routine testing of the BMC, it's necessary to perform system tests on the BMC in relevant scenarios to identify potential problems, fix them proactively, and reduce risks associated with the BMC's operation in a real-world environment after delivery. In related technologies, a complete set of test scripts is typically developed and maintained independently for each specific BMC model. This leads to the problem of repetitive test case development, resulting in high development and maintenance costs. Summary of the Invention

[0003] The purpose of this disclosure is to provide a BMC testing method, apparatus, medium, and program product to solve the above-mentioned problems.

[0004] To achieve the above objectives, this disclosure provides a BMC testing method, comprising: accessing the management controller (BMC) to be tested and obtaining its hardware information; performing a hash calculation on the hardware information to obtain a hardware identifier; obtaining a test strategy corresponding to the hardware identifier according to a preset mapping relationship, wherein the preset mapping relationship includes the correspondence between the hardware identifier and the test strategy; and loading test cases according to the test strategy, wherein the test cases are used to test the BMC. Thus, by introducing a preset mapping relationship, test cases are decoupled from specific BMC models, allowing test cases to be reused and shared between different BMCs, eliminating the need to set up a set of test scripts for each BMC, thereby reducing development and maintenance costs.

[0005] In one possible implementation, the BMC testing method further includes: determining test strategies for different test items, encapsulating the test strategies, and generating a test library; obtaining the test strategy corresponding to the hardware identifier according to a preset mapping relationship includes: obtaining the test strategy corresponding to the hardware identifier from the test library according to the preset mapping relationship. Based on this, test cases in the test library can be reused, eliminating the need to edit a separate set of test scripts for the BMC, thus reducing the development and maintenance costs of testing.

[0006] In one possible implementation, the BMC testing method further includes: acquiring test logs generated during the testing of the BMC using the test cases, wherein the test logs include at least one of the following: black-box logs, test logs, serial port logs, and logs related to operation records; and classifying the test logs according to error type using a pre-trained log classification model to obtain classification results. Compared to manual classification, this implementation achieves automation, accuracy, and speed in error diagnosis by acquiring test logs from multiple sources and classifying them using a log classification model.

[0007] In one possible implementation, the BMC testing method further includes sending an error notification message if the error type of the classification result is a preset error type. This allows users to promptly understand any problems with the BMC and make timely improvements.

[0008] In one possible implementation, the testing method for the BMC further includes: sending a locking command to the BMC, the locking command being used to lock the functions of the BMC, wherein the locked functions include at least one of the following: front-end page access function, access function, session function, and serial communication function. This locking of the above functions prevents user operations from affecting the test results.

[0009] In one possible implementation, accessing the management controller (BMC) under test and obtaining its hardware information includes: accessing the BMC through a container and obtaining its hardware information. This facilitates subsequent decoupling testing and reduces testing costs.

[0010] In one possible implementation, the number of BMCs is n, and the number of containers is n, with each of the n containers corresponding one-to-one with one of the n BMCs, where n is a positive integer. By using different containers to isolate and test different BMCs, the testing is decoupled, reducing testing costs.

[0011] This disclosure also provides a testing apparatus for a BMC (Bureau Management Controller), comprising: an access module configured to access the BMC to be tested and obtain hardware information of the BMC; a calculation module configured to perform hash calculation on the hardware information to obtain a hardware identifier; a mapping module configured to obtain a test strategy corresponding to the hardware identifier according to a preset mapping relationship, wherein the preset mapping relationship includes a correspondence between the hardware identifier and the test strategy; and a testing module configured to load test cases according to the test strategy, wherein the test cases are used to test the BMC.

[0012] This disclosure also provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the aforementioned BMC test method.

[0013] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned BMC testing method.

[0014] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0015] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a BMC test management system provided in this publication.

[0016] Figure 2 This is a schematic diagram of another BMC test management system provided in this disclosure.

[0017] Figure 3 This is a flowchart illustrating a BMC testing method provided in one embodiment of this disclosure.

[0018] Figure 4 This is a flowchart illustrating a BMC testing method provided in another embodiment of this disclosure.

[0019] Figure 5 This is a flowchart illustrating a BMC testing method provided in another embodiment of this disclosure.

[0020] Figure 6 This is a flowchart illustrating a BMC testing method provided in another embodiment of this disclosure.

[0021] Figure 7 This is a flowchart illustrating a BMC testing method provided in another embodiment of this disclosure.

[0022] Figure 8 This is a logic block diagram of a BMC testing apparatus provided in one embodiment of this disclosure.

[0023] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0024] Figure 10 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation

[0025] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.

[0026] After developing BMC-related functions or during routine testing, it's necessary to perform system testing on the BMC in relevant scenarios to identify potential problems, fix them proactively, and reduce risks associated with the BMC's operation in a real-world environment after delivery. In related technologies, a complete set of test scripts is typically developed and maintained independently for each specific BMC model. This leads to the problem of repetitive test case development, making it difficult to effectively reuse basic, existing, or similar test cases. Development and maintenance costs are high.

[0027] In addition, the development of test cases in related technologies suffers from problems such as the lack of a unified management platform across multiple projects, differences in how different developers display logs, the need for manual investigation of the types of errors in test cases, and the inability to prevent other personnel from accidentally using the BMC under test.

[0028] To address the aforementioned issues, this disclosure provides a test management system for BMCs. The test management system integrates a test library, which encapsulates test strategies. The test management system can then perform tests on different BMCs according to the test strategies. For an example, please refer to [link to example]. Figure 1 The testing of the BMC (Browser Control Center) includes different test projects, namely the BMCs of Project 1, Project 2, and Project 3. The test management system accesses the BMCs of each project, obtains their hardware information, retrieves test strategies from the test library based on the hardware information, and performs tests on the BMCs according to the strategies. This enables the reuse of test cases across multiple test projects. By performing secondary development on Openbmc-test-automatio and loading test strategies with hardware signatures, the problems of test case reuse and platform decoupling are effectively solved. This eliminates the need for separate development of test cases for individual projects using Python or Shell scripts, reducing testing costs.

[0029] This disclosure also provides a test management system for BMC; please refer to [link / reference]. Figure 2 BMC's test management system includes: Docker module, PostgreSQL module, JForg Artifactory module, Jenkins module, log classification model, PostgreSQL REST interface module, API interface, and web page.

[0030] The docker (container) module is used to package the program and all its dependencies into a container, so that the program can run in different environments. The platform supports running multiple docker environments at the same time to run test cases for multiple projects.

[0031] The PostgreSQL module is used for persistent storage of critical data. This disclosure uses the PostgreSQL database, whose stability and high performance ensure secure and efficient data access.

[0032] The JForg Artifactory module is used by the test management system to obtain the BMC version and firmware version of the corresponding project before testing. Other firmware versions include PSU, CPLD, etc. The JForg Artifactory module is also used for managing and labeling the stored firmware. This disclosure uses JForg Artifactory to store the BMC version and other firmware versions of each project by deploying a local repository. The platform only needs to access the specified URL (Uniform Resource Locator) to obtain them.

[0033] The Jenkins module is used for continuous integration and continuous delivery, enabling the continuous and automated building and testing of related software projects.

[0034] The log classification model can be an AI model based on a multi-layered Transformer structure, capable of classifying logs. After testing, the final test results are first fed into the log classification model for error classification. Based on the error type, the platform triggers a notification to the person in charge of the corresponding module for the specified project.

[0035] The Postg REST interface module is used to encapsulate standard API (Application Programming Interface) interfaces, enabling front-end web developers to easily perform CRUD operations on database resources.

[0036] The API interface communicates with the web page via the HTTPS (Hypertext Transfer Protocol Secure) protocol.

[0037] This disclosure provides a testing method for BMC; please refer to [link / reference]. Figure 3 The BMC testing method described above can be applied to Figure 1 BMC's test management system Figure 2 BMC's test management system Figure 8 The BMC test apparatus 200 shown Figure 9 The electronic device 700 shown Figure 10 The image shows a server 1900, computer program products, and computer-readable storage media. The following example uses a test management system applied to BMC. The following will focus on... Figure 3 The process shown is described in detail. The BMC testing method may include the following steps: Step S110: Access the management controller (BMC) to be tested and obtain the hardware information of the BMC.

[0038] The test management system connects to the BMC via a network. The test management system initiates communication with the IP address of the BMC under test via the network to access the BMC. The test management system sends a query request to the BMC. If the BMC determines the query request is valid, it sends its own hardware information back to the test management system, thereby obtaining the BMC's hardware information.

[0039] Hardware information is used to identify the hardware. For example, hardware information may include at least one of the following: the hardware number, serial number, name, manufacturer, model, firmware version, system configuration, power specifications, etc. on the BMC.

[0040] In one implementation, it can be achieved by... Figure 2 The Docker container in the system accesses the BMC and obtains the BMC's hardware information.

[0041] Optionally, the number of BMCs to be tested can be n, the number of containers can be n, and the n containers correspond one-to-one with the n BMCs, where n is a positive integer.

[0042] If n is a positive integer greater than 1, then a container is configured for each BMC.

[0043] Step S120: Perform a hash calculation on the hardware information to obtain the hardware identifier.

[0044] The hardware information is hashed using a hash algorithm to obtain a hardware identifier. The hardware identifier can be considered a unique and irreversible hardware signature.

[0045] For example, the hash algorithm can be, but is not limited to, the SHA-256 hash algorithm and the CRC32 hash algorithm.

[0046] Step S130: Obtain the test strategy corresponding to the hardware identifier according to the preset mapping relationship, wherein the preset mapping relationship includes the correspondence between the hardware identifier and the test strategy.

[0047] Pre-defined mapping relationships are set and stored in the test management system. These pre-defined mapping relationships include the correspondence between hardware identifiers and test strategies. For example, the pre-defined mapping relationships can be in the form of a lookup table.

[0048] Query the preset mapping relationship to obtain the test strategy corresponding to the hardware identifier. The test strategy may include at least one of the following: the name of the test case, the unique identifier of the test case, and the storage path of the test case in the test library.

[0049] Step S140: Load test cases according to the test strategy, wherein the test cases are used to test the BMC.

[0050] The test management platform loads test cases according to the test strategy and sends them to the BMC (Browser Control Center). The BMC then executes the test cases to test its functionality. For example, it tests power control functions, such as the accuracy of remote power-on, power-off, restart, and power status queries. It also tests sensor reading functions, such as the accuracy of sensor readings of temperature, voltage, and fan speed.

[0051] The BMC testing method provided in this embodiment accesses the management controller (BMC) under test and obtains its hardware information. It performs a hash calculation on the hardware information to obtain a hardware identifier. Based on a preset mapping relationship, it obtains the test strategy corresponding to the hardware identifier and loads test cases according to the test strategy to test the BMC. By introducing a preset mapping relationship, manual configuration is eliminated, and test cases are decoupled from specific BMC models. Test cases can be reused and shared between different BMCs, eliminating the need to set up a set of test scripts for each BMC, thus reducing development and maintenance costs.

[0052] Optionally, the method further includes: determining the test risk level corresponding to the test strategy, and determining the lockable functions of the BMC corresponding to the test risk level. After locking the lockable functions, test cases are loaded according to the test strategy, wherein the test cases are used to test the BMC. For example, the test risk levels include high risk, medium risk, and low risk.

[0053] In addition to identifying test strategies, the aforementioned hardware identifiers can also be used to select the correct BMC and other firmware versions (BIOS, PSU, etc.), and can also tag tested versions. The JForg Artifactory module's local repository stores daily compiled BMC version information for different device models, as well as version information for various firmware types. For each hardware identifier, the platform queries the corresponding version configuration and sends a request to the JForg Artifactory module to obtain the version information of various firmware types under the current configuration of the BMC to be tested for flashing. After the overall test progress is completed, a request is sent to the JForg Artifactory module to set the status information of the corresponding version based on the test results. Thus, the test management system administrator can clearly understand the past test status of each firmware through the JForg Artifactory module.

[0054] The test management platform tests BMC in the following way: The Jenkins module of the test management platform can trigger test tasks for multiple projects simultaneously. Each project's test task runs in an independent Docker module. The Docker module loads the test policy using hardware identifiers and runs the specified test cases according to the test policy. For an example, please refer to [link to example]. Figure 4 When the BMCs to be tested include BMC1 and BMC2, docker1 obtains the hardware information of BMC1 and uses a hash algorithm to calculate the hardware identifier corresponding to this hardware information. docker1 then retrieves test cases from the test case set based on the hardware identifier. The test cases refer to the automatically generated script `run_test.sh`. The test cases in docker1 are written through the configuration file of project 1.

[0055] Furthermore, the testing method for BMC2 is similar to that for BMC1, and will not be repeated here.

[0056] Optionally, since this disclosure decouples hardware through a preset mapping relationship, when new hardware is added to the BMC, the test strategy of the new hardware is obtained, the new hardware information of the new hardware is obtained, the new hardware information is hashed to obtain a new hash value, and then the new hash value and its corresponding test strategy are bound to update the preset mapping relationship. There is no need to modify the test scripts of other hardware on the BMC, which greatly reduces the development and maintenance costs of testing.

[0057] Optionally, the BMC testing method further includes: determining testing strategies for different test items, encapsulating the testing strategies, and generating a test library.

[0058] When adding new hardware to the BMC, determine the test strategy corresponding to the new hardware, and then determine the test cases corresponding to the test strategy. If the test cases are already stored in the test library, then the test cases in the test library can be reused directly. If the test cases are newly written, then the newly written test cases are encapsulated and saved in the test library, and the test cases in the test library are updated.

[0059] Based on this, step S130 may include the following steps: obtaining the test strategy corresponding to the hardware identifier from the test library according to the preset mapping relationship.

[0060] In this implementation, test cases from the test library are reused, eliminating the need to edit a separate set of test scripts for the BMC, thus reducing the development and maintenance costs of the tests.

[0061] Optionally, the BMC testing method further includes: acquiring test logs generated during the testing of the BMC using the test cases, wherein the test logs include at least one of the following: black-box logs, test logs, serial port logs, and logs related to operation records. Then, a pre-trained log classification model is used to classify the test logs according to error type to obtain classification results.

[0062] Among them, the black-box log is used to characterize the internal state of the BMC, the test log is used to record test commands, the serial port log is used to reflect the hardware response of the BMC host, and the operation log is used to reflect the test context.

[0063] Furthermore, the log classification model is pre-trained, for example, by training it using sample logs and their corresponding classification results. The log classification model then combines the aforementioned log types to obtain a comprehensive log classification result.

[0064] Error types include BMC firmware errors, test script errors, and environmental anomalies. The obtained classification results can characterize the error type. Of course, if the test results show no errors, the classification results indicate that the BMC is functioning normally.

[0065] Optionally, the test logs and classification results generated during the testing process can be used to iteratively train the log classification model to improve the model's classification accuracy.

[0066] Compared to manual classification, this implementation method automates, improves accuracy, and speeds up error diagnosis by acquiring test logs from multiple sources and using a log classification model.

[0067] Optionally, the BMC testing method further includes sending an error notification message if the error type to which the classification result belongs is a preset error type.

[0068] Through this implementation method, users can promptly understand the problems existing in the BMC and make timely improvements to the BMC.

[0069] Optionally, such as Figure 5 As shown, the classification method using the log classification model is as follows: Obtain the raw logs, use the model to determine if the log is a BMC error. If it is, send a first error notification message to notify the development team to investigate the BMC issue. If not, send a second notification message to notify the testing team to fix the script. Error synchronization testing incrementally updates the dataset and training dataset, using the training dataset to iteratively update the model. For example, the model is iteratively trained using the training dataset according to a preset period.

[0070] It should be noted that the original log in this embodiment refers to the aforementioned test log, which may include at least one of the following: black-box log, test log, serial port log, and logs related to operation records.

[0071] Optionally, the testing method for the BMC further includes: sending a locking command to the BMC, the locking command being used to lock the functions of the BMC, wherein the locked functions include at least one of the following: front-end page access function, access function, session function, and serial communication function.

[0072] After the BMC's functionality is locked, the web interface will display that it is in use. Therefore, the BMC cannot be operated via the web page to avoid affecting the test results.

[0073] BMC access control during testing can include the following: Web machine lock, BMC lock, session lock, and serial port lock. Web machine lock refers to the platform identifying the IP address of the user account occupying the machine and revoking other IP addresses' permissions to create tasks or perform other operations on that machine. BMC lock refers to the platform sending commands to the BMC to configure iptables (iptables is a firewall and network packet filtering tool) to deny all access except for the user. Session lock refers to the platform using Flask decorators to perform real-time session verification to prevent unauthorized access. Serial port lock refers to the platform modifying BMC registers and saving serial port logs to prevent external access to the serial port via network or physical means; the relevant serial port logs are stored in the relevant BMC path. These methods prevent accidental operation by other users that could cause the ongoing test to fail.

[0074] In one possible implementation, Figure 6A locking strategy is illustrated below: The test management system sends a hardware identifier to the PostgreSQL module. Based on this identifier, the PostgreSQL module returns the test risk level to the test management system, which is categorized into high, medium, and low risk. The test management system locks functions according to the test risk level. For example, in a high-risk scenario, the full-lock template locks all functions, including front-end page access, access functions, session functions, and serial communication functions. In a medium-risk scenario, the partial-lock template locks only some functions, specifically parts of the front-end page access, access, session, and serial communication functions. In a low-risk scenario, the suggestive-lock template locks functions related to the suggested information.

[0075] in, Figure 6 The risk assessment in the test management system involves querying the database in the PostgreSQL module using hardware identifiers when a test task is created. This process obtains the test case and BMC version information, as well as the test risk level of the task.

[0076] The test management system uses strategy matching, automatically matching corresponding resource locking templates (i.e., full lock template, partial lock template, or suggestive lock template) based on the test risk level. For example, high-risk firmware flashing tasks match a "full lock template," while low-risk sensor reading tasks match a "suggestive lock template." For high-risk tasks, the test operation will cause permanent changes to the hardware or firmware or pose a high risk of failure. High-risk tests include: BMC firmware flashing, power cycle testing, BIOS setting updates, critical register read / write, etc. For medium-risk tasks, the test will generate a large amount of data or load, which may temporarily affect system stability but will not cause permanent changes. Medium-risk tests include: memory bandwidth stress testing, CPU full load testing, large-scale network traffic testing, etc. For low-risk tasks, the test is a read-only operation or a simple query, with minimal impact on the system. Low-risk tests include: sensor information reading (temperature, voltage), system information query, log query, etc.

[0077] The predefined lockout templates corresponding to different risk levels are as follows: The locking methods for high-risk fully locked templates are: automatically triggering WEB page locking, BMC locking, serial port locking, and session locking.

[0078] For medium-risk locked templates, the locking method is: automatic triggering of web machine locking + session locking. Monitoring via serial port is allowed.

[0079] For low-risk, suggestive locking templates, the locking method is as follows: only mark them as "occupied" on the web interface, without locking the underlying hardware, and allow sharing.

[0080] In addition, the test management system executes dynamically. During the test environment initialization phase, the test management system will automatically call all the underlying commands defined by the locking template (including but not limited to WEB machine locking, BMC locking, serial port locking, etc.) before the test cases are executed, so as to achieve precise resource isolation and improve test accuracy.

[0081] In this embodiment, the above-mentioned functions are locked to prevent users from operating the BMC during the BMC test and affecting the test results.

[0082] In one possible implementation, Figure 7 This is a state transition diagram of the BMC being occupied. Each state is recorded in the test management system's database. When transitioning from the released state to the idle state, the previously performed locking operations are cleared, and the relevant permissions for the BMC and the web page are restored. When transitioning from the idle or occupied state to the locked state, the platform executes a process to lock the relevant functions of the BMC. It should be noted that... Figure 7 The device mentioned refers to the BMC to be tested.

[0083] Optionally, this disclosure also provides a testing method for BMC; please refer to [link / reference]. Figure 7 The method includes: Step S201: Determine the test strategies for different test items, encapsulate the test strategies, and generate a test library.

[0084] Step S202: Access the BMC corresponding to each of the n containers and obtain the hardware information of the n BMCs.

[0085] Step S203: Perform a hash calculation on the hardware information to obtain the hardware identifier.

[0086] It should be noted that the hardware information of the BMC obtained in step S202 is n. In this step, the hardware identifiers corresponding to the hardware information of the n BMCs can be calculated to obtain n hardware identifiers.

[0087] Step S204: According to the preset mapping relationship, obtain the test strategy corresponding to the hardware identifier from the test library.

[0088] Step S205: Load test cases according to the test strategy, wherein the test cases are used to test the BMC.

[0089] Step S206: Obtain the test logs generated during the testing of the BMC using the test cases, wherein the test logs include at least one of the following: black-box logs, test logs, serial port logs, and logs related to operation records.

[0090] Step S207: Use a pre-trained log classification model to classify the test logs according to error type and obtain the classification results.

[0091] Step S208: If the error type of the classification result belongs to the preset error type, send an error notification message.

[0092] Step S209: Send a locking command to the BMC. The locking command is used to lock the functions of the BMC. The locked functions include at least one of the following: front-end page access function, access function, session function, and serial communication function.

[0093] The above method can achieve the following effects: (I) Centralized Management of Multi-Project Test Management System. Relevant testers can select the machines to be tested and create corresponding test tasks on the web page, select the corresponding test scope, test start and end time, and run test cases through hardware signing, JForg Artifactory module and container to automatically obtain the corresponding BMC firmware version and the firmware versions of other components on the tested machine. This solves the problem of the need for a lot of manual intervention in hardware verification, version lookup and environment configuration before testing, which is cumbersome and error-prone, and realizes true one-click automated testing.

[0094] (ii) Decouple the differences between automated test projects. After secondary development of Openbmc-test-automatio, test strategies are dynamically loaded through hardware signatures to decouple the differences between projects and reuse test cases without affecting the general code.

[0095] (iii) Locking the permissions of the machine to be tested: Depending on whether the device needs to be tested, the user can choose to put the machine in either occupied or locked mode. In occupied mode, the machine is not locked and can be shared with other users; in locked mode, the machine can only be used by the user.

[0096] (iv) Automatic Machine Locking Strategy. The test management system will automatically match the locking strategy according to the current test strategy of the BMC to be tested. This strategy defines what template of system resources needs to be locked when executing this type of test. It realizes machine permission management that adapts to the risk of the test content, which helps to alleviate the situation where relevant developers have no BMC available when the number of BMCs is tight.

[0097] Based on the same inventive concept, this disclosure provides a BMC testing device. Please refer to [link / reference]. Figure 8 The BMC test device 200 includes: an access module 210, a calculation module 220, a mapping module 230, and a test module 240; Access module 210 is configured to access the management controller (BMC) to be tested and obtain the hardware information of the BMC; The computing module 220 is configured to perform a hash calculation on the hardware information to obtain a hardware identifier; The mapping module 230 is configured to obtain the test strategy corresponding to the hardware identifier according to a preset mapping relationship, wherein the preset mapping relationship includes the correspondence between the hardware identifier and the test strategy; Test module 240 is configured to load test cases according to a test strategy, wherein the test cases are used to test the BMC.

[0098] In one possible implementation, the BMC testing apparatus 200 further includes: a generation module; The generation module is configured to determine the test strategies for different test items, encapsulate the test strategies, and generate a test library. The mapping module 230 is specifically configured to obtain the test strategy corresponding to the hardware identifier from the test library according to the preset mapping relationship.

[0099] In one possible implementation, the BMC testing device 200 further includes: a log acquisition module and a classification module; The log acquisition module is configured to acquire test logs generated during the testing of the BMC using the test cases, wherein the test logs include at least one of the following: black-box logs, test logs, serial port logs, and logs related to operation records; The classification module is configured to classify the test logs according to error type using a pre-trained log classification model to obtain classification results.

[0100] In one possible implementation, the BMC test apparatus 200 further includes: a first transmission module; The first sending module is configured to send error notification information when the error type of the classification result is a preset error type.

[0101] In one possible implementation, the BMC test apparatus 200 further includes: a second transmission module; The second sending module is configured to send a locking instruction to the BMC. The locking instruction is used to lock the functions of the BMC, wherein the locked functions include at least one of the following: front-end page access function, access function, session function, and serial communication function.

[0102] In one possible implementation, the access module 210 is specifically configured to access the BMC through the container and obtain hardware information of the BMC.

[0103] In one possible implementation, the number of BMCs is n, the number of containers is n, and the n containers correspond one-to-one with the n BMCs, where n is a positive integer.

[0104] Regarding the BMC testing device 200 in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0105] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Figure 9 As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0106] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the BMC testing method described above. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and audio components. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination thereof; therefore, the corresponding communication component 705 may include a Wi-Fi module, a Bluetooth module, or an NFC module.

[0107] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the BMC test method described above.

[0108] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the BMC testing method described above. For example, the computer-readable storage medium may be the memory 702 including the program instructions described above, which may be executed by the processor 701 of the electronic device 700 to complete the BMC testing method described above.

[0109] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a processor, which, when executed by the processor, implements the steps of the BMC testing method described above.

[0110] Figure 10 This is a block diagram illustrating a server according to an exemplary embodiment. For example, server 1900 may be provided as a server. Please refer to... Figure 10 The server 1900 includes processors 1922, which may be one or more, and memory 1932 for storing computer programs executable by the processors 1922. The computer programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 1922 may be configured to execute the computer program to perform the BMC test methods described above.

[0111] Additionally, server 1900 may include a power supply component 1926 and a communication component 1950. The power supply component 1926 can be configured to perform power management for server 1900, and the communication component 1950 can be configured to enable communication for server 1900, such as wired or wireless communication. Furthermore, server 1900 may include an input / output (I / O) interface 1958. Server 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM Mac OSX TM Unix TM Linux TM etc.

[0112] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the BMC testing method described above. For example, the computer-readable storage medium may be the memory 1932 including the program instructions described above, which may be executed by the processor 1922 of the server 1900 to complete the BMC testing method described above.

[0113] In another exemplary embodiment, a computer program product is also provided, which includes a computer program executable by a processor, which, when executed by the processor, implements the steps of the BMC testing method described above.

[0114] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.

[0115] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.

[0116] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.

Claims

1. A method for testing BMC, characterized in that, The testing method for the BMC includes: Access the management controller (BMC) to be tested and obtain the hardware information of the BMC; The hardware information is hashed to obtain the hardware identifier; According to a preset mapping relationship, the test strategy corresponding to the hardware identifier is obtained, wherein the preset mapping relationship includes the correspondence between the hardware identifier and the test strategy; Test cases are loaded according to the test strategy, wherein the test cases are used to test the BMC.

2. The BMC testing method according to claim 1, characterized in that, The BMC testing method also includes: Determine the testing strategies for different test items, encapsulate the testing strategies, and generate a test library; The step of obtaining the test strategy corresponding to the hardware identifier according to the preset mapping relationship includes: Based on the preset mapping relationship, the test strategy corresponding to the hardware identifier is obtained from the test library.

3. The BMC testing method according to claim 1, characterized in that, The BMC testing method also includes: Obtain test logs generated during the testing of the BMC using the test cases, wherein the test logs include at least one of the following: black-box logs, test logs, serial port logs, and logs related to operation records; The test logs are classified according to error type using a pre-trained log classification model to obtain the classification results.

4. The BMC testing method according to claim 3, characterized in that, The BMC testing method also includes: If the error type of the classification result is a preset error type, send an error notification message.

5. The BMC testing method according to claim 1, characterized in that, The BMC testing method also includes: A locking command is sent to the BMC, the locking command being used to lock the functions of the BMC, wherein the locked functions include at least one of the following: front-end page access function, access function, session function, and serial communication function.

6. The BMC testing method according to claim 1, characterized in that, The process of accessing the management controller (BMC) to be tested and obtaining the hardware information of the BMC includes: Access the BMC through the container and obtain the hardware information of the BMC.

7. The BMC testing method according to claim 6, characterized in that, The number of BMCs is n, the number of containers is n, and the n containers correspond one-to-one with the n BMCs, where n is a positive integer.

8. A testing device for BMC, characterized in that, The testing apparatus for the BMC includes: The access module is configured to access the management controller (BMC) to be tested and obtain the hardware information of the BMC; The computing module is configured to perform a hash calculation on the hardware information to obtain a hardware identifier; The mapping module is configured to obtain the test strategy corresponding to the hardware identifier according to a preset mapping relationship, wherein the preset mapping relationship includes the correspondence between the hardware identifier and the test strategy; The testing module is configured to load test cases according to a testing strategy, wherein the test cases are used to test the BMC.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the test method for the BMC as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the test method for the BMC as described in any one of claims 1 to 7.