CN113645162B - Hardware testing method, system, equipment and medium of switch - Google Patents

Hardware testing method, system, equipment and medium of switch Download PDF

Info

Publication number
CN113645162B
CN113645162B CN202110904342.6A CN202110904342A CN113645162B CN 113645162 B CN113645162 B CN 113645162B CN 202110904342 A CN202110904342 A CN 202110904342A CN 113645162 B CN113645162 B CN 113645162B
Authority
CN
China
Prior art keywords
tested
attribute parameters
switch
test
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110904342.6A
Other languages
Chinese (zh)
Other versions
CN113645162A (en
Inventor
徐亚洲
张连聘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110904342.6A priority Critical patent/CN113645162B/en
Publication of CN113645162A publication Critical patent/CN113645162A/en
Application granted granted Critical
Publication of CN113645162B publication Critical patent/CN113645162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • H04L49/555Error detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a hardware testing method of a switch, which comprises the following steps: acquiring a configuration file and factory attribute parameters of a switch to be tested; determining a plurality of hardware to be tested in the switch to be tested according to the configuration file; obtaining test files corresponding to the plurality of hardware to be tested respectively; calling a plurality of interfaces in a predefined data interface layer to acquire attribute parameters of the hardware to be tested, which are defined in each test file; and comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result. The invention also discloses a system, a computer device and a readable storage medium. The scheme provided by the invention simplifies and unifies the switch test through the data interface layer, thereby being capable of rapidly positioning the switch fault.

Description

Hardware testing method, system, equipment and medium of switch
Technical Field
The invention relates to the field of testing, in particular to a method, a system, equipment and a storage medium for testing hardware of a switch.
Background
When the switch produces and delivers goods, all test items can be delivered to the client only after passing through the test of a production line production test program. The design of the switch production test program needs to completely cover the switch functionality.
At present, switch manufacturers on the market all have a set of switch production test kits. A switchboard manufacturer develops a diagnosis test program suitable for the product according to the characteristics of the product; and for different models of switches, there will be a few differences in diagnostic test procedures. When a customer receives a delivered product, the customer can receive a detailed delivery test report, but the customer cannot be involved in the specific functional test details.
The production test programs of all the switch manufacturers only aim at the products of the switch manufacturers, and the diagnosis test programs do not have uniform test flows and judgment rules. For example, how to test the switch chip on the switch to function normally and how to set the conditions for passing the test are not uniform for each manufacturer.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problem, an embodiment of the present invention provides a method for testing hardware of a switch, including the following steps:
acquiring a configuration file and a delivery attribute parameter of a switch to be tested;
determining a plurality of hardware to be tested in the switch to be tested according to the configuration file;
obtaining test files corresponding to the plurality of hardware to be tested respectively;
calling a plurality of interfaces in a predefined data interface layer to acquire attribute parameters of the hardware to be tested, which are defined in each test file;
and comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a hardware testing system for a switch, including:
the first acquisition module is configured to acquire a configuration file and factory attribute parameters of the switch to be tested;
the determining module is configured to determine a plurality of hardware to be tested in the switch to be tested according to the configuration file;
the second acquisition module is configured to acquire test files corresponding to the plurality of hardware to be tested respectively;
the calling module is configured to call a plurality of interfaces in a predefined data interface layer to acquire the attribute parameters of the hardware to be tested, which are defined in each test file;
and the comparison module is configured to compare the acquired attribute parameters with the factory attribute parameters and generate a test report based on a comparison result.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of:
acquiring a configuration file and a delivery attribute parameter of a switch to be tested;
determining a plurality of hardware to be tested in the switch to be tested according to the configuration file;
obtaining test files corresponding to the plurality of hardware to be tested respectively;
calling a plurality of interfaces in a predefined data interface layer to acquire attribute parameters of the hardware to be tested, which are defined in each test file;
and comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of:
acquiring a configuration file and a delivery attribute parameter of a switch to be tested;
determining a plurality of hardware to be tested in the switch to be tested according to the configuration file;
obtaining test files corresponding to the plurality of hardware to be tested respectively;
calling a plurality of interfaces in a predefined data interface layer to acquire attribute parameters of the hardware to be tested, which are defined in each test file;
and comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on a comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
The invention has one of the following beneficial technical effects: the scheme provided by the invention simplifies and unifies the switch test through the data interface layer, thereby being capable of rapidly positioning the switch fault.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a hardware testing method of a switch according to an embodiment of the present invention;
fig. 2 is a flow chart of a hardware testing method of a switch according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a hardware testing system according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
According to an aspect of the present invention, an embodiment of the present invention provides a method for testing hardware of a switch, as shown in fig. 1, which may include the steps of:
s1, acquiring a configuration file and factory attribute parameters of a switch to be tested;
s2, determining a plurality of hardware to be tested in the switch to be tested according to the configuration file;
s3, obtaining test files corresponding to the plurality of hardware to be tested respectively;
s4, calling a plurality of interfaces in a predefined data interface layer to obtain attribute parameters of the hardware to be tested, which are defined in each test file;
and S5, comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
The scheme provided by the invention simplifies and unifies the switch test through the data interface layer, thereby being capable of rapidly positioning the switch fault.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
Specifically, as shown in fig. 2, the main service (i.e., the test main program) deployed on the test server is a set of standard diagnostic test programs, and is deployed on the server, so that the test flow of each device of the switch is realized; the slave service (i.e., client) core with the first interface deployed on the switch to be tested is the restful server service.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
Specifically, the configuration file configures which test items are performed by the switch to be tested, the main service can know the test items performed by the switch after acquiring the configuration file of the switch to be tested, then the corresponding test file is acquired, the test file comprises a corresponding test flow, a test result of corresponding hardware of the switch to be tested can be obtained by executing the test flow, and then the test result is compared with default configuration of leaving a factory. The testing process of each device is executed according to the testing standard in the switch industry. The test main program firstly accesses a test database to obtain data such as an IP address and factory configuration of the equipment to be tested; then, initiating a request through restful network service, requesting to acquire hardware information of the equipment to be tested, and waiting for returning; and after the equipment to be tested returns data, the test main program checks whether the returned data is correct or not, matches the returned data with the test database and generates a test report.
The test main program is a whole set of switch test flow, and comprises test items of all devices of the switch, mainly comprising a PSU power supply, a FAN FAN, a Sensor, a CPU processor, a MEMORY MEMORY, SSD storage, firmware, a PORT PORT, an FRU replaceable unit, an LED lamp, an SFP optical module, a USB and the like, wherein the test flows of the test items are realized based on test criteria in the switch industry. The standard test flow of the PSU test item is as follows, and the PSU can be referred to in the test flows of other device test items.
(1) Checking the in-place state and the power supply state of the PSU, reporting an error if the PSU is abnormal, and entering the next step if the PSU is abnormal;
(2) Accessing firmware information of the PSU, judging whether the firmware information accords with factory configuration, reporting an error if the firmware information is abnormal, and entering the next step if the firmware information does not accord with factory configuration;
(3) Accessing the input and output current, voltage, power and temperature of the PSU, judging whether the input and output current, voltage, power and temperature exceed a threshold value, if so, reporting an error, otherwise, entering the next step;
(4) And generating a test result.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by utilizing the first interface.
Specifically, as shown in fig. 2, the slave service monitors a restful request initiated by the server-side test main program through a first interface (i.e., a restful interface), and calls a data interface layer to return the attribute parameters of the hardware to be tested.
In some embodiments, the Restful interface definition is a set of C/S communication interfaces defined by the present invention, for example, the interface may be defined as follows:
Figure BDA0003200953090000091
therefore, the exchanger production workshop builds an environment according to the diagnosis and test device designed by the invention, and the exchanger can be subjected to factory detection in batch by executing the test main program on the server.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
Specifically, the test database configures an IP address range of the switch to be tested, which test items need to be executed for testing, and default configuration of the switch when leaving factory.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
Specifically, as shown in fig. 2, the data interface layer is a set of hardware access interfaces, and the interfaces are defined and implemented by using Python language. The interface may be implemented to obtain data from a driver or SDK, set parameters, etc. Therefore, the switch manufacturer can only meet the execution requirement of the client program by realizing the layer interface.
As shown in fig. 2, the data interface layer defines data access interfaces of various devices, including PSU power, FAN, sensor, CPU, memory, hard disk, firmware, etc. For example, the data access interface of the PSU power supply may be defined as follows:
Figure BDA0003200953090000101
Figure BDA0003200953090000111
the scheme provided by the invention has the advantages that the main test program is operated by the server side, the client side operates the client program and the data interface layer, and the formulated data interface layer is realized by the manufacturer, so that the test of the switch can be realized, the test of the switch is simplified and unified, and the client can download the diagnosis test program to operate, so that the fault of the switch can be quickly positioned.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a hardware testing system 400 of a switch, as shown in fig. 3, including:
a first obtaining module 401, configured to obtain a configuration file and a delivery attribute parameter of a switch to be tested;
a determining module 402 configured to determine a plurality of hardware to be tested in the switch to be tested according to the configuration file;
a second obtaining module 403, configured to obtain test files corresponding to the multiple pieces of hardware to be tested, respectively;
a calling module 404 configured to call a plurality of interfaces in a predefined data interface layer to obtain attribute parameters of the hardware to be tested defined in each test file;
the comparison module 405 is configured to compare the obtained attribute parameters with the factory attribute parameters, and generate a test report based on a comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the factory attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
The scheme provided by the invention has the advantages that the main test program is operated by the server side, the client side operates the client program and the data interface layer, and the formulated data interface layer is realized by the manufacturer, so that the test of the switch can be realized, the test of the switch is simplified and unified, and the client can download the diagnosis test program to operate, so that the fault of the switch can be quickly positioned.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer apparatus 501, including:
at least one processor 520; and
a memory 510, the memory 510 storing a computer program 511 executable on the processor, the processor 520 executing the program to perform the steps of:
s1, acquiring a configuration file and a delivery attribute parameter of a switch to be tested;
s2, determining a plurality of to-be-tested hardware in the to-be-tested switch according to the configuration file;
s3, obtaining test files corresponding to the plurality of hardware to be tested respectively;
s4, calling a plurality of interfaces in a predefined data interface layer to obtain attribute parameters of the hardware to be tested, which are defined in each test file;
and S5, comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
The scheme provided by the invention has the advantages that the main test program is operated by the server side, the client side operates the client program and the data interface layer, and the formulated data interface layer is realized by the manufacturer, so that the test of the switch can be realized, the test of the switch is simplified and unified, and the client can download the diagnosis test program to operate, so that the fault of the switch can be quickly positioned.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 5, an embodiment of the present invention further provides a computer-readable storage medium 601, the computer-readable storage medium 601 stores a computer program 610, and the computer program 610 performs the following steps when executed by a processor:
s1, acquiring a configuration file and factory attribute parameters of a switch to be tested;
s2, determining a plurality of to-be-tested hardware in the to-be-tested switch according to the configuration file;
s3, obtaining test files corresponding to the plurality of hardware to be tested respectively;
s4, calling a plurality of interfaces in a predefined data interface layer to obtain attribute parameters of the hardware to be tested, which are defined in each test file;
and S5, comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on a comparison result.
In some embodiments, further comprising:
the method comprises the steps of deploying a master service on a testing server and deploying a slave service with a first interface on a switch to be tested, wherein the master service and the slave service interact through the first interface.
In some embodiments, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service, and acquiring a corresponding test file according to the configuration file.
In some embodiments, calling several interfaces in a predefined data interface layer to obtain the attribute parameters of the hardware to be tested defined in each of the test files, further includes:
and the master service sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service by using the first interface.
In some embodiments, further comprising:
and responding to the request received from the service, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
In some embodiments, comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further includes:
the slave service returns the acquired attribute parameters to the master service through the first interface;
and the main service compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
In some embodiments, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
The scheme provided by the invention has the advantages that the main test program is operated by the server side, the client side operates the client program and the data interface layer, and the formulated data interface layer is realized by the manufacturer, so that the test of the switch can be realized, the test of the switch is simplified and unified, and the client can download the diagnosis test program to operate, so that the fault of the switch can be quickly positioned.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing are exemplary embodiments of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, where the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A hardware testing method of a switch is characterized by comprising the following steps:
acquiring a configuration file and factory attribute parameters of a switch to be tested;
determining a plurality of hardware to be tested in the switch to be tested according to the configuration file;
obtaining test files corresponding to the plurality of hardware to be tested respectively;
calling a plurality of interfaces in a data interface layer defined in advance in a switch to be tested to obtain attribute parameters of the hardware to be tested, which are defined in each test file;
and comparing the acquired attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result.
2. The method of claim 1, further comprising:
the method comprises the steps of deploying a master service module on a testing server, and deploying a slave service module with a first interface on a switch to be tested, wherein the master service module and the slave service module interact through the first interface.
3. The method of claim 2, further comprising:
and acquiring the configuration file and the factory attribute parameters by using the main service module, and acquiring a corresponding test file according to the configuration file.
4. The method of claim 3, wherein invoking a number of interfaces in a data interface layer defined in advance in a switch under test to obtain attribute parameters of the hardware under test defined in each of the test files, further comprises:
and the master service module sends a request for acquiring the attribute parameters of the hardware to be tested defined in the test file to the slave service module by using the first interface.
5. The method of claim 4, further comprising:
and responding to the request received from the service module, and calling a plurality of interfaces in a data interface layer defined by the switch to be tested in advance to acquire the attribute parameters.
6. The method of claim 5, wherein comparing the obtained attribute parameters with the factory attribute parameters, and generating a test report based on the comparison result, further comprises:
the slave service module returns the acquired attribute parameters to the master service module through the first interface;
and the main service module compares the received attribute parameters with the delivery attribute parameters to generate a test report based on a comparison result.
7. The method of claim 3, further comprising:
creating a database;
and pre-storing the configuration file and the factory attribute parameters of the switch to be tested in the database.
8. A hardware testing system for a switch, comprising:
the first acquisition module is configured to acquire a configuration file and delivery attribute parameters of the switch to be tested;
the determining module is configured to determine a plurality of hardware to be tested in the switch to be tested according to the configuration file;
the second acquisition module is configured to acquire test files corresponding to the plurality of hardware to be tested respectively;
the calling module is configured to call a plurality of interfaces in a data interface layer defined in advance in the switch to be tested so as to obtain the attribute parameters of the hardware to be tested, which are defined in each test file;
and the comparison module is configured to compare the acquired attribute parameters with the factory attribute parameters and generate a test report based on a comparison result.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 7.
CN202110904342.6A 2021-08-06 2021-08-06 Hardware testing method, system, equipment and medium of switch Active CN113645162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110904342.6A CN113645162B (en) 2021-08-06 2021-08-06 Hardware testing method, system, equipment and medium of switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110904342.6A CN113645162B (en) 2021-08-06 2021-08-06 Hardware testing method, system, equipment and medium of switch

Publications (2)

Publication Number Publication Date
CN113645162A CN113645162A (en) 2021-11-12
CN113645162B true CN113645162B (en) 2023-01-20

Family

ID=78420007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110904342.6A Active CN113645162B (en) 2021-08-06 2021-08-06 Hardware testing method, system, equipment and medium of switch

Country Status (1)

Country Link
CN (1) CN113645162B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363214A (en) * 2021-12-31 2022-04-15 中国信息通信研究院 Method and device for switch anti-seismic test, computer equipment and storage medium
CN114613303B (en) * 2022-03-18 2023-10-20 西安诺瓦星云科技股份有限公司 Display screen control system fault prediction method and device
CN115037787B (en) * 2022-06-09 2024-06-14 上海禾骋科技有限公司 Method, system and device for testing automobile network communication
CN115604097A (en) * 2022-11-30 2023-01-13 天津聚芯光禾科技有限公司(Cn) Automatic configuration and detection system and method for switch leaving factory

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495791A (en) * 2011-11-01 2012-06-13 浙江省电力试验研究院 Method for making automatic test interfaces of relay protection testers of multiple manufacturers compatible
CN106569943A (en) * 2015-10-09 2017-04-19 北京北方微电子基地设备工艺研究中心有限责任公司 Hardware testing method and hardware testing system for equipment
CN109495293A (en) * 2018-10-25 2019-03-19 锐捷网络股份有限公司 A kind of test method, system, equipment and the storage medium in Switch control face
CN110659167A (en) * 2019-09-12 2020-01-07 苏州浪潮智能科技有限公司 Server hardware testing method, equipment and storage medium
CN111240906A (en) * 2019-12-27 2020-06-05 浪潮金融信息技术有限公司 Method for testing hardware module by using universal user interface
CN111309386A (en) * 2020-01-19 2020-06-19 苏州浪潮智能科技有限公司 Switch hardware driving framework and switch

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200530800A (en) * 2004-03-12 2005-09-16 Hon Hai Prec Ind Co Ltd System and method for rapidly diagnosing and testing computer hardware

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495791A (en) * 2011-11-01 2012-06-13 浙江省电力试验研究院 Method for making automatic test interfaces of relay protection testers of multiple manufacturers compatible
CN106569943A (en) * 2015-10-09 2017-04-19 北京北方微电子基地设备工艺研究中心有限责任公司 Hardware testing method and hardware testing system for equipment
CN109495293A (en) * 2018-10-25 2019-03-19 锐捷网络股份有限公司 A kind of test method, system, equipment and the storage medium in Switch control face
CN110659167A (en) * 2019-09-12 2020-01-07 苏州浪潮智能科技有限公司 Server hardware testing method, equipment and storage medium
CN111240906A (en) * 2019-12-27 2020-06-05 浪潮金融信息技术有限公司 Method for testing hardware module by using universal user interface
CN111309386A (en) * 2020-01-19 2020-06-19 苏州浪潮智能科技有限公司 Switch hardware driving framework and switch

Also Published As

Publication number Publication date
CN113645162A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN113645162B (en) Hardware testing method, system, equipment and medium of switch
US11151083B2 (en) Generating target application packages for groups of computing devices
CN108829560A (en) Data monitoring method, device, computer equipment and storage medium
US20130174126A1 (en) Automated testing of programming code for a web service
CN103152229A (en) Dynamic configuration method for monitoring index item
CN110908888A (en) Server testing method and device
CN113760697B (en) Interface testing method, device, electronic equipment and storage medium
CN112835802A (en) Equipment testing method, device, equipment and storage medium
CN110704311B (en) Application program testing method and device, electronic equipment and readable storage medium
CN110830313A (en) Method and device for generating pressure measurement flow model and readable storage medium
CN113918438A (en) Method and device for detecting server abnormality, server and storage medium
CN111767218B (en) Automatic test method, equipment and storage medium for continuous integration
CN113132522A (en) Test method, device, server and medium
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN110912779A (en) Cluster host health detection method, system, equipment and readable storage medium
CN114050990B (en) Method and device for testing network isolation equipment, storage medium and electronic equipment
CN115904978A (en) Redfish interface testing method, computing device and storage medium
US20180059179A1 (en) Automatic control system and automatic instrument searching method for the same
CN113866606A (en) Module pin detection method and device, electronic equipment and storage medium
CN113300912A (en) Equipment testing method and device and electronic equipment
CN106992873B (en) Protection group processing method and device
CN108156007B (en) Attribution method and device for network service fault
US9552203B1 (en) Configuration dependency manager for configurable applications
US20240202108A1 (en) Computer-implemented method for determining compatible system elements and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant