Test method, device and terminal equipment

By introducing stress testing and non-stress testing into server BMC tests, combined with real-time monitoring processing, the problem of insufficient flexibility in BMC testing is solved, and more efficient and accurate testing is achieved.

CN119759676APending Publication Date: 2025-04-04SUGON INFORMATION IND +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411919399.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The server BMC test has low flexibility, and it is only possible to detect BMC abnormalities after a long period of pressurization test, resulting in insufficient testing flexibility.

Method used

Provide a testing method and device, by obtaining test requests, conducting stress tests or non-stress tests, and monitoring and processing the BMC during the test process, observing resource information in real time, and avoiding long-term testing.

Benefits of technology

It improves the flexibility of server BMC testing, can monitor BMC resource information in real time, and promptly detect functional abnormalities, improving the accuracy and efficiency of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759676A_ABST
    Figure CN119759676A_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a test method, apparatus and terminal device. The method includes: obtaining a test request, the test request includes the identification of the baseboard management controller BMC to be tested, and the test type; if the test type is a stress test type, obtaining at least one test script corresponding to the stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain the test result corresponding to the test request; if the test type is a non-stress test type, obtaining a first preset acquisition frequency, and monitoring processing on the BMC according to the first preset acquisition frequency to obtain the test result corresponding to the test request. The flexibility of server BMC testing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a testing method, apparatus, and terminal device. Background Art

[0002] The server's baseboard management controller (BMC) can monitor and manage the server's hardware resources. In order to ensure the server runs stably, the server's BMC needs to be tested before running the server to improve the stability of the BMC.

[0003] In the related art, the BMC can be tested in the following ways: perform stress tests on specific BMC functions (for example, perform stress tests on the Simple Network Management Protocol (SNMP) interface to obtain multi-threaded information) to determine whether the BMC function will behave abnormally under long-term stress tests. In the above process, the test focuses more on the test of the upper-layer functional interface, and functional problems caused by insufficient resources may occur only after long-term stress testing. If the BMC memory leaks, it will take a long time to show that the BMC function is abnormal, resulting in low flexibility in server BMC testing. Summary of the invention

[0004] The embodiments of the present application provide a testing method, an apparatus and a terminal device to solve the problem of low flexibility in server BMC testing.

[0005] In a first aspect, an embodiment of the present application provides a testing method, comprising:

[0006] Obtaining a test request, wherein the test request includes an identifier of a baseboard management controller BMC to be tested and a test type;

[0007] If the test type is a stress test type, obtaining at least one test script corresponding to the stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request;

[0008] If the test type is a non-stress test type, a first preset acquisition frequency is obtained, and the BMC is monitored according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

[0009] In the embodiment of the present application, the BMC of the server is subjected to stress testing or non-stress testing, and the BMC can be monitored and processed during the test to observe the resource information in the BMC in real time. Instead of only testing the upper-layer functional interface, it can avoid the situation where a long test is required to discover the abnormality of the BMC function, thereby improving the flexibility of the server BMC test.

[0010] In a possible implementation, performing testing and monitoring on the BMC to obtain a test result corresponding to the test request includes:

[0011] Determining a second preset acquisition frequency and a test period according to the at least one test script;

[0012] Performing test processing on the BMC during the test period according to the at least one test script;

[0013] Performing monitoring processing on the BMC during the test period, and collecting at least one test resource information corresponding to the BMC during the test period according to the second preset collection frequency;

[0014] A test result corresponding to the test request is determined according to the at least one test resource information.

[0015] In the embodiment of the present application, while the BMC is stress tested, the BMC is monitored and at least one test resource information is obtained. The user can analyze the test results generated by the at least one test resource information to determine whether the BMC is abnormal, thereby improving the accuracy of the BMC test.

[0016] In a possible implementation, the test resource information includes at least a process memory occupancy rate of the BMC, a process occupancy rate of the BMC on a central processing unit CPU, a process file descriptor of the BMC, a process identifier of the BMC, and sensor information of the BMC; determining a test result corresponding to the test request according to the at least one test resource information includes:

[0017] In the at least one test resource information, at least one first resource set is determined, wherein the first resource set includes information corresponding to the same item in the at least one test resource information;

[0018] For any first resource set, determine the collection time of each information in the first resource set;

[0019] generating a first image corresponding to each item of information according to the collection time, wherein the first image is used to indicate a trend corresponding to each item of information according to the collection time;

[0020] It is determined that the test result corresponding to the test request includes the first image corresponding to each first resource set.

[0021] In the embodiment of the present application, the test result includes a result trend chart of each information in the test resource information over the test time, and the user only needs to check whether each first image is normal. When an abnormality occurs, the problem location analysis can be performed through the monitoring log stored in the preset storage area.

[0022] In a possible implementation, monitoring the BMC according to the first preset acquisition frequency to obtain a result corresponding to the test request includes:

[0023] Acquire at least one first script currently running by the BMC;

[0024] According to the at least one first script and the first preset collection frequency, at least one test resource information corresponding to the BMC is collected within a current period to monitor the BMC;

[0025] A test result corresponding to the test request is determined according to the at least one test resource information.

[0026] In the embodiment of the present application, when the BMC is in normal operation, the BMC is monitored and at least one test resource information is obtained. The user can analyze the test results generated by the at least one test resource information to determine whether the BMC is abnormal in the normal operation state, thereby improving the flexibility of the BMC test.

[0027] In a possible implementation, the method further includes:

[0028] Before performing monitoring processing, user information corresponding to the BMC is obtained, and the user information is stored in a preset storage area of ​​the BMC, so that when obtaining the at least one test resource information, the at least one test resource information is obtained from the preset storage area through a preset command according to the user information.

[0029] In the embodiment of the present application, the monitoring model can directly obtain at least one test resource information from the preset storage area. Since the preset storage area is a storage area in the BMC, it is not affected by the iterative version of the BMC itself, the maintenance cost of the model is low, and it is implemented automatically, saving manpower and time costs.

[0030] In a possible implementation, the method further includes:

[0031] If the first resource information or the second resource information also includes a core dump file, obtaining a preset storage path, wherein the core dump file is used to indicate memory-related information corresponding to a process when the process crashes or is abnormal;

[0032] The core dump file is stored according to the preset storage path.

[0033] In the embodiment of the present application, when a process crashes or is abnormal, a core dump file can be obtained and stored, so that the user can determine the cause of the process crash or abnormality according to the core dump file, thereby improving the accuracy of the test.

[0034] In a second aspect, an embodiment of the present application provides a testing device, the device comprising:

[0035] An acquisition module, used for acquiring a test request, wherein the test request includes an identifier of a baseboard management controller BMC to be tested and a test type;

[0036] A first processing module is used for obtaining at least one test script corresponding to the stress test type if the test type is a stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request;

[0037] The second processing module is used to obtain a first preset acquisition frequency if the test type is a non-stress test type, and monitor the BMC according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

[0038] In a possible implementation manner, the first processing module is specifically configured to:

[0039] Determining a second preset acquisition frequency and a test period according to the at least one test script;

[0040] Performing test processing on the BMC during the test period according to the at least one test script;

[0041] Performing monitoring processing on the BMC during the test period, and collecting at least one test resource information corresponding to the BMC during the test period according to the second preset collection frequency;

[0042] A test result corresponding to the test request is determined according to the at least one test resource information.

[0043] In a possible implementation manner, the first processing module is specifically configured to:

[0044] In the at least one test resource information, at least one first resource set is determined, wherein the first resource set includes information corresponding to the same item in the at least one test resource information;

[0045] For any first resource set, determine the collection time of each information in the first resource set;

[0046] generating a first image corresponding to each item of information according to the collection time, wherein the first image is used to indicate a trend corresponding to each item of information according to the collection time;

[0047] It is determined that the test result corresponding to the test request includes the first image corresponding to each first resource set.

[0048] In a possible implementation manner, the second processing module is specifically configured to:

[0049] Acquire at least one first script currently running by the BMC;

[0050] According to the at least one first script and the first preset collection frequency, at least one test resource information corresponding to the BMC is collected within a current period to monitor the BMC;

[0051] A test result corresponding to the test request is determined according to the at least one test resource information.

[0052] In a possible implementation manner, the device further includes a storage module.

[0053] Wherein, the storage module is used for:

[0054] Before performing monitoring processing, user information corresponding to the BMC is obtained, and the user information is stored in a preset storage area of ​​the BMC, so that when obtaining the at least one test resource information, the at least one test resource information is obtained from the preset storage area through a preset command according to the user information.

[0055] The storage module is also used for:

[0056] If the first resource information or the second resource information also includes a core dump file, obtaining a preset storage path, wherein the core dump file is used to indicate memory-related information corresponding to a process when the process crashes or is abnormal;

[0057] The core dump file is stored according to the preset storage path.

[0058] In a third aspect, an embodiment of the present application provides a terminal device, including:

[0059] at least one processor; and

[0060] a memory communicatively connected to the at least one processor; wherein,

[0061] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any method described in the first aspect.

[0062] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the first aspect.

[0063] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method in the first aspect when executed by a processor.

[0064] The test method, device and terminal device provided in the embodiment of the present application can perform stress test or non-stress test on the BMC of the server, and can monitor and process the BMC during the test to observe the resource information in the BMC in real time. Instead of only testing the upper-layer functional interface. It can also avoid the situation where a long test is required to discover BMC function abnormalities, thereby improving the flexibility of server BMC testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0066] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application;

[0067] Figure 2 A flow chart of a testing method provided in an embodiment of the present application;

[0068] Figure 3 A schematic diagram of the process of obtaining a test request provided in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of another testing method provided in an embodiment of the present application;

[0070] Figure 5 A schematic diagram of the monitoring process provided by an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the test process provided in the embodiment of the present application;

[0072] Figure 7 A schematic diagram of the structure of a testing device provided in an embodiment of the present application;

[0073] Figure 8 A schematic diagram of the structure of another testing device provided in an embodiment of the present application;

[0074] Fig. 9 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application.

[0075] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0077] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0078] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0079] For ease of understanding, below, combined Figure 1 , the application scenarios to which the embodiments of the present application are applicable are described.

[0080] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1, including a terminal device 101 and a server 102. The terminal device 101 may be a computer, and a test tool is provided in the terminal device 101. A BMC is provided in the server 102. The BMC of the server 102 may be tested by the test tool of the terminal device 101 to determine whether the BMC is abnormal.

[0081] In the related art, the BMC can be tested in the following ways: perform stress tests on specific BMC functions (for example, perform stress tests on the Simple Network Management Protocol (SNMP) interface to obtain information through multi-threading), and determine whether the BMC function will behave abnormally under long-term stress tests. In the above process, the test focuses more on the test of the upper-layer functional interface, and functional problems caused by insufficient resources may occur only after long-term stress tests. If the BMC memory leaks, it will take a long time to show that the BMC function is abnormal, resulting in low flexibility in server BMC testing.

[0082] In the embodiment of the present application, the BMC of the server can be subjected to stress testing or non-stress testing, and the BMC can be monitored and processed during the test to observe the resource information in the BMC in real time, rather than only testing the upper-layer functional interface. It can also avoid the situation where a long test is required to discover BMC function abnormalities, thereby improving the flexibility of server BMC testing.

[0083] The method shown in the present application is described below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.

[0084] Figure 2 A flow chart of a test method provided in an embodiment of the present application. Figure 2 , the method may include:

[0085] S201. Obtain a test request.

[0086] The execution subject of the embodiment of the present application may be a terminal device, or a test device arranged in the terminal device. The test device may be implemented by software, or by a combination of software and hardware. The terminal device may be a computer.

[0087] The test request includes the identifier of the baseboard management controller BMC to be tested and the test type, which may be a stress test type or a non-stress test type.

[0088] After determining the BMC to be tested and the test type, the user can determine the identifier of the BMC to be tested and the test type in the terminal device. The terminal device generates a test request in response to the user's input selection operation.

[0089] Next, combine Figure 3 , describes the process of obtaining a test request. Figure 3 A schematic diagram of the process of obtaining a test request provided in an embodiment of the present application. Figure 3 , including interface 301 to interface 302. Interface 301 to interface 302 may be pages provided by the terminal device. Referring to interface 301, the user clicks the icon corresponding to the test application in the main page of the terminal device, and the terminal device selects the operation in response to the user's input, and displays the operation page. The operation page includes a drop-down selection menu corresponding to the BMC logo, a drop-down selection menu corresponding to the test type, and a text input box.

[0090] Referring to interface 302, the user determines that the BMC to be tested is identified as BMC 1 in the drop-down selection menu corresponding to the BMC identification, determines that the test type is a stress test type in the drop-down selection menu corresponding to the test type, and clicks the confirmation icon. The terminal device generates a test request in response to the user's input selection operation. The test request includes BMC 1 and the stress test type.

[0091] S202: If the test type is a stress test type, obtain at least one test script corresponding to the stress test type, and perform test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request.

[0092] To monitor the internal resource process of BMC during stress testing, the corresponding BMC stress tool is obtained through the test tool, and the monitoring model automatic call function is embedded in the stress tool, and then the test script in the stress tool is configured.

[0093] The BMC may be tested and monitored according to at least one test script to obtain a test result corresponding to the test request in the following manner: determining a second preset acquisition frequency and a test period according to at least one test script; testing the BMC during the test period according to at least one test script; monitoring the BMC during the test period, and collecting at least one test resource information corresponding to the BMC during the test period according to the second preset acquisition frequency; and determining a test result corresponding to the test request based on the at least one test resource information.

[0094] While performing stress testing on the BMC, the BMC is monitored and at least one test resource information is obtained. The user can analyze the test results generated by the at least one test resource information to determine whether the BMC is abnormal, thereby improving the accuracy of the BMC test.

[0095] The test script corresponds to a test process. The second preset collection frequency and test period can be determined according to the test process corresponding to each test script.

[0096] For example, the test process corresponding to the test script can be specifically shown in Table 1:

[0097] Table 1

[0098]

[0099] The test resource information includes at least the BMC process memory occupancy rate, the BMC process occupancy rate of the central processing unit (CPU), the BMC process file descriptor, the BMC process identifier, and the BMC sensor information.

