BMC automatic test system based on multi-interface high concurrency and intelligent analysis

The BMC automated testing system with high concurrency and intelligent analysis on multiple interfaces solves the shortcomings of existing BMC testing tools in terms of multi-interface concurrent testing capabilities and intelligent analysis, improves the stability and reliability of BMC, and increases test coverage and problem location efficiency.

CN120704966APending Publication Date: 2025-09-26JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510882565.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-26

Smart Images

  • Figure CN120704966A_ABST
    Figure CN120704966A_ABST
Patent Text Reader

Abstract

The invention provides a BMC automatic test system based on multi-interface high concurrency and intelligent analysis. Structured test parameters are generated through a configuration analysis module, a session management module creates and maintains a multi-user session, and a thread pool controller module dynamically adjusts the size of a thread pool according to the CPU utilization rate of a BMC. And the interface adaptation layer module supports unified calling of multiple protocols. And the result statistics and fault prediction module performs multi-dimensional analysis on a test result, predicts an interface failure probability by adopting an LSTM time sequence model, generates a high-risk interface list and a root cause positioning suggestion, and triggers a retest task. The system supports test task priority scheduling, reserves thread resources for retest tasks, and ensures cooperative execution of main test and retest tasks. The test report is output in an HTML or CSV format. The method can be widely applied to automatic testing and intelligent operation and maintenance scenes of the server BMC, and the testing coverage rate, the efficiency and the problem positioning capacity are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server management and testing, and in particular to a BMC automated testing system based on multi-interface high concurrency and intelligent analysis. Background Art

[0002] BMC (Baseboard Management Controller), as a core component for server health management and remote monitoring, is widely used in data centers, cloud computing, high-performance computing and other fields. With the continuous expansion of server scale and the continuous improvement of operation and maintenance complexity, the stability and reliability of BMC have become the key guarantee for the overall performance of the system. In related technologies, the basic framework of BMC automated testing has been constructed through the collaborative work of interface testing, load simulation and result analysis. Specifically, the test system covers the entire process from configuration parsing, session management, task scheduling to interface calling and result statistics, including test support for mainstream protocol interfaces such as Redfish, RESTful, SNMP, IPMI, and key links such as multi-user concurrent testing based on authentication mechanisms.

[0003] However, existing BMC testing methods directly use a fixed thread pool and a single interface test mode, and fail to implement mixed stress testing of multi-protocol interfaces. They also lack a mechanism for dynamically adjusting concurrency based on system load, which can lead to missed detection of interface stability issues or cause resource contention and system overload under high loads. Furthermore, existing technologies typically lack integrated intelligent analysis modules and are unable to predict faults and locate root causes based on historical test data, thus affecting test efficiency and problem response speed. In multi-user testing scenarios, the session state maintenance mechanism is imperfect, making it easy for tests to be interrupted due to authentication failures or timeouts, further reducing the automation and reliability of the test. Summary of the Invention

