A kind of test method and system of WIFI router load-carrying properties
Technical field
The present invention relates to the test methods and system of a kind of WIFI router load-carrying properties, belong to network communication technology neck
Domain.
Background technique
WIFI be with the machine amount limit, bandwidth limit WIFI performance two important quality parameters, it is in the prior art, past
Toward needing to obtain the two performance indicators by manual testing, i.e., a large amount of personnel and wireless device operated simultaneously online from
And reach the performance boundary of WIFI router, but both consume man power and material, and acquired test result precision in this way
It is not high.
A kind of (the application title: wireless routing Performance Test System and method, Shen of patent application CN 201310502974.5
Please day: 2013-10-22, applicant: Shanghai Feixun Data Communication Technology Co., Ltd.) it discloses a kind of wireless routing performance and surveys
Test system and method, belong to technical field of network test, and system includes that Devices to test, flow monitoring equipment and flow are set
It is standby;Flow occurrence of equipment includes one first network interface card and one second network interface card;First network interface card and the second network interface card bridge;Flow monitoring equipment
Including first interface and second interface;Second network interface card of first interface connection flow occurrence of equipment;Second interface connection is to be measured to be set
It is standby;Devices to test and the first network interface card of flow occurrence of equipment are wirelessly connected;Method include: configuration flow monitoring equipment with it is to be measured
Connection is established between equipment;Upstream and downstream data flow are constructed, and monitors upstream and downstream data flow;Monitoring
As a result, judging the operating status of Devices to test.The technical solution mainly realized by single flow monitoring equipment to individually to
The test of measurement equipment, but in fact, wireless device is to the road WIFI when being tested using more wireless devices WIFI router
By can all generate interference between device and different wireless devices, so as to cause test result, there are notable differences, therefore only lead to
Single flow monitoring equipment is crossed to test single Devices to test, can not accurate evaluation go out both interference to the road WIFI
The influence as caused by device load-carrying properties, to cause the accuracy Shortcomings of test result.
Therefore, the test result accuracy with higher of WIFI router load-carrying properties how had not only been guaranteed, but also can be effective
It improves testing efficiency, reduce testing cost, it has also become technical staff's technical problem urgently to be solved also finds no effect at present
Technical solution.
Summary of the invention
In view of this, the object of the present invention is to provide the test method and system of a kind of WIFI router load-carrying properties, energy
Not only the test result accuracy with higher of WIFI router load-carrying properties had been guaranteed, but also testing efficiency can be effectively improved, reduced
Testing cost.
In order to achieve the above object, the present invention provides a kind of test method of WIFI router load-carrying properties, include:
Step 1: selecting one for testing the Wireless simulator of WIFI router, and the Wireless simulator that will be selected
It is configured to wireless repeater mode, and the WIFI hot spot of its wireless relay and WIFI router to be tested are arranged to same hot spot name
Claim, then starts the Wireless simulator;
Step 2: being found according to the WIFI hot spot title of its wireless relay to be tested after Wireless simulator is activated
WIFI router, then on wireless relay to WIFI router to be tested;
Step 3: Wireless simulator passes through the WIFI router to be tested relayed, Working mould is sent to testing service device
The request message of formula, and the operating mode returned according to testing service device, configure corresponding test script, then execute test foot
This downloads respective resources from testing service device, itself the average speed from testing service device downloading resource is calculated after downloading
Itself is finally downloaded the average speed, own MAC address and the WIFI to be tested relayed of resource by degree from testing service device
The MAC Address of router is sent to testing service device;
Step 4: what testing service device was sent according to all Wireless simulators for being relayed to same WIFI router to be tested
From the average speed of testing service device downloading resource, judge whether the load-carrying properties index of WIFI router to be tested reaches one
Limiting value, if it is, according to all Wireless simulators send from testing service device downloading resource average speed, calculate to
Test the load-carrying properties index value of WIFI router;If it is not, then continuing to increase wireless relay on WIFI router to be tested
Wireless simulator, turn to step 1,
In step 3, operating mode includes but is not limited to: browsing webpage sends message, viewing video or downloading file, when
When operating mode is browsing webpage, the test script that Wireless simulator is configured is that several pictures text is downloaded from testing service device
Part and text file;When operating mode is viewing video, the test script that Wireless simulator is configured is to receive testing service
The video flowing that device transmission comes;When operating mode is to send message, the test script that Wireless simulator is configured is and tests clothes
Business device transmits socket message;When operating mode is downloading file, the test script that Wireless simulator is configured is and tests
The big file of server transport,
One file sequence as composed by several sizes mutually different file is set on testing service device, it is described
Number of files in file sequence is not less than a pre-set minimum number of files threshold value, the smallest file size in file sequence
For 1MB, maximum file size is as unit of MB, in step 3, when the operating mode that testing service device returns is browsing webpage
When, it further comprises having that Wireless simulator, which executes test script and downloads respective resources from testing service device:
Wireless simulator selects several files from the file sequence of testing service device by certain algorithm, then by institute
The file of selection is locally downloading by certain precedence, with the lasting browsing webpage behavior of analog subscriber,
Further include having:
Wireless simulator timing sends the request message of operating mode to testing service device, and judges that testing service device returns
Newest operating mode it is whether consistent with currently performed operating mode, if it is, continuing to execute current test script
Respective resources are downloaded from testing service device;If it is not, then stopping executing current test script, then returned according to testing service device
The newest operating mode returned, reconfigures newest test script, finally executes newest test script under testing service device
Carry respective resources,
Step 4 further comprises having:
Step 41, testing service device based on the received Wireless simulator send from testing service device downloading resource
Average speed, all Wireless simulators that statistics is relayed to same WIFI router to be tested download resource from testing service device
Then the average value of average speed judges whether counted average value is lower than a lowest-bandwidth threshold value, if it is, meter
It calculates and is relayed to all Wireless simulator numbers of WIFI router to be tested, during the band machine amount limit of WIFI router to be tested is
After all Wireless simulator numbers for arriving WIFI router to be tested;If it is not, then continuing to increase on WIFI router to be tested
The Wireless simulator of wireless relay turns to step 1,
WIFI router to be tested is to may customize or the not WIFI router of customizable software, when WIFI to be tested is routed
When device is the WIFI router of customizable software, WIFI router timing to be tested reports its port flow fast to testing service device
Rate,
In step 41, when testing service device judges that counted average value is lower than a lowest-bandwidth threshold value, also wrap
It has included:
Testing service device judges whether to receive the port flow rate that WIFI router to be tested is sent, if it is,
The port flow rate of WIFI router to be tested is therefrom read, the bandwidth limit of WIFI router to be tested is the port
Flow rate;If it is not, then all Wireless simulators that statistics is relayed to WIFI router to be tested are downloaded from testing service device
The sum of average speed of resource, the bandwidth limit of WIFI router to be tested are to be relayed to owning for WIFI router to be tested
Average speed the sum of of the Wireless simulator from testing service device downloading resource.
In order to achieve the above object, the present invention also provides a kind of test macros of WIFI router load-carrying properties, including
There are testing service device, WIFI router to be tested and several Wireless simulators, in which:
Wireless simulator, for being configured to wireless repeater mode, and by the WIFI hot spot of its wireless relay and to be tested
WIFI router is arranged to same hotspot name, after actuation, is found according to the WIFI hot spot title of its wireless relay to be measured
WIFI router is tried, then on wireless relay to WIFI router to be tested, by the WIFI router to be tested relayed, to
Testing service device sends the request message of operating mode, and the operating mode returned according to testing service device, configures corresponding survey
Training sheet executes test script from testing service device and downloads respective resources, itself is calculated after downloading from testing service device
Download the average speed of resource, finally by itself from the testing service device downloading average speed of resource, own MAC address and
The MAC Address of the WIFI router to be tested of relaying is sent to testing service device;
Testing service device, the average speed from testing service device downloading resource sent for receiving all Wireless simulators
Degree, judge wireless relay to the load-carrying properties index of WIFI router to be tested whether reach a limiting value, if it is,
The average speed from testing service device downloading resource sent according to all Wireless simulators, calculates WIFI router to be tested
Load-carrying properties index value;If it is not, then continuing the Wireless simulator for increasing wireless relay on WIFI router to be tested;
WIFI router to be tested, for providing the wireless communication between Wireless simulator and testing service device,
Operating mode includes but is not limited to: browsing webpage sends message, viewing video or downloading file, Wireless simulator
Further comprise having:
Webpage working cell is browsed, for downloading several picture files and text file from testing service device;
Video working cell is watched, for receiving the video flowing of testing service device transmission;
Message working cell is sent, for transmitting socket message with testing service device;
Paper work unit is downloaded, for transmitting big file with testing service device,
One file sequence as composed by several sizes mutually different file is set on testing service device, it is described
Number of files in file sequence is not less than a pre-set number of files minimum threshold, the smallest file size in file sequence
For 1MB, for maximum file size as unit of MB, browsing webpage working cell further comprises having:
Webpage analog component is browsed, for selecting several texts from the file sequence of testing service device by certain algorithm
Part, it is then that selected file is locally downloading by certain precedence, with the lasting browsing webpage behavior of analog subscriber,
Wireless simulator further includes having:
Operating mode control unit, the request message of operating mode is sent for timing to testing service device, and judges to survey
It whether consistent with currently performed operating mode tries the newest operating mode that server returns, works as if it is, continuing to execute
Preceding test script downloads respective resources from testing service device;If it is not, then stop executing current test script, then basis
Testing service device return newest operating mode, reconfigure newest test script, finally execute newest test script from
Testing service device downloads respective resources,
Testing service device further comprises having:
Band machine amount limit test unit is downloaded for what Wireless simulator based on the received was sent from testing service device
The average speed of resource, all Wireless simulators that statistics is relayed to same WIFI router to be tested are downloaded from testing service device
Then the average value of the average speed of resource judges whether counted average value is lower than a lowest-bandwidth threshold value, if
It is then to calculate all Wireless simulator numbers for being relayed to WIFI router to be tested, the band machine amount pole of WIFI router to be tested
Limit is all Wireless simulator numbers for being relayed to WIFI router to be tested;If it is not, then continuing to route in WIFI to be tested
Increase the Wireless simulator of wireless relay on device,
WIFI router to be tested is to may customize or the not WIFI router of customizable software, when WIFI to be tested is routed
When device is the WIFI router of customizable software, WIFI router timing to be tested reports its port flow fast to testing service device
Rate,
Testing service device further includes having:
Bandwidth limit test cell, for when the average value counted with machine amount limit test unit judges is lower than one
When lowest-bandwidth threshold value, continue to determine whether to receive the port flow rate that WIFI router to be tested is sent, if it is,
The port flow rate of WIFI router to be tested is therefrom read, the bandwidth limit of WIFI router to be tested is the port
Flow rate;If it is not, then all Wireless simulators that statistics is relayed to WIFI router to be tested are downloaded from testing service device
The sum of average speed of resource, the bandwidth limit of WIFI router to be tested are to be relayed to owning for WIFI router to be tested
Average speed the sum of of the Wireless simulator from testing service device downloading resource.
Compared with prior art, the beneficial effects of the present invention are: the present invention only needs a tester, more prices low
Honest and clean Wireless simulator can test WIFI router load-carrying properties, to effectively reduce the manpower that test expends
And material resources, greatly improve testing efficiency;Only need to modify the hotspot name of Wireless simulator, WIFI router to be tested,
Can the band load-carrying properties such as the machine amount limit, bandwidth limit to any WIFI router testing, the present invention has very strong
Ease for use and scalability;The present invention simulates the operation behavior of multiple users using multiple Wireless simulators, can accurately obtain
The actual bandwidth for obtaining bandwidth occupancy situation and each Wireless simulator of each WIFI router in different bearer occupies
Situation, test result have high accuracy.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the test method of WIFI router load-carrying properties of the present invention.
Fig. 2 is the concrete operations flow chart of Fig. 1 step 4.
Fig. 3 is a kind of composed structure schematic diagram of the test macro of WIFI router load-carrying properties of the present invention.
Fig. 4 is the composed structure schematic diagram of Wireless simulator.
Fig. 5 is the composed structure schematic diagram of testing service device.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, the present invention is made with reference to the accompanying drawing further
Detailed description.
As shown in Figure 1, a kind of test method of WIFI router load-carrying properties of the present invention, includes:
Step 1: selecting one for testing the Wireless simulator of WIFI router, and the Wireless simulator that will be selected
It is configured to wireless repeater mode, and the WIFI hot spot of its wireless relay and WIFI router to be tested are arranged to same hot spot name
Claim, then starts the Wireless simulator;
The Wireless simulator can use some cheap routing devices, such as use ar9331 chip flash
Openwrt open source firmware, to save testing cost, it is only necessary to the WIFI hot spot title of its wireless relay be arranged, can be realized
Performance test of multiple Wireless simulators to any WIFI router;
Step 2: being found according to the WIFI hot spot title of its wireless relay to be tested after Wireless simulator is activated
WIFI router, then on wireless relay to WIFI router to be tested;
WIFI hot spot around searching for first when Wireless simulator starts, is then relayed to the road WIFI to be tested after searching for successfully
By on device;
Step 3: Wireless simulator passes through the WIFI router to be tested relayed, Working mould is sent to testing service device
The request message of formula, and the operating mode returned according to testing service device, configure corresponding test script, then execute test foot
This downloads respective resources from testing service device, itself the average speed from testing service device downloading resource is calculated after downloading
Itself is finally downloaded the average speed, own MAC address and the WIFI to be tested relayed of resource by degree from testing service device
The MAC Address of router is sent to testing service device;
WIFI router to be tested need to be connected to in the network of testing service device connection, to guarantee Wireless simulator energy
With testing service device normal communication;
Step 4: what testing service device was sent according to all Wireless simulators for being relayed to same WIFI router to be tested
From the average speed of testing service device downloading resource, judge whether the load-carrying properties index of WIFI router to be tested reaches one
Limiting value if it is, according to all Wireless simulators send from testing service device downloading resource average speed, calculate to
Test the load-carrying properties index value of WIFI router;If it is not, then continuing to increase wireless relay on WIFI router to be tested
Wireless simulator, turn to step 1, wherein the limiting value of load-carrying properties index can be set according to the actual situation, such as
The lowest-bandwidth of each user is set as 200KB/S, in this way, when all Wireless simulators for being relayed to WIFI router to be tested
From testing service device downloading resource average speed average value be lower than 200KB/S when, then WIFI router to be tested band machine
Amount reaches the band machine amount limit.
It in step 1, when Wireless simulator is configured to wireless repeater mode, can also include: close wireless simulation
The spontaneous WIFI signal of device, to reduce the pressure of Wireless simulator.
In step 3, Wireless simulator can be grasped according to the operating mode that testing service device returns come the difference of analog subscriber
Make behavior, the operating mode can include but is not limited to: browsing webpage sends message, viewing video and downloading file, this
The flexible configuration of the operating mode to all Wireless simulators may be implemented by modification configuration file in sample, testing service device, from
And guarantee to obtain precisely and the performance data of true WIFI router to be tested.Wherein, when operating mode is browsing webpage
When, the test script that Wireless simulator is configured can be from testing service device and download several picture files and text file;
When operating mode is viewing video, the test script that Wireless simulator is configured, which can be, receives what the transmission of testing service device came
Video flowing;When operating mode is to send message, the test script that Wireless simulator is configured can be to be passed with testing service device
Defeated socket message;When operating mode is downloading file, the test script that Wireless simulator is configured can be and test clothes
Business device transmits big file.In this way, by different Wireless simulators come the different operation behavior of analog subscriber, all wireless simulations
Device can simulate the various complex scenes of a large number of users concurrent on-line operation simultaneously, to realize to WIFI router to be tested
Performance test.
Since user is not simply but to delay under some web cache while downloading when browsing webpage
It deposits, and downloads file and there is the features such as sum is more, small documents are more, downloading burst, in order to which real simulation user browses the behaviour of webpage
Make behavior, a file sequence as composed by several sizes mutually different file can be first set on testing service device
It arranges, the minimum number of files threshold value (such as 300) pre-set not less than one of the number of files in the file sequence, file sequence
In the smallest file size be 1MB, maximum file size is as unit of MB, in this way, in step 3, when testing service device returns
Operating mode when being browsing webpage, Wireless simulator executes test script and downloads respective resources from testing service device, can be with
Further comprise having:
Wireless simulator selects several files from the file sequence of testing service device by certain algorithm, then by institute
The file of selection is locally downloading by certain precedence, with the lasting browsing webpage behavior of analog subscriber.
Testing service device can also dynamically control the operating mode of each Wireless simulator, and the present invention can also include:
Wireless simulator timing sends the request message of operating mode to testing service device, and judges that testing service device returns
Newest operating mode it is consistent with currently performed operating mode if it is, continuing to execute current test script
Respective resources are downloaded from testing service device;If it is not, then stopping executing current test script, then returned according to testing service device
The newest operating mode returned, reconfigures newest test script, finally executes newest test script under testing service device
Carry respective resources.
In step 4, testing service device can collect the number sent from WIFI router to be tested and each Wireless simulator
According to test data being shown on the page after integration is handled, and carry out real-time update.Wherein, WIFI router to be tested is held
Carrying performance indicator may further include the band machine amount limit, bandwidth limit equivalence.As shown in Fig. 2, step 4 can be wrapped further
It has included:
Step 41, testing service device based on the received Wireless simulator send from testing service device downloading resource
Average speed, all Wireless simulators that statistics is relayed to same WIFI router to be tested download resource from testing service device
The average value of average speed, then judge counted average value whether be lower than a lowest-bandwidth threshold value (such as: 200KB/
S) if it is, calculating all Wireless simulator numbers for being relayed to WIFI router to be tested, the band of WIFI router to be tested
The machine amount limit is all Wireless simulator numbers for being relayed to WIFI router to be tested, then turns to step 42;If it is not, then
Show that WIFI router to be tested does not reach the band machine amount limit also, continues to increase wireless relay on WIFI router to be tested
Wireless simulator turns to step 1;
Do step 42, testing service device judge whether to receive the port flow rate that WIFI router to be tested is sent such as
Fruit is then therefrom to read the port flow rate of WIFI router to be tested, and the bandwidth limit of WIFI router to be tested is
The port flow rate;If it is not, then all Wireless simulators that statistics is relayed to WIFI router to be tested take from test
The sum of the average speed for device downloading resource of being engaged in, the bandwidth limit of WIFI router to be tested are to be relayed to WIFI routing to be tested
Average speed the sum of of all Wireless simulators of device from testing service device downloading resource.
WIFI router to be tested in the present invention can be customizable or not customizable software WIFI router, this
Sample, when WIFI router to be tested is the WIFI router of customizable software, WIFI router to be tested can be periodically to survey
Examination server reports its port flow rate, and port flow rate when testing service device reaches according to it with the machine amount limit is counted
Calculate its bandwidth limit;When WIFI router to be tested is the WIFI router of not customizable software, testing service device is according to it
All Wireless simulators when reaching with the machine amount limit download the average speed of resource to calculate its bandwidth limit.
As shown in figure 3, a kind of test macro of WIFI router load-carrying properties of the present invention, include testing service device, to
Test WIFI router and several Wireless simulators, in which:
Wireless simulator, for being configured to wireless repeater mode, and by the WIFI hot spot of its wireless relay and to be tested
WIFI router is arranged to same hotspot name, after actuation, is found according to the WIFI hot spot title of its wireless relay to be measured
WIFI router is tried, then on wireless relay to WIFI router to be tested, by the WIFI router to be tested relayed, to
Testing service device sends the request message of operating mode, and the operating mode returned according to testing service device, configures corresponding survey
Training sheet executes test script from testing service device and downloads respective resources, itself is calculated after downloading from testing service device
Download the average speed of resource, finally by itself from the testing service device downloading average speed of resource, own MAC address and
The MAC Address of the WIFI router to be tested of relaying is sent to testing service device, and the Wireless simulator can use some valences
The cheap routing device of lattice, such as using ar9331 chip flash openwrt open source firmware, to save testing cost;
Testing service device, the average speed from testing service device downloading resource sent for receiving all Wireless simulators
Degree, judge wireless relay to the load-carrying properties index of WIFI router to be tested whether reach a limiting value, if it is,
The average speed from testing service device downloading resource sent according to all Wireless simulators, calculates WIFI router to be tested
Load-carrying properties index value;If it is not, then continuing the Wireless simulator for increasing wireless relay on WIFI router to be tested;
WIFI router to be tested, for providing the wireless communication between Wireless simulator and testing service device.
When Wireless simulator is configured to wireless repeater mode, while its spontaneous WIFI signal can also be closed, to subtract
The pressure of few Wireless simulator.
Wireless simulator can be according to the operating mode that testing service device returns come the different operation behavior of analog subscriber, institute
Stating operating mode can include but is not limited to: browsing webpage sends message, viewing video and downloading file, in this way, testing service
By modification configuration file the flexible configuration of the operating mode to all Wireless simulators may be implemented, to guarantee to obtain in device
It obtains precisely and the performance data of true WIFI router to be tested.As shown in figure 4, Wireless simulator can further include
Have:
Webpage working cell is browsed, for downloading several picture files and text file from testing service device;
Video working cell is watched, for receiving the video flowing of testing service device transmission;
Message working cell is sent, for transmitting socket message with testing service device;
Paper work unit is downloaded, for transmitting big file with testing service device.
Since user is not simply but to delay under some web cache while downloading when browsing webpage
It deposits, and downloads file and there is the features such as sum is more, small documents are more, downloading burst, in order to which real simulation user browses the behaviour of webpage
Make behavior, a file sequence as composed by several sizes mutually different file can also be set on testing service device
It arranges, the number of files in the file sequence is not less than a pre-set number of files minimum threshold (such as 300), file sequence
In the smallest file size be 1MB, maximum file size is as unit of MB, in this way, browsing webpage working cell can also be into
One step includes:
Webpage analog component is browsed, for selecting several texts from the file sequence of testing service device by certain algorithm
Part, it is then that selected file is locally downloading by certain precedence, with the lasting browsing webpage behavior of analog subscriber.
Testing service device can also dynamically control the operating mode of each Wireless simulator, and Wireless simulator can also include
Have:
Operating mode control unit, the request message of operating mode is sent for timing to testing service device, and judges to survey
It whether consistent with currently performed operating mode tries the newest operating mode that server returns, works as if it is, continuing to execute
Preceding test script downloads respective resources from testing service device;If it is not, then stop executing current test script, then basis
Testing service device return newest operating mode, reconfigure newest test script, finally execute newest test script from
Testing service device downloads respective resources.
Testing service device can collect the data sent from WIFI router to be tested and each Wireless simulator, through integrating
Test data is shown after processing on the page, and carries out real-time update.Wherein, the load-carrying properties index of WIFI router to be tested
It may include the band machine amount limit, bandwidth limit equivalence.As shown in figure 5, testing service device can further include:
Band machine amount limit test unit is downloaded for what Wireless simulator based on the received was sent from testing service device
The average speed of resource, all Wireless simulators that statistics is relayed to same WIFI router to be tested are downloaded from testing service device
The average value of the average speed of resource, then judge counted average value whether be lower than a lowest-bandwidth threshold value (such as:
200KB/S), if it is, calculating all Wireless simulator numbers for being relayed to WIFI router to be tested, WIFI routing to be tested
Device is all Wireless simulator numbers for being relayed to WIFI router to be tested with the machine amount limit;If it is not, then continue to
It tests on WIFI router and increases the Wireless simulator of wireless relay;
Bandwidth limit test cell, for when the average value counted with machine amount limit test unit judges is lower than one
When lowest-bandwidth threshold value, continue to determine whether to receive the port flow rate that WIFI router to be tested is sent, if it is,
The port flow rate of WIFI router to be tested is therefrom read, the bandwidth limit of WIFI router to be tested is the port
Flow rate;If it is not, then all Wireless simulators that statistics is relayed to WIFI router to be tested are downloaded from testing service device
The sum of average speed of resource, the bandwidth limit of WIFI router to be tested are to be relayed to owning for WIFI router to be tested
Average speed the sum of of the Wireless simulator from testing service device downloading resource.
WIFI router to be tested in the present invention can be customizable or not customizable software WIFI router, this
Sample, when WIFI router to be tested is the WIFI router of customizable software, WIFI router to be tested can also timing to
Testing service device reports its port flow rate, port flow rate when testing service device reaches according to it with the machine amount limit come
Calculate its bandwidth limit;When WIFI router to be tested is the WIFI router of not customizable software, testing service device according to
All Wireless simulators when it reaches with the machine amount limit download the average speed of resource to calculate its bandwidth limit.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.