[0100] Optionally, the user may also set test resource information according to the test scenario and test requirements, so that the monitoring model can obtain the test resource information set by the user during the test period.

[0101] The stress tool of the terminal device can obtain at least one test script and send at least one test script to the server corresponding to the BMC to be tested. After receiving the at least one test script, the server creates a first process corresponding to the stress test and a second process corresponding to the monitoring model. And run at least one test script through the first process to perform stress testing. The terminal device obtains at least one test resource information from the server through the second process during the test period according to the second preset acquisition frequency. The two processes are executed in parallel without interfering with each other.

[0102] The terminal device generates a time trend graph corresponding to each item of information in the test resource information according to the test resource information, thereby obtaining the test result.

[0103] For example, according to the above example, it is determined that the test request includes BMC 1 and the stress test type. The test tool of the terminal device obtains the corresponding BMC stress tool, and embeds the monitoring model's automatic call function into the stress tool, and then configures at least one test script in the stress tool. Assume that the server corresponding to BMC 1 is server 1. The terminal device sends at least one test script to server 1. After receiving at least one test script, server 1 creates a first process corresponding to the stress test and a second process corresponding to the monitoring model. And run at least one test script through the first process to perform a stress test. The terminal device determines that the second preset acquisition frequency is 1min / once, and the terminal device obtains at least one test resource information from server 1 during the test period through the second process according to the second preset acquisition frequency, which can be specifically shown in Table 2:

[0104] Table 2

[0105]

[0106] The terminal device generates images 1 to 5 according to the test resource information shown in Table 2. Images 1 to 5 correspond to the time trend graphs of each information in the test resource information. Among them, Image 1 is the time trend graph corresponding to the memory occupancy rate of the BMC process, Image 2 is the time trend graph corresponding to the CPU occupancy rate of the BMC process, Image 3 is the time trend graph corresponding to the BMC process file descriptor, Image 4 is the time trend graph corresponding to the BMC process identifier, and Image 5 is the time trend graph corresponding to the BMC sensor information.

[0107] S203: If the test type is a non-stress test type, obtain a first preset acquisition frequency, and monitor the BMC according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

[0108] When the test type is a non-stress test type, the BMC of the server is in a normal operating state. The terminal device monitors the operation process of the BMC of the server in a normal operating state to test the BMC to determine whether the BMC is abnormal.

[0109] The BMC may be monitored and processed according to the first preset acquisition frequency to obtain a test result corresponding to the test request in the following manner: obtaining at least one first script currently running by the BMC; collecting at least one test resource information corresponding to the BMC within a current time period according to the at least one first script and the first preset acquisition frequency to monitor the BMC; and determining the test result corresponding to the test request according to the at least one test resource information.

[0110] When the BMC is in normal operation, the BMC is monitored and at least one test resource information is obtained. The user can analyze the test results generated by the at least one test resource information to determine whether the BMC is abnormal in the normal operation state, thereby improving the flexibility of the BMC test.

[0111] The first preset acquisition frequency can be set in advance, and the first preset acquisition frequency is stored in the preset storage space of the terminal device. The first preset acquisition frequency can be set by the user or can be a default value. This application does not make any restrictions.

[0112] For example, assuming that the test request includes BMC 1 and a non-stress test type, the server corresponding to BMC 1 is server 1. The test tool of the terminal device obtains at least one first script currently running by BMC 1 through the monitoring model. The terminal device collects at least one test resource information corresponding to BMC 1 within the current period according to the at least one first script and the first preset collection frequency to monitor the BMC. The terminal device generates images 6 to 10 according to the at least one test resource information corresponding to BMC 1. Images 6 to 10 correspond to the time trend graphs of each information in the test resource information.

[0113] The test method provided in the embodiment of the present application obtains a test request. If the test type is a stress test type, at least one test script corresponding to the stress test type is obtained, and the BMC is tested and monitored according to the at least one test script to obtain a test result corresponding to the test request. If the test type is a non-stress test type, the first preset acquisition frequency is obtained, and the BMC is monitored according to the first preset acquisition frequency to obtain a test result corresponding to the test request. In the above process, the BMC of the server can be stress tested or non-stress tested, and the BMC can be monitored during the test to observe the resource information in the BMC in real time. Instead of testing only the upper-level functional interface. And it can avoid the situation where a long time of testing is required to discover BMC functional abnormalities, thereby improving the flexibility of server BMC testing.

[0114] Based on any of the above embodiments, Figure 4 , the detailed process of the test is explained.

[0115] Figure 4 A flow chart of another testing method provided in the embodiment of the present application. Figure 4 , the method comprising:

[0116] S401: Get a test request.

[0117] It should be noted that the execution process of S401 can refer to S201 and will not be repeated here.

[0118] S402: If the test type is a stress test type, obtain at least one test script corresponding to the stress test type.

[0119] For example, the test request includes BMC 2 and the stress test type. The test tool of the terminal device obtains the corresponding BMC stress tool, embeds the monitoring model automatic call function into the stress tool, and obtains at least one test script including script B1 to script B5 in the stress tool.

[0120] S403: Determine a second preset collection frequency and test period according to at least one test script.

[0121] The test duration may be determined based on at least one test script, and the test period may be determined based on the test start time and the test duration.

[0122] For example, according to the above example, at least one test script is determined to include scripts B1 to B5. The terminal device determines that the second preset acquisition frequency can be 1 minute / time according to scripts B1 to B5. The terminal device determines that the test duration is 48 hours according to scripts B1 to B5, and determines that the test start time is 2024 / 12 / 20 15:50. According to the test duration, the test period is determined to be 2024 / 12 / 20 15:50~2024 / 12 / 22 15:50.

[0123] S404: Perform test processing on the BMC during a test period according to at least one test script.

[0124] For example, according to the above example, the test period is determined to be 2024 / 12 / 20 15:50~2024 / 12 / 22 15:50. Assume that the server corresponding to BMC 2 is server 2. The terminal device controls server 2 to run scripts B1~script B5 between 2024 / 12 / 20 15:50~2024 / 12 / 22 15:50 to test BMC 2.

[0125] S405: Monitor the BMC during the test period, and collect at least one test resource information corresponding to the BMC during the test period according to a second preset collection frequency.

[0126] Before performing monitoring processing, user information corresponding to the BMC is obtained and stored in a preset storage area of ​​the BMC, so that when obtaining at least one test resource information, at least one test resource information is obtained from the preset storage area through a preset command according to the user information.

[0127] The preset storage area may be a storage area in the BMC. For example, the preset storage area may be the BMC OS. At least one test resource information generated during the test may be stored in the preset storage area.

[0128] The monitoring model can directly obtain at least one test resource information from the preset storage area. Since the preset storage area is the storage area in the BMC, it is not affected by the iteration version of the BMC itself. The maintenance cost of the model is low and it is implemented automatically, saving manpower and time costs.

[0129] User information can be obtained based on the configuration file in the monitoring model. The user information includes the Internet Protocol (IP), user name, and password information of the BMC.

[0130] For example, the terminal device performs overhead processing on the BMC through the monitoring model between 2024 / 12 / 20 15:50 and 2024 / 12 / 22 15:50, and collects at least one test resource information corresponding to the BMC between 2024 / 12 / 20 15:50 and 2024 / 12 / 22 15:50 according to the second preset collection frequency.

[0131] S406: Determine a test result corresponding to the test request according to at least one test resource information.

[0132] The test result corresponding to the test request can be determined based on at least one test resource information in the following manner: in the at least one test resource information, at least one first resource set is determined, the first resource set includes information corresponding to the same item in the at least one test resource information; for any first resource set, the collection time of each information in the first resource set is determined; according to the collection time, a first image corresponding to each information is generated, the first image is used to indicate the trend of each information according to the collection time; it is determined that the test result corresponding to the test request includes the first image corresponding to each first resource set.

[0133] The test result includes a trend chart of the results of each information in the test resource information over the test time. The user only needs to check whether each first image is normal. When an abnormality occurs, the problem location analysis can be performed through the monitoring log stored in the preset storage area.

[0134] The first resource set can be stored in a dictionary and written to a json file. The terminal device obtains the data in the json file to draw the first image corresponding to each item of information in the test resource information. The final first image is printed in PDF to present the test result corresponding to the test request, and the test result includes the first image corresponding to each first resource set.

[0135] For example, in the first image, the horizontal axis is the test duration / number of laps, and the vertical axis is the data value of the monitoring factor.

[0136] For example, with respect to the process memory occupancy rate of the BMC in the test resource information, the first resource set may be determined as shown in Table 3:

[0137] Table 3

[0138]

[0139] The terminal device generates a first resource set corresponding to other information in the test resource information as shown in Table 3. The terminal device generates an image B1 corresponding to each information as shown in Table 3, and the image B1 is used to indicate the trend of the process memory occupancy rate according to the collection time. The terminal device determines that the test result corresponding to the test request can be specifically shown in Table 4:

[0140] Table 4

[0141]

[0142] According to the test results shown in Table 4 above, the user can find the following problems through the first image:

[0143] Problem 1: Memory leak. During the stress test, the memory usage of the process is continuously monitored. When the image corresponding to the BMC process memory usage shows an upward trend during the test period, it indicates that there is a memory leak. When the image corresponding to the BMC process memory usage tends to a straight line during the test period, it indicates that there is no leakage problem in this process.

[0144] Question 2: The overall resource usage of the BMC during the stress test. If the image corresponding to the memory usage of the BMC process fluctuates regularly during the test period, it indicates the occupation and release of memory resources during the test. If the image corresponding to the CPU usage of the BMC process has a large vertical coordinate value during the test period, it indicates that the overall resource usage of the CPU during the test is high, and it is speculated that the performance of the BMC for this test item is poor.

[0145] Problem 3: Monitoring the stability of BMC without any sense of certain function tests. If the image corresponding to the BMC process identifier has a change in the vertical coordinate value during the test period, it indicates that the process has been abnormally restarted multiple times during the test.

[0146] Question 4: Monitor the BMC's processing of sensor information during the stress test. If the image corresponding to the BMC's sensor information has a vertical coordinate value of 0 or -1 during the test period, it indicates that the sensor is disabled or the sensor reading is 0.

[0147] When a process crashes or is abnormal, the terminal device can obtain the core dump file generated by the server and analyze the cause of the process abnormality through the core dump file.

[0148] S407: If the test type is a non-stress test type, obtain a first preset acquisition frequency.

[0149] For example, the test request includes BMC 2 and a non-stress test type. The test tool of the terminal device obtains a first preset collection frequency of 2 minutes / time.

[0150] S408: Obtain at least one first script currently running in the BMC.

[0151] For example, according to the above example, the terminal device obtains at least one first script currently running by the BMC 2 including scripts B6 to B7.

[0152] S409: Collect at least one test resource information corresponding to the BMC in the current period according to at least one first script and a first preset collection frequency, so as to monitor the BMC.

[0153] The current time period is a time period corresponding to the execution of at least one first script by the BMC of the server.

[0154] For example, the terminal device collects at least one piece of test resource information including test resource information B1 to test resource information B20 every 2 minutes during the period of running scripts B6 to B7 through the monitoring model.

[0155] S410. Determine a test result corresponding to the test request according to at least one test resource information.

[0156] The test result corresponding to the test request can be determined based on at least one test resource information in the following manner: in the at least one test resource information, at least one second resource set is determined, the second resource set includes information corresponding to the same item in the at least one test resource information; based on each second resource set, a second image corresponding to each second resource set is generated, the second image is used to indicate the trend corresponding to each information according to the collection time; and it is determined that the first test result includes the second image corresponding to each second resource set.

[0157] It should be noted that, according to each second resource set, the process of generating the second image corresponding to each second resource set is the same as the process of generating the first image in S406, and will not be repeated here.

[0158] If the first resource information or the second resource information also includes a core dump file, a preset storage path is obtained, and the core dump file is used to indicate memory-related information corresponding to the process when the process crashes or is abnormal; the core dump file is stored according to the preset storage path.

[0159] When a process crashes or is abnormal, a core dump file can be obtained and stored, so that the user can determine the cause of the process crash or abnormality based on the core dump file, thereby improving the accuracy of the test.

[0160] The monitoring model of the terminal device can generate a monitoring log according to at least one test resource information and a core dump file, and store the monitoring log.

[0161] Next, combine Figure 5, the monitoring process of the monitoring model is explained. Figure 5 A schematic diagram of the monitoring process provided in the embodiment of the present application. Figure 5 , including a monitoring model 501. The monitoring model 501 is set in the terminal device. When performing stress testing or non-stress testing, the monitoring model 501 can monitor various information in the test resource information, and collect corresponding information according to a preset collection frequency. The monitoring model 501 generates a monitoring log based on the collected information. The terminal device can generate a corresponding monitoring image based on the monitoring log.

[0162] After the test results are generated, the test results can be displayed through the terminal device and stored according to the preset storage path, so that the user can obtain the test results according to the preset storage path.

[0163] The test method provided in the embodiment of the present application obtains a test request. If the test type is a stress test type, at least one test script corresponding to the stress test type is obtained, and the second preset acquisition frequency and the test period are determined according to the at least one test script. According to the at least one test script, the BMC is tested and processed during the test period. The BMC is monitored and processed during the test period, and at least one test resource information corresponding to the BMC is collected during the test period according to the second preset acquisition frequency. According to the at least one test resource information, the test result corresponding to the test request is determined. If the test type is a non-stress test type, the first preset acquisition frequency is obtained, and at least one first script currently running by the BMC is obtained. According to the at least one first script and the first preset acquisition frequency, at least one test resource information corresponding to the BMC is collected during the current period to monitor the BMC. According to the at least one test resource information, the test result corresponding to the test request is obtained. In the above process, the BMC of the server can be subjected to stress testing or non-stress testing, and the BMC can be monitored and processed during the test process to observe the resource information in the BMC in real time. Instead of testing only the upper-layer functional interface. And it can avoid the situation where a long time of testing is required to discover abnormal BMC functions. During the test, the abnormal values ​​obtained by the monitoring model are processed, and the results will not be affected by the abnormality. When the model runs and reports an error, it will not affect the generation of existing monitoring results. The test method provided in the embodiment of the present application is compatible with various versions and test platforms, which improves the flexibility of server BMC testing.

[0164] Based on any of the above embodiments, Figure 6 , the testing process is illustrated with examples.

[0165] Figure 6 This is a schematic diagram of the test process provided by the embodiment of this application. Figure 6, including a terminal device 601 and a server 602. The terminal device 601 may be a computer, and a test tool is provided in the terminal device 601, and the test tool includes a stress tool and a monitoring model. The server 602 includes a BMC. After determining the BMC to be tested and the test type, the user can determine the identifier of the BMC to be tested and the test type in the test tool in the terminal device 601. The terminal device 601 generates a test request in response to the user's input selection operation. The test request includes BMC 3 and non-stress type.

[0166] The terminal device 601 determines that the server corresponding to the BMC 3 is the server 3, and determines that the first preset collection frequency is 1min / time. The test tool of the terminal device 601 obtains at least one first script currently running by the BMC 3 through the monitoring model. The monitoring model of the terminal device 601 collects at least one test resource information corresponding to the BMC 3 during the period of running the at least one script according to the at least one first script and the first preset collection frequency, which can be specifically shown in Table 5:

[0167] Table 5

[0168]

[0169] The monitoring model of the terminal device 601 generates a monitoring log according to at least one test resource information shown in Table 5. The test tool of the terminal device 601 generates at least one second image according to the monitoring log, which may be specifically shown in Table 6:

[0170] Table 6

[0171]

[0172] The test tool of the terminal device 601 determines that the test results corresponding to the test request include images C1 to C5 shown in Table 6. The test tool of the terminal device 601 displays the test results corresponding to the test request and stores the test results corresponding to the test request according to the preset storage path. In this way, the user can determine whether the BMC has an abnormality according to the test results corresponding to the test request. If there is an abnormality, the cause of the abnormality can be analyzed according to the test results corresponding to the test request.

[0173] The test process provided by the embodiment of the present application obtains a test request. If the test type is a stress test type, at least one test script corresponding to the stress test type is obtained, and the second preset acquisition frequency and the test period are determined according to the at least one test script. According to the at least one test script, the BMC is tested and processed during the test period. The BMC is monitored and processed during the test period, and at least one test resource information corresponding to the BMC is collected during the test period according to the second preset acquisition frequency. According to the at least one test resource information, the test result corresponding to the test request is determined. If the test type is a non-stress test type, the first preset acquisition frequency is obtained, and at least one first script currently running by the BMC is obtained. According to the at least one first script and the first preset acquisition frequency, at least one test resource information corresponding to the BMC is collected during the current period to monitor the BMC. According to the at least one test resource information, the test result corresponding to the test request is obtained. In the above process, the BMC of the server can be subjected to stress testing or non-stress testing, and the BMC can be monitored and processed during the test process to observe the resource information in the BMC in real time. Instead of testing only the upper-layer functional interface. And it can avoid the situation where a long time of testing is required to discover the abnormal function of the BMC. During the test, the abnormal values ​​obtained by the monitoring model are processed, and the results will not be affected by the abnormality. When the model runs and reports an error, it will not affect the generation of existing monitoring results. The test method provided in the embodiment of the present application is compatible with various versions and test platforms, which improves the flexibility of server BMC testing.

[0174] Figure 7 This is a schematic diagram of the structure of a test device provided in an embodiment of the present application. Figure 7 , the testing device 10 may include:

[0175] The acquisition module 11 is used to acquire a test request, wherein the test request includes an identifier of a baseboard management controller BMC to be tested and a test type;

[0176] The first processing module 12 is used for obtaining at least one test script corresponding to the stress test type if the test type is a stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request;

[0177] The second processing module 13 is used to obtain a first preset acquisition frequency if the test type is a non-stress test type, and monitor the BMC according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

[0178] In a possible implementation manner, the first processing module 12 is specifically configured to:

[0179] Determining a second preset acquisition frequency and a test period according to the at least one test script;

[0180] Performing test processing on the BMC during the test period according to the at least one test script;

[0181] Performing monitoring processing on the BMC during the test period, and collecting at least one test resource information corresponding to the BMC during the test period according to the second preset collection frequency;

[0182] A test result corresponding to the test request is determined according to the at least one test resource information.

[0183] In a possible implementation manner, the first processing module 12 is specifically configured to:

[0184] In the at least one test resource information, at least one first resource set is determined, wherein the first resource set includes information corresponding to the same item in the at least one test resource information;

[0185] For any first resource set, determine the collection time of each information in the first resource set;

[0186] generating a first image corresponding to each item of information according to the collection time, wherein the first image is used to indicate a trend corresponding to each item of information according to the collection time;

