CN101150463A - Testing method and system - Google Patents

Testing method and system Download PDF

Info

Publication number
CN101150463A
CN101150463A CNA2007101872110A CN200710187211A CN101150463A CN 101150463 A CN101150463 A CN 101150463A CN A2007101872110 A CNA2007101872110 A CN A2007101872110A CN 200710187211 A CN200710187211 A CN 200710187211A CN 101150463 A CN101150463 A CN 101150463A
Authority
CN
China
Prior art keywords
text command
test
testing
script
command
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
CNA2007101872110A
Other languages
Chinese (zh)
Other versions
CN101150463B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2007101872110A priority Critical patent/CN101150463B/en
Publication of CN101150463A publication Critical patent/CN101150463A/en
Priority to PCT/CN2008/072148 priority patent/WO2009062419A1/en
Application granted granted Critical
Publication of CN101150463B publication Critical patent/CN101150463B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention relates to a testing method which includes the following steps: the received text command is resolved; then the corresponding testing program is transferred to execute the text command according to the result of resolution and the executive result is returned. The invention also relates to a testing system, which consists of a communications module used for receiving the text command and returning the executive result of the text command, a resolution module used for resolving the text command, an executive module used for transferring relevant testing program to perform testing of the text command. The embodiment of the invention can transfer corresponding testing program to perform the text command according to the resolved text command and unify the manual testing and automated testing, and can also select different script programming languages to compile a script, thus reducing the cost of research and development of the testing system.

Description