[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

[0005] The present invention proposes a BMC automated testing system based on multi-interface high concurrency and intelligent analysis, aiming to address the deficiencies of existing BMC testing tools in terms of multi-interface concurrent testing capabilities, dynamic load adaptability, intelligent analysis and fault prediction capabilities, thereby improving the test coverage, defect detection rate and problem location efficiency of BMC in complex load environments.

[0006] Another object of the present invention is to provide a BMC automated testing method based on multi-interface high concurrency and intelligent analysis.

[0007] To achieve the above objectives, the present invention provides a BMC automated testing system based on multi-interface high concurrency and intelligent analysis, comprising:

[0008] A configuration parsing module is configured to respond to a test configuration request, read configuration files and / or command line parameters, and generate a structured test parameter object; wherein the test parameter object includes a list of interface types, BMC IP address, number of concurrent users, number of sessions, and authentication method;

[0009] A session management module, connected to the configuration parsing module, is used to create multiple independent session instances according to the authentication method and number of sessions in the test parameter object, maintain the session active state through a heartbeat detection mechanism, and automatically release the connection and reestablish the session when a session anomaly is detected;

[0010] a thread pool controller module, connected to the session management module, configured to dynamically adjust the thread pool size based on the system resource status of the BMC, and to increase the number of threads to improve test throughput when the CPU usage is detected to be lower than a first preset threshold, and to reduce the number of threads to prevent system overload when the CPU usage is detected to be higher than a second preset threshold;

[0011] An interface adaptation layer module, connected to the thread pool controller module, is used to encapsulate a unified API and send a test request to the BMC through the unified API;

[0012] The result statistics and fault prediction module is connected to the interface adaptation layer module, and is used to collect test results and perform multi-dimensional statistical analysis. Based on historical test data and current test results, a time series model is used to predict the failure probability of each interface in the future time window. If the predicted failure probability exceeds the preset threshold, a high-risk interface list and root cause location suggestions are generated, and the corresponding test cases are added to the retest task queue to generate a test report; wherein, the test report includes interface type, test results, response time, error code, and error log.

[0013] The BMC automated testing system based on multi-interface high concurrency and intelligent analysis according to the embodiment of the present invention may also have the following additional technical features:

[0014] In one embodiment of the present invention, the thread pool controller module is also used to schedule the execution of test cases according to the test task priority. If there is a high-priority retest task, the retest task is executed first, and thread resources are reserved for the retest task to ensure the coordinated execution of the main test task and the retest task.

[0015] In one embodiment of the present invention, the interface adaptation layer module encapsulates test commands of different protocols through a unified API interface, so that the addition and removal of test instructions only need to be defined through configuration files without modifying the system code.

[0016] In one embodiment of the present invention, when generating a test report, the result statistics and fault prediction module supports classification statistics by interface type, error type, and response time, and provides a real-time monitoring dashboard.

[0017] In one embodiment of the present invention, the thread pool controller module monitors the CPU usage of the BMC in real time when dynamically adjusting the thread pool size, and adjusts the number of concurrent threads in the thread pool based on a comparison result between the CPU usage and a preset threshold.

[0018] To achieve the above objectives, the present invention further proposes a BMC automated testing method based on multi-interface high concurrency and intelligent analysis, comprising:

[0019] In response to a test configuration request, the configuration parsing module reads configuration files and / or command line parameters to generate a structured test parameter object, wherein the test parameter object includes an interface type list, a BMC IP address, a concurrency number, a session number, and an authentication method;

[0020] According to the authentication mode and number of sessions in the test parameter object, a session management module is used to create multiple independent session instances and maintain the status information of each session;

[0021] When a change in BMC system resources is detected, the thread pool size is dynamically adjusted based on the current CPU usage through the thread pool controller module. If the CPU usage is below a first preset threshold, the number of threads is increased to improve test throughput. If the CPU usage is above a second preset threshold, the number of threads is reduced to prevent system overload.

[0022] Calling a unified interface sending method through the interface adaptation layer module, and sending a test request to the BMC according to the interface type and test command list in the test parameter object;

[0023] Collect the test results of each thread's test tasks, perform multi-dimensional aggregate analysis through the result statistics and fault prediction module, and use a time series model to predict the failure probability of each interface in the future time window based on historical test data and current test results. If the predicted failure probability exceeds the preset threshold, a list of high-risk interfaces and root cause location suggestions are generated, and the corresponding test cases are added to the retest task queue;

[0024] According to the test task priority, if there is a high-priority retest task, the retest task will be scheduled first through the thread pool controller module, and thread resources will be reserved for the retest task to ensure the coordinated execution of the main test task and the retest task;

[0025] After the test task is completed, a test report is generated; wherein, the test report includes the interface type, test results, response time, error code, and error log.

[0026] The BMC automated testing system and method based on multi-interface high concurrency and intelligent analysis in the embodiments of the present invention are particularly suitable for interface stability verification and fault prediction in simulated real-world load scenarios. The core content includes dynamic thread pool management, multi-interface mixed testing, intelligent fault prediction, authentication and session management, which can effectively improve testing efficiency, increase defect detection rate, and realize intelligent operation and maintenance and assisted problem location.

[0027] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0029] Figure 1 This is an architectural diagram of a BMC automated testing system based on multi-interface high concurrency and intelligent analysis according to an embodiment of the present invention;

[0030] Figure 2 is a data interaction diagram of a configuration parsing module according to an embodiment of the present invention;

[0031] Figure 3 is a data interaction diagram of a session management module according to an embodiment of the present invention;

[0032] Figure 4 is a data interaction diagram of a thread pool controller according to an embodiment of the present invention;

[0033] Figure 5 is a data interaction diagram of an interface adaptation layer according to an embodiment of the present invention;

[0034] Figure 6 is a data interaction diagram of a result statistics and fault prediction module according to an embodiment of the present invention;

[0035] Figure 7 The flowchart of the BMC automated testing method based on multi-interface high concurrency and intelligent analysis according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

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

[0038] The following describes a BMC automated testing system and method based on multi-interface high concurrency and intelligent analysis according to an embodiment of the present invention with reference to the accompanying drawings.

[0039] The technical terms mentioned in the present invention are introduced below:

[0040] BMC: Baseboard Management Controller, used to manage and monitor servers.

[0041] LSTM: Long Short-Term Memory (LSTM) is a special recurrent neural network (RNN) designed to solve the gradient vanishing / exploding problem of traditional RNN when processing long sequence data.

[0042] Figure 1 FIG is a structural diagram of a BMC automated test system based on multi-interface high concurrency and intelligent analysis according to an embodiment of the present invention. Figure 1 As shown, including:

[0043] A configuration parsing module is configured to respond to a test configuration request, read configuration files and / or command line parameters, and generate a structured test parameter object; wherein the test parameter object includes a list of interface types, BMC IP address, number of concurrent users, number of sessions, and authentication method;

[0044] A session management module, connected to the configuration parsing module, is used to create multiple independent session instances according to the authentication method and number of sessions in the test parameter object, maintain the session active state through a heartbeat detection mechanism, and automatically release the connection and reestablish the session when a session anomaly is detected;

[0045] a thread pool controller module, connected to the session management module, configured to dynamically adjust the thread pool size based on the system resource status of the BMC, and to increase the number of threads to improve test throughput when the CPU usage is detected to be lower than a first preset threshold, and to reduce the number of threads to prevent system overload when the CPU usage is detected to be higher than a second preset threshold;

[0046] An interface adaptation layer module, connected to the thread pool controller module, is used to encapsulate a unified API and send a test request to the BMC through the unified API;

[0047] The result statistics and fault prediction module is connected to the interface adaptation layer module, and is used to collect test results and perform multi-dimensional statistical analysis. Based on historical test data and current test results, a time series model is used to predict the failure probability of each interface in the future time window. If the predicted failure probability exceeds the preset threshold, a high-risk interface list and root cause location suggestions are generated, and the corresponding test cases are added to the retest task queue to generate a test report; wherein, the test report includes interface type, test results, response time, error code, and error log.

[0048] It is understandable that the thread pool controller module not only has basic test case scheduling functions, but also supports a dynamic scheduling mechanism based on task priority. During system operation, if a high-priority retest task (such as regression testing, failure retry, etc.) is detected, the module will automatically insert it into the front of the execution queue and reserve a certain amount of thread resources for such tasks to ensure that they can obtain execution opportunities in a timely manner. This scheduling strategy effectively guarantees the coordinated execution of the main test task and the retest task, avoiding the impact of the completion efficiency of the key test process due to the accumulation of low-priority tasks.

[0049] It's understandable that the interface adaptation layer module encapsulates test commands from different underlying communication protocols (such as HTTP, MQTT, Modbus, CAN, etc.) by building a unified API interface layer, enabling protocol-independent command invocation. The addition, deletion, and modification of all test commands can be defined through configuration files without modifying the core code logic, greatly improving the system's flexibility and maintainability, and facilitating rapid integration with new devices under test or expanded test scenarios.

[0050] As you can understand, the result statistics and fault prediction module not only automatically generates structured test reports but also supports multi-dimensional data classification and statistics. Specifically, this includes analyzing response success rates by interface type, categorizing failure causes by error type, and analyzing performance bottlenecks based on response time distribution. Furthermore, the system provides a visual real-time monitoring dashboard that dynamically displays information such as current test progress, anomaly trends, and fluctuations in key indicators, helping testers quickly identify and respond to potential issues.

[0051] Furthermore, the thread pool controller module also has the ability to adaptively adjust based on the BMC system load when executing concurrent test tasks. The module continuously monitors the CPU utilization on the BMC side and compares it with the preset load threshold. When the CPU utilization exceeds the upper threshold, the system will appropriately reduce the number of concurrent threads in the thread pool to prevent system overload. Conversely, if the CPU load is low, the number of concurrent threads will be automatically increased to improve test throughput. This mechanism achieves the dual guarantee of intelligent scheduling of test resources and system stability, helping to maximize testing efficiency with limited hardware resources.

[0052] Specifically, each module is analyzed as follows:

[0053] In one embodiment of the present invention, the configuration parsing module: Based on the configuration file (YAML or JSON number) provided by the user and the input command line parameters, it structures the test parameter object, including the interface type list, BMC IP address, number of concurrency, number of sessions, authentication method, etc. The data interaction process of the configuration parsing module is as follows: Figure 2 As shown:

[0054] S21 reads the configuration file provided by the user. The configuration file format is YAML or JSON, and parses the command line parameters carried by the user when executing the automated testing tool.

[0055] S22, if the command line parameter does not exist, directly load the configuration in the configuration file as the test configuration. If it exists, merge the configuration priority, command line > file > default.

[0056] S23, parameter validity check, including determining whether the tested BMC IP address is legal, if not, throwing an exception and exiting the process, determining whether the number of concurrent users and sessions is within a reasonable range (such as 1-1000), if not, throwing an exception and exiting the process, determining whether the interface type is in the whitelist (IPMI, Redfish, Restful, SNMP), if not, throwing an exception and exiting the process, determining whether the authentication method is in the whitelist (Basic Auth, Token), if not, throwing an exception and exiting the process. After all parameter checks are passed, the command list to be tested is read and a TestConfig object is generated. The object structure type is shown in the following example:

[0057] class TestConfig:

[0058] bmc_ip:str#Required field, format verification

[0059] interfaces:list#such as ["redfish","snmp"]

[0060] concurrency:int #Range: 1-1000

[0061] sessions:int#Range: 1-100

[0062] auth_type:str#"basic"or"token"

[0063] test_cases:dict#The key is the interface type, and the value is the test command list

[0064] In one embodiment of the present invention, the session management module creates an independent session instance based on the authentication method, the number of sessions, and the BMCIP, and maintains the session state (such as the authentication token, session timeout, etc.). The data interaction process of the session management module is as follows: Figure 3 As shown:

[0065] S31, read the authentication method, session number, and BMC IP in the TestConfig object. If it is BasicAuth authentication, create an HTTP connection for each session. If it is Token authentication, call the interface to obtain the Token.

[0066] S32, heartbeat detection maintains the session in an active state by regularly sending lightweight requests to avoid the session being actively terminated by the BMC due to long periods of inactivity. The specific operation does not send a heartbeat request. If a response is received, the last active time is updated. If no response is received, the session is marked as abnormal, the connection is released, the token is refreshed, the session is rebuilt, and the session is marked as available. The polling strategy is adopted to evenly distribute the session to threads to ensure load balancing.

[0067] In one embodiment of the present invention, the thread pool controller: dynamically creates a thread pool based on the number of concurrent connections, assigns test tasks to each thread, monitors the thread execution status, can dynamically adjust the thread pool size based on the current BMC system resource situation, and supports balanced distribution of test tasks among threads, supports abnormal thread capture and automatic recovery. The data interaction process of the thread pool controller is as follows: Figure 4 As shown:

