CN102315990A - Automated testing method - Google Patents

Automated testing method Download PDF

Info

Publication number
CN102315990A
CN102315990A CN201110299752A CN201110299752A CN102315990A CN 102315990 A CN102315990 A CN 102315990A CN 201110299752 A CN201110299752 A CN 201110299752A CN 201110299752 A CN201110299752 A CN 201110299752A CN 102315990 A CN102315990 A CN 102315990A
Authority
CN
China
Prior art keywords
information
physical
link
area network
wide area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201110299752A
Other languages
Chinese (zh)
Other versions
CN102315990B (en
Inventor
郭静
杨中立
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN2011102997529A priority Critical patent/CN102315990B/en
Publication of CN102315990A publication Critical patent/CN102315990A/en
Application granted granted Critical
Publication of CN102315990B publication Critical patent/CN102315990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an automated testing method, which comprises the steps of: obtaining and storing test task information in test task files, wherein the test task information comprises wide area network link types used for marking links connected by different wide area network interface cards; obtaining and storing physical link information in physical equipment connection files, wherein the physical link information comprises the wide area network link types; obtaining and storing logical topology information in logical topology files, wherein the logical topology information comprises the wide area network link types; carrying out equipment allocation according to the stored test task information, physical link information and logical topology information; and constructing physical topology and executing the testing when the allocation is succeeded. Through the method, the automated test of wide area network links can be realized.

Description

A kind of automated testing method
Technical field
The present invention relates to the automatization testing technique field, particularly a kind of automated testing method.
Background technology
Flourish along with automatization testing technique, it is ripe that the structure of automated test frame has been tending towards, but aspect content measurement, also mainly be based on the test of ethernet link at present; For but blank out of the test of wide area network link; And in network application, wide area network is constructed the requisite part of backbone network often, adds that relevant wan protocol is more; Adopt manual the test fully, a large amount of duplication of labour meetings causes testing efficiency very low.
Therefore, existing automated test frame is perfect not enough, can not realize the test based on the wide area network link.
Summary of the invention
In view of this, the present invention provides a kind of automated testing method, can realize the automatic test of wide area network link.
For solving the problems of the technologies described above, technical scheme of the present invention is achieved in that
A kind of automated testing method; Said method comprises: obtain and preserve the test assignment information in the test assignment file, wherein, said test assignment information comprises the wide area network Linktype; Wherein, said wide area network Linktype is used to identify the link that uses different Wide Area Network interface card connection;
Obtain and preserve the physical link information in the physical equipment threaded file, wherein, comprise the wide area network Linktype in the said physical link information;
Obtain and preserve the logic topology information in the logical topology file, wherein, comprise the wide area network Linktype in the said logic topology information;
Carry out devices allocation according to said preservation test assignment information, physical link information and logic topology information; If distribute successfully, the structural physical topology is carried out test.
In sum; The present invention is through obtaining and preserve the wide area network Linktype in test assignment file, physical link threaded file and the logical topology file; And carry out devices allocation according to the test assignment information that comprises the wide area network Linktype, physical link information and logic topology information, structural physical topology and carry out test when distributing successfully.Can realize the automatic test of wide area network link through this method.
Description of drawings
Fig. 1 is an automatic test flow chart in the embodiment of the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, scheme according to the invention is done to specify further.
Referring to Fig. 1, Fig. 1 is an automatic test flow chart in the embodiment of the invention.Concrete steps are following:
The test assignment information in the test assignment file is obtained and preserved to step 101, test macro, and wherein, test assignment information comprises the wide area network Linktype, and the wide area network Linktype is used to identify the link that uses different Wide Area Network interface card connection.
Test macro is resolved the test assignment file in this step, and obtains the test assignment information of preserving in the test assignment file, and this test assignment information comprises the relevant controlled attribute of this time test, need in those wide area networks, test like this test assignment etc.
The physical link information in the physical equipment threaded file is obtained and preserved to step 102, test macro, wherein, comprises the wide area network Linktype in the physical link information.
In this step physics two-way information comprise physical equipment attribute commonly used such as log-on message and with the link information of other physical equipment, and wide area network Linktype etc.
The logic topology information in the logical topology file is obtained and preserved to step 103, test macro, wherein, comprises the wide area network Linktype in the said logic topology information.
The logic topology information that obtains in this step comprises type, quantity and the interface type etc. of logical device in the logical topology.Wherein, the logical device type refers to that equipment under test is main measurement equipment or auxilliary measurement equipment.
Test assignment file, physical equipment threaded file and logical topology file that step 101 is resolved in the step 103 all are in order to test, and be pre-prepd, in the needs test, submits to.
The wide area network link that will test in advance connects; And the link information of this wide area network stored in the physical equipment threaded file; Wherein, the link-attached method of the wide area network that will test is: equipment under test is directly connected through Wide Area Network interface, rather than through topological switching device.
In the logical topology file, preserve logic topology information in advance.If the wide area network link is arranged in the logical topology, need to specify the wide area network Linktype, if having multiple wide area network Linktype, can specify multiplely simultaneously, concrete realization can be to separate different wide area network Linktypes through separator.
In the test assignment file, preserve test assignment information, specify this less important test contents.If need test, can specify multiple wide area network Linktype simultaneously at the wide area network link.If in physical equipment threaded file and test assignment file, preserve multiple wide area network Linktype, can adopt with method same in the logical topology file, repeat no more.
The agreement that the wide area network Linktype only to need to realize a logical topology file just can test need under multiple wide area network link, test, such as peer-peer protocol (Point to Point Protocol, PPP), frame relay protocol or the like.
Step 104, test macro carries out devices allocation according to said preservation test assignment information, physical link information and logic topology information.
Before this step is carried out; Further comprise: in the test assignment information of confirm preserving, in the logic topology information; And whether the wide area network Linktype in the physical link information exist identical wide area network Linktype, if then carry out and carry out devices allocation and subsequent step; Otherwise, carry out once more and obtain and preserve test assignment infologic topology information, physical connection information and the subsequent step in the test assignment file.
If there is identical wide area network Linktype, explain and occur simultaneously not for empty, prove that the wide area network link that has the type in the environment supplies test; If occur simultaneously for empty, then prove the wide area network link that does not have the type in the facility environment, test again after waiting for the wide area network link that the type can be provided in the environment.
This physical link information comprises that also the resource of the physical equipment in the physical link has situation; The resource requirement situation that also comprises logical device in the logical topology in this logic topology information.
The method of carrying out devices allocation according to test assignment information, physical link information and the logic topology information preserved is:
Be respectively each logical device and distribute physical equipment,, then distribute successfully if the resource owning amount of the physical equipment that distributes for said logical device satisfies the resources requirement of said logical device.
All logical device are sorted by resources requirement from big to small, all physical equipments are sorted by the resource owning amount from small to large; Be respectively logical device resources requirement order assignment physical equipment from big to small; When each logical device is distributed physical equipment, from the ascending traversal of physical equipment resource owning amount.
Here the resource of mentioning comprises: interface quantity, interface type quantity and interface type.The resources requirement that the resource owning amount of the physical equipment that distributes for logical device satisfies this logical device comprises: physical equipment can satisfy interface quantity, interface type quantity and the interface type of logical device demand; And the opposite end physical equipment of physical equipment can satisfy interface quantity, interface type quantity and the interface type of the opposite end logical device demand of said logical device.
As long as above-mentioned condition has one not satisfy; Then abandon this physical equipment, select next physical equipment, and judge whether the resource owning amount of the current physical equipment of searching satisfies the resources requirement of this logical device; By that analogy, up to finding the physical equipment that can satisfy this logical device.Do not find all that the resource owning amount can satisfy if travel through all physical equipments, then distribute failure, wait for after environment can provide resourceful physical equipment and testing again.
Step 105, if distribute successfully, test macro structural physical topology is carried out test.
In this step; If after the devices allocation success; Then can carry out the physical equipment topology and be provided with, need not do any change for the wide area network link when being provided with, because Wide Area Network interface is directly to link to each other and need not pass through topological switching device according to logical topology and physical equipment.
Dissimilar Wide Area Network interface is carried out different initial configuration; There is not interface at first such as some wan interface cards; Whether need could produce interface behind manual creation branch road or the time slot, can be this part configuration of initialization according to this Wide Area Network interface type decided under the default situations in this time so.Initial configuration can also be according to the needs of selftest, control whether initialization through whether initial configuration attribute in the logical topology is set.
If also comprise whether init attributes of link in the logic topology information, when the link that obtains when init attributes is link initialization, after the structural physical topology, to carry out before the test, this method further comprises: the said wide area network link of initialization.Initialization wide area network link comprises: create interface and configuration interface IP address.
Because just there is not concrete interface in some wan interface cards itself, could produces interface after needing to create branch road or configuration time slot, so then this init attributes can be set so that can normally carry out when testing for interface card.And if ethernet link only needs a configuration interface IP address to get final product when needing initialization.
The present invention not only can test the wide area network link, can also test Ethernet simultaneously.If when wide area network is tested, in the time of need testing Ethernet, in the test assignment file, increase the ethernet link type.When resolving test assignment file, physical equipment threaded file and logical topology file; The survey of obtaining is established and is comprised the ethernet link type in the mission bit stream; Also comprise the ethernet link type in the physical link information of obtaining, also comprise the ethernet link type in the logic topology information that obtains.In the existing ethernet link test that realizes, if Linktype is empty, be defaulted as the ethernet link test, owing to increased the wide area network Linktype now,, then need increase the ethernet link type if need carry out wide area network and ethernet test simultaneously.
Lift specific embodiment below, the process of distributing physical equipment for logical device in the detailed description specific embodiment of the invention.
From the physical equipment threaded file, obtain the physical equipment that supplies distribution, and these physical equipments are pressed the sequence arrangement of the owning amount of resource from little arrival, adopt same rule that all logical device in the logical topology are pressed from big to small and arrange.Wherein, resource is meant equipment interface quantity, interface type and interface type quantity, and the expression resource owning amount that interface quantity is many, type is abundant is big.
Travel through each logical device from big to small from owning amount, be prepared as it and distribute physical equipment, from sorted physical equipment, travel through from front to back simultaneously according to resource; Take out a physical equipment, judge whether he distributes, if do not have; Judge whether the interface quantity of this equipment satisfies the requirement of logical device docking port quantity so earlier,, then directly travel through next physical equipment if do not satisfy; If satisfy, judge that more whether interface type quantity satisfies, and needs 2 such as the logical device Ethernet interface; Wide Area Network interface needs 1, and whether the Ethernet interface quantity that need judge this physical equipment so is more than or equal to 2, and whether Wide Area Network interface is more than or equal to 1; If do not satisfy, the comparison of jumping out this physical equipment directly travels through next physical equipment, if satisfy; Judge again whether he satisfies by interface type, and determination methods is taken out an interface type at first traveling through each interface type of logical device; Travel through each interface type of physical equipment again, see whether compare success, if this logic interfacing type is the Ethernet interface type and has found; Just directly think and mate successfully, if the Wide Area Network interface type, need be with the Linktype collection of the type and test assignment file; All Wide Area Network interface types of this physical equipment that defines in the physical equipment threaded file are got common factor, if be empty, the comparison of jumping out this physical equipment directly travels through next physical equipment; If be not empty, need check also whether the opposite end logical device of this logical device also meets demand, judge that content is interface quantity and interface type; Determination methods is at first taken out the opposite end logical device from logical device, and from the physical equipment file, takes out the opposite end physical equipment of the physical equipment of distributing to logical device, and whether docking port quantity checks consistent with interface type then; Determination methods is consistent with above interface quantity and interface type determination methods, the different just opposite ends of the inspection opposite end of not recirculation.
Respectively each logical device is distributed physical equipment by above method, as long as there is one to distribute failure then to need read test assignment file again, logical topology file, physical equipment threaded file carry out devices allocation once more.
Above-mentioned method; The Wide Area Network interface set of types got also need describe attribute behind the common factor and compare connection optional in the test assignment file; Comparison method is the connection of this equipment in the physical equipment file to be described being connected in attribute and the test assignment file describe attribute and compare; If comparison gets nowhere then thinks that this physical equipment does not meet, continue the next physical equipment of traversal.
In sum, automated testing method provided by the invention can be tested the wide area network link when supporting the ethernet link test; Increased the automatic test coverage rate greatly; Reduce manual a large amount of duplications of labour in the Wide Area Network interface test, practiced thrift great deal of labor, when the test of wide area network link, adopted the maximum physical equipment of resource to distribute at last simultaneously; The principle that the maximum logical device of resources requirement is distributed at first; Improve the utilance of resource to a great extent, under the situation of resource scarcity, can let more test assignment carry out especially, dwindled total test period.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. an automated testing method is characterized in that, said method comprises:
Obtain and preserve the test assignment information in the test assignment file, wherein, said test assignment information comprises the wide area network Linktype, and said wide area network Linktype is used to identify the link that uses different Wide Area Network interface card connection;
Obtain and preserve the physical link information in the physical equipment threaded file, wherein, comprise the wide area network Linktype in the said physical link information;
Obtain and preserve the logic topology information in the logical topology file, wherein, comprise the wide area network Linktype in the said logic topology information;
Test assignment information, physical link information and logic topology information according to said preservation carry out devices allocation; If distribute successfully, the structural physical topology is carried out test.
2. method according to claim 1 is characterized in that, said method further comprises:
The wide area network link that will test in advance connects, and equipment under test is directly connected through Wide Area Network interface.
3. method according to claim 2 is characterized in that,
Also comprise whether init attributes of link in the said logic topology information;
When the said link that obtains when init attributes is link initialization, after the said structural physical topology, before the said execution test, said method further comprises: the said wide area network link of initialization.
4. method according to claim 3 is characterized in that,
The said wide area network link of said initialization comprises: create interface and configuration interface IP address.
5. according to any described method of claim 1-4, it is characterized in that saidly carry out before the devices allocation according to said preservation test assignment information, physical link information and logic topology information, said method further comprises:
In the said test assignment information of confirm preserving, in the said logic topology information, and whether the wide area network Linktype in the said physical link information exist identical wide area network Linktype, if then carry out and carry out devices allocation and subsequent step; Otherwise, carry out once more and obtain and preserve test assignment information, logic topology information and physical connection information and the subsequent step in the test assignment file.
6. according to any described method of claim 5, it is characterized in that,
Comprise also in the said physical link information that link connects the description attribute;
Comprise also in the said test assignment information that link connects the description attribute;
In the test assignment information of said preservation, in the said logic topology information, and the wide area network Linktype in the said physical link information is when existing identical wide area network Linktype, said method further comprises:
Confirm whether said identical wide area network Linktype link corresponding in test assignment information connects the description attribute consistent with the connection of link corresponding in said physical link information description attribute, if carry out and carry out devices allocation and subsequent step; Otherwise, carry out once more and obtain and preserve test assignment information and the subsequent step in the test assignment file.
7. according to any described method of claim 1-4, it is characterized in that,
Said physical link information comprises that also the resource of the physical equipment in the physical link has situation;
The resource requirement situation that also comprises logical device in the logical topology in the said logic topology information;
Said method of carrying out devices allocation according to said preservation test assignment information, physical link information and logic topology information is:
Be respectively each logical device and distribute physical equipment,, then distribute successfully if the resource owning amount of the physical equipment that distributes for said logical device satisfies the resources requirement of said logical device.
8. method according to claim 7 is characterized in that, said each logical device that is respectively is distributed before the physical equipment, and said method further comprises:
All logical device are sorted by resources requirement from big to small, all physical equipments are sorted by the resource owning amount from small to large;
Said each logical device that is respectively distributes the method for physical equipment to be:
Be respectively logical device resources requirement order assignment physical equipment from big to small; When each logical device is distributed physical equipment, from the ascending traversal of physical equipment resource owning amount.
9. method according to claim 7 is characterized in that, said resource comprises: interface quantity, interface type quantity and interface type;
The resources requirement that the resource owning amount of the said physical equipment that distributes for said logical device satisfies said logical device comprises:
Said physical equipment can satisfy interface quantity, interface type quantity and the interface type of said logical device demand;
The opposite end physical equipment of said physical equipment can satisfy interface quantity, interface type quantity and the interface type of the opposite end logical device demand of said logical device.
10. according to any described method of claim 2-4, it is characterized in that,, also comprise the ethernet link type in the said test assignment information if need carry out the test of ethernet link the time;
Also comprise the ethernet link type in the said physical link information;
Also comprise the ethernet link type in the said logic topology information.
CN2011102997529A 2011-09-28 2011-09-28 Automated testing method Active CN102315990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102997529A CN102315990B (en) 2011-09-28 2011-09-28 Automated testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102997529A CN102315990B (en) 2011-09-28 2011-09-28 Automated testing method

Publications (2)

Publication Number Publication Date
CN102315990A true CN102315990A (en) 2012-01-11
CN102315990B CN102315990B (en) 2013-11-27

Family

ID=45428827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102997529A Active CN102315990B (en) 2011-09-28 2011-09-28 Automated testing method

Country Status (1)

Country Link
CN (1) CN102315990B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535725A (en) * 2019-08-28 2019-12-03 网宿科技股份有限公司 A kind of enterprise network test method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6069873A (en) * 1997-10-01 2000-05-30 U S West, Inc. Closed-loop automated testing of system equipment and management
CN1731747A (en) * 2005-07-29 2006-02-08 杭州华为三康技术有限公司 Automatization testing frame system and method
CN101937394A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Method and device for adaption of topology
CN101986282A (en) * 2010-11-08 2011-03-16 中兴通讯股份有限公司 Topological adaptation method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6069873A (en) * 1997-10-01 2000-05-30 U S West, Inc. Closed-loop automated testing of system equipment and management
CN1731747A (en) * 2005-07-29 2006-02-08 杭州华为三康技术有限公司 Automatization testing frame system and method
CN101937394A (en) * 2010-09-14 2011-01-05 中兴通讯股份有限公司 Method and device for adaption of topology
CN101986282A (en) * 2010-11-08 2011-03-16 中兴通讯股份有限公司 Topological adaptation method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535725A (en) * 2019-08-28 2019-12-03 网宿科技股份有限公司 A kind of enterprise network test method and device

Also Published As

Publication number Publication date
CN102315990B (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103812949B (en) A kind of task scheduling towards real-time cloud platform and resource allocation methods and system
CN106301829A (en) A kind of method and apparatus of Network dilatation
CN103338150A (en) Method and device for establishing information communication network system structure, as well as server and router
CN102984757A (en) Gateway data processing method and gateway data processing device for Internet of Things
CN105791402B (en) A kind of cloud computing platform network virtualization implementation method and corresponding plug-in unit and agency
CN102780779A (en) Gateway equipment and method and device for optimization of campus network export P2P (peer-to-peer) traffic
CN101741705A (en) Method and device for parallel processing of routing update messages
CN106143532A (en) Method that Train Dynamic heavily joins and node
CN104615765A (en) Data processing method and data processing device for browsing internet records of mobile subscribers
CN101909010B (en) Port configuration method and device as well as switcher equipment
CN105872053A (en) Data migration method and system
CN102665231A (en) Method of automatically generating parameter configuration file for LTE (Long Term Evolution) system
CN103475537A (en) Method and device for message feature extraction
CN105227683A (en) A kind of LDAP company-data synchronous method and system
CN106453576A (en) Interactive method, interactive system and dispatching centre based on hybrid cloud platform
CN102420797B (en) Topology mapping method and system
CN106254379A (en) The processing system of network security policy and processing method
CN105099774B (en) A kind of router software upgrade method and system
CN106101412A (en) The information session processing method of mobile communication terminal and mobile communication terminal
CN104050038B (en) A kind of virtual machine migration method based on policy-aware
CN102315990B (en) Automated testing method
CN104869011A (en) Circuit dispatching method and circuit dispatching device
CN106354870A (en) Data loading method and system
CN104714875A (en) Distributed automatic collecting method
CN105812280A (en) Classification method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 Sichuan city of Chengdu province high tech Zone nine Hing Road No. 16 building, Maipu

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder