Network card testing method and device, server, electronic equipment and storage medium

By automatically generating test strategies and executing test tasks, the inefficiency and potential failures caused by manual intervention in server network card testing are solved, achieving efficient and reliable network card testing.

CN116614399BActive Publication Date: 2026-02-13INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310402567.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2026-02-13
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

Existing technologies require extensive manual intervention to test server network cards, resulting in low testing efficiency and a high risk of malfunctions or damage.

Method used

By receiving network card test requests, obtaining network card information and test item information, automatically generating test strategies, and automatically executing test tasks, including hot-swapping and performance testing, the system reduces manual intervention.

Benefits of technology

It automates and improves the efficiency of network card testing, reduces labor costs, enhances the real-time performance and reliability of testing, and avoids potential failures caused by manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116614399B_ABST
    Figure CN116614399B_ABST
Patent Text Reader

Abstract

The application provides a network card testing method and device, a server, electronic equipment and a storage medium, and relates to the technical field of computers.The method comprises the following steps: receiving a network card testing request, and acquiring network card information and testing item information of a network card to be tested according to the network card testing request; acquiring a testing strategy corresponding to the network card testing request according to the network card information and the testing item information; the testing strategy comprises at least one testing task corresponding to the network card to be tested and an execution process of each testing task; executing each testing task on the network card to be tested according to the execution process of each testing task, and acquiring a testing result of the network card to be tested according to an execution result. The application can effectively reduce labor costs, improve testing efficiency and real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular to a network card testing method and device, a server, an electronic device and a storage medium. BACKGROUND

[0002] The network card is one of the key elements in the server, which is used to realize the communication and data transmission of the server and has a great influence on the performance of the server. Therefore, how to accurately test the network card is an important issue to be solved in the industry at present.

[0003] The related art usually tests each network card in the server one by one by manual operation. However, the number of network cards in the server is large, and the number of test items is also large. If multiple network cards in the server are to be tested, a large amount of manual cost will be consumed, and the test efficiency is low. SUMMARY

[0004] The present application provides a network card testing method and device, a server, an electronic device and a storage medium, which can solve the problem of low test efficiency and high labor cost in the related art, and realize automatic and efficient testing of the network card.

[0005] The present application provides a network card testing method, comprising:

[0006] receiving a network card testing request, and obtaining network card information and test item information of a network card to be tested according to the network card testing request;

[0007] obtaining a test strategy corresponding to the network card testing request according to the network card information and the test item information; the test strategy includes at least one test task corresponding to the network card to be tested, and an execution process of each test task;

[0008] executing each test task on the network card to be tested according to the execution process of each test task, and obtaining a test result of the network card to be tested according to the execution result.

[0009] According to the network card testing method provided by the present application, the test strategy corresponding to the network card testing request is obtained according to the network card information and the test item information, comprising:

[0010] if it is determined according to the network card information that the network card to be tested has hot plug function, it is determined that the test task in the test strategy includes a first test task and a second test task, and it is determined that the execution priority in the execution process includes that the execution priority of the first test task is higher than that of the second test task.

[0011] The first test task is used for hot pull-out test, and the second test task is used for hot insertion test.

[0012] According to the execution flow of each test task, each test task is executed on the to-be-tested network card, and a test result of the to-be-tested network card is obtained according to an execution result.

[0013] A first control instruction is sent to a power-on timing module and a power supply module associated with the to-be-tested network card, so that the power-on timing module and the power supply module perform power-off control on a target slot corresponding to the to-be-tested network card according to the first control instruction, to simulate execution of the first test task by the to-be-tested network card.

[0014] A first network card management log and a second network card management log of a target device to which the to-be-tested network card belongs are captured; the first network card management log is a network card management log generated before the first test task is executed; and the second network card management log is a network card management log generated after the first test task is executed.

[0015] A first test result of the to-be-tested network card is obtained according to the first network card management log and the second network card management log.

[0016] In a case where the first test result is that the to-be-tested network card passes the hot pull-out test, a second control instruction is sent to the power-on timing module and the power supply module, so that the power-on timing module and the power supply module perform power-on control on the target slot according to the second control instruction, to simulate execution of the second test task by the to-be-tested network card.

[0017] A third network card management log of the target device is captured; the third network card management log is a network card management log generated after the second test task is executed.

[0018] A second test result of the to-be-tested network card is obtained according to the second network card management log and the third network card management log.

[0019] A test result of the to-be-tested network card is obtained according to the first test result and the second test result.

[0020] According to the execution flow of each test task, each test task is executed on the to-be-tested network card, and a test result of the to-be-tested network card is obtained according to an execution result.

[0021] The test result of the to-be-tested network card is obtained according to the first test result and the second test result.

[0022] In a case where it is determined according to the first test result and the second test result that the to-be-tested network card passes the hot plug test, the third test task is performed on the to-be-tested network card to obtain a third test result of the to-be-tested network card.

[0023] The test result of the to-be-tested network card is obtained according to the first test result, the second test result and the third test result.

[0024] According to the network card test method provided by the application, the test strategy corresponding to the network card test request is obtained according to the network card information and the test item information, and the test strategy includes a first test task, a second test task, a third test task and a fourth test task.

[0025] In a case where it is determined according to the test item information that the to-be-tested network card needs to be tested on a network card position identification function test item, if it is determined according to the network card information that the to-be-tested network card has a hot plug function, it is determined that the test task in the test strategy includes the first test task, the second test task and the fourth test task, and it is determined that the execution flow in the test strategy includes that the execution priority of the first test task is higher than that of the second test task, and the execution priority of the second test task is higher than that of the fourth test task.

[0026] The fourth test task is used for identification function test.

[0027] According to the network card test method provided by the application, each test task is performed on the to-be-tested network card according to the execution flow of each test task, and a test result of the to-be-tested network card is obtained according to an execution result.

[0028] The first test task and the second test task are performed on the to-be-tested network card according to the execution flow.

[0029] In a case where the test result is that the to-be-tested network card passes the hot plug test, a network card management log of a baseboard management controller to which the to-be-tested network card belongs and slot information of a target slot corresponding to the to-be-tested network card are obtained; the slot information includes network card information of all network cards inserted into the target slot before and after the execution of the first test task, and network card information of all network cards inserted into the target slot before and after the execution of the second test task.

