CN106301993A - A kind of method and apparatus of test router - Google Patents

A kind of method and apparatus of test router Download PDF

Info

Publication number
CN106301993A
CN106301993A CN201510325678.1A CN201510325678A CN106301993A CN 106301993 A CN106301993 A CN 106301993A CN 201510325678 A CN201510325678 A CN 201510325678A CN 106301993 A CN106301993 A CN 106301993A
Authority
CN
China
Prior art keywords
router
test case
test
result
netconf message
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.)
Withdrawn
Application number
CN201510325678.1A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510325678.1A priority Critical patent/CN106301993A/en
Priority to PCT/CN2016/071612 priority patent/WO2016197616A1/en
Publication of CN106301993A publication Critical patent/CN106301993A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The method and apparatus that the invention discloses a kind of test router, including: generate test case;The test case of generation is converted to network configuration NETCONF message;NETCONF message is sent to router, receives the returned packet from router;Execution order on the router in test case is sent to router, receives the execution result from router;Intended test result in test case is compared with the test result in returned packet and the execution result that receives and shows comparative result respectively.By the solution of the present invention, automatically router is tested, improve testing efficiency.

Description

A kind of method and apparatus of test router
Technical field
The present invention relates to network configuration (NETCONF, Network Configuration) technology, espespecially A kind of method and apparatus of test router.
Background technology
During the maintenance of test router, each node in router the most normally works and needs Want tester to carry out manual testing according to substantial amounts of test case, then test result is evaluated.By The most in the test object of each node, the test case that each test object relates to is the most different, The test case of some test object is the most, and each test case includes again multiple achievement data. And test case needs to follow specific test specification and configuration requirement, the work of test node the most every time The situation of work will carry out same operation, the duplication of labour, test process needs manual write down out of order Node.Therefore, this way workload is big, and testing efficiency is low.
Summary of the invention
In order to solve the problems referred to above, the present invention proposes the method and apparatus of a kind of test router, it is possible to Improve testing efficiency.
In order to achieve the above object, the present invention proposes a kind of method of test router, including:
Generate test case;
The test case of generation is converted to network configuration NETCONF message;
NETCONF message is sent to router, receives the returned packet from router;
Execution order on the router in test case is sent to router, receives from route The execution result of device;
By the intended test result in test case respectively with the test result in returned packet and reception To execution result compare and show comparative result.
Preferably, described generation test case includes:
Calling the test case template that described router is corresponding, in described test case template, write is described Execution order on the router, intended test result that each test node of router is corresponding are surveyed Example on probation.
Preferably, described the test case of generation be converted to NETCONF message include:
Obtain the module belonging to described test case according to described test case, generate according to the module obtained The content comprised in first node in described NETCONF message, respectively by described test case Other nodes are as a tag entry of expandable mark language XML in described NETCONF message.
The invention allows for the device of a kind of test router, at least include:
Generation module, is used for generating test case;
Modular converter, for being converted to network configuration NETCONF message by the test case of generation;
Sending module, for being sent to router by NETCONF message;By test case Zhong road It is sent to router by the execution order on device;
Receiver module, for receiving the returned packet from router;Receive holding from router Row result;
Comparison module, for by the intended test result in test case respectively with the survey in returned packet Test result and the execution result received compare and show comparative result.
Preferably, described generation module specifically for:
Calling the test case template that described router is corresponding, in described test case template, write is described Execution order on the router, intended test result that each test node of router is corresponding are surveyed Example on probation.
Preferably, described modular converter specifically for:
Obtain the module belonging to described test case according to described test case, generate according to the module obtained The content comprised in first node in described NETCONF message, respectively by described test case Other nodes are as a tag entry of expandable mark language XML in described NETCONF message.
Compared with prior art, the present invention includes: generate test case;The test case conversion that will generate For NETCONF message;NETCONF message is sent to router, receives from router Returned packet;Execution order on the router in test case is sent to router, receives and arrive From the execution result of router;By the intended test result in test case respectively with in returned packet Test result and the execution result received compare and show comparative result.By the side of the present invention Case, tests router automatically, improves testing efficiency.
Accompanying drawing explanation
Illustrating the accompanying drawing in the embodiment of the present invention below, the accompanying drawing in embodiment is for this Bright is further appreciated by, and is used for explaining the present invention, is not intended that and the present invention is protected model together with description The restriction enclosed.
Fig. 1 is the flow chart of the method for test router of the present invention;
Fig. 2 is the structure composition schematic diagram of the device of test router of the present invention.
Detailed description of the invention
For the ease of the understanding of those skilled in the art, below in conjunction with the accompanying drawings the present invention is further retouched State, can not be used for limiting the scope of the invention.It should be noted that in the case of not conflicting, Embodiment in the application and the various modes in embodiment can be mutually combined.
Seeing Fig. 1, the present invention proposes a kind of method of test router, including:
Step 100, generation test case.Specifically include:
Call the test case template that router is corresponding, test case template writes each survey of router Execution order on the router, intended test result that examination node is corresponding obtain test case.
Wherein, test case template can be Excel form, includes the survey of router in Excel form Examination node.It can be the mode of "/module name: node name ".Such as, / bfd:configuration/bfd:bfd/bfd:interface-paras/bfd:interf ace-para/bfd:if-name represents Under the interface-paras node under the bfd node under Configuration node under bfd module If-name node under interface-para node.
Excel form can comprise one or more test nodes.
Wherein it is possible to call test case template from the path at test case template place.
Step 101, the test case of generation is converted to NETCONF message.Specifically include:
Obtain the module belonging to test case according to test case, generate according to the module obtained The content comprised in first node in NETCONF message, respectively by other nodes in test case As extensible markup language in NETCONF message (XML, Extensible Markup Language) A tag entry.
Such as, in above-mentioned example, module belonging to test case is bfd.
The NETCONF message generated is:
Wherein, the first row, the second row represent the content that comprises in first node in NETCONF message Starting, the tenth row represents the end of the content comprised in first node in NETCONF message, the 3rd Row represents the beginning of the tag entry that bfd node is corresponding, and the 9th row represents the tag entry that bfd node is corresponding Terminating, fourth line represents that the beginning of the tag entry that Interface-paras node is corresponding, the 8th row represent The end of the tag entry that Interface-paras node is corresponding, fifth line represents that interface-para node is corresponding The beginning of tag entry, the 7th row represents the end of the tag entry that interface-para node is corresponding, the 6th The tag entry that behavior if-name node is corresponding.
Step 102, NETCONF message is sent to router, receives the return from router Message.
In this step, by calling NETCONF4J tool kit, NETCONF message can be sent to Router, implements the known technology belonging to those skilled in the art, is not intended to limit the present invention Protection domain, repeats no more here.
In this step, returned packet includes the value of each test node.
Step 103, the execution order on the router in test case is sent to router, receives To the execution result from router.
In this step, the most how to be sent to route by the execution order on the router in test case Device, receives the execution result from router and belongs to the known technology of those skilled in the art, and need not In limiting protection scope of the present invention, repeat no more here.
Step 104, by the intended test result in test case respectively with in returned packet test tie Fruit and the execution result received compare and show comparative result.
In this step, comparative result, such as diagrammatic form can be shown in a variety of forms.
By the solution of the present invention, automatically router is tested, improve testing efficiency.
See Fig. 2, the invention allows for the device of a kind of test router, at least include:
Generation module, is used for generating test case;
Modular converter, for being converted to network configuration NETCONF message by the test case of generation;
Sending module, for being sent to router by NETCONF message;By test case Zhong road It is sent to router by the execution order on device;
Receiver module, for receiving the returned packet from router;Receive holding from router Row result;
Comparison module, for by the intended test result in test case respectively with the survey in returned packet Test result and the execution result received compare and show comparative result.
In assembly of the invention, generation module specifically for:
Call the test case template that router is corresponding, test case template writes each survey of router Execution order on the router, intended test result that examination node is corresponding obtain test case.
In assembly of the invention, modular converter specifically for:
Obtain the module belonging to test case according to test case, generate according to the module obtained The content comprised in first node in NETCONF message, respectively by other nodes in test case As a tag entry of expandable mark language XML in NETCONF message.
Understand it should be noted that embodiment described above is for only for ease of those skilled in the art , it is not limited to protection scope of the present invention, in the premise of the inventive concept without departing from the present invention Under, any obvious replacement that the present invention is made by those skilled in the art and improvement etc. are all at this Within the protection domain of invention.

