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

By performing a target stress test controlled by preset test rules on the network card, the problem that the network card test in the existing technology cannot simulate the real network environment is solved, and the stable performance of the network card is accurately tested and the test accuracy is improved.

CN116074228BActive Publication Date: 2024-10-18INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202211447363.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2024-10-18
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

The network card testing method in the existing technology cannot simulate the real network environment, resulting in low stability and accuracy of the tested network card.

Method used

By obtaining the preset test rules of the network card under test, control the device under test and multiple auxiliary test devices to perform target stress testing, including the first round of testing and the second round of testing, and the auxiliary testing in the first round of testing and the second round of testing. The number of devices is different, and test data is generated to determine the stable performance of the network card.

Benefits of technology

It achieves accurate testing of network card stability performance, improves test accuracy, and can analyze the network card's response to multi-channel access requests and its ability to handle request blocking queuing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074228B_ABST
    Figure CN116074228B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a network card testing method, device, storage medium and electronic device, wherein the method includes: obtaining preset test rules corresponding to the network card under test; based on the preset test rules, controlling the device under test and multiple auxiliary test devices to perform a target stress test, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round test and a second round test, and the number of auxiliary test devices in the first round test and the second round test is different; based on the test data generated by the device under test in the target stress test, determining the stability performance of the network card under test. Through this application, the problem of the prior art that the test method of directly connecting the network card interface with a network cable cannot simulate the real network environment, resulting in low accuracy of the stability performance of the tested network card is solved, thereby achieving the effect of improving the accuracy of the test of the stability performance of the network card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and specifically, to a network card testing method, device, storage medium and electronic device. Background Art

[0002] At present, users' demand for high-speed networks is becoming more and more common. As the main hardware of computer communication, the stability and reliability of network cards have become very important. The performance test of network cards is an important guarantee before computer communication services.

[0003] Generally, in the prior art, the performance of a network card is mainly tested by directly connecting a single network card, that is, using two servers with the same network card installed, and directly connecting the interfaces of the two servers via a network cable. This test method does not take into account the changes in scenarios, and cannot simulate the situation of a network card processing multiple access requests in a real network environment, thus failing to reflect the true stability of the network card, resulting in a low accuracy in the stability performance of the tested network card.