Method of testing and system
Technical field
The present invention relates to field tests, especially a kind of method of testing and system.
Background technology
In the processes such as research and development, production, deployment and maintenance of network communication equipments such as router, switch, to the function of these network equipments and performance is verified and measurement is absolutely necessary step.In general, the tested network equipment has been tested two kinds of methods: a kind of is manual test; Another kind is an automatic test.
Manual test is meant that the tester passes through input equipments such as mouse or keyboard, by human-computer interaction interface operation and management, be configured, begin test, check test run state or intermediate object program, modification configuration, continue to check test run state or intermediate object program according to tester's test intention ... up to finishing test.In the process of test, the tester can be according to the real-time adjustment test parameter of various situations, even adjusts Test Strategy, embodies great flexibility and controllability.But the shortcoming of this method of testing is that speed is slower, and when step is various, poor repeatability, situations such as configuration error occur easily.
Automatic test is meant that the operation tester uses the script of certain Script Programming language compilation in advance according to testing scheme, carries out test.Because various inputs have been made defaultly in the script, and feedback (the normal and unusual) result of expection also made respective handling, thus need not human intervention in the process of execution, finish test up to the script end of run.In order to satisfy the demand of this method of testing, tester/instrument can provide the explosion command based on certain Script Programming language (as TCL, Perl etc.) usually, and the tester can use these explosion commands to handle tester/instrument in script.This method of testing has characteristics such as execution speed is fast, favorable repeatability, and its shortcoming is to lack flexibility, can only test according to default scheme.
Related human-computer interaction interface all is a graphics test people operator interfaces in the present employed method of testing, and the tester mainly uses mouse and is aided with the keyboard input, finishes manual test.Simultaneously, in order to satisfy tester's automatic test demand, also provide explosion command (or to be called application programming interface, API) in addition specially based on certain particular script programming language (such as the TCL language), call in its test script for the tester, to realize automatic test.Technique scheme has following shortcoming:
1, single script.The kind of script is rich and varied, but test instrumentation/instrument can only provide the extended command set of certain particular script language, and this has just limited the tester can only use this script;
2, higher R﹠D costs and long R﹠D cycle.Because support two kinds of different application demands of tester--manual test and automatic test, must develop different operation system--graphics test people operator interfaces (the Graphical User Interface of two covers, GUI) with based on the extended command set of certain script, R﹠D costs have been increased, make the R﹠D cycle elongated accordingly, and reduced response speed the what's new demand.
Summary of the invention
The embodiment of the invention provides a kind of method of testing and system, in order to the unification of realization manual test and automatic test, and can select different Script Programming language compilation scripts in automatic test.
The embodiment of the invention provides a kind of method of testing, comprising:
The Text Command that receives is resolved;
Result according to resolving calls corresponding testing program and carries out described Text Command, and returns execution result.
The embodiment of the invention also provides a kind of test macro, comprising:
Communication module is used to receive Text Command, and the execution result that returns described Text Command;
Parsing module is used for described Text Command is resolved;
Executive Module is used for calling corresponding testing program and carrying out described Text Command according to the result who resolves.
As shown from the above technical solution, the embodiment of the invention is according to the result to the parsing of the Text Command that receives, call the order of corresponding testing program execution contexts to test accordingly, these two kinds of methods of manual test and automatic test have been unified, and in automatic test, can select different Script Programming language compilation scripts, thereby reduced the cost of research and development test macros.
Description of drawings
Fig. 1 is the schematic flow sheet of the embodiment of method of testing of the present invention;
Fig. 2 is the structural representation of the embodiment of test macro of the present invention.
Embodiment
Below in conjunction with accompanying drawing specific embodiments of the invention are described in further detail.
As shown in Figure 1, be the schematic flow sheet of the embodiment of method of testing of the present invention.Present embodiment may further comprise the steps:
Step 101, tester/instrument are resolved the Text Command that receives;
Above-mentioned Text Command can be tester's directly input when carrying out manual test, can also be that tester's script by operation when carrying out automatic test sends.Specifically, can (Command Line Interface CLI) realizes combining of above-mentioned manual test and automatic test, promptly obtains the Text Command that is used to test by Command Line Interface by unified Command Line Interface.Command Line Interface obtains above-mentioned Text Command can pass through dual mode, and a kind of mode is the above-mentioned Text Command that Command Line Interface directly obtains tester's input; Another kind of mode is the above-mentioned Text Command that Command Line Interface obtains the script transmission of operation, be that the tester is at first at text editor inediting script, above-mentioned Text Command is embedded in the script, and when Run Script, the Text Command that output embeds is to Command Line Interface.
Step 102, according to the result who resolves, tester/instrument is called corresponding testing program and is carried out described Text Command, and returns execution result.
Above-mentioned tester is that the reception of Text Command connects by network service and realizes to the test of the network equipment, can be to utilize the network port, by telnet (telecommunication networkprotocol, Telnet) mode is set up network service with test program and is connected; Can also utilize tester/instrument or computer by serial, set up network service by hyper terminal (or similar software) with test program and be connected.
In the present embodiment, no matter the tester is to select the manual test operation, still selects the automatic test operation, and what tester/instrument was received all is consistent Text Command.Be when the network equipments such as router, switch are tested to equipment under test, to send specific network protocol message or data traffic to it, promptly need to control tester/instrument and begin the flow transmission, then can finish by adopting Text Command " traffic start ", and above-mentioned Text Command can be directly directly input in terminal-emulation software of tester, also can be that the tester selects shell script, by carrying out script, send out by operating script.Suppose that it is " puts ' some contents ' " that certain script connects the grammer that sends message to the network service of having set up, be used for controlling tester/instrument so in the script and begin statement that flow sends and then can be " puts ' traffic start ' "; And another script to connect the grammer that sends message to the network service of having set up be " send ' somecontents ' ", be used for controlling tester/instrument so in the script and begin statement that flow sends and then can be " send ' traffic start ' ".
Present embodiment connects by above-mentioned network service provides the order line operation-interface to the tester, the Text Command that the script of acceptance test personnel input or operation sends, and Text Command resolved, call then with the corresponding routine of above-mentioned Text Command (test program) and carry out above-mentioned Text Command, carrying out test operation or configuration operation, and then feed back corresponding operating result in the text message mode to the tester by above-mentioned connection.The embodiment of method of testing of the present invention is according to the result to the parsing of the Text Command that receives, call the order of corresponding testing program execution contexts to test accordingly, these two kinds of methods of manual test and automatic test have been unified, can satisfy the demand of tester simultaneously to manual test and automatic test, the learning cost that can reduce the tester again promptly only needs study one cover order, and in automatic test, can select any one different Script Programming language compilation script, thereby reduced the cost of research and development test macros and shortened the R﹠D cycle.
In addition, owing to adopted unified Command Line Interface, the developer of tester/instrument also only need provide a kind of mode of operation, greatly reduces the development amount, has increased the response speed to tester's new demand.Simultaneously, the exploitation Command Line Interface is than development graph user interface (Graphical UserInterface, GUI) workload is little, and Command Line Interface is compared with the graphic user interface that the same operation effect is provided, the former size of code is less, under the equivalent technology condition, Command Line Interface can be stablized and efficient more.
As shown in Figure 2, be the structural representation of the embodiment of test macro of the present invention.The test macro of present embodiment is the device that is used to realize the method for testing of the invention described above, and present embodiment comprises communication module 10, parsing module 20 and the Executive Module 30 that connects in turn.Wherein, communication module 10 is used to receive Text Command, and the execution result that returns described Text Command; Parsing module 20 is used for described Text Command is resolved; Executive Module 30 is used for calling corresponding testing program and carrying out described Text Command according to the result who resolves.Executive Module 30 comprises: memory cell 31 is used for storing test program; Interface unit 32 is used for being connected with the test port of equipment under test; Performance element 33 is used for according to the result who resolves, and calls corresponding testing program and carries out described Text Command described equipment under test is detected.
In the present embodiment, the Text Command that communication module 10 is obtained can be tester's directly input when carrying out manual test, can also be that tester's script by operation when carrying out automatic test sends.Specifically, present embodiment can be realized combining of above-mentioned manual test and automatic test by unified Command Line Interface, promptly obtains the Text Command that is used to test by Command Line Interface.Command Line Interface obtains above-mentioned Text Command can pass through dual mode, and a kind of mode is the above-mentioned Text Command that Command Line Interface directly obtains tester's input; Another kind of mode is the above-mentioned Text Command that Command Line Interface obtains the script transmission of operation, be that the tester is at first at text editor inediting script, above-mentioned Text Command is embedded in the script, and when Run Script, the Text Command that output embeds is to Command Line Interface.In addition, the calling to connect by network service of 30 pairs of test programs of Executive Module realized, can be to utilize the network port, sets up network service by telnet mode and test program and is connected; Can also utilize tester/instrument or computer by serial, set up network service by hyper terminal (or similar software) with test program and be connected.
The embodiment parsing module of test macro of the present invention is resolved the Text Command that communication module receives, Executive Module to test accordingly, has been unified these two kinds of methods of manual test and automatic test according to the call by result corresponding testing program execution contexts order of above-mentioned parsing.Present embodiment can satisfy the demand of tester to manual test and automatic test simultaneously, the learning cost that can reduce the tester again promptly only needs study one cover order, and in automatic test, can select any one different Script Programming language compilation script, thereby reduced the cost of research and development test macros and shortened the R﹠D cycle.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (7)

1. a method of testing is characterized in that, comprising:
The Text Command that receives is resolved;
Result according to resolving calls corresponding testing program and carries out described Text Command, and returns execution result.
2. method of testing according to claim 1 is characterized in that, described Text Command is to obtain by the mode of operation of Command Line Interface.
3. method of testing according to claim 2 is characterized in that, the described Text Command that obtains by Command Line Interface is that the tester imports or the script of operation sends.
4. method of testing according to claim 3 is characterized in that, also comprises before the described Run Script: embed Text Command in described script.
5. according to claim 3 or 4 described method of testings, it is characterized in that the language of described script comprises at least a programming language.
6. a test macro is characterized in that, comprising:
Communication module is used to receive Text Command, and the execution result that returns described Text Command;
Parsing module is used for described Text Command is resolved;
Executive Module is used for calling corresponding testing program and carrying out described Text Command according to the result who resolves.
7. test macro according to claim 6 is characterized in that, described Executive Module comprises:
Memory cell is used for storing test program;
Interface unit is used for being connected with the test port of equipment under test;
Performance element is used for according to the result who resolves, and calls corresponding testing program and carries out described Text Command described equipment under test is detected.
CN2007101872110A 2007-11-14 2007-11-14 Testing method and system Expired - Fee Related CN101150463B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2007101872110A CN101150463B (en) 2007-11-14 2007-11-14 Testing method and system
PCT/CN2008/072148 WO2009062419A1 (en) 2007-11-14 2008-08-26 Testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101872110A CN101150463B (en) 2007-11-14 2007-11-14 Testing method and system

Publications (2)

Publication Number Publication Date
CN101150463A true CN101150463A (en) 2008-03-26
CN101150463B CN101150463B (en) 2010-08-25

Family

ID=39250815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101872110A Expired - Fee Related CN101150463B (en) 2007-11-14 2007-11-14 Testing method and system

Country Status (2)

