Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a double-network-speed testing method for a server network card, aiming at solving the problem that the prior art only adopts a method for testing the highest speed or separately testing two speeds to test the network card, so that more defects exist.
The technical scheme provided by the invention is as follows: a double-network-speed testing method for a server network card comprises the following steps:
after the test environment is built, acquiring basic information of the network card to be tested, wherein the basic information comprises the number of network ports contained in the network card to be tested;
downloading a test program from a function test server while acquiring basic information of the network card to be tested;
and controlling the running of the test program, executing gigabit rate test on each network port, executing gigabit rate test between every two adjacent network ports, and simultaneously recording a test result and a test log.
As an improved scheme, after the test environment is built, acquiring basic information of the network card to be tested, wherein the basic information includes the number of network ports included in the network card to be tested, and the following steps are also included before the step of:
and building a test environment for the network card, wherein the test environment comprises a test fixture for clamping the network card to be tested and a functional test server for providing network speed test, and a test program is built in the functional test server.
As an improved scheme, the step of controlling and running the test program, performing a gigabit rate test on each of the network ports, performing a gigabit rate test between every two adjacent network ports, and recording a test result and a test log includes the following steps:
executing gigabit rate test on the first network port of the network card to be tested, and simultaneously recording a test log and a test result;
judging whether the kilomega test of the first network port passes or not;
when the gigabit test of the first network port is judged to pass, controlling to disconnect the gigabit network and simultaneously open a butt joint cable between the first network port and the second network port;
testing the speed of ten-gigabit between the first network port and the second network port, and simultaneously recording a test log and a test result;
judging whether the ten-trillion test between the first network port and the second network port passes or not;
when the trillion test between the first network port and the second network port is judged to pass, controlling to disconnect the trillion network and open the gigabit network of a third network port;
in the same way, gigabit and tera rate tests are executed on the network port from the third network port, and test logs and test results are recorded;
judging whether the gigabit rate test of the last network port of the network card to be tested passes or not;
when the kilomega test of the last network port is judged to pass, judging that the speed test of the network card to be tested passes;
and when the situation of failure in the gigabit test or the ten-gigabit test is judged, judging that the rate test of the network card to be tested fails, and recording a test result and a test log.
As an improvement, the method further comprises the steps of:
and uploading a test result and a test log generated in the speed test process of the network card to be tested through the last network port of the network card to be tested.
As an improvement, the method further comprises the steps of:
and when the test is finished, displaying and outputting the test result of the network card to be tested.
Another objective of the present invention is to provide a server network card dual network speed testing system, which includes:
the device comprises a basic information acquisition module, a test environment setting module and a test result generation module, wherein the basic information acquisition module is used for acquiring basic information of a network card to be tested after the test environment is built, and the basic information comprises the number of network ports contained in the network card to be tested;
the test program downloading module is used for downloading the test program from the function test server while acquiring the basic information of the network card to be tested;
and the double-network-speed testing module is used for controlling the running of the testing program, executing gigabit rate testing on each network port, executing gigabit rate testing between every two adjacent network ports and simultaneously recording a testing result and a testing log.
As an improvement, the system further comprises:
the test environment building module is used for building a test environment for the network card, the test environment comprises a test fixture for clamping the network card to be tested and a functional test server for providing network speed test, and a test program is arranged in the functional test server.
As an improved scheme, the dual-network-speed testing module specifically includes:
the kilomega rate test module is used for executing kilomega rate test on the first network interface of the network card to be tested and simultaneously recording a test log and a test result;
the first judgment module is used for judging whether the gigabit test of the first network port passes or not;
the first network configuration module is used for controlling to disconnect the gigabit network and simultaneously opening a butt-joint cable between the first network port and the second network port when judging that the gigabit test on the first network port passes;
the ten-thousand-million-rate testing module is used for testing the ten-thousand-million rate between the first network port and the second network port and recording a testing log and a testing result at the same time;
the second judgment module is used for judging whether the ten-gigabit test between the first network port and the second network port passes or not;
the second network configuration module is used for controlling to disconnect the trillion network and open the gigabit network of a third network port when judging that the trillion test between the first network port and the second network port passes;
the cyclic execution control module is used for executing gigabit and tera rate tests on the network port starting from the third network port in the same way, and simultaneously recording a test log and a test result;
the third judging module is used for judging whether the gigabit rate test of the last network port of the network card to be tested passes or not;
the first judgment module is used for judging that the rate test of the network card to be tested passes when the kilomega test of the last network port passes;
and the second judging module is used for judging that the rate test of the network card to be tested fails and recording a test result and a test log when the situation that the gigabit test or the ten-gigabit test fails is judged.
As an improvement, the system further comprises:
and the uploading module is used for uploading a test result and a test log generated in the speed test process of the network card to be tested through the last network port of the network card to be tested.
As an improvement, the system further comprises:
and the test result display module is used for displaying and outputting the test result of the network card to be tested when the test is finished.
In the embodiment of the invention, after the test environment is built, basic information of the network card to be tested is obtained, wherein the basic information comprises the number of network ports contained in the network card to be tested; downloading a test program from a function test server while acquiring basic information of the network card to be tested; and controlling the running of the test program, executing gigabit rate test on each network port, executing gigabit rate test between every two adjacent network ports, and simultaneously recording a test result and a test log, thereby realizing the automatic test of the double network speed of the network card, reducing the test time and the test cost and improving the test accuracy.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
Fig. 1 is a flowchart of an implementation of the dual network speed testing method for the network card of the server provided by the present invention, which specifically includes the following steps:
in step S101, after the test environment is built, obtaining basic information of the network card to be tested, where the basic information includes the number of network ports included in the network card to be tested;
in step S102, while obtaining the basic information of the network card to be tested, a test program is downloaded from a functional test server;
in step S103, controlling to run the test program, performing a gigabit rate test on each of the network ports, performing a gigabit rate test between every two adjacent network ports, and recording a test result and a test log.
In the embodiment of the present invention, before executing the above step S101, the following steps need to be executed:
the step of measuring the number of network ports contained in the network card further comprises the following steps:
setting up a test environment for the network card, wherein the test environment comprises a test fixture for clamping the network card to be tested and a functional test server for providing network speed test, and as shown in fig. 5, a test program is arranged in the functional test server;
the test procedure is a conventional network speed test procedure, and is not described herein again.
In the embodiment of the present invention, as shown in fig. 2, the step of controlling the running of the test program, performing a gigabit rate test on each of the network ports, performing a gigabit rate test between every two adjacent network ports, and recording a test result and a test log includes the following steps:
in step S201, a gigabit rate test is performed on the first port of the network card to be tested, and a test log and a test result are recorded at the same time;
in step S202, determining whether the gigabit test for the first network port passes, if so, executing step S203, otherwise, executing step S210;
in step S203, when it is determined that the gigabit test for the first network port passes, controlling to disconnect the gigabit network and simultaneously open a docking cable between the first network port and the second network port;
in this step, a butt cable is disposed between two adjacent net ports, and the on-off control can be performed by a corresponding technical means, which is not described herein again.
In step S204, ten-gigabit rate testing is performed between the first network port and the second network port, and a test log and a test result are recorded at the same time;
in step S205, determining whether the trillion test between the first network port and the second network port passes, if yes, performing step S206, otherwise, performing step S210;
in step S206, when determining that the tera test between the first port and the second port passes, controlling to disconnect the tera network and open the gigabit network of a third port;
in step S207, by analogy, gigabit and teramega rate tests are performed on the network port starting from the third network port, and a test log and a test result are recorded at the same time;
in step S208, it is determined whether the gigabit rate test of the last network port of the network card to be tested passes, if so, step S209 is executed, otherwise, step S210 is executed after headquarter is executed;
in step S209, when it is determined that the gigabit test for the last network port passes, it is determined that the rate test for the network card to be tested passes;
in step S210, when it is determined that there is a failure in the gigabit test or the ten-gigabit test, it is determined that the rate test of the network card to be tested fails, and a test result and a test log are recorded.
According to the embodiment, simultaneous testing of gigabit and tera network speeds is provided, and convenience is provided for testing personnel.
In this embodiment, the test result and the test log generated in the speed test process of the network card to be tested are uploaded through the last network port of the network card to be tested.
In the embodiment of the invention, when the test is finished, the test result of the network card to be tested is displayed and output, so that a tester can conveniently check the test result.
Fig. 3 shows a block diagram of a dual network speed testing system for a server network card provided by the present invention, and for convenience of description, only the relevant parts to the embodiment of the present invention are shown in the diagram.
The double-network-speed test system of the server network card comprises:
the basic information acquisition module 11 is configured to acquire basic information of the network card to be tested after the test environment is built, where the basic information includes the number of network ports included in the network card to be tested;
the test program downloading module 12 is used for downloading the test program from the function test server while acquiring the basic information of the network card to be tested;
and the double-network-speed testing module 13 is used for controlling the running of the testing program, executing gigabit rate testing on each network port, executing gigabit rate testing between every two adjacent network ports, and simultaneously recording a testing result and a testing log.
In this embodiment, the test environment establishing module 14 is configured to establish a test environment for the network card, where the test environment includes a test fixture for clamping the network card to be tested and a functional test server for providing a network speed test, and the functional test server is provided with a test program inside.
As shown in fig. 4, the dual network speed testing module 13 specifically includes:
the kilomega rate test module 15 is used for executing kilomega rate test on the first network interface of the network card to be tested, and simultaneously recording a test log and a test result;
a first determining module 16, configured to determine whether the gigabit test for the first network port passes;
a first network configuration module 17, configured to, when it is determined that the gigabit test for the first network port passes, control to disconnect the gigabit network and open a docking cable between the first network port and the second network port at the same time;
a ten-thousand-million-rate test module 18, configured to perform ten-thousand-million-rate test on the first network port and the second network port, and record a test log and a test result at the same time;
a second judging module 19, configured to judge whether the trillion test between the first network port and the second network port passes;
a second network configuration module 20, configured to, when it is determined that the tera test between the first network port and the second network port passes, control to disconnect the tera network, and open a gigabit network of a third network port;
the cycle execution control module 21 is configured to execute gigabit and tera rate tests on the network port starting from the third network port in the same manner, and record a test log and a test result at the same time;
a third judging module 22, configured to judge whether the gigabit rate test of the last network port of the network card to be tested passes or not;
the first judging module 23 is configured to, when it is judged that the gigabit test for the last network port passes, judge that the rate test for the network card to be tested passes;
and the second determination module 24 is configured to determine that the rate test of the network card to be tested fails and record a test result and a test log when it is determined that the gigabit test or the ten-gigabit test fails.
In the embodiment of the present invention, the uploading module 25 is configured to upload, through the last network port of the network card to be tested, a test result and a test log generated in the speed test process of the network card to be tested;
and the test result display module 26 is configured to display and output a test result of the network card to be tested when the test is completed.
The functions of the modules are described in the above embodiments, and are not described herein again.
In the embodiment of the invention, after the test environment is built, basic information of the network card to be tested is obtained, wherein the basic information comprises the number of network ports contained in the network card to be tested; downloading a test program from a function test server while acquiring basic information of the network card to be tested; and controlling the running of the test program, executing gigabit rate test on each network port, executing gigabit rate test between every two adjacent network ports, and simultaneously recording a test result and a test log, thereby realizing the automatic test of the double network speed of the network card, reducing the test time and the test cost and improving the test accuracy.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.