CN104391782A - Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script - Google Patents

Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script Download PDF

Info

Publication number
CN104391782A
CN104391782A CN201410123362.XA CN201410123362A CN104391782A CN 104391782 A CN104391782 A CN 104391782A CN 201410123362 A CN201410123362 A CN 201410123362A CN 104391782 A CN104391782 A CN 104391782A
Authority
CN
China
Prior art keywords
test
task
network device
device management
management software
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
CN201410123362.XA
Other languages
Chinese (zh)
Other versions
CN104391782B (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN201410123362.XA priority Critical patent/CN104391782B/en
Publication of CN104391782A publication Critical patent/CN104391782A/en
Application granted granted Critical
Publication of CN104391782B publication Critical patent/CN104391782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a network-equipment managing-software client-end simulating method, in particular to a network-equipment managing-software client-end simulating method on the basis of an XML (X Extensive Markup Language) script. The method comprises the following steps of S1 establishing a script file in an XML form, wherein the script file comprises a testing-task XML script file and a testing-user and testing-task mapping-relation XML script file, the testing-user and testing-task mapping-relation XML script file comprises a plurality of task-describing segments, each task-describing segment comprises a plurality of items, each item also comprises a plurality of tasks, and each task is formed by configuring the attributes of different elements; S2 analyzing the script file in the XML form; S3 simulating the operation of a network-equipment managing-software client end by the analyzed script file, judging whether the simulated operation of the network-equipment managing-software client end is successful or not, and recording a testing result. The network-equipment managing-software client-end simulating method has the advantages of simplicity in testing and easiness in operation, and testing configuration can be repeatedly used for many times without manual repeated operation, so that the work efficiency is higher, the repeated labor is reduced, and the cost is saved.

Description

Based on the network device management software client simulation method of XML script
Technical field
The present invention relates to network device management software client simulation method, be specifically related to a kind of network device management software client simulation method based on XML script.
Background technology
Network device management software is the special software for managing various transmission and access network device, comprises client software and daemon software.Along with the fast development of the communication technology, the value volume and range of product of the network equipment is increasing, for the ease of managing a large amount of network equipments, network device management software is essential, people are by the information such as communications status, performance consumption situation of network device management software awareness network equipment, and then manage the overall network equipment of region within the jurisdiction easily, thus the normal operation of Logistics networks environment.Thus seem of crucial importance for the test that whether unimpeded the communication between network device management software and the network equipment is.Wherein, the client of analog network device management software, carrying out communication by the back office interface and the network equipment calling network device management software is a most key step.
The whether unimpeded method of testing of communication between traditional network device management software and the network equipment is:
1, record test script by automatic test software, the mode of carrying out playback test script is repeatedly tested;
2, backstage is connected by logging in network device management software client manually, different command parameters is inputted at each function interface of client, and issue the order of interconnection network equipment, test item by item, judge that whether the order issued is by test, as then do not checked the logic of network device management software by test and revised with the return message of human eye viewing command.
But there is following defect in the whether unimpeded method of testing of the communication between traditional network device management software and the network equipment:
The more difficult testing requirement meeting special network device management software of common software automated testing instrument, cannot be recorded in the various operations that network device management software client is carried out exactly; And it is expensive to buy automated test tool, increase the financial cost of network device management software.Whether and manual testing's method needs the manually various command parameter of input, need repeatedly to test various order and issue successful, thus testing efficiency is low, and test labor intensive is more, increases the human cost of network device management software; The overall R&D costs of network device management software are increased, is difficult to improve the market competitiveness.
Summary of the invention
For the defect existed in prior art, the object of the present invention is to provide a kind of network device management software client simulation method based on XML script, whether the communication being come automatic network apparatus test management software and the network equipment by XML script is unimpeded, also correctness and the runnability of each functional interface of the background program of automatic network apparatus test management software can be come by XML script, test simple to operation, and test configurations can repeatedly Reusability, do not need artificial repeatable operation, work efficiency is higher, decrease the duplication of labour, cost-saving.
For reaching above object, the present invention takes a kind of network device management software client simulation method based on XML script, comprise step: S1. creates the script file of XML format, comprises test assignment XML script file, test subscriber and test assignment mapping relations XML script file; Test subscriber and test assignment mapping relations script file comprise multiple task description fragment, comprise multiple entry, comprise again multiple task in each entry in each task description fragment, and each task is by the different attribute of an element composition of configuration; S2. resolve the script file of described XML format, wherein each entry generates entry object, and each task generates task object, Element generation element object; S3. by the script file analog network device management software client operation after parsing, and judge that whether the operation of network device management software client simulation is successful, logging test results.
On the basis of technique scheme, in described step S2, first the reference position of test subscriber and test assignment mapping relations script file is determined according to the label of task description fragment, structure also initialization task describes the entry object queue in fragment, read the entry that one of them entry object is corresponding, record its test subscriber's information; Read the information of the task in entry object, and stored in the queue of test assignment label information, wait for that the test process of test subscriber starts.
On the basis of technique scheme, structure also, before the queue of initialization entry object, needs the definition judging whether to have entry in task description fragment, if so, reads the information of all entries in task description fragment, structure also initialization entry object queue; If fruit is no, complete the parsing of test assignment XML script file.
On the basis of technique scheme, after the test process startup of described test subscriber, a task flagging value of information is read in the queue of test assignment label information, according to the test assignment XML script file that given path lookup names is the task flagging value of information, according to the label determination task description fragment reference position of the task description fragment of this test assignment XML script file, task object described in initialization, read the attribute of configuration information wherein, save as IP and the port numbers of the background server of interconnection network device management software, read the element object queue of structure task object, record the title of described task and the class name of corresponding instance, read element object attribute, save as NE ID successively, test operation performs number of times and test operation execution interval time.
On the basis of technique scheme, in described step S3, first by the IP and the port numbers that obtain the background server of interconnection network device management software in the script file after resolving, call the interface of the connection background server of network device management software client-side program, the background program of interconnection network device management software, after successful connection, take out task flagging information, task ID in script file after resolving, call the corresponding operating interface of network device management software client-side program, perform test operation and wait for that test operation returns.
On the basis of technique scheme, whether being assigned to by the element object queue verification active user of the script file after described parsing of task is complete, if not complete, then repeats step S3.
On the basis of technique scheme, if the background program failure of described interconnection network device management software, then output error message is in the test result log file of active user, and terminates the test process of active user.
On the basis of technique scheme, if the tasks carrying distributing to active user completes, output test result in the test result log file of active user, it is always consuming time etc. that recorded information comprises the consuming time and whole test of test subscriber's title, the task flagging information of test execution, test result success or not, single test, and terminate the test process of active user.
Beneficial effect of the present invention is:
1, the present invention provides the model of open-ended network device management software client test in network device management software test, the specification form of network device management software client simulation data, achieve the format analysis function of XML, test command is issued, test lead task matching, result criterion can be completed by compiling form script file, and facilitate scope, the repeatedly test run that extended network device management software client is tested.
2, the present invention to order return message according to criterion automatic decision order success or not, can replace human eye judge and shorten the judgement time, greatly improves work efficiency, reduce cost of human resources, and provide guarantee to test correctness completely.
Accompanying drawing explanation
Fig. 1 is the network device management software client simulation method flow diagram that the present invention is based on XML script;
Fig. 2 is for creating test assignment XML script file process flow diagram;
Fig. 3 is the operational flowchart of analog network device management software client.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
As shown in Figure 1, the present invention is based on the network device management software client simulation method of XML script, comprise the steps:
S1. create the script file of XML format, comprise test assignment XML script file, test subscriber and test assignment mapping relations XML script file; Described script file comprises multiple task description fragment, comprises multiple entry, comprise again multiple task in each entry in each task description fragment, and each task is by the different attribute of an element composition of configuration.
S2. resolve the script file of described XML format, wherein each entry generates entry object, and each task generates task object, Element generation element object.
S3. by the script file analog network device management software client operation after parsing, and judge that whether the operation of network device management software client simulation is successful, logging test results.
As shown in Figure 2, in described step S1, create test assignment XML script file process as follows:
S101. configure according to the client simulation tools interfaces of network device management software, obtain test assignment fragment, comprise test assignment label information, the IP of server that test assignment connects when performing and port numbers, and the title of test assignment, task ID, tasks carrying number of times, the task execution interval time.
S102. create test assignment XML script file according to the property value of the test assignment label information obtained in given path and step S101, the test assignment XML script file name of establishment is called the property value of test assignment label information.
S103. store the test assignment fragment of acquisition, comprise task description fragment, comprise multiple entry, comprise again multiple task in each entry in each task description fragment, each task is by the different attribute of an element composition of configuration.
S104. judge whether test assignment new in addition, if so, proceed to S101; If not, S105 is entered.
S105. complete the establishment of test assignment XML script file, terminate.
In described step S1, the foundation step of test subscriber and test assignment mapping relations XML script file is as follows:
S111. configure according to the client simulation tools interfaces of network device management software, obtain test subscriber and test assignment map information, comprise the test assignment label information of test subscriber's number, each test subscriber distribution.
S112. according to given path, in conjunction with the property value of test subscriber and test assignment map information, test subscriber and test assignment mapping relations XML script file is created.
In described step S2, the detailed step that the script file of described XML format is deposited in parsing is as follows:
S201. test subscriber and test assignment mapping relations XML script file is searched according to given path.
S202. judge whether test subscriber and test assignment mapping relations XML script file exist, and if so, enter S203; If not, S205 is entered.
S203. read test duty mapping relation XML script file, searches the label of the task description fragment in this XML script file, determines its reference position according to described label position.
S204. judge the definition whether having entry in task description fragment, if so, then comprise test subscriber in declarative task description fragment and test assignment maps fragment, need resolve further, enter S206; If not, do not have test subscriber and test assignment to map fragment in declarative task description fragment, forward S205 to.
S205. output error return message, and terminate test procedure.
S206. all items for information in task description fragment are read, structure also initialization entry object queue.
S207. in entry object queue, read an entry object, record test subscriber and test assignment map test subscriber's information of fragment.
S208. judge the definition whether having task in entry object, if so, then the mission bit stream comprising test subscriber and need to perform is described in entry object, need resolves further, forward S209 to; If not, the mission bit stream that there is not test subscriber and need to perform is described in entry object, forwards S218 to.
S209. read the information of the task in entry object, by the task flagging value of information of task stored in the queue of test assignment label information, wait for that the test process of current test subscriber starts, and enter S210.
S210. in the queue of test assignment label information, reading a task flagging value of information, is the test assignment XML script file of the task flagging value of information according to given path lookup names.
S211. judge whether the test assignment XML script file finding this title, if so, enter S212; If not, S218 is entered.
S212. read the test assignment XML script file that name is called the task flagging value of information, search the label of task description fragment wherein, determine task description fragment reference position, initialization task object.
S213. read the label allocation in task object, and search the attribute of configuration information successively, save as IP and the port numbers of the background server of interconnection network device management software.
S214. all elements information in task object is read, structure also initialization element object queue.
S215. in element object queue, read an element object, record the class name that the title of test assignment is corresponding.
S216. read the attribute of this element object, save as element ID successively, test operation performs number of times and test operation execution interval time.
S217. judge the task flagging value of information whether do not read in addition in the queue of current test assignment label information, if so, forward step S210 to, if not, forward S218 to.
S218. complete the parsing of test assignment XML script file, wait for that the test process of current test subscriber reads, enter S219.
S219. judge the entry object whether do not read in addition in current entries object queue, if so, forward S207 to; If not, S220 is forwarded to.
S220. complete the parsing of test subscriber and test assignment mapping relations XML script file and terminate.
As shown in Figure 3, the concrete steps of described S3 are as follows:
S301. obtain IP and the port numbers of the background server of the interconnection network device management software parsed, call the interface of the connection background server of network device management software client-side program, the background program of interconnection network device management software.
S302. judge that whether the background program of interconnection network device management software is successful, if so, forward S303 to; If not, S306 is proceeded to.
S303. take out task flagging information, a task ID after resolving, call the corresponding operating interface of network device management software client-side program, start to perform test operation and wait for that test operation returns.
S304. judge that whether the task of distributing to active user is complete according to the element object queue of resolving, if so, forward S305 to; If not, S303 is forwarded to.
S305. output test result in the test result log file of active user, it is always consuming time etc. that recorded information comprises the consuming time and whole test of test subscriber's title, the task flagging information of test execution, test result success or not, single test, and terminate the test process of active user.
S306. output error message is in the test result log file of active user, and terminates the test process of active user.
The present invention is not limited to above-mentioned embodiment, and for those skilled in the art, under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications are also considered as within protection scope of the present invention.The content be not described in detail in this instructions belongs to the known prior art of professional and technical personnel in the field.

Claims (8)

1., based on a network device management software client simulation method for XML script, it is characterized in that, comprise step:
S1. create the script file of XML format, comprise test assignment XML script file, test subscriber and test assignment mapping relations XML script file; Test subscriber and test assignment mapping relations script file comprise multiple task description fragment, comprise multiple entry, comprise again multiple task in each entry in each task description fragment, and each task is by the different attribute of an element composition of configuration;
S2. resolve the script file of described XML format, wherein each entry generates entry object, and each task generates task object, Element generation element object;
S3. by the script file analog network device management software client operation after parsing, and judge that whether the operation of network device management software client simulation is successful, logging test results.
2. as claimed in claim 1 based on the network device management software client simulation method of XML script, it is characterized in that: in described step S2, first the reference position of test subscriber and test assignment mapping relations script file is determined according to the label of task description fragment, structure also initialization task describes the entry object queue in fragment, read the entry that one of them entry object is corresponding, record its test subscriber's information; Read the information of the task in entry object, and stored in the queue of test assignment label information, wait for that the test process of test subscriber starts.
3. as claimed in claim 2 based on the network device management software client simulation method of XML script, it is characterized in that: before constructing also initialization entry object queue, need the definition judging whether to have entry in task description fragment, if, read the information of all entries in task description fragment, structure also initialization entry object queue; If fruit is no, complete the parsing of test assignment XML script file.
4. as claimed in claim 2 based on the network device management software client simulation method of XML script, it is characterized in that: after the test process startup of described test subscriber, a task flagging value of information is read in the queue of test assignment label information, according to the test assignment XML script file that given path lookup names is the task flagging value of information, according to the label determination task description fragment reference position of the task description fragment of this test assignment XML script file, task object described in initialization, read the attribute of configuration information wherein, save as IP and the port numbers of the background server of interconnection network device management software, read the element object queue of structure task object, record the title of described task and the class name of corresponding instance, read element object attribute, save as NE ID successively, test operation performs number of times and test operation execution interval time.
5. as claimed in claim 4 based on the network device management software client simulation method of XML script, it is characterized in that: in described step S3, first by the IP and the port numbers that obtain the background server of interconnection network device management software in the script file after resolving, call the interface of the connection background server of network device management software client-side program, the background program of interconnection network device management software, after successful connection, take out the task flagging information in script file after resolving, task ID, call the corresponding operating interface of network device management software client-side program, perform test operation and wait for that test operation returns.
6. as claimed in claim 5 based on the network device management software client simulation method of XML script, it is characterized in that: whether being assigned to by the element object queue verification active user of the script file after described parsing of task is complete, if not complete, then repeat step S3.
7. as claimed in claim 5 based on the network device management software client simulation method of XML script, it is characterized in that: if the background program failure of described interconnection network device management software, then output error message is in the test result log file of active user, and terminates the test process of active user.
8. as claimed in claim 5 based on the network device management software client simulation method of XML script, it is characterized in that: if the tasks carrying distributing to active user completes, output test result in the test result log file of active user, it is always consuming time etc. that recorded information comprises the consuming time and whole test of test subscriber's title, the task flagging information of test execution, test result success or not, single test, and terminate the test process of active user.
CN201410123362.XA 2014-03-28 2014-03-28 Network device management software client simulation method based on XML scripts Active CN104391782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410123362.XA CN104391782B (en) 2014-03-28 2014-03-28 Network device management software client simulation method based on XML scripts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410123362.XA CN104391782B (en) 2014-03-28 2014-03-28 Network device management software client simulation method based on XML scripts

Publications (2)

Publication Number Publication Date
CN104391782A true CN104391782A (en) 2015-03-04
CN104391782B CN104391782B (en) 2018-02-16

Family

ID=52609690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410123362.XA Active CN104391782B (en) 2014-03-28 2014-03-28 Network device management software client simulation method based on XML scripts

Country Status (1)

Country Link
CN (1) CN104391782B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608008A (en) * 2015-12-29 2016-05-25 浪潮(北京)电子信息产业有限公司 Automatic testing method and system applied to cloud storage client
CN109684196A (en) * 2018-11-01 2019-04-26 北京中清龙图网络技术有限公司 A kind of test method and device
CN112988596A (en) * 2021-04-27 2021-06-18 北京全路通信信号研究设计院集团有限公司 Automatic testing method and system based on state transition

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060117222A1 (en) * 2004-11-12 2006-06-01 Lei Shen Test agent architecture
CN102546260A (en) * 2012-02-06 2012-07-04 烽火通信科技股份有限公司 Simulator based on SNMP (Simple Network Management Protocol) network management
CN102882737A (en) * 2012-08-24 2013-01-16 烽火通信科技股份有限公司 Transaction language-1(TL1) command automatically testing method based on extensible markup language (XML) script
CN103176898A (en) * 2011-12-26 2013-06-26 上海晨兴希姆通电子科技有限公司 Testing tool and testing method applying extensive markup language (XML) configuration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060117222A1 (en) * 2004-11-12 2006-06-01 Lei Shen Test agent architecture
CN103176898A (en) * 2011-12-26 2013-06-26 上海晨兴希姆通电子科技有限公司 Testing tool and testing method applying extensive markup language (XML) configuration
CN102546260A (en) * 2012-02-06 2012-07-04 烽火通信科技股份有限公司 Simulator based on SNMP (Simple Network Management Protocol) network management
CN102882737A (en) * 2012-08-24 2013-01-16 烽火通信科技股份有限公司 Transaction language-1(TL1) command automatically testing method based on extensible markup language (XML) script

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608008A (en) * 2015-12-29 2016-05-25 浪潮(北京)电子信息产业有限公司 Automatic testing method and system applied to cloud storage client
CN109684196A (en) * 2018-11-01 2019-04-26 北京中清龙图网络技术有限公司 A kind of test method and device
CN109684196B (en) * 2018-11-01 2024-01-09 北京中清龙图网络技术有限公司 Test method and device
CN112988596A (en) * 2021-04-27 2021-06-18 北京全路通信信号研究设计院集团有限公司 Automatic testing method and system based on state transition
CN112988596B (en) * 2021-04-27 2021-08-03 北京全路通信信号研究设计院集团有限公司 Automatic testing method and system based on state transition

Also Published As

Publication number Publication date
CN104391782B (en) 2018-02-16

Similar Documents

Publication Publication Date Title
US9565129B2 (en) Resource provisioning planning for enterprise migration and automated application discovery
US9374278B2 (en) Graphic user interface based network management system to define and execute troubleshooting procedure
US9753826B2 (en) Providing fault injection to cloud-provisioned machines
CN109150640A (en) A kind of method for discovering network topology and system based on double layer network agreement
US20120099478A1 (en) Method and Device for Auto-Generating Goose Signal Connection Topology from Substation Level
US20220094614A1 (en) Systems for and methods of modelling, analysis and management of data networks
CN109062780A (en) The development approach and terminal device of automatic test cases
US20220029888A1 (en) Detect impact of network maintenance in software defined infrastructure
CN107911251A (en) A kind of method for configuring network equipment, device and medium
CN107704369A (en) A kind of recording method of Operation Log, electronic equipment, storage medium, system
CN115640045A (en) Low-code development platform based on domain-driven design and business system creation method
US20220329488A1 (en) Automated generation of standard network device configurations
CN104391782A (en) Network-equipment managing-software client-end simulating method on basis of XML (X Extensive Markup Language) script
Baresi et al. Microservice architecture practices and experience: a focused look on docker configuration files
EP4152715A1 (en) Method and apparatus for determining resource configuration of cloud service system
WO2016048294A1 (en) Infrastructure rule generation
EP4207702A1 (en) Dynamic prediction of system resource requirement of network software in a live network using data driven models
CN111158979A (en) Service dial testing method, system, device and storage medium
CN110995489A (en) Large data platform server management method, device, server and storage medium
Murphy Performance engineering for cloud computing
CN115146486A (en) Evaluation method and device for efficiency evaluation system
CN114443427A (en) Cloud resource efficiency evaluation method based on big data analysis
Funke et al. Variability Features: Extending Sustainability Decision Maps via an Industrial Case Study
CN113591448A (en) Report generation method and device and storage medium
Liu et al. Agent-based online quality measurement approach in cloud computing environment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant