Content of the invention
The present invention provides a kind of method and system of test router, and its object is to can be steady in test router
When qualitative, can in many test envelopes efficiently and rapidly positioning failure problem.
The technical scheme that the present invention provides is as follows:
A kind of method of test router, including server, at least one test machine and at least one router to be measured, institute
State test machine to be connected with described server and router to be measured communication respectively;Including step:
The test assignment that test machine acquisition described in S300 stores in advance, tests at least router to be measured;
Server described in S400 receives url access request, whether judges current test data in normal range (NR), if being carried out
Step S500;Otherwise execution step S600;
It is normal that server described in S500 exports described current test data;Judge whether described current length of testing speech meets pre-
If length of testing speech, if execution step S700;Otherwise return to step S400;
Described in S600, the current test data of server output is abnormal;Judge whether to terminate currently to test, if execution step
S700;Otherwise return to step S400;
Server controls described in S700 terminate currently to test, and described current test data is preserved to described server count
According in storehouse.
In the present invention, test machine can obtain the test script preserving in server, and router to be measured is tested, will
The result of test preserves to server, and by selecting the arbitrary test machine being connected with server network, url was both permissible for input
Access server, when outputing test data abnormal, sends warning information, points out tester to be checked, confirms abnormal number
According to and judge whether to terminate currently to test.The state of current test router to be measured can be obtained by the present invention at any time, no
Need to send special messenger to be checked respectively on the test machine of different location, time saving and energy saving.
Further, described step S300 includes step:
Test machine described in S310 and arbitrary described router wired connection to be measured;Obtain the first test in described server
Script, gathers described router memory related data to be measured in the first preset duration, and by described router memory phase to be measured
Close data to preserve to server database;And/or
Test machine described in S320 is wirelessly connected with arbitrary described router to be measured;Obtain the second test in described server
Script, gathers described router performance related data to be measured in the second preset duration, and by described router performance phase to be measured
Close data to preserve to server database;
Wherein, described first preset duration is more than described second preset duration.
It is only necessary to control test machine and router to be measured to carry out wired or wireless connection it is possible to carry out in the present invention
Different tests, wired connection can only test router memory related data to be measured on a test machine;Can also be one
On platform test machine, router performance related data to be measured is only tested in wireless connection;Can also be respectively on the test machine more than two
The test machine wired connection that setting is more than one tests router memory related data to be measured, and the test machine that setting is more than is no
Line connecting test router performance to be measured related data.Here, as long as the first preset duration is more than the second preset duration, can
Carry out testing router memory related data to be measured and performance-related data with synchronous;Router memory to be measured can also first be tested
Related data, re-test router performance to be measured related data.
Further, described step S310 includes step:
Test machine described in S311 and arbitrary described router wired connection to be measured;Obtain the first test in described server
Script;
Test machine described in S312 according to the first predeterminated frequency, obtains described router residue cpu data to be measured, and preserve to
In described server database;And/or
Test machine described in S313, according to described first predeterminated frequency, obtains described router free memory data to be measured, and
Preserve to described server database;And/or
Test machine described in S314, according to described first predeterminated frequency, obtains described router main steps state to be measured, and
Preserve to described server database;And/or
Test machine described in S315, according to described first predeterminated frequency, obtains described router device run time to be measured, and
Preserve to described server database;
Described step S320 includes step:
Test machine described in S321 is wirelessly connected with arbitrary described router to be measured;Obtain the second test in described server
Script;
Test machine described in S322, according to the second predeterminated frequency, obtains packet loss and the time delay of ping gateway, and preserves to institute
State in server database;And/or
S323, according to described second predeterminated frequency, obtains packet loss and the time delay of ping outer net, and preserves to described service
In device database;And/or
S324, according to described second predeterminated frequency, obtains transmission rate and the receiving velocity that network interface card connects, and preserves to institute
State in server database;And/or
S325, according to described second predeterminated frequency, obtains the signal strength signal intensity that network interface card connects, and preserves to described server count
According in storehouse;And/or
S326 according to described second predeterminated frequency, obtains network interface card upstream data flow and downlink data flow, and preserve to
In described server database.
In the present invention, can select to test the remaining cpu data of router to be measured, free memory data, main steps shape
One of state, operation hours or multiple test event it is also possible to select the packet loss of test ping gateway and time delay,
In transmission rate that the packet loss of ping outer net and time delay, network interface card connect and the signal strength signal intensity that receiving velocity, network interface card connect, network interface card
One of row data traffic and downlink data flow or multiple test event.
Further, described step S400 includes step:
S410 inputs url on the test machine that arbitrary and described server is connected, and asks to access described clothes by described url
Business device;
Whether server described in S420 judges described current test data in normal range (NR), if execution step S500;No
Then execution step S600.
In the present invention, test man only needs to select the arbitrary test machine being connected with server network, and url was both permissible for input
Access server is it is possible to carry out testing router to be measured it is not necessary to send special messenger to difference on the test machine of different location
Checked, time saving and energy saving.
Further, also include step before described step S300:
It is same that S100 controls described test machine, described router to be measured and described server to connect according to default building plan
Network;
Test machine described in S200 arranges described first test script and described second test script, according to described test script
Select test assignment and test time started;
Wherein, described first test script tests described router memory related data to be measured;Described second test script
Test described router performance related data to be measured.
The present invention also provides a kind of system of test router, including server, at least one test machine and at least one
Router to be measured, described test machine is connected with described server and router to be measured communication respectively;
Wherein, described test machine includes:Test module;Described server includes storage module, judge module and controls mould
Block;The storage module communication of the test module of described test machine and described server connects;The judge module of described server divides
Do not communicate and be connected with the storage module of described server and control module;
The test module of described test machine, obtains the test assignment storing in advance in described storage module, at least one
Platform router to be measured is tested;
Whether the judge module of described server, receive url access request, judge current test data in normal range (NR);
The control module of described server, when the judge module of described server exports current test data in normal range (NR)
When, export described current test data normal;
The judge module of described server, also when export described current test data normal after, judge described current test
Whether duration meets default length of testing speech;
The control module of described server, also when described current length of testing speech meets default length of testing speech, controls knot
Shu Dangqian tests, and described current test data is preserved to the storage module of described server;
The judge module of described server, also when described current length of testing speech is unsatisfactory for default length of testing speech, then continues
Judge current test data whether in normal range (NR);
The control module of described server, does not also exist when the judge module of described server exports described current test data
During normal range (NR), the described current test data of output is abnormal;
The judge module of described server, also when export described current test data normal after, judge whether to terminate current
Test;
The control module of described server, after judging to terminate described current test, controls and terminates currently to test, and ought
Front test data preserves to the storage module of described server;
The judge module of described server, also after judging not terminating described current test, continues to judge currently to test number
According to whether in normal range (NR).
In the present invention, the test script that preservation in server can be obtained of test machine, router to be measured is tested,
The result of test is preserved to server, by selecting the arbitrary test machine being connected with server network, input url both may be used
With access server, obtain the current state of test router to be measured and judged and controlled it is not necessary to send special messenger to put in place
Checked respectively on the test machine of different location, time saving and energy saving.
Further, the test module of described test machine and arbitrary described router wired connection to be measured;Obtain described clothes
The first test script in the storage module of business device, gathers described router memory dependency number to be measured in the first preset duration
According to, and described router memory related data to be measured is preserved to the storage module of described server;And/or
The test module of described test machine is wirelessly connected with arbitrary described router to be measured;Obtain the storage of described server
The second test script in module, gathers described router performance related data to be measured in the second preset duration, and will be described
Router performance related data to be measured preserves to the storage module of described server;
Wherein, described first preset duration is more than described second preset duration.
It is only necessary to control test machine and router to be measured to carry out wired or wireless connection it is possible to carry out in the present invention
Different tests, wired connection can only test router memory related data to be measured on a test machine;Can also be one
On platform test machine, router performance related data to be measured is only tested in wireless connection;Can also be respectively on the test machine more than two
The test machine wired connection that setting is more than one tests router memory related data to be measured, and the test machine that setting is more than is no
Line connecting test router performance to be measured related data.Here, as long as the first preset duration is more than the second preset duration, can
Carry out testing router memory related data to be measured and performance-related data with synchronous;Router memory to be measured can also first be tested
Related data, re-test router performance to be measured related data.
Further, the test module of described test machine includes:
Acquisition submodule, obtains the first test script in the storage module of described server;And/or, obtain described clothes
The second test script in the storage module of business device;
The remaining CPU submodule of test, according to the first predeterminated frequency, obtains described router residue cpu data to be measured, and protects
Deposit to the storage module of described server;And/or
Test free memory submodule, according to described first predeterminated frequency, obtains described router free memory number to be measured
According to, and preserve to the storage module of described server;And/or
Test main steps submodule, according to described first predeterminated frequency, obtains described router main steps shape to be measured
State, and preserve to the storage module of described server;And/or
Test run time submodule, according to described first predeterminated frequency, when obtaining described router device operation to be measured
Between, and preserve to the storage module of described server;And/or
Test Network sub-module, according to the second predeterminated frequency, obtains packet loss and the time delay of ping gateway, and preserves to institute
State in the storage module of server;And/or
Test outer net submodule, according to described second predeterminated frequency, obtains packet loss and the time delay of ping outer net, and preserves
To the storage module of described server;And/or
Test connection speed submodule, according to described second predeterminated frequency, obtains transmission rate and the network interface card that network interface card connects
The receiving velocity connecting, and preserve to the storage module of described server;
Test signal intensity submodule, according to described second predeterminated frequency, obtains the signal strength signal intensity that network interface card connects, and preserves
To the storage module of described server;And/or
Test uplink/downlink flow submodule, according to described second predeterminated frequency, obtains network interface card upstream data flow and network interface card
Downlink data flow, and preserve to the storage module of described server.
In the present invention, can select to test the remaining cpu data of router to be measured, free memory data, main steps shape
One of state, operation hours or multiple test event it is also possible to select the packet loss of test ping gateway and time delay,
In transmission rate that the packet loss of ping outer net and time delay, network interface card connect and the signal strength signal intensity that receiving velocity, network interface card connect, network interface card
One of row data traffic and downlink data flow or multiple test event.
Further, described test machine also includes:Setup module, access modules;The setup module of described test machine and institute
The storage module communication stating server connects;The access modules of described test machine are connected with the storage module communication of described server
The setup module of described test machine, arranges described first test script and described second test script, according to described
Test script selects test assignment and test time started;
The access modules of described test machine, input url on the test machine that arbitrary and described server is connected;By described
Url request accesses described server;Wherein,
Described first test script tests described router memory related data to be measured;Described second test script test institute
State router performance related data to be measured.
In the present invention, tester can enter edlin test script as needed on a testing machine, according to the survey of editor
Training originally carry out select test assignment, start test after, tester want to check the state testing router to be measured it is only necessary to
Select the arbitrary test machine being connected with server network, inputting url both can be with access server it is possible to carry out testing to be measured
Router is it is not necessary to send special messenger to be checked respectively on the test machine of different location, time saving and energy saving.
Further, according to default building plan test system building, and control described test machine, described router to be measured
Connect consolidated network with described server.
Compared with prior art, the present invention provides a kind of method and system of test router, at least brings following one kind
Technique effect:
1st, test the test event of an at least router to be measured, Test Engineer can be avoided to need to repeat to build test
Environment, improves operating efficiency, time saving and energy saving.
2nd, can be by the normal or abnormal efficiently quick positioning failure problem that outputs test data.
3rd, the router performance that can carry out different models in batches is tested, the test router performance of high-efficient automatic,
Save and carry out one by one testing and do not stop to change the time of test environment.
Specific embodiment
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, brief description will be compareed below
The specific embodiment of the present invention.It should be evident that drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing, and obtain other embodiments.
For making simplified form, each in figure only schematically show part related to the present invention, and they do not represent
It is as the practical structures of product.In addition, so that simplified form readily appreciates, there is identical structure or function in some in figures
Part, only symbolically depicts one of, or has only marked one of.Herein, " one " not only represents
" only this " is it is also possible to represent the situation of " more than one ".
With reference to shown in Fig. 1, the present invention provides an a kind of embodiment of method of test router, including server, extremely
A few test machine and at least one router to be measured, described test machine is connected with described server and router to be measured communication respectively
Connect;This embodiment includes step:
The test assignment that test machine acquisition described in S300 stores in advance, tests at least router to be measured;
Server described in S400 receives url access request, whether judges current test data in normal range (NR), if being carried out
Step S500;Otherwise execution step S600;
It is normal that server described in S500 exports described current test data;Judge whether described current length of testing speech meets pre-
If length of testing speech, if execution step S700;Otherwise return to step S400;
Described in S600, the current test data of server output is abnormal;Judge whether to terminate currently to test, if execution step
S700;Otherwise return to step S400;
Server controls described in S700 terminate currently to test, and described current test data is preserved to described server count
According in storehouse.
In the embodiment of the present invention, router to be measured can be placed in test envelope (Test Bed), Test Bed is exactly to survey
The specific software environment of examination, hardware environment, can include software, hardware and network structure.For example, Arena browser can
Using as test CSS, the Test Bed of html code.Server is connected consolidated network with test envelope, selects arbitrarily to connect this net
The test machine of network by the Visualizing Test System of url access server, and can be capable of beginning testing time of nominative testing machine,
And test the data message of all test machine test routers in test process;Wherein, test machine includes PC, notebook
Deng.The embodiment of the present invention is tested using the stability that test machine is directed to router, draws a series of test data, test
The different test script of machine execution can test the performance of a router to be measured, also can be executed not by multiple stage test machine simultaneously
Same test script tests the performance of each model of multiple stage router to be measured, obtains the test number of each test event of router to be measured
According to, and the test data of each test event and server are carried out information exchange, by the database of test data typing server
In.So, test the test event of an at least router to be measured, Test Engineer can be avoided to need to repeat to build test wrapper
Border, improves operating efficiency, time saving and energy saving;It can also it is enough normal or abnormal efficiently quickly fixed by outputing test data
Position failure problems, point out tester's data test abnormal by warning information, can be that tester rapidly finds exception
Point.
With reference to shown in Fig. 2, with respect to a upper embodiment, identical part will not be described here.The present invention provides a kind of
Another embodiment of the method for test router, this embodiment includes step:
It is same that S100 controls described test machine, described router to be measured and described server to connect according to default building plan
Network;
Test machine described in S200 arranges described first test script and described second test script, according to described test script
Select test assignment and test time started;
S310 test machine and arbitrary described router wired connection to be measured;Obtain the first test pin in described server
This, gather described router memory related data to be measured in the first preset duration, and will be related for described router memory to be measured
Data preserves to described server database;And/or
S320 test machine is wirelessly connected with arbitrary described router to be measured;Obtain the second test pin in described server
This, gather described router performance related data to be measured in the second preset duration, and will be related for described router performance to be measured
Data preserves to described server database;
S410 inputs url on the test machine that arbitrary and described server is connected, and asks to access described clothes by described url
Business device;
Whether server described in S420 judges described current test data in normal range (NR), if execution step S500;No
Then execution step S600.
Wherein, described first preset duration is more than described second preset duration.
Wherein, described first test script tests described router memory related data to be measured;Described second test script
Test described router performance related data to be measured.
In the embodiment of the present invention, tester can arbitrarily select a test machine being connected with server, in this test
Url is inputted on machine browser, access server is asked by described url, the test time started according to pre-setting is surveyed
Examination.Here can arrange and only test router memory related data to be measured it is also possible to only test router performance dependency number to be measured
According to, or router memory related data to be measured and router performance related data to be measured all test.Here can arrange wired
The test of the test assignment and wireless test router performance to be measured related data of testing router memory related data to be measured is appointed
Business starts simultaneously at and carries out;The test assignment that wired test router memory to be measured related data can also be arranged first starts to test,
The test assignment of wireless test router performance to be measured related data then begins to test;Wireless test road to be measured can also be set
Tested first by the test assignment of device performance-related data, the test assignment of wired test router memory related data to be measured
Then begin to test.Typically in order to time-consuming, arrange and first test router memory related data to be measured, re-test route to be measured
Device performance-related data.
Wherein, by choosing at random a test machine being connected with server, this test machine browser inputs url,
Access server is asked by described url, the stability Visualizing Test System of server, real time access test system can be passed through
System obtains current test data.Can also carry out selecting setting by test machine, so, user can select to think as needed
Script to be tested, can also select to want the project of test by the script selecting.Even, user can also be as needed
Add test event wanting to carry out etc. again.
The test of general router includes at least two test machines, and a test machine executes the first test script, for surveying
Try the remaining CPU of router to be measured, free memory, the test event such as the current main steps running and operation hours;
Other test machine executes the second test script, is mainly used in the test of the network parameter of router, such as ping latency,
The test events such as ping packet loss, network interface card connection speed, network interface card connection signal strength signal intensity, and network interface card flow, test machine execution is each
The test data of each test event getting from script, all can be sent to server, be stored in inside the database of server.
Whether server judges current test data in normal range (NR), if normal, test machine display data is normal, meets length of testing speech
After terminate this test, and by test data typing server database, be easy to subsequent query.If current test data does not exist
Normal range (NR), then system prompt warning information, artificially review and validate abnormal data and judge whether to terminate this test, if
Then terminate to test, and by this test data typing historical data, if otherwise whether system rejudges current data normal
Scope.When user accesses and checks these test datas, then server, after receiving instruction, loads basis first in test page
Static html webpage control and javascript script language files etc., effect much dynamic and that interactivity is stronger can be made
Really, each test machine and is called to test the test data of each test event obtaining from server database, and according to each
Each test event of individual test machine draws a test chart.The data that the present embodiment produces to test is managed, real
Show the visualization of data, by resolution chart, made tester more effectively observe the properties change of router.This
Sample, the test event of a test at least router to be measured, Test Engineer can be avoided to need to repeat to build test environment, carry
High operating efficiency, time saving and energy saving;It can also enough by the normal or abnormal efficiently quick positioning failure that outputs test data
Problem;Furthermore it is also possible to batch carries out the router performance test of different models, the test router of high-efficient automatic
Can, save test one by one and do not stop to change the time of test environment, time saving and energy saving, user's test experience greatly increases.
With reference to shown in Fig. 3, with respect to a upper embodiment, identical part will not be described here.The present invention provides a kind of
Another embodiment of the method for test router, this embodiment includes step:
Test machine described in S311 and arbitrary described router wired connection to be measured;Obtain the first test in described server
Script;
Test machine described in S312 according to the first predeterminated frequency, obtains described router residue cpu data to be measured, and preserve to
In described server database;And/or
Test machine described in S313, according to described first predeterminated frequency, obtains described router free memory data to be measured, and
Preserve to described server database;And/or
Test machine described in S314, according to described first predeterminated frequency, obtains described router main steps state to be measured, and
Preserve to described server database;And/or
Test machine described in S315, according to described first predeterminated frequency, obtains described router device run time to be measured, and
Preserve to described server database;
Described step S320 includes step:
Test machine described in S321 is wirelessly connected with arbitrary described router to be measured;Obtain the second test in described server
Script;
Test machine described in S322, according to the second predeterminated frequency, obtains packet loss and the time delay of ping gateway, and preserves to institute
State in server database;And/or
S323, according to described second predeterminated frequency, obtains packet loss and the time delay of ping outer net, and preserves to described service
In device database;And/or
S324, according to described second predeterminated frequency, obtains transmission rate and the receiving velocity that network interface card connects, and preserves to institute
State in server database;And/or
S325, according to described second predeterminated frequency, obtains the signal strength signal intensity that network interface card connects, and preserves to described server count
According in storehouse;And/or
S326 according to described second predeterminated frequency, obtains network interface card upstream data flow and downlink data flow, and preserve to
In described server database.
In the embodiment of the present invention, tester can ask access server by url, and the test according to pre-setting is opened
Time beginning is tested, and typically in order to time-consuming, arranges and first tests router memory related data to be measured, re-test road to be measured
By device performance-related data.The test of general router includes at least two test machines, test machine execution the first test pin
This, according to the first predeterminated frequency, test the remaining CPU of router to be measured, and/or free memory, and/or current operation is main
Process, and/or the test event such as operation hours;An other test machine executes the second test script, default according to first
Frequency, tests ping gateway time delay, the ping gateway packet loss of router to be measured, and/or ping outer net time delay, ping outer net are lost
Bag rate, and/or network interface card connection speed (including transmission rate and receiving velocity that network interface card connects), network interface card connection signal strength signal intensity, and/
Or the test event such as network interface card flow (include network interface card upstream data flow and network interface card downlink data flow), test machine executes respective pin
The test data of each test event originally getting, all can be sent to server, be stored in inside the database of server.This reality
Apply example simply illustrate test all of main test event, tester can only test as needed one therein or
Person arbitrarily several.When user accesses and checks these test datas, then server after receiving instruction, and from server database
In call each test machine test obtain each test event test data, can make in the page of test machine and much manifesting
The result figure of test data.The present embodiment to carrying out selecting, according to the demand of tester, the project wanting to test, then
The test result of test event is saved in the database of server, when tester wants to detect the related data of router
When, arbitrarily select a test machine connecting consolidated network with server altogether, input url may have access in the input of this test machine
Server, calls the test result of the current test of database, and test result is counted by server, and defeated through test machine
Go out display, the data that test produces has carried out management it is achieved that the visualization of data, by resolution chart, made tester more
The properties change of observation router effectively, meanwhile, it is capable to efficiently and rapidly position stability is asked in many test envelopes
Topic, for finding to provide efficiently easily approach with solve problem, improves testing efficiency and accuracy.
With reference to shown in Fig. 4, the present invention provides an a kind of embodiment of system of test router, including server
1000, at least one test machine 2000 and at least one router 3000 to be measured, test machine 2000 described in this embodiment respectively with
Described server 1000 and router to be measured 3000 communication connect;
Wherein, described test machine 2000 includes:Test module 2200;Described server 1000 include storage module 1100,
Judge module 1200 and control module 1300;The test module 2200 of described test machine 2000 and the storage of described server 1000
Module 1100 communication connects;The judge module 1200 of described server 1000 storage module with described server 1000 respectively
1100 and control module 1300 communication connect;
The test module 2200 of described test machine 2000, the test storing in advance obtaining in described storage module 1100 is appointed
Business, tests at least router 3000 to be measured;
Whether the judge module 1200 of described server 1000, receive url access request, judge current test data just
Often scope;
The control module 1300 of described server 1000, when the judge module 1200 of described server 1000 exports current survey
Examination data, in normal range (NR), exports described current test data normal;
The judge module 1200 of described server 1000, also when export described current test data normal after, judge described
Whether current length of testing speech meets default length of testing speech;
The control module 1300 of described server 1000, also when described current length of testing speech meets default length of testing speech
When, control and terminate current test, and described current test data is preserved to the storage module 1100 of described server 1000;
The judge module 1200 of described server 1000, also when described current length of testing speech is unsatisfactory for default test
Long, then continue to judge current test data whether in normal range (NR);
The control module 1300 of described server 1000, also when the judge module 1200 of described server 1000 export described
, not in normal range (NR), the described current test data of output is abnormal for current test data;
The judge module 1200 of described server 1000, also when export described current test data normal after, judge whether
Terminate current test;
The control module 1300 of described server 1000, after judging to terminate described current test, controls and terminates current survey
Examination, and current test data is preserved to the storage module 1100 of described server 1000;
The judge module 1200 of described server 1000, also after judging not terminating described current test, continues to judge to work as
Whether front test data is in normal range (NR).
In the embodiment of the present invention, wherein, server 1000 is connected consolidated network with router 3000 to be measured, selects arbitrarily to connect
Lead to the test machine 2000 of this network, by inputting the Visualizing Test System of url access server 1000, and can specify survey
The beginning testing time of test-run a machine 2000, and test all test machines 2000 in test process and test router 3000 to be measured
Test data information.The present invention is tested using the stability that test machine 2000 is directed to router, draws a series of test
Data, can execute, by a test machine 2000, the performance that different test scripts test a router 3000 to be measured, obtain
The test data of each test event of router 3000 to be measured, and the test data of each test event and server 1000 are carried out letter
Breath interaction, by the database of test data typing server 1000.So, test the survey of at least one router 3000 to be measured
Examination project, can avoid Test Engineer to need to repeat to build test environment, improve operating efficiency, time saving and energy saving;And, also
Tester can be pointed out by the normal or abnormal efficiently quick positioning failure problem that outputs test data by warning information
Data test is abnormal, can be that tester rapidly finds abnormity point.
With reference to shown in Fig. 5, with respect to a upper embodiment, identical part will not be described here.The present invention provides a kind of
Another embodiment of the system of test router,
Described test machine 2000 also includes:Setup module 2100, access modules 2300;The setting mould of described test machine 2000
Block 2100 is connected with storage module 1100 communication of described server 1000;The access modules 2300 of described test machine 2000 and institute
Storage module 1100 communication stating server 1000 connects;
The setup module 2100 of described test machine 2000, arranges described first test script and described second test script,
Test assignment and test time started are selected according to described test script;
The access modules of described test machine 2000, input on the test machine 2000 that arbitrary and described server 1000 is connected
url;Ask to access described server 1000 by described url;Wherein,
Described first test script tests described router 3000 internal memory related data to be measured;Described second test script is surveyed
Try described router to be measured 3000 performance-related data.
The test module 2200 of described test machine 2000 includes:
Acquisition submodule 2205, obtains the first test script in the storage module 1100 of described server 1000;With/
Or, the second test script in the storage module 1100 of the described server 1000 of acquisition;
The remaining CPU submodule 2210 of test, according to the first predeterminated frequency, obtains the remaining CPU of described router to be measured 3000
Data, and preserve to the storage module 1100 of described server 1000;And/or
Test free memory submodule 2220, according to described first predeterminated frequency, obtains described router 3000 to be measured and remains
Remaining internal storage data, and preserve to the storage module 1100 of described server 1000;And/or
Test main steps submodule 2230, according to described first predeterminated frequency, obtains described router 3000 to be measured main
Want process status, and preserve to the storage module 1100 of described server 1000;And/or
Test run time submodule 2240, according to described first predeterminated frequency, obtains described router 3000 to be measured and sets
Standby run time, and preserve to the storage module 1100 of described server 1000;And/or
Test Network sub-module 2250, according to the second predeterminated frequency, obtains packet loss and the time delay of ping gateway, and preserves
To the storage module 1100 of described server 1000;And/or
Test outer net submodule 2260, according to described second predeterminated frequency, obtains packet loss and the time delay of ping outer net, and
Preserve to the storage module 1100 of described server 1000;And/or
Test connection speed submodule 2270, according to described second predeterminated frequency, obtain the transmission rate that network interface card connects and
The receiving velocity that network interface card connects, and preserve to the storage module 1100 of described server 1000;
Test signal intensity submodule 2280, according to described second predeterminated frequency, obtains the signal strength signal intensity that network interface card connects, and
Preserve to the storage module 1100 of described server 1000;And/or
Test uplink/downlink flow submodule 2290, according to described second predeterminated frequency, obtain network interface card upstream data flow and
Network interface card downlink data flow, and preserve to the storage module 1100 of described server 1000.
In the embodiment of the present invention, first described test machine 2000, described router to be measured are controlled according to default building plan
3000 and described server 1000 connect consolidated network.Described first test script tests described router 3000 internal memory phase to be measured
Close data;Described second test script tests described router 3000 performance-related data to be measured.Tester can pass through url
Request access server 1000, the test time started according to pre-setting is tested, and typically in order to time-consuming, arranges first
Test router 3000 internal memory related data to be measured, re-test router to be measured 3000 performance-related data.General router
Test includes at least two test machines 2000, and a test machine 2000 executes the first test script, according to the first predeterminated frequency, surveys
Try the remaining CPU of router 3000 to be measured, free memory, the test item such as the current main steps running and operation hours
Mesh;An other test machine 2000 executes the second test script, according to the first predeterminated frequency, tests router 3000 to be measured
Ping gateway time delay, ping gateway packet loss, ping outer net time delay, ping outer net packet loss, network interface card connection speed (includes network interface card
Connect transmission rate and receiving velocity), network interface card connect signal strength signal intensity, and network interface card flow (include network interface card upstream data flow
With network interface card downlink data flow) etc. test event, test machine 2000 executes the test of each test event that respective script gets
Data, all can be sent to server 1000, be stored in inside the database of server 1000.Check these tests when user accesses
During data, then server 1000, after receiving instruction, and calls each test machine 2000 to test from server 1000 database
The test data of each test event obtaining, can make, in the page of test machine 2000, the result much manifesting test data
Figure.The present embodiment to carrying out selecting, according to the demand of tester, the project wanting to test, then by the survey of test event
Test result is saved in the database of server 1000, when tester wants the related data detecting router, arbitrarily selects
Select a test machine 2000 connecting consolidated network with server 1000 altogether, input url in the input of this test machine 2000
Access server 1000, calls the test result of the current test of database, and test result is counted by server 1000, and
Through test machine 2000 output display, the data that test produces has carried out management it is achieved that the visualization of data, by test chart
Shape, makes tester more effectively observe the properties change of router, meanwhile, it is capable to efficiently quick in many test envelopes
Ground positioning stablity sex chromosome mosaicism, for finding to provide efficiently easily approach with solve problem, improves testing efficiency and accuracy.
With reference to shown in Fig. 6, with respect to a upper embodiment, identical part will not be described here.The present invention provides a kind of
Another embodiment of the system of test router, the test module 2200 of described test machine 2000 includes:
Test module 2200 and arbitrary described router 3000 wired connection to be measured of described test machine 2000;Obtain described
The first test script in the storage module 1100 of server 1000, gathers described router to be measured in the first preset duration
3000 internal memory related datas, and described router 3000 internal memory related data to be measured is preserved to the storage of described server 1000
In module 1100;And/or
The test module of described test machine 2000 is wirelessly connected with arbitrary described router 3000 to be measured;Obtain described service
The second test script in the storage module 1100 of device 1000, gathers described router to be measured 3000 property in the second preset duration
Energy related data, and described router 3000 performance-related data to be measured is preserved to the storage module of described server 1000
In 1100;
Wherein, described first preset duration is more than described second preset duration.
In the embodiment of the present invention, different test scripts can be executed by multiple stage test machine 2000 simultaneously, test is many respectively
The performance of each model of platform router to be measured 3000, the dotted portion test machine 2000 in wherein Fig. 6 and router 3000 to be measured
Wireless connection, bold portion test machine 2000 and router 3000 wired connection to be measured.Wherein, wireless link divides dynamically distributes
IP address, wired connection part static allocation IP address.The simply optimal test program that in figure shows, in test can be one
Above test machine 2000 and router 3000 wired connection to be measured, the test machine 2000 of more than and router 3000 to be measured
Wireless connection, as long as selecting the test machine 2000 that any one is connected with server 1000, inputs url access server 1000,
The script obtaining server 1000 carries out the test of correlation, for example, obtain the first test script, according to the second predeterminated frequency, tests
The remaining CPU of router 3000 to be measured, free memory, the test item such as the current main steps running and operation hours
Mesh;Or, obtain the second test script, according to the first predeterminated frequency, test router 3000 to be measured ping gateway time delay,
Ping gateway packet loss, ping outer net time delay, ping outer net packet loss, network interface card connection speed (includes the transmission speed that network interface card connects
Rate and receiving velocity), network interface card connect signal strength signal intensity, and network interface card flow (includes line number under network interface card upstream data flow and network interface card
According to flow) etc. test event.Wherein, tester can make all routers to be measured 3000 and the test machine 2000 all can be wired
Connect and wireless connection closes unlimited connection it is only necessary to arranging a part of test machine 2000 in test and opening wired connection, and
Obtain the first test script, router 3000 internal memory dependence test to be measured just can be carried out according to the first test frequency, arrange one
Unlimited connection closed wired connection opened by partial test machine 2000, and obtains the second test script, according to the second test frequency just
Router 3000 performance dependence test to be measured can be carried out.
With reference to shown in Fig. 7 (a), Fig. 7 (b) and Fig. 7 (c), the present invention provides an a kind of reality of method of test router
Example,
S1, by 7 (a) and Fig. 7 (b) topology test system building;
S2, open stability Visualized Monitoring System arrange test envelope test essential information (such as hardware version, software
Version etc.) and the test time started
S3, testbed test starts, and opening stability Visualized Monitoring System can real time inspection test data
Whether S4, system judge current test data in normal range (NR), if normal, system display data is normal, meets and surveys
Terminate this test and by test data typing historical data after examination duration, be easy to subsequent query.If current test data is not
In normal range (NR), then system prompt warning information, artificially review and validate abnormal data and judge whether to terminate this test, if
It is to terminate to test, and by this test data typing historical data, if otherwise whether system rejudges current data just
Often scope.
Wireless connection dut is passed through in Pc1~3, gathers following data every one minute:
1、Ping-GW:Every 1 minute ping gateway, calculate packet loss and time delay, numerical value typing serverDB.
2、Ping-Internet:Every 1 minute ping outer net, calculate packet loss and time delay, numerical value typing serverDB.
3、Linkrate-Tx:Obtain the transmission rate that network interface card connects, numerical value typing serverDB every one minute.
4、Linkrate-Rx:Obtain the receiving velocity that network interface card connects, numerical value typing serverDB every one minute.
5、SignalStrength:Obtain the signal strength signal intensity that network interface card connects, numerical value typing serverDB every one minute.
6、Upstream:Obtain network interface card upstream data flow, numerical value typing serverDB every one minute.
7、Downstream:Obtain network interface card downlink data flow, numerical value typing serverDB every one minute.
Pc4 passes through wired connection dut, gathers following data every five minutes:
1、DUT-CPU:Obtain remaining cpu data, numerical value typing serverDB every five minutes telnet equipment.
2、DUT-MEM:Obtain free memory data, numerical value typing serverDB every five minutes telnet equipment.
3、DUT-Process:Obtain main steps state every five minutes telnet equipment.One phase dominant query
Cathkpt process status, numerical value typing serverDB.Later stage can inquire about other states of a process, and therefore database needs to reserve
List item is used for recording other states of a process.
4、DUT-Uptime:Obtain operation hours, numerical value typing serverDB every five minutes telnet equipment.
In present example, server is connected by laboratory network with test envelope, arbitrarily connects the pc of laboratory network
Stability Visualized Monitoring System can be accessed it is intended that the beginning testing time of test envelope by url, and monitor in test process
Data message to all test envelopes.DUT, wireless router device referred to be measured.It is wireless that the present invention utilizes test envelope to be directed to
The stability of router is tested, and draws a series of test data.Multiple such test envelopes can carry out multiple nothings simultaneously
The stability test of line router, and test data and server are interacted information, by test data typing server
In database.In network between server and test envelope, any one pc end connecting this network can be accessed surely by url
Qualitative visualization monitoring system is it is intended that the beginning testing time of test envelope, and monitors all test envelopes in test process
Data message.Here, telnet equipment refers to remote control terminal equipment.
In present example, by Zabbix DB (monitoring system of increasing income) control S1-PC-01 perform script Scrit1 Lai
The test event of the 1-5 (or arbitrarily several in 1-7) in execution Fig. 7 (b), controls S1-PC-02 perform script Scrit2 to hold
The test event of the 8-12 (or arbitrarily several in 8-14) in row Fig. 7 (b), controls S1-PC-03 perform script Scrit3 to hold
The test event of the 15-19 (or arbitrarily several in 15-21) in row Fig. 7 (b), controls S4-PC-01 perform script Scrit4
The test event of the 22-26 in execution Fig. 7 (b), the data that test is obtained preserves to the database of Zabbix DB, according to
The instruction calls test data of tester is analyzed.Test result is counted by server, and through test machine output
Display, the data that test produces has carried out management it is achieved that the visualization of data, by resolution chart, so that tester is more had
The properties change of effect ground observation router, meanwhile, it is capable to efficiently and rapidly positioning stablity sex chromosome mosaicism in many test envelopes,
For finding to provide efficiently easily approach with solve problem, improve testing efficiency and accuracy.
It should be noted that above-described embodiment all can independent assortment as needed.The above is only the preferred of the present invention
Embodiment it is noted that for those skilled in the art, in the premise without departing from the principle of the invention
Under, some improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.