[0187] It is determined that the test result corresponding to the test request includes the first image corresponding to each first resource set.

[0188] In a possible implementation manner, the second processing module 13 is specifically configured to:

[0189] Acquire at least one first script currently running by the BMC;

[0190] According to the at least one first script and the first preset collection frequency, at least one test resource information corresponding to the BMC is collected within a current period to monitor the BMC;

[0191] A test result corresponding to the test request is determined according to the at least one test resource information.

[0192] The testing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0193] Figure 8 A schematic diagram of the structure of another testing device provided in an embodiment of the present application. Figure 7 Based on the examples shown, see Figure 8The testing device 10 also includes a storage module 14 .

[0194] Wherein, the storage module 14 is used for:

[0195] Before performing monitoring processing, user information corresponding to the BMC is obtained, and the user information is stored in a preset storage area of ​​the BMC, so that when obtaining the at least one test resource information, the at least one test resource information is obtained from the preset storage area through a preset command according to the user information.

[0196] The storage module is also used for:

[0197] If the first resource information or the second resource information also includes a core dump file, obtaining a preset storage path, wherein the core dump file is used to indicate memory-related information corresponding to a process when the process crashes or is abnormal;

[0198] The core dump file is stored according to the preset storage path.

[0199] The testing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0200] Fig. 9 This is a schematic diagram of the structure of the terminal device provided in the embodiment of the present application. Fig. 9 The terminal device 20 may include: a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.

[0201] The memory 21 is used to store program instructions;

[0202] The processor 22 is used to execute the program instructions stored in the memory, so as to enable the terminal device 20 to execute the method shown in the above method embodiment.

[0203] The terminal device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0204] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above method.

[0205] The embodiment of the present application may also provide a computer program product, including a computer program, which can implement the above method when executed by a processor.

[0206] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.

[0207] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0208] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0210] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0211] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

Claims

1. A testing method, characterized in that: include: Obtaining a test request, wherein the test request includes an identifier of a baseboard management controller BMC to be tested and a test type; If the test type is a stress test type, obtaining at least one test script corresponding to the stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request; If the test type is a non-stress test type, a first preset acquisition frequency is obtained, and the BMC is monitored according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

2. The method according to claim 1, characterized in that Performing testing and monitoring on the BMC to obtain a test result corresponding to the test request includes: Determining a second preset acquisition frequency and a test period according to the at least one test script; Performing test processing on the BMC during the test period according to the at least one test script; Performing monitoring processing on the BMC during the test period, and collecting at least one test resource information corresponding to the BMC during the test period according to the second preset collection frequency; A test result corresponding to the test request is determined according to the at least one test resource information.

3. The method according to claim 2, characterized in that The test resource information includes at least the process memory occupancy rate of the BMC, the occupancy rate of the BMC process on the central processing unit CPU, the process file descriptor of the BMC, the process identifier of the BMC, and the sensor information of the BMC; Determining a test result corresponding to the test request according to the at least one test resource information includes: In the at least one test resource information, at least one first resource set is determined, wherein the first resource set includes information corresponding to the same item in the at least one test resource information; For any first resource set, determine the collection time of each information in the first resource set; generating a first image corresponding to each item of information according to the collection time, wherein the first image is used to indicate a trend corresponding to each item of information according to the collection time; It is determined that the test result corresponding to the test request includes the first image corresponding to each first resource set.

4. The method according to claim 1, characterized in that: The BMC is monitored and processed according to the first preset acquisition frequency to obtain a result corresponding to the test request, including: Acquire at least one first script currently running by the BMC; According to the at least one first script and the first preset collection frequency, at least one test resource information corresponding to the BMC is collected within a current period to monitor the BMC; A test result corresponding to the test request is determined according to the at least one test resource information.

5. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Before performing monitoring processing, user information corresponding to the BMC is obtained, and the user information is stored in a preset storage area of ​​the BMC, so that when obtaining the at least one test resource information, the at least one test resource information is obtained from the preset storage area through a preset command according to the user information.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the first resource information or the second resource information also includes a core dump file, obtaining a preset storage path, wherein the core dump file is used to indicate memory-related information corresponding to a process when the process crashes or is abnormal; The core dump file is stored according to the preset storage path.

7. A testing device, characterized in that: The device comprises: An acquisition module, used for acquiring a test request, wherein the test request includes an identifier of a baseboard management controller BMC to be tested and a test type; A first processing module is used for obtaining at least one test script corresponding to the stress test type if the test type is a stress test type, and performing test processing and monitoring processing on the BMC according to the at least one test script to obtain a test result corresponding to the test request; The second processing module is used to obtain a first preset acquisition frequency if the test type is a non-stress test type, and monitor the BMC according to the first preset acquisition frequency to obtain a test result corresponding to the test request.

8. A terminal device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: in, The computer instructions are used to make a computer execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.