Country Link
CN (1) CN101150463B (en)
WO (1) WO2009062419A1 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009062419A1 (en) * 2007-11-14 2009-05-22 Huawei Technologies Co., Ltd. Testing method and system
CN102111484A (en) * 2009-12-29 2011-06-29 比亚迪股份有限公司 Mobile terminal, method for executing expansion command and functional expansion module
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
CN104239015A (en) * 2013-06-18 2014-12-24 上海斐讯数据通信技术有限公司 Script language extension method
CN104734920A (en) * 2015-03-27 2015-06-24 盛科网络(苏州)有限公司 Method and device for testing stability of openflow interchanger
CN105071998A (en) * 2015-09-11 2015-11-18 百度在线网络技术(北京)有限公司 Test system and method based on flow control
CN105117343A (en) * 2015-09-18 2015-12-02 厦门美图移动科技有限公司 Method and device for performing automatic testing based on text
CN106227670A (en) * 2016-08-05 2016-12-14 成都广达新网科技股份有限公司 A kind of EPON equipment order automatic testing method
WO2017028574A1 (en) * 2015-08-17 2017-02-23 中兴通讯股份有限公司 Router testing method and testing device
CN106789260A (en) * 2016-12-26 2017-05-31 中国银联股份有限公司 System and method for carrying out High Availabitity rehearsal to the network equipment
CN107608857A (en) * 2017-09-25 2018-01-19 郑州云海信息技术有限公司 A kind of SAN storage health status inspection method, device and readable storage medium storing program for executing
CN108494628A (en) * 2018-03-29 2018-09-04 盛科网络(苏州)有限公司 Auxiliary interchanger verification meets the automated test tool of 802.3 standard criterions of IEEE
CN109029645A (en) * 2018-08-15 2018-12-18 金卡智能集团股份有限公司 A kind of gas meter function test method and device
CN109756385A (en) * 2017-11-07 2019-05-14 中兴通讯股份有限公司 A kind of test method, device, computer equipment and readable storage medium storing program for executing
CN103684581B (en) * 2013-12-20 2019-07-05 上海斐讯数据通信技术有限公司 A kind of automated testing method of optical network unit vlan function
CN110166328A (en) * 2019-07-05 2019-08-23 南方电网科学研究院有限责任公司 Testing device of demand response equipment
CN110188028A (en) * 2018-09-03 2019-08-30 西安奥卡云数据科技有限公司 A kind of test method of computer system
CN110377507A (en) * 2019-06-28 2019-10-25 苏州浪潮智能科技有限公司 A kind of method and system based on scripts pass parameter command
CN110765012A (en) * 2019-10-15 2020-02-07 北京信安世纪科技股份有限公司 Automatic test script generation and analysis execution method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6047389A (en) * 1997-09-30 2000-04-04 Alcatel Usa Sourcing, L.P. Testing of a software application residing on a hardware component
US6405149B1 (en) * 1999-06-23 2002-06-11 Louis K. Tsai System and method for testing a telecommunication system
CN100349134C (en) * 2005-03-28 2007-11-14 华为技术有限公司 Method and system for testing drive software
CN100375059C (en) * 2005-05-13 2008-03-12 中兴通讯股份有限公司 Automatic testing system of person digital aid cell phone function and method thereof
CN1968308A (en) * 2006-04-13 2007-05-23 华为技术有限公司 Simulated test device and method
CN101212362B (en) * 2006-12-26 2010-05-19 中兴通讯股份有限公司 Automatic testing device and method incorporating a variety of testing tools
CN101056228A (en) * 2007-06-22 2007-10-17 中兴通讯股份有限公司 Test method and system for data device alarming
CN101150463B (en) * 2007-11-14 2010-08-25 华为技术有限公司 Testing method and system

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009062419A1 (en) * 2007-11-14 2009-05-22 Huawei Technologies Co., Ltd. Testing method and system
CN102111484A (en) * 2009-12-29 2011-06-29 比亚迪股份有限公司 Mobile terminal, method for executing expansion command and functional expansion module
CN103544100B (en) * 2012-07-12 2018-02-16 腾讯科技(深圳)有限公司 Method of testing, system and the client of portable data processing equipment application program
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
CN104239015A (en) * 2013-06-18 2014-12-24 上海斐讯数据通信技术有限公司 Script language extension method
CN104239015B (en) * 2013-06-18 2018-09-28 上海斐讯数据通信技术有限公司 The extended method of script
CN103684581B (en) * 2013-12-20 2019-07-05 上海斐讯数据通信技术有限公司 A kind of automated testing method of optical network unit vlan function
CN104734920A (en) * 2015-03-27 2015-06-24 盛科网络(苏州)有限公司 Method and device for testing stability of openflow interchanger
WO2017028574A1 (en) * 2015-08-17 2017-02-23 中兴通讯股份有限公司 Router testing method and testing device
CN105071998A (en) * 2015-09-11 2015-11-18 百度在线网络技术(北京)有限公司 Test system and method based on flow control
CN105117343A (en) * 2015-09-18 2015-12-02 厦门美图移动科技有限公司 Method and device for performing automatic testing based on text
CN106227670A (en) * 2016-08-05 2016-12-14 成都广达新网科技股份有限公司 A kind of EPON equipment order automatic testing method
CN106789260A (en) * 2016-12-26 2017-05-31 中国银联股份有限公司 System and method for carrying out High Availabitity rehearsal to the network equipment
CN106789260B (en) * 2016-12-26 2020-11-20 中国银联股份有限公司 System and method for high availability drilling of network devices
CN107608857A (en) * 2017-09-25 2018-01-19 郑州云海信息技术有限公司 A kind of SAN storage health status inspection method, device and readable storage medium storing program for executing
CN109756385A (en) * 2017-11-07 2019-05-14 中兴通讯股份有限公司 A kind of test method, device, computer equipment and readable storage medium storing program for executing
CN108494628A (en) * 2018-03-29 2018-09-04 盛科网络(苏州)有限公司 Auxiliary interchanger verification meets the automated test tool of 802.3 standard criterions of IEEE
CN108494628B (en) * 2018-03-29 2021-08-27 苏州盛科通信股份有限公司 Automated test tool for assisting switch to verify compliance with IEEE802.3 standard specification
CN109029645A (en) * 2018-08-15 2018-12-18 金卡智能集团股份有限公司 A kind of gas meter function test method and device
CN110188028A (en) * 2018-09-03 2019-08-30 西安奥卡云数据科技有限公司 A kind of test method of computer system
CN110188028B (en) * 2018-09-03 2023-09-12 西安奥卡云数据科技有限公司 Test method of computer system
CN110377507A (en) * 2019-06-28 2019-10-25 苏州浪潮智能科技有限公司 A kind of method and system based on scripts pass parameter command
CN110166328A (en) * 2019-07-05 2019-08-23 南方电网科学研究院有限责任公司 Testing device of demand response equipment
CN110765012A (en) * 2019-10-15 2020-02-07 北京信安世纪科技股份有限公司 Automatic test script generation and analysis execution method

Also Published As

Publication number Publication date
WO2009062419A1 (en) 2009-05-22
CN101150463B (en) 2010-08-25

Similar Documents

Publication Publication Date Title
CN101150463B (en) Testing method and system
CN101567065B (en) Cross-platform online file editing system and method thereof
CN101847118B (en) Automatic test system
CN101137170A (en) Software automatic testing instrument and method of embedded equipment
CN103298016A (en) Test system for mobile terminals
CN101382915B (en) Software debugging system and debugging method
CN112306884B (en) Program test control, execution method and corresponding device, equipment and medium thereof
CN108234246B (en) Method and system for multi-directionally testing network performance of server
CN111194046A (en) Automatic WIFI module testing system and method
CN101252469B (en) Multi-net elements automated testing method
CN104516809A (en) Automated testing system and method
CN104239114A (en) Application compiling method and device
CN102169447B (en) Method and corresponding system for registering and deregistering self-defined Shell
US7469359B2 (en) Method and apparatus for testing communication software
CN101272293B (en) Network testing method and device
CN102750143B (en) Based on the DSP development approach that MATLAB com component calls
CN114997102A (en) Physical layer verification method, device, equipment and storage medium
CN103365661A (en) Development method and system for automatic testing scripts
CN112181806A (en) Embedded software testing device and method based on TFTP protocol
CN101296462A (en) Method and system for batch execution of mobile terminal software automatic test
CN115134427B (en) Communication protocol coordination method, device, computer equipment and storage medium
WO2008029974A1 (en) Application framework system for distribution and migration of application
CN106354966B (en) The method of the conversion of chip id E project file and rapid configuration artificial debugging environment
CN100512343C (en) Automatic testing device and method for digital user line intercommunity
CN102387137A (en) Implementation method and system of intelligent operation logic of a plurality of network devices

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100825

Termination date: 20121114