[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a network card testing method, device, storage medium and electronic device to at least solve the problem that the testing method in the related art that uses a network cable to directly connect the network card interface cannot simulate the real network environment, resulting in low accuracy of the stability performance of the tested network card.

[0006] According to an embodiment of the present application, a network card testing method is provided, including: obtaining preset test rules corresponding to the network card under test; based on the preset test rules, controlling a device under test and multiple auxiliary test devices to perform a target stress test, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round of testing and a second round of testing, and the number of auxiliary test devices in the first round of testing and the second round of testing is different; based on the test data generated by the device under test in the target stress test, determining the stability performance of the network card under test.

[0007] In an exemplary embodiment, based on preset test rules, the device under test and multiple auxiliary test devices are controlled to perform a target stress test, including: according to the preset test rules, a target data set is obtained, wherein the target data set is composed of IP addresses of multiple auxiliary test devices; a screening instruction is run to randomly screen an IP address from the target data set, and a target auxiliary test device is determined from multiple auxiliary test devices based on the IP address; based on the target auxiliary test device, a first round of testing is performed on the device under test; based on at least two auxiliary test devices among the multiple auxiliary test devices, a second round of testing is performed on the device under test.

[0008] In an exemplary embodiment, the preset test rules include at least a first test rule, and a first round of testing is performed on the device to be tested based on a target auxiliary test device, including: sending a first test command to the target auxiliary test device to cause the device to be tested and the target auxiliary test device to perform a stress test according to the first test rule; repeatedly executing the run screening instruction to randomly screen an IP address from the target data set to redetermine the target auxiliary test device; sending a first test command to the redetermined target auxiliary test device to cause the device to be tested and the redetermined target auxiliary test device to perform a stress test according to the first test rule, until the number of stress tests reaches a first preset number, completing the first round of testing.

[0009] In an exemplary embodiment, the preset test rules include at least a second test rule, and a second round of testing is performed on the device to be tested based on at least two auxiliary test devices among multiple auxiliary test devices, including: sending a second test command to at least two auxiliary test devices among the multiple auxiliary test devices, so that the device to be tested and at least two auxiliary test devices among the multiple auxiliary test devices are stress tested according to the second test rule; repeating the step of stress testing the device to be tested and at least two auxiliary test devices among the multiple auxiliary test devices according to the second test rule until the number of stress tests reaches a second preset number, completing the second round of testing.

[0010] In an exemplary embodiment, after performing a second round of testing on the device to be tested based on at least two auxiliary testing devices among the multiple auxiliary testing devices, the network card testing method further includes: repeatedly executing the target stress test until the number of times the target stress test is executed reaches a third preset number.

[0011] In an exemplary embodiment, before obtaining the preset test rules corresponding to the network card under test, the network card testing method also includes: responding to the configuration instruction, configuring the IP address of the device under test and the IP addresses of multiple auxiliary test devices to be in the same local area network segment; after the IP address of the device under test and the IP addresses of multiple auxiliary test devices are in the same local area network segment, connecting the network card under test in the device under test to the switch, so that the network card under test in the device under test and the network cards of the same model as the network card under test in the multiple auxiliary test devices can communicate.

[0012] In an exemplary embodiment, the stability performance of the network card under test is determined based on the test data generated by the device under test in the target stress test, including: generating a target graph based on the test data, wherein the target graph is used to present the stress information to which the network card under test is subjected; and determining the stability performance of the network card under test according to the target graph.

[0013] According to another embodiment of the present application, a network card testing device is provided, including: an acquisition module, used to obtain preset test rules corresponding to the network card under test; a control module, used to control the device under test and multiple auxiliary test devices to perform a target stress test based on the preset test rules, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round of testing and a second round of testing, and the number of auxiliary test devices in the first round of testing and the second round of testing is different; a determination module, used to determine the stability performance of the network card under test based on the test data generated by the device under test in the target stress test.

[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] In an embodiment of the present invention, a random dynamic multi-channel test is performed on a network card under test in a device under test by an auxiliary test device. First, a preset test rule corresponding to the network card under test is obtained. Then, based on the preset test rule, the device under test and multiple auxiliary test devices are controlled to perform a target stress test. Then, based on the test data generated by the device under test in the target stress test, the stability performance of the network card under test is determined. The device under test is equipped with a network card under test, and the target stress test includes at least a first round test and a second round test. The number of auxiliary test devices in the first round test and the second round test is different.

[0017] In the above process, by obtaining the preset test rules corresponding to the network card under test, a data basis is provided for the subsequent target stress test; based on the preset test rules, the first round of testing and the second round of testing are carried out to realize the dynamic testing of the network card under test. Compared with the testing method of directly connecting the network cable to the network card interface in the prior art, it more realistically reflects the actual operation of the network traffic, so that the hidden unknown risks of the network card under test in the dynamic test environment can be analyzed, and the test accuracy of the stability performance of the network card is improved; by analyzing the test data, the response and response capabilities of the network card to multiple access requests and the ability to handle request blocking and queuing can be obtained, thereby realizing the accurate determination of the stability performance of the network card.

[0018] It can be seen that through the technical solution of the present invention, the purpose of accurately testing the stability performance of the network card is achieved, thereby realizing the technical effect of improving the accuracy of the test of the stability performance of the network card, and further solving the technical problem that the test method in the prior art that uses a network cable to directly connect the network card interface cannot simulate the real network environment, resulting in low accuracy of the tested stability performance of the network card. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal according to an optional network card testing method of an embodiment of the present application;

[0021] Figure 2 is a flow chart of an optional network card testing method according to an embodiment of the present application;

[0022] Figure 3 is a schematic diagram of a test environment for an optional network card test according to an embodiment of the present application;

[0023] Figure 4 This is a schematic diagram of a small cycle unit test of an optional network card test according to an embodiment of the present application;

[0024] Figure 5 is a test flow chart of an optional network card test according to an embodiment of the present application;

[0025] Figure 6 is a periodic dynamic diagram of an optional test data according to an embodiment of the present application;

[0026] Figure 7 It is a structural block diagram of an optional network card testing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 11 is a hardware structure block diagram of a mobile terminal of a network card testing method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the network card testing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a method running on the above mobile terminal is provided. Figure 2 is a flow chart according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0033] Step S202, obtaining the preset test rules corresponding to the network card under test;

[0034] Step S204, based on preset test rules, controlling the device under test and multiple auxiliary test devices to perform a target stress test, wherein the device under test is equipped with a network card under test, and the target stress test includes at least a first round test and a second round test, and the number of auxiliary test devices in the first round test and the second round test is different;

[0035] Step S206: determining the stability performance of the network card under test based on the test data generated by the device under test in the target stress test.

[0036] Through the above steps, the problem of the prior art testing method of using a network cable to directly connect the network card interface, which cannot simulate the real network environment and leads to low accuracy of the tested stability performance of the network card, is solved, thereby achieving the effect of improving the accuracy of the test of the stability performance of the network card.

[0037] The execution subject of the above steps may be a terminal, etc., but is not limited thereto.

[0038] The execution order of step S202 and step S204 is interchangeable, that is, step S204 may be executed first, and then step S202.

[0039] Optionally, in an embodiment of the present application, the network test environment for the stress test of the network card under test includes at least a device under test and multiple auxiliary test devices, wherein the multiple auxiliary test devices are installed with network cards of the same model as the network card under test, and the multiple auxiliary test devices are used to send test data packets to the device under test.

[0040] Specifically, Figure 3 is a schematic diagram of a test environment for an optional network card test according to an embodiment of the present application, such as Figure 3 As shown, the network test environment for the stress test of the network card under test includes at least a device under test (i.e., the machine under test SUT) and multiple auxiliary test devices (i.e., auxiliary machines Client), wherein the network card under test is installed in the device under test, and the multiple auxiliary test devices are installed with network cards of the same model as the network card under test, and the multiple auxiliary test devices are used to send test data packets to the device under test.

[0041] Specifically, the network test environment of the stress test of the network card under test also includes a switch and a control machine, wherein the switch is connected to the machine under test SUT and the control machine, and multiple auxiliary machines Client can be expanded through the switch.

[0042] It should be noted that the network card in the auxiliary test equipment and the device under test are of the same model, which ensures the accuracy and reliability of the test.

[0043] Specifically, in step S202, the preset test rules corresponding to the network card under test can be obtained through the application system, the processor, the electronic device and other devices. Optionally, in this embodiment, the preset test rules corresponding to the network card under test are obtained through the control machine. Among them, the preset test rules specify the number of devices to be tested on the network card under test, the test time, the number of tests, and the test process. For example, in this embodiment, the preset test rule can be to randomly select one auxiliary test device from multiple auxiliary test devices, and the selected one auxiliary test device and the device under test are subjected to a 10-minute stress test, with an interval of 1 minute, and then repeat the above steps of randomly selecting one auxiliary test device, and the selected one auxiliary test device and the device under test are subjected to a 10-minute stress test, with an interval of 1 minute 10 times, and then dispatch all the auxiliary test devices and the device under test to conduct a 10-minute stress test, with an interval of 1 minute, and repeat the step of dispatching all the auxiliary test devices and the device under test to conduct a 10-minute stress test, with an interval of 1 minute 3 times, so that one round training is completed, and finally the above overall round training step is repeated 10 times. It should be noted that the above-mentioned scheduling of all auxiliary test devices may also be scheduling of at least two auxiliary test devices among multiple auxiliary test devices. The above-mentioned example is only used for explanation and does not constitute a limitation on the embodiments of the present invention.

[0044] Specifically, in step S204, the first round of testing can be a 10-minute stress test of the device under test and one auxiliary test device, with a 1-minute interval. The second round of testing can be a 10-minute stress test of the device under test and multiple auxiliary test devices, with a 1-minute interval. Continuing to use the example in the above step S202 for explanation, at this time, the target stress test includes a total of 130 stress tests, that is, 10 times plus 3 times, a total of 13 times, and then 13 times multiplied by 10 times, a total of 130 times.

[0045] Specifically, in step S206, the example in the above step S202 is continued for explanation. At this time, the test data generated by the device under test in the target stress test is 130 test data. By analyzing the above test data, the stability performance of the network card under test can be determined.

[0046] Based on the scheme defined in the above steps S202 to S206, it can be known that in the embodiment of the present invention, a random dynamic multi-channel test is performed on the network card under test in the device under test by using an auxiliary test device, firstly, the preset test rules corresponding to the network card under test are obtained, and then based on the preset test rules, the device under test and multiple auxiliary test devices are controlled to perform a target stress test, and then the stability performance of the network card under test is determined based on the test data generated by the device under test in the target stress test. Wherein, the network card under test is installed in the device under test, and the target stress test includes at least a first round test and a second round test, and the number of auxiliary test devices in the first round test and the second round test is different.

[0047] It is easy to notice that in the above process, by obtaining the preset test rules corresponding to the network card under test, a data basis is provided for the subsequent target stress test; based on the preset test rules, the first round of testing and the second round of testing are carried out to realize the dynamic testing of the network card under test. Compared with the testing method of directly connecting the network cable to the network card interface in the prior art, it more realistically reflects the actual operation of the network traffic, so that the hidden unknown risks of the network card under test in the dynamic test environment can be analyzed, and the test accuracy of the stability performance of the network card is improved; by analyzing the test data, the response and response capabilities of the network card to multiple access requests and the ability to handle request blocking and queuing can be obtained, thereby realizing the accurate determination of the stability performance of the network card.