Claims (6)

1. the method for a test router, it is characterised in that including:
Generate test case;
The test case of generation is converted to network configuration NETCONF message;
NETCONF message is sent to router, receives the returned packet from router;
Execution order on the router in test case is sent to router, receives from route The execution result of device;
By the intended test result in test case respectively with the test result in returned packet and reception To execution result compare and show comparative result.
Method the most according to claim 1, it is characterised in that described generation test case includes:
Calling the test case template that described router is corresponding, in described test case template, write is described Execution order on the router, intended test result that each test node of router is corresponding are surveyed Example on probation.
Method the most according to claim 1 and 2, it is characterised in that the described test use that will generate Example is converted to NETCONF message and includes:
Obtain the module belonging to described test case according to described test case, generate according to the module obtained The content comprised in first node in described NETCONF message, respectively by described test case Other nodes are as a tag entry of expandable mark language XML in described NETCONF message.
4. the device of a test router, it is characterised in that at least include:
Generation module, is used for generating test case;
Modular converter, for being converted to network configuration NETCONF message by the test case of generation;
Sending module, for being sent to router by NETCONF message;By test case Zhong road It is sent to router by the execution order on device;
Receiver module, for receiving the returned packet from router;Receive holding from router Row result;
Comparison module, for by the intended test result in test case respectively with the survey in returned packet Test result and the execution result received compare and show comparative result.
Device the most according to claim 4, it is characterised in that described generation module specifically for:
Calling the test case template that described router is corresponding, in described test case template, write is described Execution order on the router, intended test result that each test node of router is corresponding are surveyed Example on probation.
6. according to the device described in claim 4 or 5, it is characterised in that described modular converter is specifically used In:
Obtain the module belonging to described test case according to described test case, generate according to the module obtained The content comprised in first node in described NETCONF message, respectively by described test case Other nodes are as a tag entry of expandable mark language XML in described NETCONF message.
CN201510325678.1A 2015-06-12 2015-06-12 A kind of method and apparatus of test router Withdrawn CN106301993A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510325678.1A CN106301993A (en) 2015-06-12 2015-06-12 A kind of method and apparatus of test router
PCT/CN2016/071612 WO2016197616A1 (en) 2015-06-12 2016-01-21 Method and apparatus for testing router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510325678.1A CN106301993A (en) 2015-06-12 2015-06-12 A kind of method and apparatus of test router

