Automatic testing method and device for power over Ethernet function, and storage medium
Through the automated power-up function testing method, the inefficiency and low accuracy problems caused by the dependence of manual operation on traditional PoE functional testing is solved, and an efficient and accurate test method is realized, suitable for large-scale production and testing.
Patent Information
- Application Number
- CN202411710934.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-18
Smart Images

Figure CN119484373A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Ethernet power supply, and in particular to an Ethernet power supply function automatic testing method, device and storage medium. Background Art
[0002] In today's digital age, enterprises have an increasing demand for network communications, and the stable operation of enterprise-level networks is crucial to the business development of enterprises. As an important part of enterprise-level networks, the functions and performance of network terminal devices directly affect the overall quality of the network. PoE (Power Over Ethernet) function is a technology that can provide power to network terminal devices through Ethernet cables. It has the advantages of simple wiring, high flexibility and low cost, and has been widely used in enterprise-level network terminals. However, the reliability and stability of the PoE function are crucial to the normal operation of network terminal equipment, so it needs to be strictly tested.
[0003] Traditional PoE functional testing methods mainly rely on manual operation, with low testing efficiency and poor accuracy. They are difficult to meet the needs of large-scale production and testing and are easily affected by human factors. Therefore, they need to be improved. Summary of the invention
[0004] In view of this, the present invention provides an Ethernet power supply function automatic testing method, device and storage medium.
[0005] Specifically, the present invention is achieved through the following technical solutions:
[0006] According to a first aspect of the present invention, there is provided a method for automated testing of Power over Ethernet function, the method comprising the steps of:
[0007] Configure the Ethernet power supply function test environment;
[0008] Setting Ethernet power supply function test parameters for the Ethernet power supply function test environment;
[0009] Executing a Power over Ethernet function test case on the Power over Ethernet function test environment;
[0010] Obtain and analyze Ethernet power supply function test results;
[0011] Generate an Ethernet power supply function test report according to the Ethernet power supply function test result.
[0012] Optionally, configuring the Ethernet power supply function test environment includes the steps of:
[0013] Obtain Ethernet power supply function test hardware equipment and Ethernet power supply function test software program;
[0014] Connect the Ethernet power supply function test hardware equipment according to the test requirements;
[0015] The Power over Ethernet function test software program is installed on the Power over Ethernet function test hardware device according to the test requirements.
[0016] Optionally, the step of setting the Ethernet power supply function test parameters for the Ethernet power supply function test environment comprises the steps of:
[0017] Obtaining an Ethernet power supply device simulator and an Ethernet power consumption device simulator in the Ethernet power supply function test environment;
[0018] Setting the output power of the Ethernet power supply simulator;
[0019] Set the power receiving capability of the Ethernet powered device simulator.
[0020] Optionally, executing the Ethernet power supply function test case on the Ethernet power supply function test environment includes the steps of:
[0021] Running the test software in the Power over Ethernet functional test environment;
[0022] Execute the test steps in sequence according to the requirements of the test case;
[0023] Collect test data.
[0024] Optionally, obtaining and analyzing the Ethernet power supply function test result comprises the steps of:
[0025] Get test data;
[0026] Inputting the test data into the test software;
[0027] The test data is analyzed to determine deterioration.
[0028] Optionally, generating an Ethernet power supply function test report according to the Ethernet power supply function test result comprises the steps of:
[0029] Get test data;
[0030] Generate a test conclusion according to the test data;
[0031] A test report is generated according to the test data and the test conclusion.
[0032] According to a second aspect of the present invention, there is provided an Ethernet power supply function automatic test device, comprising:
[0033] Configuration module, used to configure the Ethernet power supply function test environment;
[0034] A setting module, used to set Ethernet power supply function test parameters for the Ethernet power supply function test environment;
[0035] An execution module, used for executing a Power over Ethernet function test case on the Power over Ethernet function test environment;
[0036] An analysis module, used to obtain and analyze Ethernet power supply function test results;
[0037] A generating module is used to generate an Ethernet power supply function test report according to the Ethernet power supply function test result.
[0038] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the aforementioned methods when executing the program.
[0039] According to a fourth aspect of the present invention, a computer program product is provided. It includes a computer program / computer executable instructions, which, when executed by a processor of an electronic device, implements the steps of any of the above methods.
[0040] According to a fifth aspect of the present invention, there is provided a storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of any one of the aforementioned methods.
[0041] The technical solution provided by the present invention brings at least the following beneficial effects:
[0042] The present application provides an Ethernet power supply function automated testing method, device and storage medium, which have the advantages of high automation, high testing accuracy, strong compatibility and simple operation, and can meet the needs of large-scale production and testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 A schematic diagram of a flow chart of an automated testing method for Ethernet power supply function provided by an embodiment of the present invention;
[0046] Figure 2A schematic diagram of the structure of an Ethernet power supply function automatic test device provided by an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of the structure of a storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Figure 1 The present invention schematically shows a flowchart of an automated testing method for Ethernet power supply function applicable to an embodiment of the present invention.
[0051] See also Figure 1 The embodiment of the present invention provides an Ethernet power supply function automatic testing method, which can be applied to electronic devices, such as PCs, servers, terminals, etc. The method may include the following steps:
[0052] S1: Configure the Ethernet power supply function test environment;
[0053] Exemplarily, configuring the Ethernet power supply function test environment includes the steps of:
[0054] Obtain Ethernet power supply function test hardware equipment and Ethernet power supply function test software program;
[0055] Connect the Ethernet power supply function test hardware equipment according to the test requirements;
[0056] The Power over Ethernet function test software program is installed on the Power over Ethernet function test hardware device according to the test requirements.
[0057] In the embodiment of the present application, the Ethernet power supply function test environment construction includes the construction of hardware equipment and software programs, and the hardware equipment mainly includes:
[0058] (1) Optical communication terminal equipment: providing PoE power supply function;
[0059] (2) Network terminal equipment: network terminal equipment that supports PoE function, such as wireless access points, network cameras, and Internet phones;
[0060] (3) Test instruments: such as oscilloscope, power meter, network analyzer, etc.;
[0061] (4) Automated testing equipment: such as automated testing platforms, test fixtures, etc.;
[0062] The software environment mainly includes:
[0063] (1) Test software: used to control the automated test equipment to perform tests and record the test results;
[0064] (2) Operating system: such as Windows, Linux, etc.
[0065] (3) Network management software: used to manage optical communication terminal equipment and network terminal equipment.
[0066] The test instrument mainly consists of Ethernet power supply equipment simulator, Ethernet power consumption equipment simulator, power meter, oscilloscope, network analyzer and other equipment. The Ethernet power supply equipment simulator is used to simulate the function of Ethernet power supply equipment and provide power to the Ethernet power consumption equipment simulator. The Ethernet power consumption equipment simulator is used to simulate the function of Ethernet power consumption equipment, receive power from the Ethernet power supply equipment simulator, and feedback the power receiving status to the test system; the power meter is used to measure the power output by the Ethernet power supply equipment simulator, the oscilloscope is used to observe the waveform of the PoE signal, and the network analyzer is used to analyze the quality of the Ethernet signal.
[0067] In the embodiment of the present application, the Ethernet power supply device simulator is one of the core components of the automated testing device. It can simulate the functions of the Ethernet power supply device simulator and provide power to the Ethernet power consumption device simulator. It usually has the following functions: Output power regulation: the output power can be adjusted according to the test requirements to meet the test requirements of different standards. It is the reference standard for comparing and verifying the Ethernet power supply device simulator function of the optical communication terminal to measure whether the Ethernet power supply device simulator function of the optical communication terminal meets different standard requirements; Port status detection: it can detect the status of the connected Ethernet power consumption device simulator, such as whether it is connected, power receiving capacity, etc. Fault simulation: it can simulate the fault conditions of the Ethernet power supply device simulator during the test process, such as output overvoltage, overcurrent, short circuit, etc., to test the protection function of the Ethernet power consumption device simulator.
[0068] In the embodiment of the present application, the Ethernet power device simulator is used to simulate the function of the Ethernet power device, receive power from the Ethernet power supply device simulator or the optical communication terminal, and feedback the power receiving status to the test system. The Ethernet power device simulator generally has the following functions: Power receiving capacity adjustment: the power receiving capacity can be adjusted according to the test requirements to meet the test requirements of different standards. Compatibility test: compatibility test can be performed with Ethernet power supply device simulators of different manufacturers to verify the compatibility of the PoE system.
[0069] In the embodiment of the present application, the power meter is mainly used to measure the power output of the Ethernet power supply device simulator, with an accuracy of milliwatt level. Multi-channel measurement: The output power of multiple Ethernet power supply device simulator ports can be tested simultaneously to improve test efficiency. Data recording: The measurement data can be recorded and exported to a computer for analysis and processing.
[0070] In the embodiment of the present application, the oscilloscope is mainly used to observe the waveform of the POE signal and share the quality and stability of the signal. It usually has the following functions: High bandwidth: It can meet the bandwidth requirements of the PoE signal and accurately display the waveform of the signal. Trigger function: You can set the trigger condition to capture a specific signal waveform for easy analysis and debugging. Data storage: It can record the waveform data on the oscilloscope screen and export the data to a computer for analysis and processing.
[0071] In the embodiment of the present application, the network analyzer is mainly used to analyze the quality of the Ethernet signal to ensure that the PoE system does not affect the network performance while transmitting data. The network analyzer usually has the following functions: Signal analysis: It can analyze the amplitude, frequency, phase and other parameters of the Ethernet signal to evaluate the quality of the signal. Fault diagnosis: It can check the faults in the Ethernet signal, such as noise, interference, reflection, etc., to help users quickly locate the problem. Data storage: It can record the analysis results and export the data to the computer for analysis and processing.
[0072] In the embodiment of the present application, the test software uses an automated test framework, such as Pytest, Unittest, etc., to implement the writing, execution and result analysis of test cases. The test software communicates with the equipment in the test device to control the operation and data collection of the equipment, and analyzes and judges the collected data according to the requirements of the test case. The test software can also generate a test report, record the test results and key data in the test process, and facilitate user viewing and analysis.
[0073] S2: Setting Ethernet power supply function test parameters for the Ethernet power supply function test environment;
[0074] Exemplarily, the step of setting the Ethernet power supply function test parameters for the Ethernet power supply function test environment includes the steps of:
[0075] Obtaining an Ethernet power supply device simulator and an Ethernet power consumption device simulator in the Ethernet power supply function test environment;
[0076] Setting the output power of the Ethernet power supply simulator;
[0077] Set the power receiving capability of the Ethernet powered device simulator.
[0078] In the embodiment of the present application, parameters such as the output power of the Ethernet power supply device simulator and the power receiving capacity of the Ethernet power consumption device simulator are set according to the test requirements.
[0079] S3: Execute a Power over Ethernet function test case on the Power over Ethernet function test environment;
[0080] Exemplarily, the performing of the Power over Ethernet function test case on the Power over Ethernet function test environment comprises the steps of:
[0081] Running the test software in the Power over Ethernet functional test environment;
[0082] Execute the test steps in sequence according to the requirements of the test case;
[0083] Collect test data.
[0084] In the embodiment of the present application, the test software is run according to the requirements of the test case, the test steps are executed in sequence, and the test data is collected.
[0085] S4: Obtain and analyze Ethernet power supply function test results;
[0086] Exemplarily, the obtaining and analyzing the Ethernet power supply function test result comprises the steps of:
[0087] Get test data;
[0088] Inputting the test data into the test software;
[0089] The test data is analyzed to determine deterioration.
[0090] In the embodiment of the present application, the test software analyzes the collected data to determine whether the test results meet the requirements.
[0091] S5: Generate an Ethernet power supply function test report according to the Ethernet power supply function test result.
[0092] Exemplarily, generating an Ethernet power supply function test report according to the Ethernet power supply function test result includes the steps of:
[0093] Get test data;
[0094] Generate a test conclusion according to the test data;
[0095] A test report is generated according to the test data and the test conclusion.
[0096] In the embodiment of the present application, the test software generates a test report based on the test results, recording key data and test conclusions during the test process.
[0097] like Figure 2 The present application provides an Ethernet power supply function automatic test device, comprising:
[0098] Configuration module 10, used for configuring the Ethernet power supply function test environment;
[0099] A setting module 20, used to set Ethernet power supply function test parameters for the Ethernet power supply function test environment;
[0100] An execution module 30, configured to execute a Power over Ethernet function test case on the Power over Ethernet function test environment;
[0101] An analysis module 40 is used to obtain and analyze Ethernet power supply function test results;
[0102] The generating module 50 is used to generate a Power over Ethernet function test report according to the Power over Ethernet function test result.
[0103] The present application provides an Ethernet power supply function automatic test device which can execute an Ethernet power supply function automatic test method provided by the above steps.
[0104] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.
[0105] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device 100 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Figure 3 As shown, the electronic device 100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the electronic device 100 are also stored. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.
[0107] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device 100 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 100 having various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] Reference below Figure 4 , which shows a structural schematic diagram of a computer-readable storage medium suitable for implementing an embodiment of the present disclosure, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it can implement any of the Ethernet power supply function automated testing methods described above.
[0110] The present application also provides a computer program product, including a computer program / computer executable instructions, which, when executed by a processor of an electronic device, implements the steps of any of the aforementioned methods for automating the testing of the Ethernet power supply function.
[0111] The present application provides an Ethernet power supply function automated testing method, device and storage medium, which have the advantages of high automation, high testing accuracy, strong compatibility and simple operation, and can meet the needs of large-scale production and testing.
[0112] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0113] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An automated test method for Ethernet power supply function, characterized in that: The method comprises the steps of: Configure the Ethernet power supply function test environment; Setting Ethernet power supply function test parameters for the Ethernet power supply function test environment; Executing a Power over Ethernet function test case on the Power over Ethernet function test environment; Obtain and analyze Ethernet power supply function test results; Generate an Ethernet power supply function test report according to the Ethernet power supply function test result.
2. The method for automated testing of the Ethernet power supply function according to claim 1, characterized in that: The configuration of the Ethernet power supply function test environment includes the following steps: Obtain Ethernet power supply function test hardware equipment and Ethernet power supply function test software program; Connect the Ethernet power supply function test hardware equipment according to the test requirements; The Power over Ethernet function test software program is installed on the Power over Ethernet function test hardware device according to the test requirements.
3. The method for automated testing of the Ethernet power supply function according to claim 1, characterized in that: The step of setting the Ethernet power supply function test parameters for the Ethernet power supply function test environment comprises the following steps: Obtaining an Ethernet power supply device simulator and an Ethernet power consumption device simulator in the Ethernet power supply function test environment; Setting the output power of the Ethernet power supply simulator; Set the power receiving capability of the Ethernet powered device simulator.
4. The method for automated testing of the Ethernet power supply function according to claim 1, characterized in that: The performing of the Ethernet power supply function test case on the Ethernet power supply function test environment comprises the steps of: Running the test software in the Power over Ethernet functional test environment; Execute the test steps in sequence according to the requirements of the test case; Collect test data.
5. The method for automated testing of the Ethernet power supply function according to claim 1, characterized in that: The method of obtaining and analyzing the Ethernet power supply function test result comprises the steps of: Get test data; Inputting the test data into the test software; The test data is analyzed to determine deterioration.
6. The method for automated testing of Ethernet power supply function according to claim 1, characterized in that: Generating a Power over Ethernet function test report according to the Power over Ethernet function test result comprises the steps of: Get test data; Generate a test conclusion according to the test data; A test report is generated according to the test data and the test conclusion.
7. An Ethernet power supply function automatic test device, characterized in that: include: Configuration module, used to configure the Ethernet power supply function test environment; A setting module, used to set Ethernet power supply function test parameters for the Ethernet power supply function test environment; An execution module, used for executing a Power over Ethernet function test case on the Power over Ethernet function test environment; An analysis module, used to obtain and analyze Ethernet power supply function test results; A generating module is used to generate an Ethernet power supply function test report according to the Ethernet power supply function test result.
8. 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 program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / computer executable instructions, characterized in that: When the computer program / computer executable instructions are executed by a processor of an electronic device, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.