[0048] It can be seen that through the technical solution of the present invention, the purpose of accurately testing the stability performance of the network card is achieved, thereby realizing the technical effect of improving the accuracy of the test of the stability performance of the network card, and further solving the technical problem that the test method in the prior art that uses a network cable to directly connect the network card interface cannot simulate the real network environment, resulting in low accuracy of the tested stability performance of the network card.

[0049] In an exemplary embodiment, based on preset test rules, the device under test and multiple auxiliary test devices are controlled to perform a target stress test, including: according to the preset test rules, a target data set is obtained, wherein the target data set is composed of IP addresses of multiple auxiliary test devices; a screening instruction is run to randomly screen an IP address from the target data set, and a target auxiliary test device is determined from multiple auxiliary test devices based on the IP address; based on the target auxiliary test device, a first round of testing is performed on the device under test; based on at least two auxiliary test devices among the multiple auxiliary test devices, a second round of testing is performed on the device under test.

[0050] Optionally, in this embodiment, there is no restriction on the tool for running the stress test, for example, the network performance test tool iperf or netperf can be used. Specifically, the stress test is run by executing a preset script on the control machine. Optionally, the command transmission of the control machine can be implemented by remotely executing the command ssh. Specifically, before performing the target stress test, the control machine first sends a waiting signal to the device under test to start the device under test and put it in a waiting state. For example, the control machine sends an iperf-s command to the device under test to start and wait in a server-side manner.

[0051] Furthermore, since the preset test rule stipulates that one auxiliary test device is randomly selected from multiple auxiliary test devices, the control machine first obtains a target data set consisting of IP addresses of multiple auxiliary test devices according to the preset test rule.

[0052] Further, a screening instruction is run to randomly screen an IP address from the target data set, and a target auxiliary test device is determined from multiple auxiliary test devices according to the IP address. For example, by using the Linux random number RANDOM command, a random number IP address is screened from a target data set consisting of IP addresses: 192.168.1.10, 192.168.1.20, 192.168.1.30, and a random auxiliary test device can be selected from multiple auxiliary test devices, that is, the target auxiliary test device corresponding to the selected IP address.

[0053] Furthermore, based on the target auxiliary test device, the first round of testing is performed on the device to be tested. Optionally, the control machine sends a remote execution command ssh to make the target auxiliary test device and the device to be tested perform the first round of testing. For example, through the following command: ssh root@random auxiliary machine IP "iperf-c192.168.1.1-b 1000M-t 600-d">>random auxiliary machine IP.log, it is realized by using local random numbers to mobilize the auxiliary test device to start the stress test, where t 600 means that the stress test is set to 10 minutes. Further, the command sleep 60 is used to set the interval to 1 minute, and then the for loop is used to set the random rotation training 10 times to realize the first round of testing.

[0054] Further, based on at least two of the plurality of auxiliary test devices, a second round of testing is performed on the device to be tested. Optionally, the second round of testing may include at least two auxiliary test devices, for example, the second round of testing is performed on the device to be tested by auxiliary machines Client1 and Client2. Optionally, in this embodiment, Figure 3All the auxiliary test devices shown, namely three auxiliary machines (Client1, Client2, Client3) are used as an example for explanation. Specifically, when the first round of test execution is completed, the control machine dispatches all auxiliary machines to jointly initiate stress testing and conduct a second round of testing on the equipment under test. For example, the stress test is set to 10 minutes, and the command sleep 60 is used to set the interval to 1 minute, and then the while loop is used to set the rotation training 3 times to implement the second round of testing.

[0055] In an exemplary embodiment, the preset test rules include at least a first test rule, and a first round of testing is performed on the device to be tested based on a target auxiliary test device, including: sending a first test command to the target auxiliary test device to cause the device to be tested and the target auxiliary test device to perform a stress test according to the first test rule; repeatedly executing the run screening instruction to randomly screen an IP address from the target data set to redetermine the target auxiliary test device; sending a first test command to the redetermined target auxiliary test device to cause the device to be tested and the redetermined target auxiliary test device to perform a stress test according to the first test rule, until the number of stress tests reaches a first preset number, completing the first round of testing.

[0056] Optionally, the first test rule corresponds to the first round of testing. Specifically, the first test rule may be a 10-minute stress test between a randomly selected auxiliary test device and the device under test, with an interval of 1 minute. The first preset number of times is the number of times corresponding to the completion of the first round of testing, that is, the number of times the stress test between the device under test and the re-determined target auxiliary test device using the first test rule is repeated. For example, the first preset number of times is 10 times, that is, the above-mentioned randomly selected auxiliary test device performs a 10-minute stress test on the device under test, with an interval of 1 minute, and is repeated 10 times. Optionally, the first test command may be a command to start the first round of testing.

[0057] In an exemplary embodiment, the preset test rules include at least a second test rule, and a second round of testing is performed on the device to be tested based on at least two auxiliary test devices among multiple auxiliary test devices, including: sending a second test command to at least two auxiliary test devices among the multiple auxiliary test devices, so that the device to be tested and at least two auxiliary test devices among the multiple auxiliary test devices are stress tested according to the second test rule; repeating the step of stress testing the device to be tested and at least two auxiliary test devices among the multiple auxiliary test devices according to the second test rule until the number of stress tests reaches a second preset number, completing the second round of testing.

[0058] Optionally, the second test rule corresponds to the second round of testing. Specifically, the second test rule may be that at least two of the plurality of auxiliary test devices perform a 10-minute stress test on the device under test, with an interval of 1 minute. Figure 3 All the auxiliary machines shown, that is, 3 auxiliary machines, are taken as an example for explanation. For example, the second test rule may be that the 3 auxiliary machines perform a 10-minute stress test on the machine under test, with an interval of 1 minute. Optionally, the second preset number of times is the number of times corresponding to the completion of the second round of testing, that is, the number of times the stress test between the device under test and at least two of the multiple auxiliary test devices is repeated according to the second test rule. For example, the second preset number of times is 3 times, that is, all the above-mentioned auxiliary machines (3 auxiliary machines) perform a 10-minute stress test on the machine under test, with an interval of 1 minute, and repeat it 3 times. Optionally, the second test command may be a command to start the second round of testing.

[0059] Specifically, Figure 4 is a schematic diagram of a small cycle unit test of an optional network card test according to an embodiment of the present application, such as Figure 4 As shown, the control machine is used to schedule the machine under test and the auxiliary machines, that is, the equipment to be tested and the auxiliary test equipment. Specifically, the control machine first sends a waiting signal to the machine under test to start the machine under test and put it in a waiting state. Then the control machine schedules the randomly selected auxiliary machines and the machine under test to perform 10 stress tests according to the first test rule to complete the first round of testing. Then the control machine sends a waiting signal to the machine under test, and the machine under test starts and is in a waiting state. Then the control machine schedules all the auxiliary machines and the machine under test to perform 3 stress tests according to the second test rule to complete the second round of testing. At this point, one small cycle unit test is completed, that is, one target stress test is completed.

[0060] Specifically, Figure 5 is a test flow chart of an optional network card test according to an embodiment of the present application, such as Figure 5 As shown, the control machine first controls the machine under test and the auxiliary machine to perform the above-mentioned small cycle unit test, i.e., the target stress test, once, and then the control machine controls the machine under test and the auxiliary machine to rotate the above-mentioned small cycle unit test 10 times, thus ending the entire stress test process.

[0061] In an exemplary embodiment, after performing a second round of testing on the device to be tested based on at least two auxiliary testing devices among the multiple auxiliary testing devices, the network card testing method further includes: repeatedly executing the target stress test until the number of times the target stress test is executed reaches a third preset number.

[0062] Optionally, the third preset number is the number corresponding to the overall stress test, that is, the number of times the target stress test is repeatedly executed. Figure 5As shown, after the above-mentioned small cycle unit test, i.e., the target stress test, the control machine controls the device under test and multiple auxiliary test devices to perform 10 small cycle unit tests as a whole. For example, the whole device is trained 10 times through a for loop, thus ending the entire stress test process.

[0063] In an exemplary embodiment, before obtaining the preset test rules corresponding to the network card under test, the network card testing method also includes: responding to the configuration instruction, configuring the IP address of the device under test and the IP addresses of multiple auxiliary test devices to be in the same local area network segment; after the IP address of the device under test and the IP addresses of multiple auxiliary test devices are in the same local area network segment, connecting the network card under test in the device under test to the switch, so that the network card under test in the device under test and the network cards of the same model as the network card under test in the multiple auxiliary test devices can communicate.

[0064] Optionally, in this embodiment, the communication among the device to be tested, multiple auxiliary test devices, the control machine, and the switch is realized through the concept of a local area network. Optionally, in response to a configuration instruction, the IP address of the device to be tested and the IP addresses of multiple auxiliary test devices are configured to be the same local area network segment. Specifically, all network cards are set to the same local area network segment, wherein all network cards are the network cards to be tested, the network cards in multiple auxiliary test devices, and the network card of the control machine. The network card of the control machine only has the authority to send instructions, and the type of network card is not limited. For example, the IP address of the device to be tested is 192.168.1.1, the IP address of the auxiliary machine Client1 is 192.168.1.10, the IP address of the auxiliary machine Client2 is 192.168.1.20, the IP address of the auxiliary machine Client3 is 192.168.1.30, and the IP address of the control machine is 192.168.1.100. It should be noted that in this embodiment, there is no restriction on the specific IP address, and it is only required to be in the same LAN segment. The above example is only used for explanation and does not constitute a limitation on the embodiment of the present invention.

[0065] Furthermore, after the IP address of the device under test and the IP addresses of multiple auxiliary test devices are in the same LAN segment, the network card of the device under test, i.e. the tested machine, is connected to a switch with the same bandwidth, and then the control machine and multiple auxiliary test devices are connected through the switch.

[0066] In an exemplary embodiment, the stability performance of the network card under test is determined based on the test data generated by the device under test in the target stress test, including: generating a target graph based on the test data, wherein the target graph is used to present the stress information to which the network card under test is subjected; and determining the stability performance of the network card under test according to the target graph.

[0067] Optionally, the target graph may be a bandwidth pressure data periodic dynamic graph drawn based on the bandwidth pressure data on the machine under test. The tester may select a suitable drawing tool based on the requirements, and no limitation is made here.

[0068] Furthermore, the stability performance of the tested network card can be determined according to the target graph. Specifically, by analyzing the target graph, it is determined whether the tested network card meets the test standard, and the test standard can be that the stability performance of the network card reaches 90% of the device bandwidth.

[0069] Specifically, Figure 6 is a periodic dynamic diagram of an optional test data according to an embodiment of the present application, such as Figure 6 As shown, the value corresponding to the moving average can be the value obtained by averaging the test data obtained from the 130 stress tests in the above example, the value corresponding to the pressure point can be the value of the test data during the 10-minute stress test in the above example, and the value corresponding to the interval can be the value of the test data corresponding to the 1-minute interval time in the above example.

[0070] Specifically, by analyzing the target graph, it is determined whether the network card under test meets the test standard. When the fluctuation of the pressure point in the target graph is greater than the periodic time point, it is determined that the pressure fails, that is, the network card under test has not passed the test. Among them, the periodic time point can correspond to the above example of testing for 10 minutes and resting for 1 minute. The fluctuation of the pressure point in the target graph is greater than the periodic time point, which means that the fluctuation of the pressure point exceeds 10 minutes. At this time, it is considered that the ability of the network card under test to handle access requests from multiple auxiliary machines, that is, the ability of the network card under test to handle blocking and queuing, does not meet the test standard, that is, the stable performance of the network card cannot achieve 90% of the device bandwidth.

[0071] Optionally, the number of points below the average line in the target graph can be counted and recorded as the target points. When the percentage of the target points to all stress points is greater than 1%, the stress is considered to be invalid. For example, the tested machine and the auxiliary machine are subjected to 100 stress tests, each test lasting 10 minutes with a 1-minute interval. When the value of one point is lower than the average line, it is considered that the 10-minute test time corresponding to the point does not meet the standard, that is, the ability of the tested network card to handle access requests from multiple auxiliary machines, that is, the ability of the tested network card to handle blocking and queuing does not meet the test standard, that is, the stability performance of the network card cannot reach 90% of the device bandwidth.

[0072] Optionally, scores may be assigned to each pressure point according to the product specification of the tested network card, that is, each pressure point corresponds to a score. When the score of a certain pressure point is lower than the average score of all pressure points, the pressure is judged to be failed. For example, the average score of all pressure points is 90 points, and the score of a certain pressure point is 75 points. At this time, it is considered that the 10-minute test time corresponding to this point does not meet the standard, that is, the ability of the tested network card to handle access requests from multiple auxiliary machines, that is, the ability of the tested network card to handle blocking and queuing does not meet the test standard, that is, the stability performance of the network card cannot achieve 90% of the device bandwidth. In the test process, abnormal test time points may also occur. For example, if the size of the cycle of the target graph is observed, if two cycle time periods overlap, an abnormal test time period occurs. The analysis of this problem is conducted by the tester according to the specific problem, and will not be repeated in this embodiment.

[0073] Optionally, in traditional network card development and testing, a single network card direct connection mode is usually used, that is, two servers with the same network card installed are used to test the network card interface by directly connecting the network cable. The network card test is required to pass when 90% of the device bandwidth is achieved. Although this method has a simple test architecture, it does not take into account scenario changes and has a large deviation from the multi-access request situation in the actual network environment. It is unable to test the scheduling ability of the tested network card in handling multi-access requests, such as blocking and queuing, and thus the tested network card performance is inaccurate.

[0074] In this embodiment, a random dynamic multi-channel network card test method is provided, which can effectively avoid omissions in the test scenario, can ensure that the pressure of the tested network card's control of blocking and queuing meets the expected standards, and effectively reflects the adaptability of the tested network card when dealing with multi-channel access, which can provide a basis for the selection of network cards. In addition, through the stress test in this embodiment, the stability of the tested network card in a complex environment is fully reflected, and the effect of improving the test accuracy of the stability performance of the network card is achieved.

[0075] It can be seen that through the technical solution of the present invention, the purpose of accurately testing the stability performance of the network card is achieved, thereby realizing the technical effect of improving the accuracy of the test of the stability performance of the network card, and further solving the technical problem that the test method in the prior art that uses a network cable to directly connect the network card interface cannot simulate the real network environment, resulting in low accuracy of the tested stability performance of the network card.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the network card testing method described in each embodiment of the present application.

[0077] In this embodiment, a network card testing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0078] Figure 7 is a structural block diagram of a network card testing device according to an embodiment of the present application, such as Figure 7 As shown, the device includes: an acquisition module 72, which is used to obtain preset test rules corresponding to the network card under test; a control module 74, which is used to control the device under test and multiple auxiliary test devices to perform a target stress test based on the preset test rules, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round of test and a second round of test, and the number of auxiliary test devices in the first round of test and the second round of test is different; a determination module 76, which is used to determine the stability performance of the network card under test based on the test data generated by the device under test in the target stress test.

[0079] It should be noted that the above-mentioned acquisition module 72, control module 74 and determination module 76 correspond to steps S202 to S206 in the above-mentioned embodiment. The examples and application scenarios implemented by the three modules are the same as those of the corresponding steps, but are not limited to the contents disclosed in the above-mentioned method embodiment.

[0080] Optionally, the control module includes: a first acquisition unit, used to acquire a target data set according to preset test rules, wherein the target data set consists of IP addresses of multiple auxiliary test devices; a screening unit, used to run a screening instruction, randomly screen an IP address from the target data set, and determine a target auxiliary test device from multiple auxiliary test devices based on the IP address; a first test unit, used to perform a first round of testing on the device to be tested based on the target auxiliary test device; and a second test unit, used to perform a second round of testing on the device to be tested based on at least two auxiliary test devices among the multiple auxiliary test devices.

[0081] Optionally, the first test unit includes: a first sending submodule, used to send a first test command to a target auxiliary test device, so that the device under test and the target auxiliary test device are stress tested according to a first test rule; a first processing submodule, used to repeatedly execute a run filtering instruction, randomly filter an IP address from a target data set, to redetermine the target auxiliary test device; a second processing submodule, used to send a first test command to the redetermined target auxiliary test device, so that the device under test and the redetermined target auxiliary test device are stress tested according to the first test rule, until the number of stress tests reaches a first preset number of times, completing the first round of testing.

[0082] Optionally, the second test unit includes: a second sending submodule, used to send a second test command to at least two auxiliary test devices among a plurality of auxiliary test devices, so that the device to be tested and at least two auxiliary test devices among the plurality of auxiliary test devices perform stress testing according to second test rules; a third processing submodule, used to repeatedly execute the step of performing stress testing on the device to be tested and at least two auxiliary test devices among the plurality of auxiliary test devices according to the second test rules, until the number of stress tests reaches a second preset number, thereby completing the second round of testing.

[0083] Optionally, the network card testing device further includes: an execution module, configured to repeatedly execute the target stress test until the number of times the target stress test is executed reaches a third preset number of times.

[0084] Optionally, the network card testing device also includes: a response module, used to respond to configuration instructions, and configure the IP address of the device under test and the IP addresses of multiple auxiliary test devices to the same local area network segment; a connection module, used to connect the network card under test in the device under test to the switch after the IP address of the device under test and the IP addresses of multiple auxiliary test devices are in the same local area network segment, so that the network card under test in the device under test and the network cards of the same model as the network card under test in multiple auxiliary test devices can communicate.

[0085] Optionally, the determination module includes: a generation unit, used to generate a target graph based on the test data, wherein the target graph is used to present the stress information borne by the network card under test; and a first determination unit, used to determine the stability performance of the network card under test according to the target graph.

[0086] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0087] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0088] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0089] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0090] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0091] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0092] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0093] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A network card testing method, characterized in that: include: Get the preset test rules corresponding to the network card under test; Based on the preset test rules, control the device under test and multiple auxiliary test devices to perform a target stress test, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round test and a second round test, and the number of auxiliary test devices in the first round test and the second round test is different; Determining the stability performance of the network card under test based on the test data generated by the device under test in the target stress test; Wherein, based on the preset test rules, controlling the device under test and multiple auxiliary test devices to perform a target stress test includes: According to the preset test rules, a target data set is obtained, wherein the target data set is composed of the IP addresses of the plurality of auxiliary test devices; Run a screening instruction to randomly screen an IP address from the target data set, and determine a target auxiliary test device from the plurality of auxiliary test devices according to the IP address; Based on the target auxiliary test device, performing the first round of testing on the device under test; The second round of testing is performed on the device under test based on at least two auxiliary testing devices among the multiple auxiliary testing devices.

2. The method according to claim 1, characterized in that The preset test rules include at least a first test rule, and based on the target auxiliary test device, the first round of testing is performed on the device under test, including: Sending a first test command to the target auxiliary test device so that the device under test and the target auxiliary test device perform a stress test according to the first test rule; Repeat the execution of the run screening instruction to randomly screen an IP address from the target data set to redetermine the target auxiliary test device; send the first test command to the redetermined target auxiliary test device to cause the device under test and the redetermined target auxiliary test device to perform stress testing with the first test rules until the number of stress tests reaches a first preset number, completing the first round of testing.

3. The method according to claim 2, characterized in that The preset test rules include at least a second test rule, and based on at least two auxiliary test devices among the plurality of auxiliary test devices, the second round of testing is performed on the device under test, including: Sending a second test command to at least two of the plurality of auxiliary test devices, so that the device under test and at least two of the plurality of auxiliary test devices perform a stress test according to the second test rule; Repeat the step of performing stress testing on the device under test and at least two of the plurality of auxiliary test devices according to the second test rule until the number of stress tests reaches a second preset number, thereby completing the second round of testing.

4. The method according to claim 3, characterized in that After performing the second round of testing on the device under test based on at least two auxiliary testing devices among the multiple auxiliary testing devices, the method further includes: The target pressure test is repeatedly performed until the number of times the target pressure test is performed reaches a third preset number of times.

5. The method according to claim 1, characterized in that Before obtaining the preset test rules corresponding to the tested network card, the method further includes: In response to the configuration instruction, the IP address of the device under test and the IP addresses of the plurality of auxiliary test devices are configured to be in the same local area network segment; After the IP address of the device under test and the IP addresses of the multiple auxiliary test devices are in the same local area network segment, the network card under test in the device under test is connected to a switch so that the network card under test in the device under test and the network cards of the same model as the network card under test in the multiple auxiliary test devices can communicate.

6. The method according to claim 1, characterized in that Determining the stability performance of the network card under test based on the test data generated by the device under test in the target stress test includes: Based on the test data, a target graph is generated, wherein the target graph is used to present the pressure information borne by the tested network card; According to the target graph, the stability performance of the tested network card is determined.

7. A network card testing device, characterized in that: include: An acquisition module is used to obtain preset test rules corresponding to the network card under test; A control module, configured to control the device under test and a plurality of auxiliary test devices to perform a target stress test based on the preset test rules, wherein the network card under test is installed in the device under test, and the target stress test includes at least a first round test and a second round test, and the number of auxiliary test devices in the first round test and the second round test is different; A determination module, configured to determine the stability performance of the network card under test based on the test data generated by the device under test in the target stress test; The control module includes: A first acquisition unit, configured to acquire a target data set according to the preset test rule, wherein the target data set consists of IP addresses of the plurality of auxiliary test devices; A screening unit, configured to execute a screening instruction, randomly screen an IP address from the target data set, and determine a target auxiliary test device from the plurality of auxiliary test devices according to the IP address; A first testing unit, configured to perform the first round of testing on the device under test based on the target auxiliary testing device; The second testing unit is configured to perform the second round of testing on the device under test based on at least two auxiliary testing devices among the plurality of auxiliary testing devices.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the network card testing method described in any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the network card testing method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and device for testing network cards

    CN106059860A

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

    CN111786854A

  • Hard disk performance test method and device, electronic equipment and storage medium

    CN114090357A

  • Network card testing method and device, server, medium and computer program product

    CN114465937A

  • Network card performance test method and device, equipment and storage medium

    CN114629831A