Automated testing method, system and the device of router far and near distance performance
Technical field
The present invention relates to the automated testing method of router technology field more particularly to router far and near distance performance,
System and device.
Background technique
Router (Router) is also known as gateway (Gateway), for connecting multiple logically separate networks.It is so-called
Logical network is to represent an individual network or a subnet.When data is transferred from one subnet to another subnet,
It can be completed by the routing function of router.Therefore, router has the function of judging network address and the selection path IP, it
Can flexible connection be established, can be connected with entirely different data grouping with media access method in a multi-network interconnection environment
Various subnets, router only receive source station or the information of other routers, belong to a kind of InterWorking Equipment of network layer.
Currently, test method, device of performance each for router etc. are also more and more diversified, such as test router
The method, apparatus of the performances such as parameter, the memory pressure of test router, the transmission power of test router is prepared, such as:Application
Number the test method and device of a kind of configuration of routers parameter are provided for 201410789762.4 Chinese invention patent, surveyed
Method for testing includes:Determine router to be measured;The parameter sets to be measured configured in the router to be measured;It will test terminal and institute
State router to be measured connection, and judge to test terminal whether with router successful connection to be measured;If successful connection, test is obtained
Feedback information, and judge acquired test feedback information whether with feedback reference information matches;If matching, prompt test logical
It crosses;Otherwise, test crash is prompted.And application No. is the Chinese invention patents of CN201711181108.5 to disclose a kind of routing
Device memory pressure test method and system, router memory method for testing pressure include:S11 constructs multiple and different connections
Request message is simultaneously sent to test router, to simulate the case where multiple client initiates the connection request to test router;And
Clip is carried out to the multiple connection status shielded a shortcoming or fault of crying simulated, when the client of simulation is disconnected with test router,
It re-execute the steps S11;S12, each predetermined period obtain the technical information of successively test router;S13:Work as test router
When occurring abnormal, test data is saved, and terminate test.
The far and near distance performance of router is to investigate router to pass through under Air Coupling in the important of the performance of different distance
The case where index, the coverage area and wireless performance that can embody router wireless signal change with spacing distance.
But be still at present to use artificial appraisal to change measuring distance for the far and near distance performance of router, then
The traditional approach that operation network interface card connection router runs handling capacity is tested, and is had the following disadvantages:Need artificial mobile road
By device to specific range position, it can not achieve automation and even run;There are biggish location error in moving process, it is unfavorable for multiple
Look into the throughput data at some distance and position;When needing to carry out performance comparison to multiple routers, switching equipment is needed, is surveyed
Low efficiency is tried, and is easy to be effected by environmental factors.
Summary of the invention
In view of the above-mentioned problems, the invention discloses a kind of automated testing method of router far and near distance performance, it should be certainly
Dynamicization test method includes the following steps:
S1:Control router to be measured moved with the distance between router to be measured for minimum value;
S2:Data packet to the first PC machine being connected with router to be measured is persistently sent to exist to obtain above-mentioned router to be measured
Throughput data in preset time;
S3:Judge whether above-mentioned throughput data is zero;If so, thening follow the steps S5;If it is not, thening follow the steps S4;
S4:Record above-mentioned throughput data, and control the mobile preset step-length of above-mentioned router to be measured with it is described to
It surveys the distance between router and increases a preset step-length;Repeat step S2 to S3;
S5:Based on above-mentioned throughput data graphing, and terminate to test.
Further, further include before above-mentioned steps S1:
S01:Wired interface channel is constructed to carry out wired connection with above-mentioned first PC machine;
S02:It sends wireless messages acquisition request and prompts the above-mentioned router to be measured of user setting to above-mentioned first PC machine
Wireless messages;
S03:The first PC machine is obtained through wireless messages transmitted by above-mentioned wired connection channel;
S04:Based on above-mentioned wireless messages, it is wirelessly connected with above-mentioned router to be measured.
Further, above-mentioned router to be measured and the first PC machine are placed on transmission equipment;Pacify on transmission equipment
It sets one or more and accompanies survey router.
It is corresponding based on a kind of automated testing method of router far and near distance performance disclosed in this invention, this
Invention also discloses a kind of automatization test system of router far and near distance performance, which includes:
Mobile module is controlled, is moved for controlling router to be measured to be with the distance between above-mentioned router to be measured
Minimum value;
Data acquisition module, for persistently sending data packet to the first PC machine being connected with router to be measured to obtain
State the throughput data of router to be measured within a preset time;
Judgment module, for judging whether above-mentioned throughput data is zero;
Mobile module is recorded, for recording above-mentioned throughput data, and above-mentioned router to be measured mobile one is controlled and presets
Step-length is to increase a preset step-length with the distance between above-mentioned router to be measured;
Module is repeated, for when above-mentioned throughput data is not zero, to rerun judgment module and data acquisition
Module;
Graphic plotting module, for according to throughput data graphing and terminating to test.
Further, above-mentioned automatization test system further includes:
First building module, for constructing wired interface channel to carry out wired connection with the first PC machine;
Request sending module, for sending wireless messages acquisition request to the first PC machine to prompt user setting routing to be measured
The wireless messages of device;
Data obtaining module, for obtaining the first PC machine through wireless messages transmitted by above-mentioned wired connection channel;
Second building module, for being wirelessly connected with above-mentioned router to be measured according to acquired wireless messages.
Further, above-mentioned router to be measured and the first PC machine are placed on transmission equipment;Pacify on transmission equipment
It is equipped with one or more and accompanies survey router.
The invention also discloses a kind of automatic test device of router far and near distance performance, the automatic test devices
Including the first PC machine, the second PC machine, first PC machine and router to be measured carry out wired connection;Second PC machine is internally provided with this
The automatization test system of router far and near distance performance provided by inventing.
Further, above-mentioned automatic test device further includes:Transmission equipment is mounted with routing to be measured on the transmission equipment
Device and the first PC machine;It is mounted with one or more on the transmission equipment and accompanies survey router.
Further, above-mentioned automatic test device further includes:Interchanger, the interchanger is respectively and inside the first PC machine
Wired network adapter inside wired network adapter, the second PC machine carries out wired connection.
Further, it is connected with each other between above-mentioned second PC machine and transmission equipment by serial ports so that the second PC machine is by being somebody's turn to do
The operation of serial ports control transmission equipment.
Automated testing method, system and the device of a kind of router far and near distance performance disclosed in this invention, can
The distance between router to be measured and automatization test system are accurately adjusted by setting preset step-length, are realized to routing to be measured
The far and near performance of device carries out automatic test, also can be directly by router accurate recovery to be measured to a certain distance and position to repeat
The throughput data of the distance and position is verified, verification efficiency is improved, reduces error.
In addition, when needing to router to be measured with accompanying the far and near distance performance for surveying router to be compared, it is of the invention
Technical solution only by the router to be measured for needing to carry out performance test, accompany to survey and router while being placed on transmission equipment with simultaneously
Automatic test is carried out, router to be measured can be made to be closer to the testing time for surveying router is accompanied, it can be utmostly
Reduction because brought by environmental disturbances influence, have preferable practicability.
Detailed description of the invention
Fig. 1 is the automated testing method flow chart of one of embodiment one router far and near distance performance;
Fig. 2 is method flow diagram of the acquisition wireless messages in embodiment one to be wirelessly connected with router to be measured;
Fig. 3 is that the automatization test system of one of embodiment one router far and near distance performance forms figure;
Fig. 4 obtains wireless messages for user in the automatization test system in embodiment one to carry out nothing with router to be measured
The module of line connection forms figure;
Fig. 5 is the composite structural diagram of one of embodiment one automatic test device of router far and near distance performance.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment
Think, only shown in schema then with related component in the present invention rather than component count, shape and size when according to actual implementation
Draw, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel
It is likely more complexity.
Embodiment one
Referring to Fig.1, a kind of automated testing method of router far and near distance performance, the automation are present embodiments provided
Test method includes the following steps:
S1:Control router to be measured moved with the distance between router to be measured for minimum value;
S2:Data packet to the first PC machine being connected with router to be measured is persistently sent to exist to obtain above-mentioned router to be measured
Throughput data in preset time;
S3:Judge whether above-mentioned throughput data is zero;If so, thening follow the steps S5;If it is not, thening follow the steps S4;
S4:Record above-mentioned throughput data, and control the mobile preset step-length of above-mentioned router to be measured with it is described to
It surveys the distance between router and increases a preset step-length;Repeat step S2 to S3;
S5:Based on above-mentioned throughput data graphing, and terminate to test.
It should be noted that the automatization test system needs to obtain before the far and near distance performance of test router
To router to be measured wireless messages in order to can be wirelessly connected with router to be measured.Based on this, referring to Fig. 2, in step
Should also it include the following steps before rapid S1:
S01:Wired interface channel is constructed to carry out wired connection with above-mentioned first PC machine;
S02:It sends wireless messages acquisition request and prompts the above-mentioned router to be measured of user setting to above-mentioned first PC machine
Wireless messages;
S03:The first PC machine is obtained through wireless messages transmitted by above-mentioned wired connection channel;
S04:Based on above-mentioned wireless messages, it is wirelessly connected with above-mentioned router to be measured.
I.e.:It is logical that wired connection can be constructed between the automatization test system and the first PC machine by equipment such as interchangers
Road;In turn, automatization test system sends wireless messages acquisition request to interchanger, and interchanger is by the wireless messages acquisition request
It is forwarded to the first PC machine;First PC machine prompt user is configured the wireless messages of router to be measured, and by the wireless communication
Breath is formed by wired connection channel by interchanger and feeds back to automatization test system;Automatization test system is according to the first PC
The wireless messages and router to be measured that machine is fed back are wirelessly connected in order to which the automatic test system can be with wireless
Form sends data packet to router to be measured.
It should be noted that:Router to be measured and the first PC machine in the present embodiment can be placed on transmission equipment,
In order to achieve the effect that carry out accurate movement router to be measured as needed by the operation of control transmission equipment.
I.e.:Automatization test system can be by controlling the operation of transmission equipment, and then controls router movement to be measured so that road to be measured
It is that router to be measured (it is automatic to be moved to distance on transmission equipment by minimum value by the spacing between device and automatization test system
Change at the nearest position of test macro).
It should be noted that being also provided with one or more on the transmission equipment of this implementation accompanies survey router.If
Need to router to be measured, accompany survey router far and near distance performance be compared when, router to be measured and accompany survey router it is equal
Being placed on transmission equipment makes router to be measured in order to carry out automatic test simultaneously and accompanies the test for surveying router
Time is closer to, and is reduced to the greatest extent because influencing brought by environmental disturbances.
It should be noted that the present embodiment is by both test automation test macro and router to be measured in different
Apart from when throughput data realize the test to the far and near distance performance of router to be measured, i.e., by observing router to be measured
Throughput data at the different distance position relative to automatization test system observes the far and near distance of router to be measured
Performance.
It should be noted that the present embodiment is to run Chariot race to the first PC machine by automatization test system to handle up
Amount, to obtain the throughput data in preset time.The mistake process of step S1-S5 specifically can be described as:
At a distance from router to be measured is between automatization test system when minimum, router to be measured receives automatic test
System transmitted data packet in a wireless form, and the received data packet is forwarded to the first PC by the router to be measured
Machine, so that router to be measured can get the throughput data in preset time;Automatization test system receives routing to be measured
The throughput data that device is fed back;In turn, automatization test system can carry out the throughput data to judge whether it is zero,
Namely whether automatization test system can run logical to the first PC machine operation Chariot race handling capacity;Handling capacity be zero or
When running obstructed, is then drawn according to throughput data and be able to reflect the figure of router far and near distance performance to be measured, and terminate to test;
If not amount or running logical, then the throughput data is recorded, and automatization test system will control transmission equipment operation with will
The distance of the mobile preset step-length of router to be measured, so that the distance between automatization test system and router to be measured be made to increase
Add a step-length, preset step-length can be actually needed according to user to be independently arranged;Then, it repeats and executes step S4 extremely
S5, until test terminates.Wherein, the wireless signal that user can observe to obtain router to be measured by the figure drawn can cover
The range of lid and its wireless performance with the spacing distance of both Auto-Test System and router to be measured situation of change.
It should be noted that:It is disposed upon on transmission equipment by router to be measured in this present embodiment, thus needing
When being verified to the performance at a certain distance and position, it is only necessary to control the operation of transmission equipment so that router to be measured is moved to
Retest can be carried out at the distance and position, can accurately restore distance, improve verification efficiency.
It is corresponding based on a kind of automated testing method of router far and near distance performance provided by the present embodiment,
The present embodiment additionally provides a kind of automatization test system of router far and near distance performance, referring to Fig. 3, the automatic test system
System includes:
Mobile module is controlled, is moved for controlling router to be measured to be with the distance between above-mentioned router to be measured
Minimum value;
Data acquisition module, for persistently sending data packet to the first PC machine being connected with router to be measured to obtain
State the throughput data of router to be measured within a preset time;
Judgment module, for judging whether above-mentioned throughput data is zero;
Mobile module is recorded, for recording above-mentioned throughput data, and above-mentioned router to be measured mobile one is controlled and presets
Step-length is to increase a preset step-length with the distance between above-mentioned router to be measured;
Module is repeated, for when above-mentioned throughput data is not zero, to rerun judgment module and data acquisition
Module;
Graphic plotting module, for according to throughput data graphing and terminating to test.
Wherein, referring to Fig. 4, which further includes:
First building module, for constructing wired interface channel to carry out wired connection with the first PC machine;
Request sending module, for sending wireless messages acquisition request to the first PC machine to prompt user setting routing to be measured
The wireless messages of device;
Data obtaining module, for obtaining the first PC machine through wireless messages transmitted by above-mentioned wired connection channel;
Second building module, for being wirelessly connected with above-mentioned router to be measured according to acquired wireless messages.
Based on a kind of automatization test system of router far and near distance performance provided by the present embodiment, corresponding
Embodiment additionally provides a kind of automatic test device suitable for router far and near distance performance, and referring to Fig. 5, which is surveyed
Trial assembly set including:
First PC machine 100, the second PC machine 200, first PC machine 100 and router 300 to be measured carry out wired connection;Second
PC machine 200 is internally provided with the automatization test system 700 of router far and near distance performance provided by the present embodiment.
Wherein, further include in the automatic test device:Transmission equipment 400, be provided on the transmission equipment 400 serial ports with
Convenient for carrying out serial ports connection by Serial Port Line 600 with the second PC machine 200;Second PC machine can reach real-time control biography by the serial ports
The effect of the operation of device is sent, accurately to move the router to be measured 300 on transmission equipment.In addition, the first PC machine 100 is also pacified
It sets on transmission equipment 400.
Wherein, further include an interchanger 500 in the automatic test, the first PC machine 100 and the second PC machine 200 with this
Interchanger 500 carries out wired connection.
Wherein, the first PC machine interior arrangement has multiple wired network adapters (gigabit wired network adapter), internal wired network adapter point
For two classes, one kind is the wired network adapter 110 for carrying out wired connection with router to be measured;It is another kind of be used for and interchanger into
The wired network adapter 120 of row wired connection.
Wherein, the second PC machine 200 is internally provided with the 11AC double-frequency wireless network interface card 210 an of high standard, the wireless network card
210 are wirelessly connected with router 300 to be measured;It is additionally provided with gigabit wired network adapter 220, the wired network adapter 220 and interchanger
500 carry out wired connection.
It should be noted that also settable one or more accompanies survey router (not shown) on transmission equipment,
Need to router to be measured, accompany survey router far and near distance performance be compared when, will can need to carry out performance test
Router to be measured accompanies and surveys router while being placed on transmission equipment with while carrying out the test of far and near performance, so as to be measured
Router is closer to the testing time for surveying router is accompanied, and is reduced to the greatest extent because influencing brought by environmental disturbances,
It should be noted that automatization test system provided by the present embodiment is remote in addition to that can carry out for router to be measured
Except short distance performance test, additionally it is possible to test the wireless network card being arranged in the second PC machine, i.e.,:To wireless network card
When carrying out far and near distance performance test, it is only necessary to fix the position of router, the second PC machine of the wireless network card will be installed
It is placed on transmission equipment.
A kind of automated testing method of router far and near distance performance, system provided by the present embodiment, can pass through
Preset step-length is set accurately to adjust the distance between router to be measured and automatization test system, to the remote of router to be measured
Nearly performance carries out automatic test, also can directly be somebody's turn to do router accurate recovery to be measured to a certain distance and position with repeated authentication
The throughput data of distance and position improves verification efficiency, reduces error.In addition, automatic test provided by the present embodiment fills
Setting can also be when needing to router to be measured with accompanying the far and near distance performance for surveying router to be compared, it is only necessary to by progressive
The router to be measured of energy comparison accompanies survey router while being placed on transmission equipment with while carrying out automatic test,
Router to be measured is closer to the testing time for surveying router is accompanied, and can be reduced to the greatest extent because of shadow brought by environmental disturbances
It rings.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.