[0068] S41 initializes the thread pool, monitors the BMC CPU usage in real time, and dynamically adjusts the maximum number of threads. When the CPU usage is lower than 50%, the number of threads is expanded to improve throughput. When the CPU usage is greater than 80%, the number of threads is reduced to prevent overload. The total number of threads is not less than 1 and not higher than the preset maximum value.

[0069] S42, obtain the interface task to be tested from the queue, and determine whether the thread pool is idle. If not, wait for 10ms and try again. Otherwise, assign a new test task to the idle thread.

[0070] S43, execute the call test interface, record success if the execution is successful, if the execution fails, determine whether the number of retries is less than 3, if less than 3, increase the number of retries by 1, and call the test interface again, if the retries fail after 3 times, mark it as failure.

[0071] S44, detect whether there is a high-priority retest task. If so, use the task priority scheduling algorithm to preemptively execute the emergency-level retest task first, and then execute the normal-level main test task.

[0072] S45, after the test task is completed, the success record and the failure record are submitted to the statistics module.

[0073] In one embodiment of the present invention, the interface adaptation layer: implements the protocol adaptation of Redfish / Restful / Snmp / IPMI and encapsulates a unified API for the upper layer to call. The interaction process of the interface adaptation layer is as follows: Figure 5 As shown:

[0074] S51: The interface adaptation layer encapsulates a unified command sending interface for Redfish, SNMP, and IPMI. It obtains the test interface type and specific test command by reading the test command list in the TestConfig object, fills them into the unified command sending interface, and sends them to the BMC.

[0075] S52: The unified command sending interface includes an authentication interface encapsulated according to the authentication method (Basic Auth or Token), and a sending interface encapsulated according to the protocol type. Due to the unified abstraction of the interface layer, the addition and removal of test commands can be configured simply through the configuration file, without additional code modifications.

[0076] In one embodiment of the present invention, the result statistics and fault prediction module collects the execution results of each thread (success / failure, response time, error log, error code), generates a final test report in HTML or CSV format, analyzes historical test data, generates a fault prediction report (high-risk interface list), root cause location suggestions, and a retest task queue. The data interaction process between the result statistics and the fault prediction module is as follows: Figure 6 Said:

[0077] S61, based on the return results (success / failure, response time, error code, etc.) of the test tasks of each thread, conduct multi-dimensional aggregation analysis (classified by interface type and error type). The statistical results include interface type, actual test interface name, success / failure results, number of successes / failures, response time, error code, error log and other information, and output test reports in HTML or CSV format and real-time monitoring dashboard.

[0078] S62, the fault prediction function can be controlled by the configuration file. When the fault prediction function is enabled, the fault prediction module generates a high-risk interface list, root cause location suggestions, and a retest task queue based on real-time test results and historical test data, and re-adds the use cases that need to be retested to the thread pool for retesting. It supports preemptive execution of high-priority retest tasks, reserves 20% of thread resources for retest tasks, and prevents the main test task from being blocked.

[0079] S63, the fault prediction function mainly extracts key features from test results, such as error rate and error type distribution entropy, to train the fault model. It uses a lightweight LSTM model to predict the failure probability of each interface within the next 10 minutes based on historical data. It can identify high-risk interfaces and provide fault location suggestions.

[0080] According to the BMC automated testing system based on multi-interface high concurrency and intelligent analysis provided by the embodiments of the present invention, high concurrency simulates real loads, exposes interface race conditions, resource leakage and other problems, and improves test coverage and defect detection rate; uses a dynamic thread pool to shorten test execution time and reduce the response time of retest tasks; uses an LSTM model to analyze historical test data to automatically identify high-risk interfaces and provide fault suggestions, greatly shortening problem location time; a unified interface adaptation layer and configuration module shield the differences in BMC interfaces of different models and platforms, increase test scalability, and can add or tailor test cases without modifying the code.

[0081] In order to implement the above embodiment, Figure 7 As shown, this embodiment also provides a BMC automated testing method based on multi-interface high concurrency and intelligent analysis, including:

[0082] S1, in response to a test configuration request, reads a configuration file and / or command line parameters through a configuration parsing module to generate a structured test parameter object, wherein the test parameter object includes an interface type list, a BMC IP address, a concurrency number, a session number, and an authentication method;

[0083] S2, creating multiple independent session instances through a session management module according to the authentication method and number of sessions in the test parameter object, and maintaining status information of each session;

[0084] S3, when a change in BMC system resources is detected, the thread pool size is dynamically adjusted based on the current CPU usage through the thread pool controller module. If the CPU usage is lower than a first preset threshold, the number of threads is increased to improve the test throughput. If the CPU usage is higher than a second preset threshold, the number of threads is reduced to prevent system overload.

[0085] S4, calling a unified interface sending method through the interface adaptation layer module, and sending a test request to the BMC according to the interface type and test command list in the test parameter object;

[0086] S5 collects the test results of each thread's test task execution, performs multi-dimensional aggregate analysis through the result statistics and fault prediction module, and uses a time series model to predict the failure probability of each interface in the future time window based on historical test data and current test results. If the predicted failure probability exceeds the preset threshold, a list of high-risk interfaces and root cause location suggestions are generated, and the corresponding test case is added to the retest task queue;

[0087] S6: Based on the test task priority, if there is a high-priority retest task, the retest task is scheduled first through the thread pool controller module, and thread resources are reserved for the retest task to ensure the coordinated execution of the main test task and the retest task;

[0088] S7, after the test task is completed, a test report is generated; wherein, the test report includes the interface type, test results, response time, error code, and error log.

[0089] Furthermore, when parsing the configuration file and command line parameters, a priority merging strategy is adopted, wherein the command line parameters have a higher priority than the configuration file, and the configuration file has a higher priority than the default configuration.

[0090] Furthermore, when creating a session instance, Basic Auth or Token authentication is selected according to the authentication method, and lightweight requests are sent regularly through the heartbeat detection mechanism to maintain the session active. When a session abnormality is detected, the connection is automatically released and the authentication information is refreshed to re-establish the session.

[0091] Furthermore, when dynamically adjusting the thread pool size, the CPU usage of the BMC is monitored in real time, and the number of concurrent threads in the thread pool is adjusted according to a comparison result between the CPU usage and a preset threshold.

[0092] Furthermore, an LSTM model is used to perform time series analysis on the test results, extract the error rate and error type distribution entropy, predict the failure probability of each interface in the future time window, and generate a list of high-risk interfaces and root cause location suggestions based on the prediction results.

[0093] According to the BMC automated testing method based on multi-interface high concurrency and intelligent analysis provided by an embodiment of the present invention, high concurrency simulates real loads, exposes interface race conditions, resource leakage and other problems, and improves test coverage and defect detection rate; uses a dynamic thread pool to shorten test execution time and reduce retest task response time; uses an LSTM model to analyze historical test data to automatically identify high-risk interfaces and provide fault suggestions, greatly shortening problem location time; a unified interface adaptation layer and configuration module shield the differences in BMC interfaces of different models and platforms, increase test scalability, and can add or tailor test cases without modifying the code.

[0094] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0095] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

Claims

1. A BMC automated testing system based on multi-interface high concurrency and intelligent analysis, characterized by: include: A configuration parsing module is configured to respond to a test configuration request, read configuration files and / or command line parameters, and generate a structured test parameter object; wherein the test parameter object includes a list of interface types, BMC IP address, number of concurrent users, number of sessions, and authentication method; A session management module, connected to the configuration parsing module, is used to create multiple independent session instances according to the authentication method and number of sessions in the test parameter object, maintain the session active state through a heartbeat detection mechanism, and automatically release the connection and reestablish the session when a session anomaly is detected; a thread pool controller module, connected to the session management module, configured to dynamically adjust the thread pool size based on the system resource status of the BMC, and to increase the number of threads to improve test throughput when the CPU usage is detected to be lower than a first preset threshold, and to reduce the number of threads to prevent system overload when the CPU usage is detected to be higher than a second preset threshold; An interface adaptation layer module, connected to the thread pool controller module, is used to encapsulate a unified API and send a test request to the BMC through the unified API; The result statistics and fault prediction module is connected to the interface adaptation layer module, and is used to collect test results and perform multi-dimensional statistical analysis. Based on historical test data and current test results, a time series model is used to predict the failure probability of each interface in the future time window. If the predicted failure probability exceeds the preset threshold, a high-risk interface list and root cause location suggestions are generated, and the corresponding test cases are added to the retest task queue to generate a test report; wherein, the test report includes interface type, test results, response time, error code, and error log.

2. The system according to claim 1, wherein: The thread pool controller module is also used to schedule the execution of test cases according to the test task priority. If there is a high-priority retest task, the retest task will be executed first, and thread resources will be reserved for the retest task to ensure the coordinated execution of the main test task and the retest task.

3. The system according to claim 1, wherein: The interface adaptation layer module encapsulates test commands of different protocols through a unified API interface, so that the addition and removal of test instructions only need to be defined through the configuration file without modifying the system code.

4. The system according to claim 1, wherein: When generating a test report, the result statistics and fault prediction module supports classification statistics by interface type, error type, and response time, and provides a real-time monitoring dashboard.

5. The system according to claim 1, wherein: When dynamically adjusting the thread pool size, the thread pool controller module monitors the CPU usage of the BMC in real time and adjusts the number of concurrent threads in the thread pool according to a comparison result between the CPU usage and a preset threshold.

6. A BMC automated testing method based on multi-interface high concurrency and intelligent analysis, characterized in that: The following steps are involved: In response to a test configuration request, the configuration parsing module reads configuration files and / or command line parameters to generate a structured test parameter object, wherein the test parameter object includes an interface type list, a BMC IP address, a concurrency number, a session number, and an authentication method; According to the authentication mode and number of sessions in the test parameter object, a session management module is used to create multiple independent session instances and maintain the status information of each session; When a change in BMC system resources is detected, the thread pool size is dynamically adjusted based on the current CPU usage through the thread pool controller module. If the CPU usage is below a first preset threshold, the number of threads is increased to improve test throughput. If the CPU usage is above a second preset threshold, the number of threads is reduced to prevent system overload. Calling a unified interface sending method through the interface adaptation layer module, and sending a test request to the BMC according to the interface type and test command list in the test parameter object; Collect the test results of each thread's test tasks, perform multi-dimensional aggregate analysis through the result statistics and fault prediction module, and use a time series model to predict the failure probability of each interface in the future time window based on historical test data and current test results. If the predicted failure probability exceeds the preset threshold, a list of high-risk interfaces and root cause location suggestions are generated, and the corresponding test cases are added to the retest task queue; According to the test task priority, if there is a high-priority retest task, the retest task will be scheduled first through the thread pool controller module, and thread resources will be reserved for the retest task to ensure the coordinated execution of the main test task and the retest task; After the test task is completed, a test report is generated; wherein, the test report includes the interface type, test results, response time, error code, and error log.

7. The method according to claim 6, characterized in that When parsing configuration files and command line parameters, a priority merging strategy is adopted, where command line parameters have a higher priority than configuration files, and configuration files have a higher priority than default configurations.

8. The method according to claim 6, characterized in that When creating a session instance, select Basic Auth or Token authentication based on the authentication method, and regularly send lightweight requests through the heartbeat detection mechanism to maintain the session active. When a session anomaly is detected, the connection is automatically released, the authentication information is refreshed, and the session is reestablished.

9. The method according to claim 6, characterized in that When dynamically adjusting the thread pool size, the CPU usage of the BMC is monitored in real time, and the number of concurrent threads in the thread pool is adjusted based on a comparison result between the CPU usage and a preset threshold.

10. The method according to claim 6, characterized in that The LSTM model is used to perform time series analysis on the test results, extract the error rate and error type distribution entropy, predict the failure probability of each interface in the future time window, and generate a list of high-risk interfaces and root cause location suggestions based on the prediction results.

Citation Information

Cited By

  • Security protection system for authentication based on different types of interfaces

    CN121309109A