A kind of automatic test approach and system for test router and terminal transparency
Technical field
The invention belongs to routers and terminal transparency testing field, more particularly to one kind being used for test router and terminal
The automatic test approach and system of compatibility.
Background technology
In the usage scenario of router, terminal is various, including mobile phone (Android system and ios systems
Deng), tablet, computer, network interface card etc..The compatible implementations of router and terminal, directly influence the usage experience of user.Thus exist
When test router is with the compatible implementations of terminal, it should accomplish as possible it is exhaustive, so needing terminal number ratio to be tested
It is more.In addition to this, for even for single terminal, compatible test is also complex, on the one hand in order to cover
The test scope of 2.4G and 5G needs the connection of manual switching 2.4G and 5G, on the other hand, in order to cover different bandwidth 20MHz,
40MHz etc.;Test, need the bandwidth that manual switching is different.And it needs to be changed to manually after the completion of a terminal test
Next terminal, even the test of single terminal, complexity is but also more how testing efficiency is very low and human cost is huge,
The test of the multiple terminals of condition.
In order to solve the above-mentioned technical problem, people have carried out long-term exploration, such as Chinese patent discloses a kind of test
Method and system [the publication number of router compatibility:CN107864067A] include:By router and multiple terminals into line number
Ping packets are sent to the multiple terminal according to steaming transfer, while by the router, and every preset period of time from described
Router obtains the connection duration information of the multiple terminal;Obtain the test data in test process;To the test data
It is handled, so that the compatibility to the router is analyzed.
Said program can be used for compatibility test of the router in long-time multiple terminals, test process automation,
Reduce the workload of tester, improves the accuracy of testing efficiency and test.But its mainly for for a long time mostly eventually
Compatibility test in the case of end does not propose to carry out between 2.4G and 5G and different bandwidth automatically during the test
Automatic switching mode, it is not high enough there are the degree of automation the shortcomings of, remain to be further improved.
Invention content
Regarding the issue above, the present invention provides a kind of high degree of automation is used for test router and terminal
The automated testing method of compatibility;
The another object of this programme is to provide a kind of automatization test system based on the above method.
In order to achieve the above objectives, present invention employs following technical proposals:
The automated testing method for test router and terminal transparency of the present invention, including:
S1:The bandwidth that wireless mode and the wireless mode are adapted is set;
S2:Traversal tests the compatibility of all terminals to be measured and router;
S3:Judge whether to traverse the adaptable all bandwidth of the wireless mode, if it is not, the bandwidth is switched to described
The adaptable another bandwidth of wireless mode, executes step S2;If so, executing step S4;
S4:Judge whether to traverse all wireless modes, if it is not, switching the wireless mode, adaptable bandwidth is set, is held
Row step S2~S3;If so, preserving test data.
In the above-mentioned automated testing method for being used for test router and terminal transparency, in step s3, pass through one
The post request commands of packet catcher extraction modification bandwidth information are to switch bandwidth.
In the above-mentioned automated testing method for being used for test router and terminal transparency, pass through bandwidth switching function mould
The post request commands of quasi- modification bandwidth information, and the bandwidth information includes representing the corresponding reference numerals of different bandwidth.
In the above-mentioned automated testing method for test router and terminal transparency, in step sl, by with
Wireless mode is arranged under type:
One terminal to be measured is connected to current wireless mode, and next automatic connection is arranged to make the current wireless mode pair
The SSID name answered is as peculiar SSID name.
In step s 4, switch wireless mode by the following method:
S41:Detect whether current wireless mode is the last one wireless mode, if it is not, thening follow the steps S42;
S42:The SSID name for changing current wireless mode is non-peculiar SSID name, while changing to be switched wireless mode
SSID name be the peculiar SSID name so that the to be switched wireless mode is switched to current wireless mode, execute
Step S2~S3.
In the above-mentioned automated testing method for test router and terminal transparency, in step s 2, by according to
It is secondary from including to extract the mode of terminal to be measured in the terminal list to be measured of all terminal names to be measured to traverse terminal to be measured;
After step s4, further include:
Judge whether complete testing time reaches preset times, if it is not, executing step S0~S4.
In the above-mentioned automated testing method for being used for test router and terminal transparency, the wireless mode includes
2.4G is wireless and 5G is wireless;
And the 2.4G wirelessly under bandwidth include 20MHz bandwidth, 20/40MHz bandwidth and 40MHz bandwidth;Under 5G is wireless
Bandwidth include 20MHz bandwidth, 40MHz bandwidth and 20/40/80MHz bandwidth.
A kind of automatization test system for test router and terminal transparency, including main control computer, routing to be measured
With at least one terminal to be measured, the routing to be measured and all terminals to be measured are respectively positioned in a screened room, and the main control computer is logical
It crosses lan interfaces to connect with the routing to be measured, and is equipped in the main control computer for testing compatibility automatically, automatically
Switch wireless mode, automatically switch bandwidth and automatically switches the automatized script of terminal to be measured.
It is used in the automatization test system of test router and terminal transparency in above-mentioned, the automatic test foot
This is the automatic programming language based on python, and the automatic test script includes:
Test module is used for the compatibility of automatic test router and terminal to be measured;
Terminal handover module traverses all terminals to be measured, if it is not, switching terminal to be measured for judging whether;
Bandwidth handover module traverses the adaptable all bandwidth of the wireless mode, if it is not, will be described for judging whether
Bandwidth is switched to the adaptable another bandwidth of the wireless mode;
Wireless mode handover module traverses all wireless modes for judging whether, if it is not, switch the wireless mode,
Adaptable bandwidth is set.
It is used in the automatization test system of test router and terminal transparency in above-mentioned, the bandwidth handover module
Including analog module and post information scratching modules, wherein
Analog module, the post request commands for simulating modification bandwidth information, and the bandwidth information include representing not
The corresponding reference numerals with bandwidth;
Post information scratching modules, for extracting the post request commands of modification bandwidth information to switch bandwidth;
The terminal handover module includes list block and table spider module, wherein list block, which is used to preserve, includes
There is the terminal list to be measured of terminal name to be measured;Table spider module is to be measured for being extracted from terminal list to be measured successively
Terminal;
The automatic test script further includes testing time judgment module, for judging complete compatibility test number
Whether preset times are reached, if it is not, then informing all bandwidth tests of the system to all terminals to be measured in all wireless modes
Compatibility test again is carried out under module.
It is used in the automatization test system of test router and terminal transparency in above-mentioned, the test module includes
Wireless mode setup module is current wireless mode for the wireless mode with peculiar SSID name to be arranged;
The wireless mode handover module includes SSID name modified module, the SSID names for changing current wireless mode
Referred to as non-peculiar SSID name, while the SSID name for changing to be switched wireless mode is the peculiar SSID name, so that institute
It states to be switched wireless mode and is switched to current wireless mode.
The present invention has the following advantages compared to the prior art:
1, realize automatic test, largely avoid the manpower huge human cost brought of intervention with it is artificial
Error improves testing efficiency, and since the characteristics of automating, test can execute at night, alleviates test resource
Nervous problem, saves human resources;
2, testing time is unrestricted, and test is repeated several times and is possibly realized, " the minimum personnel's operating pressure " of automatic test
So that test, which is repeated several times, is provided with actual operation with the characteristics of " test can be executed at night ", and repeatedly tests for compatibility
Property test for it is very useful, can be reduced as far as compatibility issue omission possibility;
3, test flexibility ratio is high:It is no longer limited to " sequence is one by one " test of manual test, it can be according to actual test
Situation arbitrarily selects single or multiple terminals disposably to complete compatibility test;
4, pattern switching number is few, efficient:In the present solution, no matter test how many a terminals, carry out one is all only needed
The switching of secondary 2.4G and 5G and the switching of bandwidth will not be incremented by because of the increase of terminal into multiple.
Description of the drawings
Fig. 1 is one test topology figure of the embodiment of the present invention;
Fig. 2 is the system block diagram of the embodiment of the present invention one;
Fig. 3 is the group method flow chart of the embodiment of the present invention two;
Fig. 4 is the automated testing method flow chart of the embodiment of the present invention two;
Fig. 5 is the automatic test course schematic diagram of the embodiment of the present invention two.
Reference numeral:Main control computer PC;Routing DUT to be measured;Terminal STA to be measured;Screened room 100;Automatized script 200;
Test module 201;Wireless mode setup module 2011;Terminal handover module 202;List block 2021;Table spider module
2022;Bandwidth handover module 203;Analog module 2031;Post information scratchings module 2032;Wireless mode handover module 204;
SSID name modified module 2041;Testing time judgment module 205.
Specific implementation mode
Although operations are described as the processing of sequence by flow chart, many of which operation can by concurrently,
Concomitantly or simultaneously implement.The sequence of operations can be rearranged.Processing can be terminated when its operations are completed,
It is also possible to the additional step being not included in attached drawing.Processing can correspond to method, function, regulation, subroutine, son
Program etc..
Term "and/or" used herein above includes the arbitrary and institute of the associated item listed by one of them or more
There is combination.When a unit is referred to as " connecting " or when " coupled " to another unit, can be connected or coupled to described
Another unit, or may exist temporary location.
Term used herein above is not intended to limit exemplary embodiment just for the sake of description specific embodiment.Unless
Context clearly refers else, otherwise singulative used herein above "one", " one " also attempt to include plural number.Also answer
When understanding, term " include " and or " include " used herein above provide stated feature, integer, step, operation,
The presence of unit and/or component, and do not preclude the presence or addition of other one or more features, integer, step, operation, unit,
Component and/or a combination thereof.
The present invention is used for the automated testing method and system of test router and terminal transparency, is mainly used in automatic
The field of test router and terminal transparency, solves in the prior art that manual test efficiency is low, and test result accuracy obtains
The problems such as less than ensureing, is the preferred embodiment of the present invention and in conjunction with attached drawing below, makees to technical scheme of the present invention further
Description, but the present invention is not limited to these Examples.
Embodiment one
Present embodiment discloses a kind of automatization test systems for test router and terminal transparency, including master control
Computer PC, routing DUT to be measured and at least one terminal STA to be measured, the routing DUT to be measured and all equal positions of terminal STA to be measured
In in a screened room 100, main control computer PC is connect by lan interfaces LAN with routing DUT to be measured, and the main control computer PC
In be equipped with for testing compatibility automatically, automatically switch wireless mode, automatically switch bandwidth and automatically switch to connect road to be measured
By the automatized script 200 of the terminal STA to be measured of DUT, main control computer PC as the control computer for executing automatized script 200,
Simultaneously as the starting point for beating current test handling capacity.
Main control computer PC can be located in screened room 100, can also be located at outside screened room 100, but for operating personnel
Health, main control computer PC is arranged outside screened room 100 here.In addition, the terminal STA to be measured in screened room 100 can wrap
Various terminals, including mobile phone, tablet, notebook and network interface card etc. have been included, the reality of placement can be changed according to actual demand
Border terminal kinds and number, can also be according to test each terminal STA to be measured of experience adjustments with respect to placement position.As shown in Figure 1, screen
It covering and is placed with 10 terminal STAs to be measured in room 100, respectively STA1~STA10, wherein STA10 can be used for carrying network interface card, with
For testing and the compatibility of external network interface card.
Further, automatic test script here is the automatic programming language based on python, and python is one
The explanation type computer programming language of kind of object-oriented, has a powerful and abundant library, and as shown in Fig. 2, here oneself
Dynamicization test script includes:
Test module 201 is used for the compatibility of automatic test router and terminal STA to be measured;
Terminal handover module 202 traverses all terminals to be measured, if it is not, switching survey terminal STA to be measured for judging whether;
Bandwidth handover module 203 traverses the adaptable all bandwidth of the wireless mode, if it is not, will for judging whether
The bandwidth is switched to the adaptable another bandwidth of the wireless mode;
Wireless mode handover module 204 traverses all wireless modes for judging whether, if it is not, the switching wireless mould
Adaptable bandwidth is arranged in formula, if so, preserving data.
It should be noted that the terminal STA to be measured switched here refers to that this test took turns to not yet in screened room 100
Any one terminal STA to be measured, that is to say, that there are ten terminal STAs to be measured of SAT1~STA10 for example in screened room 100,
Current STA2 is carrying out compatibility test, and compatibility test is completed in STA1, then after STA2 completes compatibility test, remains
Any one in remaining STA3~STA10 can be switched for the compatibility of itself and router of system detectio.
Similarly, another bandwidth also refers under current wireless mode that there are no used bandwidth, the wireless mode of switching to refer to
This test used wireless mode not yet, also, in general, wireless mode is there are two types of pattern, 2.4G is wireless and 5G is wireless, and
That connect at the beginning is 2.4G wireless, and the switching wireless mode in primary test refers to that be switched to 5G wireless.Wherein,
2.4G wirelessly under bandwidth include 20MHz bandwidth, 20/40MHz bandwidth and 40MHz bandwidth;5G wirelessly under bandwidth include 20MHz
Bandwidth, 40MHz bandwidth and 20/40/80MHz bandwidth.That is, under 2.4G patterns, control bandwidth is from 20MHz, 20/
The cycle of 40MHz, 40MHz;Under 5G patterns, control bandwidth is from 20MHz, the cycle of 40MHz, 20/40/80MHz.
Further, bandwidth handover module 203 includes analog module 2031 and post information scratchings module 2032, wherein
Analog module 2031, the post request commands for simulating modification bandwidth information, and bandwidth information include representing not
The corresponding reference numerals with bandwidth;
Post information scratchings module 2032, for extracting the post request commands of modification bandwidth information to switch bandwidth;
Further, terminal handover module 202 includes list block 2021 and table spider module 2022, wherein list
Module 2021 be used for preserve include all terminal STA titles to be measured and/or its IP address terminal STA list to be measured;Table
Spider module 2022 from terminal STA list to be measured for extracting terminal to be measured successively when needing to switch terminal STA to be measured
STA;
Similarly, automatic test script further includes testing time judgment module 205, for judging that complete compatibility is surveyed
Whether examination number reaches preset times, if it is not, then informing that system is all in all wireless modes to all terminal STAs to be measured
201 times compatibility tests carried out again of bandwidth test module, to realize automatic multiple compatibility test.
Further, the test module 201 includes wireless mode setup module 2011, has peculiar SSID for being arranged
The wireless mode of title is current wireless mode;
The wireless mode handover module 204 includes SSID name modified module 2041, for changing current wireless mode
SSID name be non-peculiar SSID name, while change to be switched wireless mode SSID name be it is described SSID peculiar
Claim, so that the to be switched wireless mode is switched to current wireless mode.Side directly by exchanging SSID name in other words
Formula changes the SSID name of each wireless mode, such as wireless mode has 2.4G wirelessly and 5G is wireless, and it is wireless that 2.4G is arranged at the beginning
Entitled peculiar SSID name A, the entitled non-peculiar SSID nouns B that 5G is wireless, then can be made by way of exchange
The title that 5G is wireless becomes A, and the title that 2.4G is wireless becomes B.
The present embodiment, which realizes, is disposably placed in all terminal STAs to be measured in the screened room 100 of test, carries out successively
Compatibility test is not necessarily to manpower intervention and goes to carry out the replacement of terminal, in the process without manual switching wireless mode and bandwidth.Such as
This, greatly improves testing efficiency, and the realization method automated so that test is repeated several times, and is conducive to most
The reliability and stability of whole test data.
Embodiment two
As shown in figure 3, present embodiment discloses a kind of automated testing methods based on system in embodiment one, including:
S1:The bandwidth that wireless mode and the wireless mode are adapted is set;
S2:Traversal tests the compatibility of all terminal STAs to be measured and router;
S3:Judge whether to traverse the adaptable all bandwidth of the wireless mode, if it is not, the bandwidth is switched to described
The adaptable another bandwidth of wireless mode, executes step S2;If so, executing step S4;
S4:Judge whether to traverse all wireless modes, if it is not, switching the wireless mode, adaptable bandwidth is set, is held
Row step S2~S3;If so, preserving test data.
Specifically, wireless mode here includes that 2.4G is wireless and 5G is wireless;And 2.4G wirelessly under bandwidth include 20MHz
Bandwidth, 20/40MHz bandwidth and 40MHz bandwidth;5G wirelessly under bandwidth include 20MHz bandwidth, 40MHz bandwidth and 20/40/
80MHz bandwidth.
Further, after step s4, further include:
Judge whether complete testing time reaches preset times, if it is not, executing step S0~S4;It can be real by this method
Test is now repeated several times, until testing time reaches number set by user, is improved by way of being repeated several times and testing automatically
Test accuracy rate.
Specifically, in step s3, the post request commands of modification bandwidth information are extracted to switch by a packet catcher
Bandwidth, and packet catcher here uses fiddler tools, and it is that a http protocol debugging acts on behalf of tool, is able to record
And check that the http between computer and internet is communicated, breakpoint is set, checks the data of all " disengaging " Fiddler.
In addition, here by writing the post request commands of bandwidth switching function simulation modification bandwidth information, and bandwidth is believed
Breath includes representing the corresponding reference numerals of different bandwidth.
Further, in step sl, wireless mode is set in the following manner:
One terminal to be measured is connected to current wireless mode, and next automatic connection is arranged to make the current wireless mode pair
The SSID name answered is as peculiar SSID name.
Need exist for test has that 2.4G is wireless and 5G is wireless, it is assumed that 2.4G is first tested, then 2.4G is wirelessly connected to
Terminal to be measured is so that 2.4G is wirelessly used as current wireless mode, and due to being set as next automatic connection, also, this is connected automatically
Identification object be SSID name, so wirelessly corresponding SSID name needs to cut 2.4G just by as peculiar SSID name
Change 5G it is wireless when, it is only necessary to the wireless titles of 5G are changed to the wireless SSID names of script 2.4G.
Specifically, in step s 4, switch wireless mode by the following method:
S41:Detect whether current wireless mode is the last one wireless mode, if it is not, thening follow the steps S42;
S42:The SSID name for changing current wireless mode is non-peculiar SSID name, while changing to be switched wireless mode
SSID name be the peculiar SSID name so that the to be switched wireless mode is switched to current wireless mode, execute
Step S2~S3.And the present embodiment by the name swap block voluntarily write exchange 2.4G wirelessly the name wireless with 5G with reality
Existing 2.4G wirelessly switches with automation wireless 5G.
Also, in step s 2, by successively from the terminal STA list to be measured for including all terminal STA titles to be measured
The mode of middle extraction terminal STA to be measured traverses terminal STA to be measured.
In order to make user be more clearly understood that this programme, automatic test explanation is carried out with reference to Fig. 4 and Fig. 5:
1st step:Initializaing variable assignment:For the flexible setting of automatized script 200, some regulated variables are converged
Always, such as CycleNum is for controlling test number of repetition;, name_test_index includes this time to need to test compatibility
All terminal STA titles to be measured terminal list to be measured;, the IP address of e1_ip main control computers PC;Deng.Automatized script 200
Main program operation when can call these variables;
2nd step:File and file initial treatment:Using Python the libraries xlsxwriter Workbook functions and
Add_worksheet and write functions do the foundation and write operation of Excel file;Python mainly has the read-write of Excel
Xlrd, xlwt, xlutils, openpyxl, xlsxwriter are several, used here as last one kind.
3rd step:I=0:Loop control variable, for controlling different bandwidth;
4th step:Flag=0:For marking 2.4G test phases or 5G wireless test stages, flag=0 to indicate 2.4G
Wireless test stage, flag=1 indicate the 5G wireless test stages;
5th step:BandwidthNum=BandwidthNum_2.4G:BandwidthNum indicates to need difference to be tested
The quantity of bandwidth, BandwidthNum_2.4G expressions need the quantity of different bandwidth under 2.4G wireless modes to be tested,
BandwidthNum initial assignments are the 2.4G wireless test stages at BandwidthNum_2.4G;
6th step:i<BandwidthNum:For Rule of judgment, the cycle of different bandwidth is controlled, from the point of view of Fig. 5, in 2.4G
Under pattern, control bandwidth is from 20MHz, the cycle of 20/40MHz, 40MHz;Under 5G patterns, control bandwidth from 20MHz, 40MHz,
The cycle of 20/40/80MHz.For the example of Fig. 5, BandwidthNum is 3, when Rule of judgment is ungratified, then
It needs to carry out other judgements, considers whether to need to switch 2.4G and 5G, and when condition meets, it is put into the 7th step;
7th step:Change bandwidth:The automation mechanized operation of change bandwidth is mainly the bandwidth switching function by writing
bandwidth_change;The post request commands of simulation modification bandwidth information, and bandwidth information includes representing different bandwidth pair
The reference numerals answered extract post request commands by fiddler, and bandwidth switching function here has 2 parameters, respectively
Bandwidth2G and bandwidth5G, bandwidth2G and bandwidth5G parameter respectively represent under 2.4G and 5G patterns
The reference numerals of corresponding different bandwidth.In general, under 2.4G patterns, the corresponding reference numerals bandwidth2G of 20MHz are 0.But
Different product would also vary from, and specific reference numerals are subject to the occurrence inside the post request commands that fiddler is grabbed.
When running (0,0) bandwidth_change, the bandwidth that 2.4G and 5G are adjusted to 20MHz is generally meant that;And when fortune
When (1,1) row bandwidth_change, generally means that and adjust separately 2.4G and 5G for 20/40MHz, the bandwidth of 40MHz.
So by adjustment parameter bandwidth2G and bandwidth5G, the automation change operation of different bandwidth may be implemented.This
Outside, post requests are simulated with Request the and urlopen functions in the libraries urllib2 in the writing of bandwidth switching function, is
Modification bandwidth parameter needs to send post twice and asks, is for the first time log on request, second of modification for bandwidth information etc.
Request.If log on request is attached to stok, subsidiary stok information is needed in second of request.
8th step:The sleep_time stand-by period:After changing bandwidth, there are one the processes reconnected for terminal, wait for one
The section time, it is ensured that be all connected with and reach expected negotiated speed;Ensure the accuracy of test data;
9th step:J=0:Initial assignment, j, which is represented, marks the control of different terminal STAs to be measured;
10th step:j<EndpointNum:Loop control condition is come for traversing all terminal STAs to be measured in conjunction with Fig. 5
It sees, exactly traverses each terminal to be measured of STA1~STA10;
11st step:Ixchariot TX, RX, TX+RX beat stream and storage data:By the api interface for calling Ixchariot
Stream operation is played to carry out automation, the control in Business Stream direction is realized by the control of test_type parameters;
12nd step:J=j+1:Cycle plus 1, it is ensured that cycle can exit, and different j corresponds to different terminals to be measured
STA;
13rd step:I=i+1:Cycle plus 1, it is ensured that cycle can exit, and different i corresponds to different bandwidth;
14th step:Flag==1:Judge whether flag at this time is 1, if it is 1, because of the wireless corresponding flag of 2.4G
It is 1, test starts by 2.4G wirelessly, flag is 1 and represents 2.4G and 5G and be completed at this time, can preserve data
And then terminate, if being not 1, illustrate the handover operation for needing to carry out 2.4G and 5G in next step, the presence of flag, it is ensured that program is not
Endless loop can be entered;
15th step:2.4G connect switching with 5G:The automation mechanized operation that 2.4G connect switching with 5G is depended on and is voluntarily compiled
SSID_change (SSID1, the SSID2) function write is realized.Two parameters SSID1 and SSID2 of the function are indicated respectively
The SSID name of 2.4G and 5G.
Such as the SSID name that 2.4G is wireless at the beginning and 5G is wireless is respectively A and B, and will be waited for before test execution
It surveys terminal STA to carry out 2.4G wireless connections manually and next automatic connection is arranged, that is to say, that A is peculiar SSID here
Claim, then when needing to allow premises automation connection 5G SSID to be tested, it is only necessary to execute SSID_change ('
A', ' B') function, at this time SSID name wireless 5G and 2.4G before are wirelessly identical, due to being provided with automatic connection, there is note
Recall function, terminal will connect that 5G is wireless automatically, so just realize the automation switching of 2.4G and 5G.
16th step:BandwidthNum=BandwidthNum_5G:BandwidthNum indicates to need different band to be tested
Wide quantity, BandwidthNum_5G indicate to need the quantity of different bandwidth under 5G patterns to be tested, BandwidthNum changes
Assignment is the 5G wireless test stages, can so enter new test phase at BandwidthNum_5G;
17th step:Flag=1:Flag is labeled as 1, it is ensured that after the completion of testing in the 5G stages, can pass through in the 14th step
Judge to terminate program;
18th step:I=0:I is assigned a value of 0 again, it is ensured that terminating, 2.4G is wireless, when starting 5G wireless tests, is restored to most
Original state, it is ensured that the 6th step can be normally carried out;
19th step:Data are preserved, the files such as the Excel of data will be recorded using functions such as close () and carry out closing preservation
Operation, and be stored under scheduled catalogue, facilitate query result.
20th step, the 21st step, the 22nd step:For controlling systemic circulation, i.e., the number of above 2-19 step cycles.Due to certainly
The convenience of dynamicization, multiplicating test can be arranged in we, and CycleNum is exactly such effect herein, works as CycleNum
When being arranged to 2, so that it may twice with retest, at this point, it should be noted that in order to distinguish not homogeneous test result, it can
To have carried out time calibrating using the libraries time strftime functions in Python, for distinguishing.
The present embodiment can realize the compatibility test testing throughput of all terminal STAs to be measured by once automating,
During automating realization, emphasis solves the problems, such as both sides:First, how to realize what the 2.4G of terminal was connect with 5G
Automation switching;Second, how to realize the automation switching of bandwidth.
Here first problem is realized by using the mode of the SSID name of automation alternating change 2.4G and 5G and is waited for
Survey the automation switching that the 2.4G and 5G of terminal STA are connect;Second Problem, the post that the information such as bandwidth are changed by extraction are asked
The automation switching of realistic existing bandwidth.
The present invention is based on python and fiddler, by the extractions of the post request commands to routing DUT to be measured with it is automatic
Change simulation, realizes the automatic test of routing DUT devices and terminal STA to be measured compatibility to be measured.It is treated by automatization simulation
The post request commands for surveying routing DUT devices realize the automation switching of 2.4G and 5G, the automation switching of bandwidth, Jin Ershi
The full-automatic compatibility test of terminal is showed.This mode has broken away from the manual test of original clumsiness, greatly improves survey
Efficiency is tried, and so that test, which is repeated several times, to be become possible to.
Also, the present invention has larger improvement other than realizing automation in terms of test method and flow:
First, it is that test is completed to carry out the test of next terminal after a terminal again, often in original manual test flow
The test of a terminal will carry out the switching of 2.4G and 5G and the switching of bandwidth.It is this when having multiple terminals
The number of operations of switching will be at double be incremented by, cause the increase of waste of time and operation error.And as seen from Figure 5,
In the automation scheme of the present invention, how many a terminals no matter are tested, all only need switching and the band of 2.4G and 5G of progress
Wide switching will not be incremented by because of the increase of terminal into multiple;
Second, at automatic test development and exploration initial stage, also a kind of thinking can carry out the switching of 2.4G and 5G, and
The automation mechanized operation of the switching of bandwidth.This thinking is to realize the automation of information more using the element localization method of webpage
Change.But the method for element positioning is for the method for the present invention, the problems such as there are inefficiency, main reason is that:
One side element is located in less efficient when the page is searched for into row element, to find the element of needs, be often required to first pass through many
On the other hand it is process-type that the judgement of useless element is element localization method, each step will expend many times, example
Browser is such as logged in, and the method for the present invention is result type, and unified send of the information result for finally needing to change is asked
, reaction is at the right time.Further, since the process-type between two methods and difference the characteristics of result type, in transplanting code
When to other products, the method for the present invention transplanting is more efficient.
Specific embodiment described herein is only to be given an example to the present invention.The technical field of the invention
Technical staff can make various modifications or additions to the described embodiments or substitute by a similar method, but
Without departing from the spirit of the invention or going beyond the scope defined by the appended claims.
In addition, although main control computer PC is used more herein;Routing DUT to be measured;Terminal STA to be measured;Screened room
100;Automatized script 200;Test module 201;Wireless mode setup module 2011;Terminal handover module 202;List block
2021;Table spider module 2022;Bandwidth handover module 203;Analog module 2031;Post information scratchings module 2032;Wirelessly
Mode switch module 204;SSID name modified module 2041;The terms such as testing time judgment module 205, but use is not precluded
The possibility of other terms.The use of these items is only for more easily describe and explain the essence of the present invention to solve them
Any one of the additional limitations is interpreted into all to disagree with spirit of that invention.