Disclosure of Invention
The embodiment of the invention provides a method and a system for testing a wireless router in a dual-frequency integrated manner, which aim to solve the problems.
In a first aspect, an embodiment of the present invention provides a method for testing a wireless router in a dual-frequency-in-one manner, where the method includes:
s1, after a plurality of terminals are controlled to be connected to a wireless router, simulating different space position conditions of the terminals and the wireless router and different flow load conditions of the terminals to trigger switching functions of the terminals on different frequency bands;
and S2, acquiring the network connection state information of the plurality of terminals in real time, analyzing the network connection state information, and acquiring the frequency band switching information of the plurality of terminals.
Further, step S1 is preceded by: and configuring the double-frequency-in-one function test parameters of the wireless router.
Further, step S1 is preceded by: and installing an application program for controlling the terminal to be connected to the wireless router in the plurality of terminals.
Further, in step S1, simulating the spatial location of the plurality of terminals different from the wireless router specifically includes:
and simulating different space position conditions of the plurality of terminals and the wireless router by configuring different adjustable attenuation values of signals of the wireless router.
Further, in step S1, simulating different traffic load conditions of the multiple terminals specifically includes:
and simulating different flow load conditions of the plurality of terminals by installing flow packet sending devices in the plurality of terminals and calling interfaces of the flow packet sending devices.
Further, in step S2, the frequency band switching information of the multiple terminals includes: the switching reason and the switching time of a plurality of terminals on each wireless frequency band.
In a second aspect, an embodiment of the present invention provides a wireless router dual-frequency-in-one test system, where the system includes: the system comprises a control end, a wireless router and a plurality of terminals;
the control end is used for simulating different space position conditions of the plurality of terminals and the wireless router and different flow load conditions of the plurality of terminals after controlling the plurality of terminals to be connected to the wireless router so as to trigger the switching functions of the plurality of terminals on different frequency bands; the system comprises a plurality of terminals, a frequency band switching module and a processing module, wherein the frequency band switching module is used for acquiring network connection state information of the terminals in real time, analyzing the network connection state information and acquiring frequency band switching information of the terminals;
the wireless router is connected with the control end;
the plurality of terminals are wirelessly connected with the wireless router.
Further, still include:
and the adjustable attenuator is used for configuring the adjustable attenuation values of different wireless router signals.
Further, the control terminal includes:
the connection control module is used for controlling a plurality of terminals to be connected to the wireless router;
the first simulation module is used for simulating different space position conditions of the plurality of terminals and the wireless router so as to trigger the switching functions of the plurality of terminals on different frequency bands;
the second simulation module is used for simulating different flow load conditions of the plurality of terminals so as to trigger the switching functions of the plurality of terminals on different frequency bands;
and the analysis module is used for acquiring the network connection state information of the plurality of terminals in real time, analyzing the network connection state information and acquiring the frequency band switching information of the plurality of terminals.
Further, an application program for controlling the terminal to be connected to the wireless router is installed in the plurality of terminals;
and the plurality of terminals are internally provided with flow packet senders for simulating different flow load conditions.
In the embodiment of the invention, different space distances are simulated through adjustable attenuation, the test environment is simplified, and the test maneuverability is improved; different service scenes of a user are simulated through the flow packet sender, and the accuracy and the controllability of the test are improved; and manual intervention can be effectively reduced in the testing process, testing data errors are reduced, the testing environment can be accurately reproduced, and the consistency of testing results is ensured.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.
It is to be understood that the terminology used in the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In embodiments of the present invention, a terminal may be any data device that communicates with a wireless router via a wireless channel and/or via a wired channel (e.g., fiber optic or coaxial cables). A terminal can have a variety of names, such as mobile station, mobile device, mobile unit, mobile phone, remote station, remote terminal, remote unit, user device, user equipment, handheld device, etc.
The following are specific examples of the present invention.
Example one
Fig. 1 is a flowchart of a dual-frequency-in-one testing method for a wireless router in this embodiment, as shown in fig. 1, the dual-frequency-in-one testing method for a wireless router in this embodiment includes the steps of:
s1, after a plurality of terminals are controlled to be connected to a wireless router, simulating different space position conditions of the terminals and the wireless router and different flow load conditions of the terminals to trigger switching functions of the terminals on different frequency bands;
and S2, acquiring the network connection state information of the plurality of terminals in real time, analyzing the network connection state information, and acquiring the frequency band switching information of the plurality of terminals.
A wireless router belongs to a Radio Frequency (RF) system, and can communicate with other devices only when operating within a certain Frequency range, which is called the operating Frequency band of the wireless router. The frequency band in which the wireless router operates is generally divided into two frequency bands of 2.4GHz and 5 GHz. 2.4GHz is a frequency band commonly adopted by early wireless routers, and a single-frequency wireless router generally works in the 2.4GHz frequency band; the dual-frequency wireless router refers to a wireless router which works in 2.4GHz and 5GHz frequency bands simultaneously. The 2.4GHz band is a free public band, and other electronic products, such as air conditioners, microwave ovens, wireless mice, wireless speakers, bluetooth, cordless phones and the like, use the band, which easily causes wireless signal interference among devices, thereby causing instability of wireless networks.
Nowadays, multi-frequency routers are almost standard wireless routers. More and more medium-high-end wireless routers support the dual-frequency-in-one function. The dual-band unification function is that a plurality of frequency bands use the same wireless SSID (Service Set Identifier), and under the condition that the wireless SSIDs are the same, relevant trigger rules are Set, so that complex intervention is not needed, and the wireless terminal can be triggered in different frequency bands according to factors of different scene environments to realize seamless switching so as to keep the stability of the wireless network.
At present, the method for testing the double-frequency integration is carried out in an actual scene, the actual scene usually needs to trigger the switching of the wireless terminal on different frequency bands through the continuous removal of the mobile wireless terminal and the on-demand of various services in the real environment by people, the operation is complex, the efficiency is low, the manual operation cannot ensure the consistency of the test environment configuration every time, and the error is large.
The embodiment provides a dual-frequency integrated test method for a wireless router, which simulates different spatial position conditions of a plurality of terminals and the wireless router and different flow load conditions of the plurality of terminals to trigger switching functions of the plurality of terminals on different frequency bands, and obtains frequency band switching information of the plurality of terminals by analyzing network connection state information of the plurality of terminals, so as to test the dual-frequency integrated function of the wireless router.
Example two
Referring to fig. 1, in the dual-frequency unification testing method of the wireless router in the embodiment, before the step S1, the method further includes: configuring a double-frequency-in-one function test parameter of the wireless router;
an automatic test system (Robot Frame Work automation platform) controls a DUT (Device under test) through a Python script and configures related parameters of the DUT dual-frequency-in-one function.
Step S1 is preceded by: and installing an application program for controlling the terminal to be connected to the wireless router in the plurality of terminals.
In the embodiment, an APP is developed and installed at the test terminal, and the APP encapsulates the relevant interface of the wifi state information.
The automatic test system controls each terminal to be connected with WIFI through a Python script and reads real-time information returned to the WIFI connection state.
In step S1, simulating the spatial location condition of the terminal different from the wireless router specifically includes:
and simulating different space position conditions of the plurality of terminals and the wireless router by configuring different adjustable attenuation values of signals of the wireless router.
The automatic test system controls the value of each adjustable attenuation interval through a Python script, realizes the far, middle and near simulation in a wireless space, and triggers the switching of the wireless terminal on different frequency bands through the space simulation.
In step S1, the specific steps of simulating different traffic load conditions of the plurality of terminals are:
and simulating different flow load conditions of the plurality of terminals by installing flow packet sending devices in the plurality of terminals and calling interfaces of the flow packet sending devices.
And installing a flow packet sender, such as Iverf, at the end of the testing mobile phone.
Iperf is a network performance testing tool. Iperf can test maximum TCP and UDP bandwidth performance. Iperf has various parameters and UDP characteristics, which can be adjusted as required. Iperf may report bandwidth, delay jitter and packet loss.
The automatic test system controls the flow packet sender on each terminal through the Python script to realize the load of system flow, and triggers the switching of the wireless terminal on different frequency bands through the simulation of the flow load.
In step S2, the frequency band switching information of the multiple terminals includes: the switching reason and the switching time of a plurality of terminals on each wireless frequency band.
And the automatic test system checks the real-time connection state of the wireless terminal on the DUT through the Python script.
The tester can judge the switching reason and switching time of the wireless terminal on each wireless frequency band through the test report generated by the system.
The embodiment has the advantages that: different space distances are simulated through adjustable attenuation, the test environment is simplified, and the test maneuverability is improved; different service scenes of users are simulated through the flow packet sender, so that the testing accuracy and controllability are improved; the test environment can be accurately reproduced, and the consistency of test results is ensured; through the realization of laboratory simulation and automation, the manual intervention can be effectively reduced, the error of test data is reduced, the test environment can be accurately reproduced, and the consistency of test results is ensured.
EXAMPLE III
Fig. 2 is a structural diagram of a dual-frequency integrated testing system of a wireless router in this embodiment, and as shown in fig. 2, the dual-frequency integrated testing system of the wireless router in this embodiment includes: a control terminal 100, a wireless router 200, and a plurality of terminals 300;
the control end 100 is configured to simulate different spatial position conditions of the plurality of terminals 300 and the wireless router 200 and different traffic load conditions of the plurality of terminals 300 after controlling the plurality of terminals 300 to connect to the wireless router 200, so as to trigger a switching function of the plurality of terminals 300 on different frequency bands; the system is used for acquiring the network connection state information of the plurality of terminals 300 in real time, analyzing the network connection state information and acquiring the frequency band switching information of the plurality of terminals 300;
the wireless router 200 is connected with the control terminal 100;
the plurality of terminals 300 are wirelessly connected with the wireless router 200.
In this embodiment, the system further includes:
an adjustable attenuator 400 for configuring adjustable attenuation values of different wireless router signals.
The control terminal 100 includes:
a connection control module 110 for controlling a plurality of terminals 300 to be connected to the wireless router 200;
a first simulation module 120, configured to simulate a spatial location condition of the multiple terminals 300 different from that of the wireless router 200, so as to trigger a switching function of the multiple terminals 300 on different frequency bands;
a second simulation module 130, configured to simulate different traffic load conditions of the multiple terminals 300, so as to trigger a switching function of the multiple terminals 300 on different frequency bands;
the analysis module 140 is configured to obtain the network connection status information of the plurality of terminals 300 in real time, analyze the network connection status information, and obtain the frequency band switching information of the plurality of terminals 300.
An application 310 for controlling the terminal 300 to connect to the wireless router 200 is installed in the plurality of terminals 300;
the plurality of terminals 300 are installed with traffic packet transmitters 320 for simulating different traffic load conditions.
In this embodiment, the control terminal 100 may be a computer.
When the system works, a Robot Frame Work automation platform is installed on a computer, keywords are developed on the platform, and related test parameters of the wireless router for double-frequency integration are configured through Python scripts.
The computer develops keywords on the platform to configure adjustable attenuation through a Python script, and different space distances are simulated by configuring different adjustable attenuation values.
Compiling a Python script on the computer, carrying out WIFI connection on the mobile phone and monitoring WIFI state information through calling an installed mobile phone APP WIFI interface, and reading WIFI state information of a mobile phone end and returning the WIFI state information to the automation platform of the computer.
And compiling a Python script on the computer, wherein the script realizes the load simulation of the service flow of each test device by calling the flow packet sender interface installed in the step two.
And compiling a Python script on the computer to check the real-time connection state of the wireless terminal on the DUT.
And editing the test report on the computer through an xlwt function interface of Python, editing the read wifi information of the wireless terminal into an Excel table according to a set format, and outputting the Excel table to form the test report.
The user directly obtains the related report from the storage catalog of the computer report, and can judge the switching reason and the switching time of the wireless terminal on each wireless frequency band according to the test report.
The embodiment provides a dual-frequency integrated test system of a wireless router, which can simulate different spatial distances through an adjustable attenuator, simplify the test environment and improve the test maneuverability; different service scenes of a user can be simulated through the flow packet sender, so that the accuracy and the controllability of the test are improved; through the realization of laboratory simulation and automation, the manual intervention can be effectively reduced, the error of test data is reduced, the test environment can be accurately reproduced, and the consistency of test results is ensured. And analyzing the network connection state information of the plurality of terminals to acquire the frequency band switching information of the plurality of terminals, thereby testing the double-frequency integration function of the wireless router.
In addition, after the system builds a test environment, a tester only needs to start to operate the automatic test system, and after the automatic test process is completed, a test report can be obtained under a specified path. The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.