[0030] The identification performance test result corresponding to the to-be-tested network card is obtained according to the network card management log of the baseboard management controller and the slot information.

[0031] According to the identification performance test result, a test result of the to-be-tested network card is acquired.

[0032] According to the network card information and the test item information, a test strategy corresponding to the network card test request is acquired.

[0033] According to the network card function identifier in the network card information and the test item identifier in the test item information, a test index is generated.

[0034] According to the test index, a test strategy corresponding to the network card test request is determined in a test strategy library.

[0035] The application further provides a network card testing device, comprising:

[0036] A receiving module is configured to receive a network card test request, and acquire network card information and test item information of a to-be-tested network card according to the network card test request.

[0037] An acquiring module is configured to acquire a test strategy corresponding to the network card test request according to the network card information and the test item information; the test strategy comprises at least one test task corresponding to the to-be-tested network card and an execution flow of each test task.

[0038] A testing module is configured to execute each test task on the to-be-tested network card according to the execution flow of each test task, and acquire a test result of the to-be-tested network card according to an execution result.

[0039] The application further provides a server, which comprises a controller, at least one network card, at least one slot, a power-on timing module and a power supply module associated with each network card, and the network card testing device.

[0040] Each network card is installed on a corresponding slot through a slide rail.

[0041] The controller is connected with the network card testing device, the network card testing device is connected with the power-on timing module, the power-on timing module is connected with the power supply module, and the power supply module is connected with the corresponding network card.

[0042] The controller is configured to input a network card test request.

[0043] The power-on timing module is configured to receive a control instruction sent by the network card testing device, control the power supply module to output a corresponding power supply voltage, and perform power-off control or power-on control on the slot corresponding to the corresponding network card.

[0044] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the network card testing method according to any one of the above when executing the program.

[0045] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the network card testing method according to any one of the above.

[0046] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the network card testing method according to any one of the above.

[0047] The network card testing method, device, server, electronic device and storage medium provided by the application can adaptively generate a testing strategy according to the network card information and the testing item information, on one hand, the corresponding testing strategy can be adaptively generated according to different network card testing requests, the human resources and the writing time wasted in manually writing the testing strategy are effectively reduced, and the testing efficiency is improved; on the other hand, at least one testing task can be executed according to the execution process in the testing strategy, so that the testing of the network card is adaptively implemented, the whole testing process is automatically executed, and the testing efficiency and the real-time performance are further improved while the human cost is effectively reduced. BRIEF DESCRIPTION OF DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the application or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or the related art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0049] Figure 1 is one of the flowcharts of the network card testing method provided by the application;

[0050] Figure 2 is another flowchart of the network card testing method provided by the application;

[0051] Figure 3 is a third flowchart of the network card testing method provided by the application;

[0052] Figure 4 is a structural schematic diagram of the network card testing device provided by the application;

[0053] Figure 5 is a structural schematic diagram of the testing module provided by the application;

[0054] Figure 6 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0055] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described below in conjunction with the accompanying drawings in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0056] Network cards are widely used for communication and data transmission of servers, and therefore, it is particularly important to test the performance of network cards to ensure the performance of network cards in servers.

[0057] In the related art, the testing of network cards is usually implemented by manually pressing physical test buttons set for the network cards, manually observing the flashing mode of button lights, and manually querying and counting test results. When testing multiple network cards of multiple servers by this way, a large number of manual operations are required, which occupies a large amount of manpower, resulting in low testing efficiency, and when the testing operation is improper, irreversible faults or damages of the network cards or servers may occur.

[0058] To solve the above problems, the present embodiment provides a network card testing method, device, server, electronic device, and storage medium. According to the network card testing request, the network card information and the test item information are acquired in real time, the test strategy is adaptively generated according to the network card information and the test item information, and at least one test task is adaptively executed according to the execution process in the test strategy, so as to adaptively implement the testing of the network card. The entire testing process is automatically executed, which effectively reduces the labor cost, improves the testing efficiency and real-time performance.

[0059] The present application will be described below in conjunction with Figures 1-3 The present application will be described below in conjunction with

[0060] As shown in FIG. 1, which is one of the flowcharts of the network card testing method provided by the present embodiment, the method comprises the following steps. Figure 1

[0061] Step 101: receiving a network card testing request, and acquiring network card information and test item information of a network card to be tested according to the network card testing request;

[0062] ​The network card test request is used for requesting to perform a network card test, and is sent when the network card test is needed. The network card test request includes, but is not limited to, a network card hot plug test, a network card flow test, and a network card location identification function test. The embodiment is not limited in this regard.

[0063] The network card test request can be a user input input in a client interface of the server, or information generated by a controller of the server under certain conditions, such as a network card test request triggered at a fixed time. The user input can be information input by touch input, pull-down selection input, voice input, gesture input, visual input, brain-computer input, and the like.

[0064] Optionally, the network card test request is monitored in real time, and in a case where the network card test request is monitored, network card information and test item information of a network card to be tested are parsed from the network card test request, or a test request identifier is parsed from the network card test request, and corresponding network card information and test item information are acquired according to the test request identifier, a mapping relationship between the test request identifier and the network card information, and a mapping relationship between the test request identifier and the test item information. The embodiment is not limited in this regard.

[0065] The network card information includes, but is not limited to, a network card number, a function description, and a function identifier. The test item information includes, but is not limited to, a test item description and a test item identifier.

[0066] The network card to be tested can be various network cards configured in the server, such as an OCP (Open Compute Project) network card.

[0067] In step 102, a test strategy corresponding to the network card test request is acquired according to the network card information and the test item information. The test strategy includes at least one test task corresponding to the network card to be tested, and an execution flow of each test task.

[0068] Different network card information and test item information correspond to different test strategies.

[0069] Each test strategy includes different test tasks and execution flows.

[0070] The test task includes, but is not limited to, a hot plug function test task, a hot plug performance test task, an identification function test task, and a flow test task. The embodiment is not limited in this regard.

[0071] The execution flow is used for defining an execution priority level of each test task, that is, an execution sequence of each test task.

[0072] Optionally, after obtaining the NIC information and the test item information, the NIC information and the test item information can be subjected to test strategy selection condition judgment to obtain a corresponding test strategy; or the NIC function identifier can be obtained from the NIC information, the test item identifier can be obtained from the test item information, and a corresponding test strategy can be obtained according to the NIC function identifier and the test item identifier.

[0073] In step 103, each test task is executed on the NIC to be tested according to the execution flow of each test task, and a test result of the NIC to be tested is obtained according to an execution result.

[0074] Optionally, after obtaining the test tasks and the execution flow of each test task, the code corresponding to each test task can be loaded, and the code corresponding to each test task can be executed according to the execution flow to execute each test task on the NIC to be tested, collect an execution result of each test task, and jointly determine the test result of the NIC to be tested according to the execution result of each test task; or a corresponding test case can be generated by combining the code corresponding to each test task according to the execution flow, and the test result of the NIC to be tested can be obtained through an overall execution result of the test case. The present embodiment is not limited in this regard.

[0075] In the present embodiment, different test tasks correspond to different codes, and the code corresponding to each test task can be obtained by using a preconfigured mapping relationship between the test task and the code; or the code can be generated by querying a pre-established database table and obtaining a table field matched with the test task. The present embodiment is not limited in this regard.

[0076] The NIC testing method provided in the present embodiment can adaptively generate a test strategy according to NIC testing requests, real-time NIC information and test item information, on one hand, adaptively generate a corresponding test strategy according to different NIC testing requests, effectively reduce the waste of human resources and the writing time of manually writing a test strategy, and improve the testing efficiency; on the other hand, at least one test task can be executed according to the execution flow in the test strategy to adaptively implement the testing of the NIC, the entire testing process is automatically executed, and the testing efficiency and real-time performance are further improved while effectively reducing the human cost.

[0077] In some embodiments, the step of obtaining a test strategy corresponding to the NIC testing request according to the NIC information and the test item information in step 102 further includes:

[0078] In a case where it is determined according to the test item information that the test item required by the to-be-tested network card includes a hot plug test item, if it is determined according to the network card information that the to-be-tested network card has a hot plug function, it is determined that the test task in the test strategy includes a first test task and a second test task, and it is determined that the execution priority in the execution process includes that the execution priority of the first test task is higher than that of the second test task.

[0079] The first test task is used for hot pull-out test, and the second test task is used for hot plug-in test.

[0080] The hot plug test item can be used to test whether the hot plug function of the network card is supported, or can also be used to test whether the server can normally run after the network card is hot plugged, whether a network card related error is generated, and the like, that is, the test task can include a hot pull-out test task and a hot plug-in test task, or can also include a hot plug performance test task, and the like, which are not limited in the present example.

[0081] Optionally, after the test item information and the network card information are acquired, the test item required by the to-be-tested network card can be determined according to the test item identifier or the test item description in the test item information, the function of the to-be-tested network card can be determined according to the network card function identifier or the network card function description in the network card information, and it is determined whether the test item required by the to-be-tested network card matches the function of the to-be-tested network card. In a case where it is determined that the test item required by the to-be-tested network card matches the function of the to-be-tested network card, the corresponding test strategy can be acquired according to the test item information and the network card information.

[0082] Optionally, in a case where it is determined according to the test item information that the test item required by the to-be-tested network card includes a hot plug test item, it is further required to determine whether the to-be-tested network card has a hot plug function according to the network card information. In a case where the to-be-tested network card has a hot plug function, it is indicated that the test request is valid, otherwise it is indicated that the test request is invalid. By performing multiple determinations before determining the test strategy, the validity of the test request can be ensured, and the effectiveness of the network card test can be improved.

[0083] In a case where the test request is valid, it can be determined that the test task in the test strategy includes a first test task and a second test task, that is, the hot pull-out test task and the hot plug-in test task in the test strategy, and the execution priority of the hot pull-out test task is higher than that of the hot plug-in test task, that is, the hot pull-out test task is executed before the hot plug-in test task, so as to avoid the influence of the hot plug test on the performance of the server.

[0084] As Figure 2In some embodiments, the step of executing each test task on the to-be-tested network card according to the execution flow of each test task in step 103, and obtaining the test result of the to-be-tested network card according to the execution result, further includes:

[0085] In step 201, a first control instruction is sent to a power-on timing module and a power supply module associated with the to-be-tested network card, so that the power-on timing module and the power supply module perform power-off control on the target slot corresponding to the to-be-tested network card according to the first control instruction, to simulate the to-be-tested network card executing the first test task.

[0086] In step 202, a first network card management log and a second network card management log of the target device to which the to-be-tested network card belongs are captured; the first network card management log is a network card management log generated before the first test task is executed; and the second network card management log is a network card management log generated after the first test task is executed.

[0087] In step 203, a first test result of the to-be-tested network card is obtained according to the first network card management log and the second network card management log.

[0088] In step 204, when the first test result is that the to-be-tested network card passes the hot pull-out test, a second control instruction is sent to the power-on timing module and the power supply module, so that the power-on timing module and the power supply module perform power-on control on the target slot according to the second control instruction, to simulate the to-be-tested network card executing the second test task.

[0089] In step 205, a third network card management log of the target device is captured; the third network card management log is a network card management log generated after the second test task is executed.

[0090] In step 206, a second test result of the to-be-tested network card is obtained according to the second network card management log and the third network card management log.

[0091] In step 207, a test result of the to-be-tested network card is obtained according to the first test result and the second test result.

[0092] Optionally, the step of performing the hot plug test on the to-be-tested network card specifically includes:

[0093] First, network card information and test item information of the to-be-tested network card are obtained.

[0094] Secondly, it is judged whether the power-on and power-off control is performed on the target slot corresponding to the to-be-tested network card, that is, whether the required test task includes the hot plug test and whether the to-be-tested network card has the hot plug function; in the case that it is determined that the power-on and power-off control needs to be performed on the target slot corresponding to the to-be-tested network card, the first control instruction is issued under the operating system, that is, the first control instruction is sent to the power-on timing module and the power supply module associated with the to-be-tested network card, so that the power-on timing module controls the power supply module to output the first level signal (that is, the low level signal) according to the first control instruction, and then controls the output voltage of the VR (Voltage Adjustment, voltage adjustment) chip of the target slot corresponding to the to-be-tested network card to be a low voltage, such as 0 volt, so as to realize the power-off control of the target slot corresponding to the to-be-tested network card, and to simulate the hot pull-out test of the to-be-tested network card.

[0095] Here, the first control instruction is an instruction for controlling the power-off control of the target slot corresponding to the to-be-tested network card, which can be a power-off control instruction issued by the "ipmitool raw 0x00" command.

[0096] In addition, the first network card management log of the target device (that is, the server) to which the to-be-tested network card belongs before the first test task is executed is captured, and the second network card management log of the target device (that is, the server) to which the to-be-tested network card belongs after the first test task is executed is captured. By comparing the first network card management log and the second network card management log, it is determined whether the to-be-tested network card can be normally identified in the second network card management log compared with the first network card management log, so as to determine whether the to-be-tested network card is powered off, and then the first test result of the to-be-tested network card is obtained, that is, it is judged whether the to-be-tested network card can realize the hot pull-out function.

[0097] It should be noted that the first network card management log can be obtained before the first control instruction is issued or after the first control instruction is issued, and the embodiment does not limit the order of obtaining the first network card management log.

[0098] Here, the determination method of the first test result includes: in the case that the to-be-tested network card cannot be normally identified in the second network card management log compared with the first network card management log, that is, the to-be-tested network card can be normally identified in the first network card management log, but the to-be-tested network card cannot be normally identified in the second network card management log after the power-off control, it is determined that the to-be-tested network card is powered off successfully, and then it is determined that the first test result of the to-be-tested network card is that the hot pull-out test is passed; in the case that the to-be-tested network card can be normally identified in the second network card management log compared with the first network card management log, it is determined that the to-be-tested network card is not powered off successfully, and then it is determined that the first test result of the to-be-tested network card is that the hot pull-out test is not passed.

[0099] Further, in a case that the first test result is that the to-be-tested network card passes the hot plug-out test, the second control instruction is continuously sent under the operating system, that is, the second control instruction is sent to the power-on timing module and the power supply module associated with the to-be-tested network card, so that the power-on timing module controls the power supply module to output a second level signal (that is, a high level signal) according to the second control instruction, and then controls the output voltage of the VR chip of the target slot corresponding to the to-be-tested network card to be a high voltage, such as +3.3V_EDGE or +12V_EDGE, so as to realize the power-on control of the target slot corresponding to the to-be-tested network card, simulate the hot plug-in test of the to-be-tested network card, realize the hot plug-in function triggered in the automatic simulation mode of hot plug-in key pressing according to the control instruction, simulate the hot plug-in operation, perform the hot plug-in test, and thus reduce the manual participation and improve the test efficiency.

[0100] Here, the second control instruction is an instruction for controlling the power-on control of the target slot corresponding to the to-be-tested network card, which can be an ipmitool raw 0x01 command.

[0101] Further, the second network card management log of the target device (that is, the server) to which the to-be-tested network card belongs after the execution of the second test task is captured, the second network card management log and the third network card management log are compared, and whether the to-be-tested network card can be normally identified in the third network card management log compared with the second network card management log is determined according to the comparison result, so as to determine whether the to-be-tested network card is powered off, and then the second test result of the to-be-tested network card is obtained, that is, whether the to-be-tested network card can realize the hot plug-in function is judged.

[0102] Here, the determination method of the second test result includes: the to-be-tested network card can be normally identified in the third network card management log compared with the second network card management log, that is, the to-be-tested network card cannot be normally identified in the second network card management log, but the to-be-tested network card can be normally identified in the third network card management log after the power-on control; at this time, it is determined that the to-be-tested network card is powered on successfully, and then it is determined that the second test result of the to-be-tested network card is that the hot plug-in test is passed, otherwise, it is determined that the second test result is that the hot plug-in test is not passed.

[0103] After the first test result and the second test result are acquired, the final test result can be directly acquired according to the first test result and the second test result, or the final test result can be acquired according to a further test result obtained by further testing the to-be-tested network card on the basis of the first test result and the second test result. For example, according to the first test result and the second test result, it is determined that the to-be-tested network card passes the hot pull-out and hot plug-in test, and it is directly determined that the hot plug function of the to-be-tested network card is normal, otherwise, it is directly determined that the hot plug function of the to-be-tested network card is abnormal; or according to the first test result and the second test result, it is determined that the to-be-tested network card passes the hot pull-out and hot plug-in test, and further testing obtains that the hot plug performance of the to-be-tested network card is normal, and it is determined that the hot plug function of the to-be-tested network card is normal, otherwise, it is determined that the hot plug function of the to-be-tested network card is abnormal.

[0104] In the related art, the hot plug function of a network card is verified by pressing a hot plug button, observing the on-off or flickering mode of the button light, and manually checking whether the network card is powered off and whether the network card can be recognized in the OS (Operating System) of a server. Each link in the entire test process needs manual participation, occupies a large amount of human resources, and has low test efficiency; and the network card is easily operated by hot plug without power off, which causes the network card to be powered off due to manual misoperation, and causes irreversible failure or damage to the network card or the server system.

[0105] In comparison, the test method provided in the embodiment automatically controls the target slot corresponding to the to-be-tested network card to be powered on and off by issuing a control instruction, to simulate the hot plug action of the to-be-tested network card, and to realize automatic test of the hot plug function of the network card, thereby effectively reducing test errors of manual test, a large amount of human and material resources required, improving test efficiency, and improving test reliability.

[0106] In some embodiments, the test tasks in the test strategy further include a third test task, and the execution priority in the execution process further includes that the execution priority of the second test task is higher than that of the third test task.

[0107] The test result of the to-be-tested network card is acquired according to the first test result and the second test result, and the test result of the to-be-tested network card includes:

[0108] In a case where it is determined that the to-be-tested network card passes the hot plug test according to the first test result and the second test result, the third test task is executed on the to-be-tested network card, and a third test result of the to-be-tested network card is obtained.

[0109] According to the first test result, the second test result and the third test result, a test result of the to-be-tested network card is obtained.

[0110] Optionally, in the case where it is determined according to the test item information that the to-be-tested network card needs to be tested for the hot plug test item, if it is determined according to the network card information that the to-be-tested network card has the hot plug function, it is determined that the test task in the test strategy further includes a third test task, i.e., a hot plug performance test task, in addition to the first test task and the second test task, so as to perform one-step test on whether the hot plug of the network card has a relevant influence on the performance of the network card, thereby improving the comprehensiveness of the hot plug test of the network card test.

[0111] Here, the third test task includes one or more of the performance tests such as the stress test, the delay test and the communication capability test, and the priority of the third test task is lower than that of the second test task.

[0112] Optionally, in the case where it is determined according to the first test result and the second test result that the to-be-tested network card passes the hot plug test, one or more combinations of the performance tests such as the stress test, the delay test and the communication capability test can be directly performed on the to-be-tested network card to obtain the third test result of the to-be-tested network card, or the one or more combinations of the performance tests such as the stress test, the delay test and the communication capability test can be performed on the to-be-tested network card to obtain the third test result of the to-be-tested network card after it is further determined that the bandwidth rate information of the to-be-tested network card is correct, and the embodiment is not limited in this regard.

[0113] Then, according to the first test result and the second test result, it is determined that the to-be-tested network card passes the hot plug-in and hot plug-out test, and further test shows that the hot plug performance of the to-be-tested network card is normal, it is determined that the hot plug function of the to-be-tested network card is normal, otherwise it is determined that the hot plug function of the to-be-tested network card is abnormal.

[0114] The method provided in the embodiment can not only automatically perform the hot plug-in test and the hot plug-out test on the to-be-tested network card, but also automatically perform the hot plug performance test when the network card hot plug item test is performed, so as to ensure that the function of the network card is not damaged due to the hot plug process, and the stability of the machine is not affected, thereby improving the efficiency of the hot plug test and the comprehensiveness of the hot plug test of the network card test.

[0115] The execution of the test strategy is described below with specific examples. As shown in FIG. 3, Figure 3 The steps of the hot plug test of the to-be-tested network card specifically include:

[0116] In step 301, the network card information and the test item information of the to-be-tested network card are obtained at the front end.

[0117] Step 302, determine whether the target slot corresponding to the network card to be tested is powered on and off, that is, whether the required test task includes hot plug test and whether the network card to be tested has hot plug function; in the case of determining that the target slot corresponding to the network card to be tested needs to be powered on and off, step 303 is executed; otherwise, return to 301 to reacquire the network card information and test item information of the network card to be tested.

[0118] Step 303, power on and off the target slot of the network card to be tested through a control instruction, for details, see the execution step shown in Figure 2 .

[0119] Step 304, acquire and compare the first network card management log, the second network card management log and the third network card management log of the target device before and after the power-off operation, and collect the first test result and the second test result; determine whether the network card to be tested passes the hot plug test according to the first test result and the second test result, and execute step 305 if the network card to be tested passes the hot plug test, otherwise execute step 306;

[0120] Step 305, further perform stress test, delay test, communication capability test, etc. on the network card to be tested to obtain a third test result;

[0121] Step 306, test whether the hot plug function of the network card to be tested is normal according to the first test result and the second test result, and / or the third test result; execute step 307 if the hot plug function of the network card to be tested is abnormal, otherwise execute step 308;

[0122] Step 307, save the test failure log of the network card to be tested, and output alarm information to the front end according to the test failure log;

[0123] Step 308, collect the test success log of the network card to be tested, and display the test success log to the front end.

[0124] In some embodiments, the step of acquiring the test strategy corresponding to the network card test request according to the network card information and the test item information in step 102 further includes:

[0125] In a case where it is determined according to the test item information that the test items required by the to-be-tested network card include the network card position recognition function test item, if it is determined according to the network card information that the to-be-tested network card has the hot plug function, it is determined that the test tasks in the test strategy include the first test task, the second test task and the fourth test task, and it is determined that the execution flow in the test strategy includes that the execution priority of the first test task is higher than that of the second test task, and the execution priority of the second test task is higher than that of the fourth test task.

[0126] The fourth test task is used for recognition function test.

[0127] The network card position recognition function test item can be used to test the influence of the network card hot plug on the slot stability.

[0128] Optionally, in a case where it is determined according to the test item information that the test items required by the to-be-tested network card include the network card position recognition function test item, it is further required to judge whether the to-be-tested network card has the hot plug function according to the network card information, and in a case where the to-be-tested network card has the hot plug function, it is indicated that the test request is valid, otherwise it is indicated that the test request is invalid. By multiple judgments before determining the test strategy, the validity of the test request can be ensured, and the effectiveness of the network card test can be improved.

[0129] In a case where the test request is valid, it can be determined that the test tasks in the test strategy include the first test task, the second test task and the fourth test task, that is, the hot plug-out test task, the hot plug-in test task and the recognition function test task in the test strategy, and the priority of the hot plug-out test task is higher than that of the hot plug-in test task, and the priority of the hot plug-in test task is higher than that of the recognition function test task, that is, the hot plug-out test task is executed before the hot plug-in test task, and the hot plug-in test task is executed before the recognition function test task.

[0130] In this embodiment, the network card position recognition function test strategy and the test flow can be adaptively determined through the network card information and the test item information, and the network card position recognition function test can be efficiently and accurately implemented to obtain the influence of the network card hot plug on the slot stability.

[0131] In some embodiments, the step of executing each test task on the to-be-tested network card according to the execution flow of each test task and obtaining the test result of the to-be-tested network card according to the execution result in step 103 further includes:

[0132] The first test task and the second test task are executed on the to-be-tested network card according to the execution flow.

[0133] In a case where the test result is that the to-be-tested network card passes the hot plug test, a network card management log of a baseboard management controller to which the to-be-tested network card belongs and slot information of a target slot corresponding to the to-be-tested network card are acquired; the slot information includes network card information of all network cards inserted into the target slot before and after execution of the first test task and network card information of all network cards inserted into the target slot before and after execution of the second test task.

[0134] According to the network card management log of the baseboard management controller and the slot information, a recognition performance test result corresponding to the to-be-tested network card is acquired.

[0135] According to the recognition performance test result, a test result of the to-be-tested network card is acquired.

[0136] Optionally, according to an execution process, the first test task and the second test task are executed on the to-be-tested network card, and specific reference can be made to an execution step shown in Figure 2 , which will not be described here again.

[0137] and it is determined whether the test result is that the to-be-tested network card passes the hot plug test. In a case where the to-be-tested network card passes the hot plug test, a network card management log of a baseboard management controller (BMC) to which the to-be-tested network card belongs and slot information of a target slot corresponding to the to-be-tested network card are acquired; the network card management log includes information logs of power-on and power-off of each network card.

[0138] The information logs of power-on and power-off of each network card in the network card management log of the baseboard management controller are compared with the slot information of the target slot corresponding to the to-be-tested network card, so as to determine whether a position recognition function of the to-be-tested network card of the target slot by the BMC is correct under the hot plug function, that is, according to a power-on and power-off sequence of the to-be-tested network card, it is determined whether a recognition result of the to-be-tested network card of the target slot by the BMC before and after execution of the first test task and before and after execution of the second test task by the to-be-tested network card matches the slot information of the target slot, and then the influence of the hot plug function on the function of recognizing the slot information is tested.

[0139] The test method provided in this embodiment can adaptively perform network card position recognition function test according to network card information and test item information, on the one hand, adaptively generates a corresponding test strategy according to different network card test requests, effectively reduces the waste of human resources and writing time caused by manual test strategy writing, improves the test efficiency, on the other hand, automatically performs network card position recognition function test according to the test strategy, effectively reduces the test failure of manual test, the large amount of manpower and material resources consumed, improves the test efficiency and the test reliability.

[0140] In some embodiments, step 102, which involves obtaining the test strategy corresponding to the network interface card (NIC) test request based on the NIC information and the test item information, further includes:

[0141] A test index is generated based on the network card function identifier in the network card information and the test item identifier in the test item information.

[0142] Based on the test index, the test strategy corresponding to the network card test request is determined in the test strategy library.

[0143] Optionally, the network interface card (NIC) function identifier and the test item identifier can be combined or re-encoded to generate a test index;

[0144] Based on the mapping relationship between test indexes and test policies in the test policy library, the test policy associated with the test index is determined in the test policy library, and then the test policy corresponding to the network card test request is obtained.

[0145] The method provided in this embodiment can accurately obtain the corresponding test strategy by combining the network card function identifier and the test item identifier. Based on the test strategy, the network card can be automatically tested for adaptability, avoiding the need to manually write test strategies. This improves the efficiency and accuracy of network card testing, while also increasing the flexibility and applicability of network card testing.

[0146] The network card testing device provided by the present invention is described below. The network card testing device described below can be referred to in correspondence with the network card testing method described above.

[0147] like Figure 4 As shown, this embodiment provides a network card testing device, which includes:

[0148] The receiving module 401 is used to receive network card test requests and, based on the network card test requests, obtain network card information and test item information of the network card to be tested;

[0149] The acquisition module 402 is used to acquire the test strategy corresponding to the network card test request based on the network card information and the test item information; the test strategy includes at least one test task corresponding to the network card to be tested, and the execution flow of each test task;

[0150] The testing module 403 is used to execute each of the test tasks on the network card to be tested according to the execution flow of each test task, and obtain the test results of the network card to be tested based on the execution results.

[0151] The network card testing device provided by the embodiment can adaptively generate a test strategy according to network card information and test item information, which is obtained in real time according to a network card testing request, on the one hand, the corresponding test strategy can be adaptively generated according to different network card testing requests, so that the human resources and the writing time wasted by manually writing the test strategy are effectively reduced, and the test efficiency is improved; on the other hand, at least one test task can be executed according to the execution process in the test strategy, so that the test of the network card is adaptively implemented, the whole test process is automatically executed, and the test efficiency and the real-time performance are further improved while the human cost is effectively reduced.

[0152] In some embodiments, the obtaining module 402 is specifically configured to:

[0153] If it is determined according to the network card information that the network card to be tested has a hot plug function, the test task in the test strategy is determined to include a first test task and a second test task, and the execution priority in the execution process is determined to include that the execution priority of the first test task is higher than that of the second test task.

[0154] The first test task is used for hot pull-out testing, and the second test task is used for hot plug-in testing.

[0155] As shown in Figure 5 In some embodiments, the test module 403 specifically includes a controller 501, a control chip 502, an information obtaining unit 503, a determination unit 504 and an output unit 505; the control chip 502 can be a pcie lane control chip.

[0156] The controller 501 is configured to generate a control instruction, including at least a first control instruction and / or a second control instruction.

[0157] The control chip 502 is configured to send the first control instruction to a power-on timing module and a power supply module associated with the network card to be tested, so that the power-on timing module and the power supply module perform power-off control on a target slot corresponding to the network card to be tested according to the first control instruction, to simulate the execution of the first test task by the network card to be tested.

[0158] The information obtaining unit 503 is configured to capture a first network card management log and a second network card management log of a target device to which the network card to be tested belongs; the first network card management log is a network card management log generated before the execution of the first test task; and the second network card management log is a network card management log generated after the execution of the first test task.

[0159] The determination unit 504 is configured to acquire a first test result of the to-be-tested network card according to the first network card management log and the second network card management log.

[0160] The control chip 502 is further configured to send a second control instruction to the power-on timing module and the power supply module, so that the power-on timing module and the power supply module perform power-on control on the target slot according to the second control instruction, to simulate the to-be-tested network card to execute the second test task, in a case where the first test result indicates that the to-be-tested network card passes the hot pull-out test.

[0161] The information acquisition unit 503 is further configured to capture a third network card management log of the target device; the third network card management log is a network card management log generated after the second test task is executed.

[0162] The determination unit 504 is further configured to acquire a second test result of the to-be-tested network card according to the second network card management log and the third network card management log.

[0163] The output unit 505 is configured to acquire a test result of the to-be-tested network card according to the first test result and the second test result.

[0164] In some embodiments, the test tasks in the test strategy further include a third test task, and the third test task is used for hot plug performance test; and the execution priority in the execution process further includes that the execution priority of the second test task is higher than that of the third test task.

[0165] The test module 403 is further configured to:

[0166] In a case where it is determined according to the first test result and the second test result that the to-be-tested network card passes the hot plug test, the third test task is executed on the to-be-tested network card to obtain a third test result of the to-be-tested network card.

[0167] The test result of the to-be-tested network card is acquired according to the first test result, the second test result and the third test result.

[0168] In some embodiments, the acquisition module 402 is further configured to:

[0169] In a case where it is determined according to the test item information that the test item required by the to-be-tested network card includes a network card position identification function test item, if it is determined according to the network card information that the to-be-tested network card has a hot plug function, it is determined that the test task in the test strategy includes a first test task, a second test task and a fourth test task, and it is determined that the execution flow in the test strategy includes that the execution priority of the first test task is higher than that of the second test task, and the execution priority of the second test task is higher than that of the fourth test task.

[0170] The fourth test task is used for identification function test.

[0171] In some embodiments, the test module 403 is further configured to:

[0172] According to the execution flow, the first test task and the second test task are executed on the to-be-tested network card.

[0173] In a case where the test result is that the to-be-tested network card passes the hot plug test, the network card management log of a baseboard management controller to which the to-be-tested network card belongs and the slot information of a target slot corresponding to the to-be-tested network card are acquired. The slot information includes network card information of all network cards inserted into the target slot before and after execution of the first test task, and network card information of all network cards inserted into the target slot before and after execution of the second test task.

[0174] According to the network card management log of the baseboard management controller and the slot information, an identification performance test result corresponding to the to-be-tested network card is acquired.

[0175] According to the identification performance test result, a test result of the to-be-tested network card is acquired.

[0176] In some embodiments, the acquisition module 402 is further configured to:

[0177] According to the network card function identifier in the network card information and the test item identifier in the test item information, a test index is generated.

[0178] According to the test index, a test strategy corresponding to the network card test request is determined in a test strategy library.

[0179] The embodiment provides a server, which includes at least one network card, at least one slot, a power-on timing module and a power supply module associated with each network card, and a network card testing device.

[0180] Each network card is installed on a corresponding slot through a slide rail. The slot and slide rail installation mode facilitates installation and disassembly of the network card.

[0181] The network card testing device is connected with the power-on timing module, the power-on timing module is connected with the power supply module, and the power supply is connected with the corresponding network card.

[0182] The power-on timing module is used for receiving the control instruction sent by the network card testing device, controlling the power supply to output the corresponding power supply voltage, and performing power-off control or power-on control on the corresponding slot of the corresponding network card.

[0183] Optionally, the network card testing device generates a first control instruction and a second control instruction according to a network card testing request, and issues the first control instruction under an operating system, that is, sends the first control instruction to the power-on timing module and the power supply module associated with the network card to be tested, so that the power-on timing module controls the power supply module to output a first level signal (that is, a low level signal) according to the first control instruction, and then controls the output voltage of the VR chip of the target slot corresponding to the network card to be tested to be a low voltage, so as to realize power-off control on the target slot corresponding to the network card to be tested, and simulate hot pull-out testing of the network card to be tested; in the case that the network card to be tested passes the hot pull-out testing, the second control instruction is continuously issued under the operating system, that is, the second control instruction is sent to the power-on timing module and the power supply module associated with the network card to be tested, so that the power-on timing module controls the power supply module to output a second level signal (that is, a high level signal) according to the second control instruction, and then controls the output voltage of the VR chip of the target slot corresponding to the network card to be tested to be a high voltage, so as to realize power-on control on the target slot corresponding to the network card to be tested, simulate hot plug-in testing of the network card to be tested, realize hot plug-in function triggered in the mode of automatically simulating hot plug-in key pressing, simulate hot plug-in operation, and perform hot plug-in testing, thereby reducing manual participation and improving testing efficiency.

[0184] Figure 6 An example of an entity structure diagram of an electronic device is shown as Figure 6As shown, the electronic device can include a processor 601, a communications interface 602, a memory 603, and a communications bus 604, wherein the processor 601, the communications interface 602, and the memory 603 complete mutual communication through the communications bus 604. The processor 601 can invoke a logical instruction in the memory 603 to execute a network card testing method, which includes: receiving a network card testing request, and according to the network card testing request, acquiring network card information and test item information of a network card to be tested; according to the network card information and the test item information, acquiring a test strategy corresponding to the network card testing request; the test strategy includes at least one test task corresponding to the network card to be tested, and an execution flow of each test task; according to the execution flow of each test task, executing each test task on the network card to be tested, and according to an execution result, acquiring a test result of the network card to be tested.

[0185] In addition, the logical instruction in the memory 603 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the related art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0186] On the other hand, the present application also provides a computer program product, which includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the network card testing method provided by the above-mentioned methods, which includes: receiving a network card testing request, and according to the network card testing request, acquiring network card information and test item information of a network card to be tested; according to the network card information and the test item information, acquiring a test strategy corresponding to the network card testing request; the test strategy includes at least one test task corresponding to the network card to be tested, and an execution flow of each test task; according to the execution flow of each test task, executing each test task on the network card to be tested, and according to an execution result, acquiring a test result of the network card to be tested.

[0187] In another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the network card testing method provided by the above method, and the method comprises: receiving a network card testing request, and according to the network card testing request, obtaining network card information and test item information of a network card to be tested; according to the network card information and the test item information, obtaining a test strategy corresponding to the network card testing request; the test strategy comprises at least one test task corresponding to the network card to be tested, and an execution flow of each test task; according to the execution flow of each test task, executing each test task on the network card to be tested, and according to the execution result, obtaining a test result of the network card to be tested.

[0188] The device embodiments described above are only schematic, wherein the units illustrated as separate components may or may not be physically separate, and the components illustrated as units may or may not be physical units, i.e., may be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement without creative labor.

[0189] From the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary universal hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the method described in each embodiment or some part of the embodiment.

[0190] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of testing a network card, the method comprising: The method comprises the steps of: receiving a network card test request and obtaining network card information and test item information of a network card to be tested according to the network card test request; obtaining a test strategy corresponding to the network card test request according to the network card information and the test item information; the test strategy comprises at least one test task corresponding to the network card to be tested and an execution flow of each test task; executing each test task on the network card to be tested according to the execution flow of each test task, and obtaining a test result of the network card to be tested according to an execution result; the step of obtaining the test strategy corresponding to the network card test request according to the network card information and the test item information comprises the steps of: generating a test index according to a network card function identifier in the network card information and a test item identifier in the test item information; determining the test strategy corresponding to the network card test request in a test strategy library according to the test index; in a case where it is determined according to the test item information that a test item required by the network card to be tested is a hot plug test item, if it is determined according to the network card information that the network card to be tested has a hot plug function, it is determined that a test task in the test strategy comprises a first test task and a second test task, and it is determined that an execution priority in the execution flow comprises an execution priority of the first test task being higher than that of the second test task; the first test task is used for hot pull-out test, and the second test task is used for hot plug-in test; the step of executing each test task on the network card to be tested according to the execution flow of each test task, and obtaining a test result of the network card to be tested according to an execution result comprises the steps of: sending a control instruction to a power-on timing module and a power supply module associated with the network card to be tested, and performing power-off or power-on control on a target slot corresponding to the network card to be tested based on the control instruction.

2. The method of claim 1, wherein, the step of executing each test task on the network card to be tested according to the execution flow of each test task, and obtaining a test result of the network card to be tested according to an execution result comprises the steps of: sending a first control instruction to a power-on timing module and a power supply module associated with the network card to be tested, so that the power-on timing module and the power supply module perform power-off control on a target slot corresponding to the network card to be tested according to the first control instruction, to simulate execution of the first test task by the network card to be tested; grabbing a first network card management log and a second network card management log of a target device to which the network card to be tested belongs; the first network card management log is a network card management log generated before the first test task is executed; the second network card management log is a network card management log generated after the first test task is executed; obtaining a first test result of the network card to be tested according to the first network card management log and the second network card management log; In a case where the first test result is that the to-be-tested network card passes the hot pull-out test, a second control instruction is sent to the power-on timing module and the power supply module, so that the power-on timing module and the power supply module perform power-on control on the target slot according to the second control instruction, to simulate execution of the second test task by the to-be-tested network card; a third network card management log of the target device is captured; the third network card management log is a network card management log generated after execution of the second test task; a second test result of the to-be-tested network card is obtained according to the second network card management log and the third network card management log; a test result of the to-be-tested network card is obtained according to the first test result and the second test result.

3. The method of claim 2, wherein, The test tasks in the test strategy further include a third test task, and the execution priority in the execution process further includes that the execution priority of the second test task is higher than that of the third test task. The test result of the to-be-tested network card is obtained according to the first test result and the second test result, including: In a case where the to-be-tested network card passes the hot pull-out test according to the first test result and the second test result, the third test task is executed on the to-be-tested network card, to obtain a third test result of the to-be-tested network card; The test result of the to-be-tested network card is obtained according to the first test result, the second test result and the third test result.

4. The method of claim 1, wherein, The test strategy corresponding to the network card test request is obtained according to the network card information and the test item information, including: In a case where the test item information indicates that the to-be-tested network card needs to be tested for a network card position recognition function test item, if the network card information indicates that the to-be-tested network card has a hot pull-out function, it is determined that the test tasks in the test strategy include a first test task, a second test task and a fourth test task, and it is determined that the execution process in the test strategy includes that the execution priority of the first test task is higher than that of the second test task, and the execution priority of the second test task is higher than that of the fourth test task. The fourth test task is used for recognition function test.

5. The method of claim 4, wherein, The test result of the to-be-tested network card is obtained according to the execution process of each test task, including: The first test task and the second test task are executed on the to-be-tested network card according to the execution process; In a case where the test result is that the to-be-tested network card passes the hot pull-out test, a network card management log of a baseboard management controller to which the to-be-tested network card belongs and slot information of a target slot corresponding to the to-be-tested network card are obtained; the slot information includes network card information of all network cards connected to the target slot before and after execution of the first test task, and network card information of all network cards connected to the target slot before and after execution of the second test task. According to the network card management log of the baseboard management controller and the slot information, an identification performance test result corresponding to the network card to be tested is obtained; According to the identification performance test result, a test result of the network card to be tested is obtained.

6. A network card testing device, characterized by Comprise: A receiving module is configured to receive a network card test request, and obtain network card information and test item information of a network card to be tested according to the network card test request; A obtaining module is configured to obtain a test strategy corresponding to the network card test request according to the network card information and the test item information; The test strategy comprises at least one test task corresponding to the network card to be tested, and an execution flow of each test task; A test module is configured to execute each test task on the network card to be tested according to the execution flow of each test task, and obtain a test result of the network card to be tested according to an execution result; The obtaining of the test strategy corresponding to the network card test request according to the network card information and the test item information comprises: Generating a test index according to a network card function identifier in the network card information and a test item identifier in the test item information; Determining the test strategy corresponding to the network card test request in a test strategy library according to the test index; In a case where it is determined according to the test item information that a test item required by the network card to be tested comprises a hot plug test item, if it is determined according to the network card information that the network card to be tested has a hot plug function, it is determined that a test task in the test strategy comprises a first test task and a second test task, and it is determined that an execution priority in the execution flow comprises that an execution priority of the first test task is higher than that of the second test task; The first test task is used for hot pull-out test, and the second test task is used for hot plug-in test; The execution of each test task on the network card to be tested according to the execution flow of each test task, and the obtaining of a test result of the network card to be tested according to an execution result comprise: Sending a control instruction to a power-on timing module and a power supply module associated with the network card to be tested, and performing power-off control or power-on control on a target slot corresponding to the network card to be tested based on the control instruction.

7. A server, characterized by The server comprises at least one network card, at least one slot, a power-on timing module and a power supply module associated with each network card, and a network card test device as claimed in claim 6; Each network card is installed on a corresponding slot through a slide rail; The network card test device is connected with the power-on timing module, the power-on timing module is connected with the power supply module, and the power supply module is connected with the corresponding network card; The power-on timing module is configured to receive a control instruction sent by the network card test device, control a power supply to output a corresponding power supply voltage, and perform power-off control or power-on control on the slot corresponding to the corresponding network card.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the network card test method as claimed in any one of claims 1 to 5. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the network card test method as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Network card testing method and device, electronic equipment and readable storage medium

    CN111786854A