Publications (1)

Publication Number Publication Date
CN106301993A true CN106301993A (en) 2017-01-04

Family

ID=57503072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510325678.1A Withdrawn CN106301993A (en) 2015-06-12 2015-06-12 A kind of method and apparatus of test router

Country Status (2)

Country Link
CN (1) CN106301993A (en)
WO (1) WO2016197616A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819648A (en) * 2017-11-14 2018-03-20 新华三技术有限公司 Network configuration NETCONF connecting detection method and apparatus
CN108092843A (en) * 2017-03-24 2018-05-29 深圳市必联电子有限公司 A kind of router universal testing method
CN112817859A (en) * 2021-02-04 2021-05-18 深圳市吉祥腾达科技有限公司 Automatic testing method and system for intelligent connection platform

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768764A (en) * 2018-05-08 2018-11-06 四川斐讯信息技术有限公司 A kind of router test method and device
CN112867047B (en) * 2021-04-13 2022-11-08 四川九州电子科技股份有限公司 WiFi6 router performance test system and test method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056225A (en) * 2007-05-31 2007-10-17 中兴通讯股份有限公司 A router test method and its onsite simulation test device
CN102271066A (en) * 2011-08-22 2011-12-07 中兴通讯股份有限公司 Automatic intelligent command line testing method and system
CN102377610A (en) * 2010-08-17 2012-03-14 盛科网络(苏州)有限公司 Automatic testing system and automatic testing method for simple network management protocol
CN103914370A (en) * 2012-12-31 2014-07-09 百度国际科技(深圳)有限公司 XML (Extensive Markup Language) configuration file based test method and device
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100369423C (en) * 2005-07-14 2008-02-13 牛伟 Network simulation detection system and method
US20140310604A1 (en) * 2013-04-12 2014-10-16 Fluke Corporation Network test instrument
CN104349346B (en) * 2014-11-13 2018-05-29 广东欧珀移动通信有限公司 A kind of mobile terminal WiFi handling capacity automated testing methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056225A (en) * 2007-05-31 2007-10-17 中兴通讯股份有限公司 A router test method and its onsite simulation test device
CN102377610A (en) * 2010-08-17 2012-03-14 盛科网络(苏州)有限公司 Automatic testing system and automatic testing method for simple network management protocol
CN102271066A (en) * 2011-08-22 2011-12-07 中兴通讯股份有限公司 Automatic intelligent command line testing method and system
CN103914370A (en) * 2012-12-31 2014-07-09 百度国际科技(深圳)有限公司 XML (Extensive Markup Language) configuration file based test method and device
CN104113443A (en) * 2013-04-19 2014-10-22 中兴通讯股份有限公司 Network equipment detection method, device and cloud detection system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108092843A (en) * 2017-03-24 2018-05-29 深圳市必联电子有限公司 A kind of router universal testing method
CN107819648A (en) * 2017-11-14 2018-03-20 新华三技术有限公司 Network configuration NETCONF connecting detection method and apparatus
CN112817859A (en) * 2021-02-04 2021-05-18 深圳市吉祥腾达科技有限公司 Automatic testing method and system for intelligent connection platform

Also Published As

Publication number Publication date
WO2016197616A1 (en) 2016-12-15

Similar Documents

Publication Publication Date Title
CN106301993A (en) A kind of method and apparatus of test router
CN106155891A (en) Interface test method, interface description data library generating method and device
EP2887582A1 (en) Service-based communication network evaluation method and device
DE602005000383D1 (en) Error detection and diagnostics
CN105323085A (en) Processing method and device for establishing performance measurement task and performance measurement result
DE602005016967D1 (en) METHOD AND DEVICE FOR FIXING A ROUTE FOR A COMMUNICATION CONNECTION
CN102967815A (en) Chip testing method, automated testing equipment and system
CN108933787A (en) Message forming method and device
CN106936658A (en) The method of testing and test platform of test case, simulation test equipment
CN103675529B (en) The protective relaying device automatic test approach of feature based word and device
CN106708720A (en) Test case generation method and test case generation system
CN105072040A (en) Efficient satellite SpaceWire Plug-and-Play (PnP) network topology construction method
CN106209540A (en) The method of testing of a kind of CAN sampling point position and device
CN113162816B (en) Testing method and testing system for OSPFv3 protocol of switch
CN106210169A (en) IP address automatic allocating method and device
CN105528296A (en) Project-software-oriented class cluster test method
CN102053808B (en) Method, device for printing software information as well as equipment with network interface
US20160352607A1 (en) Method and controller for announcing bandwidth of cluster system
Ural et al. Synchronizable test sequence generation using UIO sequences
CN109861846A (en) Using call relation acquisition methods, system and storage medium
CN102541830A (en) Method and device for generating simulation report in simulation platform
CN107579871A (en) The generation method of distributed testing script based on model inspection and generation system
CN114443488A (en) ARINC664 network configuration testing framework construction method
CN105187280A (en) Automatic DSCP-to-CoS mapping testing device and method
CN103198740B (en) A kind of Way of Sensor Deployment of teaching experiment platform and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170104