[go: up one dir, main page]

CN1889471A - Automatic testing device and method for user interface - Google Patents

Automatic testing device and method for user interface Download PDF

Info

Publication number
CN1889471A
CN1889471A CN 200510080071 CN200510080071A CN1889471A CN 1889471 A CN1889471 A CN 1889471A CN 200510080071 CN200510080071 CN 200510080071 CN 200510080071 A CN200510080071 A CN 200510080071A CN 1889471 A CN1889471 A CN 1889471A
Authority
CN
China
Prior art keywords
order
command
user interface
mode
result
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
CN 200510080071
Other languages
Chinese (zh)
Other versions
CN100421394C (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.)
Global Innovation Polymerization LLC
Gw Partnership 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 CNB2005100800718A priority Critical patent/CN100421394C/en
Publication of CN1889471A publication Critical patent/CN1889471A/en
Application granted granted Critical
Publication of CN100421394C publication Critical patent/CN100421394C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种用户接口的自动测试装置,包括:命令行产生器,用来产生可执行的命令;命令行执行器,用于执行命令行产生器所产生的命令,并返回执行的结果;结果分析处理模块,用来判断所执行的结果,并根据判断结果对可执行的命令进行处理;主控模块,用于控制命令行产生器产生可执行的命令。根据本发明,使得遍历执行网络通信设备的用户接口成为可能,从而会更快和全面地测试网络设备的用户接口,并根据测试结果及时地调整网络设备的用户接口,保障了网络设备的稳定性。

Figure 200510080071

The invention discloses an automatic testing device for a user interface, comprising: a command line generator for generating executable commands; a command line executor for executing the command generated by the command line generator and returning the execution result ; The result analysis and processing module is used to judge the executed result and process the executable command according to the judgment result; the main control module is used to control the command line generator to generate the executable command. According to the present invention, it is possible to traverse and execute the user interface of the network communication device, so that the user interface of the network device can be tested more quickly and comprehensively, and the user interface of the network device can be adjusted in time according to the test result, thereby ensuring the stability of the network device .

Figure 200510080071

Description

一种用户接口的自动测试装置和方法An automatic testing device and method for a user interface

技术领域technical field

本发明涉及一种网络通信技术,尤其涉及一种用户接口的自动测试装置和方法。The invention relates to a network communication technology, in particular to an automatic testing device and method of a user interface.

背景技术Background technique

用户一般采用命令行的方式对网络通信设备进行数据配置及执行其它各种操作。为了保证网络通信设备的运行稳定性和安全性,需要对网络设备的各个命令进行测试,在对其进行测试时,为了完成一个功能,需要配置若干个命令及其参数的组合。Users generally use the command line to configure data and perform other operations on network communication devices. In order to ensure the operation stability and security of network communication equipment, it is necessary to test each command of the network equipment. When testing it, in order to complete a function, it is necessary to configure a combination of several commands and their parameters.

在现有技术中,对命令行测试的一般方法是:首先根据命令行设计规格说明书设计命令行测试用例,命令的参数通过边界值法选取边界和中间的数值,然后人工执行这些用例,执行的结果一般也由人工判定其正确性。然而,由于命令、参数的数目非常庞大,其各种组合的数目更是非常庞大,采用人工的方式进行测试仅能覆盖其中的极少部分,很容易发生漏测的问题。In the prior art, the general method of testing the command line is: firstly design the command line test case according to the command line design specification, select the boundary and intermediate values of the parameters of the command through the boundary value method, and then manually execute these use cases, the executed The results are generally judged by humans to be correct. However, since the number of commands and parameters is very large, and the number of various combinations thereof is very large, manual testing can only cover a very small part of them, and the problem of missed testing is likely to occur.

在有些命令行的测试方法中,用例的执行和结果的判断部分尽管已经有一些自动化技术。然而,由于比较费时的用例设计部分还是采用人工的方式,仍然存在效率较低的问题;其次,人工设计的用例可能会有错误和遗漏的地方;再者,由于人力的限制,对于命令、参数组合较多的情况不能做完全的覆盖。In some command-line test methods, although there are already some automation technologies in the execution of use cases and the judgment of results. However, because the more time-consuming use case design is still done manually, there is still a problem of low efficiency; secondly, there may be errors and omissions in the use cases designed manually; moreover, due to manpower constraints, commands and parameters In the case of many combinations, complete coverage cannot be done.

发明内容Contents of the invention

针对现有技术的上述缺陷,本发明的目的是提供一种用户接口的自动测试装置和方法,不仅提高了测试效率,而且可全面地测试用户接口的各个命令。In view of the above-mentioned defects in the prior art, the purpose of the present invention is to provide an automatic testing device and method for user interface, which not only improves the testing efficiency, but also can comprehensively test each command of the user interface.

本发明是通过下述技术方案实现的,本发明提供了一种用户接口的自动测试装置,包括:The present invention is achieved through the following technical solutions. The present invention provides an automatic test device for user interface, comprising:

命令行产生器,用来产生可执行的命令;Command line generator, used to generate executable commands;

命令行执行器,用于执行命令行产生器所产生的命令,并返回执行的结果;The command line executor is used to execute the command generated by the command line generator and return the execution result;

结果分析处理模块,用来判断所执行的结果,并根据判断结果对可执行的命令进行处理;The result analysis and processing module is used to judge the executed result, and process the executable command according to the judgment result;

主控模块,用于控制命令行产生器产生可执行的命令。The main control module is used to control the command line generator to generate executable commands.

所述的测试装置还包括:命令行过滤器,用于对送往命令执行器的命令进行过滤。The test device also includes: a command line filter, used to filter the commands sent to the command executor.

所述主控模块还包括热补丁模块,用于修改用户接口自动测试装置的各模块功能。The main control module also includes a hot patch module, which is used to modify the functions of each module of the user interface automatic test device.

本发明还提供了一种用户接口的自动测试方法,包括:The present invention also provides an automatic testing method of a user interface, comprising:

A、命令行产生器产生待执行的命令;A. The command line generator generates commands to be executed;

B、根据所产生的命令对其进行处理。B. Process the command generated according to it.

所述的步骤A进一步包括:Described step A further comprises:

若当前模式为新模式,执行下列步骤:If the current mode is a new mode, perform the following steps:

获得当前模式下的所有命令;Get all commands in the current mode;

将所有命令放入当前模式所对应的所有命令列表中;Put all commands into the list of all commands corresponding to the current mode;

将当前模式添加到已知模式列表中;Add the current schema to the list of known schemas;

命令行产生器根据命令产生方式和命令行要素从当前模式所对应的所有命令列表中产生待执行的命令;The command line generator generates commands to be executed from all command lists corresponding to the current mode according to the command generation method and command line elements;

命令行产生器从所有命令列表中删除所产生的命令。The command line generator removes the generated command from the list of all commands.

所述的步骤A进一步包括:Described step A further comprises:

若当前模式为已知模式,If the current mode is a known mode,

则判断所有命令列表是否为空,若是,则执行步骤:Then judge whether all the command lists are empty, if so, execute the steps:

将当前模式添加到遍历完成列表中;Add the current schema to the traversal completion list;

判断遍历完成列表的数目与已知模式列表的数目是否相等,若相等,则返回空命令;否则,命令行产生器从模式切换命令列表中产生待执行的命令;Judging whether the number of the traversal completion list is equal to the number of the known mode list, if they are equal, return an empty command; otherwise, the command line generator generates the command to be executed from the mode switching command list;

否则,执行步骤:Otherwise, perform the steps:

命令行产生器根据命令产生方式和命令行要素从所有命令列表中产生待执行的命令;The command line generator generates commands to be executed from all command lists according to the command generation method and command line elements;

命令行产生器从所有命令列表中删除所产生的命令。The command line generator removes the generated command from the list of all commands.

所述的命令产生方式包括顺序产生方式和随机产生方式。The command generation method includes sequential generation method and random generation method.

所述的命令要素包括:命令提示符、命令联想符、命令结束符、命令参数类型、命令参数范围、命令模式唯一性。The command elements include: command prompt, command association symbol, command terminator, command parameter type, command parameter range, and command mode uniqueness.

所述的步骤B进一步包括:Described step B further comprises:

若命令行产生器所产生的命令为空,则结束本过程,否则,执行下列步骤:If the command generated by the command line generator is empty, then end this process, otherwise, perform the following steps:

B1、命令行执行器执行命令行产生器所产生的命令,并返回所执行的结果;B1. The command line executor executes the command generated by the command line generator and returns the executed result;

B2、若执行的结果发生模式切换,将所述的命令放入模式切换命令列表中;B2. If mode switching occurs as a result of the execution, put the command into the mode switching command list;

B3、结果分析处理模块根据返回结果对命令进行处理;B3. The result analysis and processing module processes the command according to the returned result;

B4、执行步骤A。B4. Step A is executed.

在执行步骤B1之前还执行:命令行过滤器对来自命令行列表中的命令进行过滤。Before executing step B1, also execute: the command line filter to filter the commands from the command line list.

根据本发明,使得遍历执行网络通信设备的命令成为可能,从而会更快和全面地测试网络设备的用户接口,并根据测试结果及时地调整网络设备的用户接口,保障了网络设备的稳定性。According to the present invention, it is possible to traverse and execute the commands of the network communication equipment, so that the user interface of the network equipment can be tested more quickly and comprehensively, and the user interface of the network equipment can be adjusted in time according to the test results, thereby ensuring the stability of the network equipment.

附图说明Description of drawings

图1示出了本发明的用户接口的自动测试装置;Fig. 1 shows the automatic testing device of the user interface of the present invention;

图2示出了本发明的用户接口的自动测试方法的流程图。Fig. 2 shows a flow chart of the automatic testing method of the user interface of the present invention.

具体实施方式Detailed ways

为了便于本领域一般技术人员理解和实现本发明,现结合附图描绘本发明的实施例。In order to make it easier for those skilled in the art to understand and realize the present invention, the embodiments of the present invention are described in conjunction with the accompanying drawings.

如图1所示,本发明的用户接口的自动测试装置包括:主控模块、命令行产生器、命令行执行器、命令行过滤器和结果分析处理模块。As shown in FIG. 1 , the automatic testing device of the user interface of the present invention includes: a main control module, a command line generator, a command line executor, a command line filter and a result analysis and processing module.

上述5个模块协同工作,作为一个有机整体,其协同工作过程可以使用伪码表示如下:The above five modules work together, as an organic whole, the process of working together can be expressed as follows in pseudocode:

if{已经全部遍历完成} {if{All traversal has been completed} {

     returnreturn

}}

命令行产生器获得当前模式下的所有命令;The command line generator gets all the commands in the current mode;

foreach{每个命令} {foreach{each command} {

  命令行执行器执行此命令;The command line executor executes this command;

  记录命令的执行结果;Record the execution result of the command;

  if{进入了新的模式} {if {entered a new mode} {

      进行递归调用;Make a recursive call;

  }}

}}

            标记此模式下的命令全部遍历完成;Mark all the commands in this mode have been traversed;

从上面的伪码段可以看出,如图2所示,本发明的基本思想是:在步骤1中,命令行产生器产生待执行的命令;在步骤2中,判断命令行产生器所产生的命令是否为空,若是,在步骤6中,则结束本过程。否则,执行下列步骤:在步骤3中,命令行执行器执行命令行产生器所产生的命令,并返回所执行的结果;在步骤4中,若执行的结果发生模式切换,将所述的命令放入模式切换命令列表中;在步骤5中,结果分析处理模块根据返回结果对命令进行处理,并返回步骤A。As can be seen from the pseudo-code segment above, as shown in Figure 2, the basic idea of the present invention is: in step 1, the command line generator generates the command to be executed; Whether the command is empty, if so, in step 6, then end this process. Otherwise, perform the following steps: In step 3, the command line executor executes the command generated by the command line generator, and returns the executed result; in step 4, if the executed result has a mode switch, the command Put it into the mode switching command list; in step 5, the result analysis and processing module processes the command according to the returned result, and returns to step A.

下面分别介绍上述五个模块。The above five modules are introduced respectively below.

二、主控模块2. Main control module

主控模块主要负责程序的总体调度,执行结束判断,热补丁等。The main control module is mainly responsible for the overall scheduling of the program, the judgment of the execution end, hot patching, etc.

1)总体调度:总体调度实质上是一个大循环,它首先调用命令行产生器获取下一条需要执行的命令并调用命令行过滤器判断是否需要执行此命令,如果需要执行则调用命令行执行器来执行此命令。1) Overall scheduling: Overall scheduling is essentially a big cycle. It first calls the command line generator to obtain the next command to be executed and calls the command line filter to determine whether the command needs to be executed. If it needs to be executed, it calls the command line executor to execute this command.

2)执行结束判断:如果从命令行产生器获取的命令为空,则表示所有的命令已经执行完毕,结束本程序。2) Execution end judgment: If the command obtained from the command line generator is empty, it means that all commands have been executed and the program ends.

3)热补丁:由于命令行的遍历是非常费时的,几个小时、几天都是常事,所以在每一次循环周期都提供了一次程序自我修正的机会,用户在程序的执行过程中可以动态的改变程序的行为,例如,修改命令行的过滤规则,去除程序的BUG,变更命令执行结果的判断条件,等等。3) Hot patch: Since the traversal of the command line is very time-consuming, hours and days are common, so each cycle provides a chance for the program to self-correct, and the user can dynamically update the program during the execution of the program. Change the behavior of the program, for example, modify the filtering rules of the command line, remove the BUG of the program, change the judgment conditions of the command execution result, and so on.

热补丁通过判断注册表中的标志位或者某一个外部文件的修改时间来确定是否更新自己,如果发现需要更新,则重新加载各个函数库文件,以完成函数的动态更新。The hot patch determines whether to update itself by judging the flag bit in the registry or the modification time of an external file. If it is found that it needs to be updated, it reloads each function library file to complete the dynamic update of the function.

三、命令行产生器3. Command line generator

1)整体架构:命令行产生器的主要作用是用来产生可执行的命令。它先获得当前模式对应的所有命令集合,然后根据预先定义的命令产生方式来产生下一条需要执行的命令,如果执行完所有的普通命令,则认为此模式命令已经执行完毕,如果所有已知模式都遍历完成,则认为全部完成了遍历,返回空命令。1) Overall architecture: The main function of the command line generator is to generate executable commands. It first obtains all the command sets corresponding to the current mode, and then generates the next command to be executed according to the predefined command generation method. If all common commands are executed, it is considered that the mode command has been executed. If all known modes If all traversals are completed, it is considered that all traversals have been completed, and an empty command is returned.

其产生可执行命令的算法可用伪码表示如下:The algorithm for generating executable commands can be expressed in pseudocode as follows:

#变量定义#Variable definitions

set″已知模式列表″nullset "List of Known Patterns" null

set″遍历完成模式列表″nullset "traversing the complete pattern list" null

set″所有命令列表″nullset "List of all commands" null

set″模式切换命令列表″nullset "mode switching command list" null

得到当前模式get current mode

if{当前模式is新模式} {if{current mode is new mode} {

     add当前模式to″已知模式列表″add current mode to "list of known modes"

}}

得到当前模式对应的″所有命令列表″Get the "all command list" corresponding to the current mode

if{″所有命令列表″==null} {if{"all command list"==null} {

     add当前模式to″遍历完成模式列表″Add the current mode to "traversal complete mode list"

     if{number(″遍历完成模式列表″)>=number(″已知模式列表″)} {If{number("traversing the list of complete patterns")>=number("list of known patterns")} {

         #表示全部遍历完成    #Indicates that all traversal is complete

         return nullreturn null

    }}

}else {} else {

    #从″所有命令列表″中取出一条命令# Take out a command from the "all command list"

    switch{命令产生模式} {switch{command generation mode} {

         case随机方式:case random method:

             随机从″所有命令列表″中取出一条命令Randomly take a command from the "all command list"

         case顺序方式:Sequence of cases:

             顺序从″所有命令列表″中取出一条命令Sequentially take a command from the "all command list"

    }}

    remove命令from″所有命令列表″The remove command from "List of all commands"

    if{命令is模式切换命令} {if{command is mode switching command} {

       add命令to″模式切换命令列表″Add command to "mode switching command list"

    }}

    return命令return command

}}

return从″模式切换命令列表″中取出一条命令return Take a command from the "mode switching command list"

下面对本申请涉及到的几个概念进行解释。Several concepts involved in this application are explained below.

命令模式:通信设备的所有命令必须在一定的命令模式下才能执行,即使是相同的命令,在不同的命令模式下也可能有不同的含义。所以命令是以命令模式来分类的,首先获取当前的命令模式,然后才能获取此命令模式下的所有命令集合。Command mode: All commands of the communication device must be executed in a certain command mode. Even the same command may have different meanings in different command modes. Therefore, commands are classified by command mode. First, the current command mode is obtained, and then all command sets in this command mode can be obtained.

模式切换命令:命令分为两种,一种是普通的命令,一种是模式切换命令。模式切换命令指的此命令执行完以后,引起命令模式发生了变化。例如,“exit”命令往往表示退出当前模式,进入到父命令模式,所以“exit”命令就属于模式切换命令。Mode switching command: There are two types of commands, one is common command and the other is mode switching command. The mode switching command means that after the command is executed, the command mode changes. For example, the "exit" command often means to exit the current mode and enter the parent command mode, so the "exit" command belongs to the mode switching command.

命令产生模式:由于网络设备的功能往往与多个命令的执行顺序有关系,命令产生模式定义了命令的执行顺序,“顺序”方式表示顺序产生用户自定义的命令,“随机”方式表示命令的顺序是随机产生的,对于同一个命令集合,多次执行可能产生不同的效果。Command generation mode: Since the functions of network devices are often related to the execution order of multiple commands, the command generation mode defines the execution order of commands. The sequence is generated randomly, and multiple executions of the same command set may produce different effects.

2)命令生成:当得到命令后,还要根据命令的参数生成命令行,下面讲述从当前命令行模式生成命令的技术。2) Command generation: After getting the command, a command line is also generated according to the parameters of the command. The following describes the technique of generating the command from the current command line mode.

自动生成命令行的技术与网络设备的具体实现有一定的联系,本申请定义了网络设备命令行所应该提供的命令行要素。对一个特定的网络设备,只需简单的修改相关配置文件,可根据这些要素完成命令行的自动生成。The technology of automatically generating command lines is related to the specific realization of network devices. This application defines the command line elements that should be provided by the command lines of network devices. For a specific network device, it is only necessary to simply modify the relevant configuration files, and the automatic generation of the command line can be completed according to these elements.

网络设备应提供的命令行要素:   命令行要素   说明   必要性   命令提示符   主要有两个作用,一是表示上一个命令执行完毕,二是等待输入下一个命令;命令行产生器可以使用它来提取当前的命令模式。例如“#”、“>”、“[]”等等。   必须   命令联想符   网络设备必须提供网络设备命令自动联想的功能,例如“a?”列出所有以“a”开头的命令,“atm?”列出“atm”命令下面可以输入的所有参数。这里“?”就是命令联想符。   必须   命令结束符   用来表示命令结束的符号,例如“<cr>”表示命令的结束。   必须   命令参数类型   命令的参数应该能够反映参数的类型,例如“INTEGER<1-99>”表示参数的类型为整数。如果命令参数类型不明确,则生成的命令行可能不能反映命令的真实状况。   可选   命令参数范围   命令的参数应该给出范围,例如“INTEGER<1-99>”表示参数的范围为1到99。有了参数的范围,才能自动生成边界值、异常值的用例,增强测试的效果。   可选   命令模式唯一性   网络设备的命令行模式应该具有唯一性,相同的命令模式应该具有相同的命令集合。虽然可以通过命令的数目来判断是否是相同的模式,但是还是有微小的概率部分命令遍历不到。   可选 Command line elements that a network device should provide: command line elements illustrate necessity command prompt There are two main functions, one is to indicate that the previous command has been executed, and the other is to wait for the next command to be entered; the command line generator can use it to extract the current command mode. For example "#", ">", "[]" and so on. must command association The network device must provide the function of automatically associating network device commands, for example, "a?" lists all commands beginning with "a", and "atm?" lists all parameters that can be entered under the "atm" command. Here "?" is the command association character. must command terminator The symbol used to indicate the end of the command, such as "<cr>" means the end of the command. must Command parameter type The parameters of the command should be able to reflect the type of the parameter, for example, "INTEGER<1-99>" indicates that the type of the parameter is an integer. If the command parameter type is ambiguous, the generated command line may not reflect the actual condition of the command. optional Command parameter range The parameter of the command should give the range, for example "INTEGER<1-99>" means the range of the parameter is 1 to 99. With the range of parameters, use cases of boundary values and outliers can be automatically generated to enhance the effect of testing. optional command pattern uniqueness The command line mode of a network device should be unique, and the same command mode should have the same set of commands. Although the number of commands can be used to determine whether they are in the same pattern, there is still a small probability that some commands cannot be traversed. optional

命令生成的算法可用伪码表示如下:The algorithm generated by the command can be expressed in pseudocode as follows:

proc GetCmds{cmd} {proc GetCmds{cmd} {

  if{当前命令不符合过滤条件} {if{The current command does not meet the filter conditions} {

         returnreturn

}}

#获得当前命令的参数列表# Get the parameter list of the current command

set命令参数列表[命令执行器″当前命令命令联想符″]set command parameter list [command executor "current command command association"]

foreach{每个参数} {foreach{each parameter} {

     if{与命令结束符相同||命令的参数数目大于指定值} {                                                                 

        return″当前命令命令参数″return "Current command parameter"

     }else {} else {

         #递归调用#Recursive call

         return[GetCmds″当前命令 命令参数″]Return[GetCmds "Current Command Command Parameters"]

    }}

  }}

}}

用户可以设置命令参数的数目,以提高搜索的性能,默认情况下,进行极限搜索,可能会花费较长的时间。The user can set the number of command parameters to improve the performance of the search. By default, the limit search may take a long time.

四、命令行过滤器Fourth, the command line filter

命令行过滤器主要提供命令过滤的功能,以免一些特殊命令影响命令遍历或者有些命令执行时间过长,例如复位系统的命令建议过滤掉。The command line filter mainly provides the function of command filtering, so as to prevent some special commands from affecting the command traversal or the execution time of some commands is too long, for example, the command to reset the system is recommended to be filtered out.

命令行过滤器在命令过滤时是动态的,也就是说,在命令行遍历程序执行的过程中,可以通过主控模块的热补丁功能动态修改过滤的条件,会立即生效,不必中断程序的执行。The command line filter is dynamic during command filtering, that is to say, during the execution of the command line traversal program, the filter conditions can be dynamically modified through the hot patch function of the main control module, which will take effect immediately without interrupting the execution of the program .

命令行的过滤分为两个层次,一个层次是模式,另一个层次是模式下每个命令,也就是说,所过滤的命令是用二维表示的。每个模式下面可以包括若干个需要过滤的命令。模式和命令都是以正则表达式的形式表示的。The filtering of the command line is divided into two levels, one level is the mode, and the other level is each command in the mode, that is to say, the filtered commands are expressed in two dimensions. Each mode can include several commands that need to be filtered. Both patterns and commands are expressed in the form of regular expressions.

五、命令执行器和结果分析处理模块5. Command executor and result analysis and processing module

命令执行器的作用是执行每一个搜索到的命令,并返回执行的结果。为了提高遍历命令的效率,当执行搜索到的命令时,优选的是,对其执行的时间要进行限制。也就是说,执行一个命令,等待多长时间认为命令执行完毕,可以根据命令提示符或者其它的符号来加快执行的效率,例如,一旦发现下一个命令提示符,可以认为上一个命令已经执行完毕了。The role of the command executor is to execute each searched command and return the execution result. In order to improve the efficiency of traversing commands, when executing the searched commands, it is preferable to limit the execution time. That is to say, how long does it take to execute a command to consider that the command is completed? You can speed up the execution efficiency based on the command prompt or other symbols. For example, once you find the next command prompt, you can consider that the previous command has been executed. up.

结果分析处理模块用来自动判断执行结果的正确性,有通用判断和特殊判断两种形式。通用判断用一些特有的线索表示系统出现了问题,例如出现“Error”、“Fail”、“Warning”等提示信息;特殊判断是引用一个对照文件,把命令的执行结果与命令的预期结果对应起来,一旦发现命令的执行结果与预期结果不符,即认为出现了问题。命令的执行结果和命令的预期结果都是以正则表达式的形式表示。The result analysis and processing module is used to automatically judge the correctness of the execution results, and there are two forms of general judgment and special judgment. The general judgment uses some unique clues to indicate that there is a problem in the system, such as "Error", "Fail", "Warning" and other prompt messages; the special judgment refers to a reference file to match the execution result of the command with the expected result of the command , once the execution result of the command is found to be inconsistent with the expected result, it is considered that there is a problem. Both the execution result of the command and the expected result of the command are expressed in the form of regular expressions.

当发现命令的执行出现问题时(通用判断或者特殊判断失败),有两种可选的动作,一个是暂停程序的执行,等待用户的干预,这样可以保留第一现场,方便问题定位;另一个选择是继续执行,把错误记录到执行日志中,适用于无人值守的情况。When it is found that there is a problem with the execution of the command (the general judgment or the special judgment fails), there are two optional actions, one is to suspend the execution of the program, and wait for the user's intervention, so that the first scene can be reserved to facilitate problem location; the other Choose Yes to continue execution, and record errors to the execution log, which is suitable for unattended situations.

根据本发明,使得遍历执行网络通信设备浩如烟海的命令成为可能,可以在无人值守的情况下长时间运行,如果条件允许,还可以多个命令行终端对同一个网络设备进行操作,这样会更快地测试网络设备的用户接口,从而根据测试结果及时地调整网络设备的用户接口,有力保障了网络设备的稳定性。According to the present invention, it is possible to traverse and execute a vast number of commands of network communication devices, and it can run for a long time without being on duty. If conditions permit, multiple command line terminals can also operate on the same network device, which will be more efficient. Quickly test the user interface of the network equipment, so as to adjust the user interface of the network equipment in time according to the test results, which effectively guarantees the stability of the network equipment.

虽然通过实施例描绘了本发明,但本领域普通技术人员知道,在不脱离本发明的精神和实质的情况下,就可使本发明有许多变形和变化,本发明的范围由所附的权利要求来限定。Although the present invention has been described by the embodiments, those of ordinary skill in the art know that, without departing from the spirit and essence of the present invention, the present invention can have many modifications and variations, and the scope of the present invention is defined by the appended rights Requirements to limit.

Claims (10)

1. the automatic testing equipment of a user interface is characterized in that, comprising:
The order line generator is used for producing executable order;
The order line actuator is used for the order that fill order row generator is produced, and returns the result of execution;
The interpretation of result processing module is used for judging performed result, and according to judged result executable order is handled;
Main control module is used for control command row generator and produces executable order.
2. the automatic testing equipment of user interface according to claim 1 is characterized in that, described testing apparatus also comprises: the order line filter is used for the order of being sent to command executer is filtered.
3. the automatic testing equipment of user interface according to claim 1 and 2 is characterized in that, described main control module also comprises the hot patch module, is used to revise each functions of modules of user interface automatic testing equipment.
4. the automatic test approach of a user interface is characterized in that, comprising:
A, order line generator produce pending order;
B, it is handled according to the order that is produced.
5. the automatic test approach of user interface according to claim 4 is characterized in that, described steps A further comprises:
If present mode is a new model, carry out the following step:
Obtain all orders under the present mode;
Pairing all command list (CLIST)s of present mode are put in all orders;
Present mode is added in the known mode tabulation;
The order line generator produces pending order according to order producing method and order line key element from pairing all command list (CLIST)s of present mode;
The order line generator is deleted the order that is produced from all command list (CLIST)s.
6. the automatic test approach of user interface according to claim 4 is characterized in that, described steps A further comprises:
If present mode is a known mode,
Judge that then whether all command list (CLIST)s are empty, if, execution in step then:
Adding present mode to traversal finishes in the tabulation;
Judge that whether travel through the number of finishing tabulation equates with the number of known mode tabulation, if equate, then returns null command; Otherwise the order line generator produces pending order from the mode switch command list (CLIST);
Otherwise, execution in step:
The order line generator produces pending order according to order producing method and order line key element from all command list (CLIST)s;
The order line generator is deleted the order that is produced from all command list (CLIST)s.
7. according to the automatic test approach of claim 5 or 6 described user interfaces, it is characterized in that described order producing method comprises producing method and producing method in proper order at random.
8. according to the automatic test approach of claim 5 or 6 described user interfaces, it is characterized in that described order key element comprises: CMD, order association symbol, order end mark, command parameter type, command parameter scope, command mode uniqueness.
9. according to the automatic test approach of one of them described user interface of claim 4 to 6, it is characterized in that described step B further comprises:
If order that the order line generator produced is for empty, ending said process then, otherwise, carry out the following step:
The order that B1, order line actuator fill order row generator are produced, and return performed result;
B2, if the emergence pattern of carrying out as a result switches, the mode switch command list (CLIST) is put in described order;
B3, interpretation of result processing module are handled order according to return results;
B4, execution in step A.
10. the automatic test approach of user interface according to claim 9 is characterized in that, also carries out before execution in step B1: the order line filter is to filtering from the order in the order line tabulation.
CNB2005100800718A 2005-06-28 2005-06-28 An automatic testing device and method for a user interface Expired - Fee Related CN100421394C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100800718A CN100421394C (en) 2005-06-28 2005-06-28 An automatic testing device and method for a user interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100800718A CN100421394C (en) 2005-06-28 2005-06-28 An automatic testing device and method for a user interface

Publications (2)

Publication Number Publication Date
CN1889471A true CN1889471A (en) 2007-01-03
CN100421394C CN100421394C (en) 2008-09-24

Family

ID=37578731

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100800718A Expired - Fee Related CN100421394C (en) 2005-06-28 2005-06-28 An automatic testing device and method for a user interface

Country Status (1)

Country Link
CN (1) CN100421394C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140540B (en) * 2007-10-19 2010-10-13 中兴通讯股份有限公司 A method and system for automatically monitoring magnetic array faults
CN105045717A (en) * 2015-08-18 2015-11-11 网易(杭州)网络有限公司 Testing environment deployment method, apparatus and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003069566A (en) * 2001-08-23 2003-03-07 Nippon Telegr & Teleph Corp <Ntt> Network test method and system, and program and recording medium therefor
CN1254047C (en) * 2002-11-02 2006-04-26 华为技术有限公司 Method of carrying out test against join up service instrument
US20040162898A1 (en) * 2003-02-14 2004-08-19 Rich Jason H. Dedicated networked device monitoring system
CN1529466A (en) * 2003-09-29 2004-09-15 港湾网络有限公司 Network Equipment Automated Testing Method
CN100388690C (en) * 2004-07-08 2008-05-14 中兴通讯股份有限公司 Automatic test system and test method for command line interface commands of data communication equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140540B (en) * 2007-10-19 2010-10-13 中兴通讯股份有限公司 A method and system for automatically monitoring magnetic array faults
CN105045717A (en) * 2015-08-18 2015-11-11 网易(杭州)网络有限公司 Testing environment deployment method, apparatus and system
CN105045717B (en) * 2015-08-18 2018-08-07 网易(杭州)网络有限公司 Test environment dispositions method, device and system

Also Published As

Publication number Publication date
CN100421394C (en) 2008-09-24

Similar Documents

Publication Publication Date Title
CN100337235C (en) Method and apparatus for accessing database
CN1920828A (en) Method and system for cleaning garbage files
CN1704908A (en) Method for locating program abnormity
CN101079737A (en) An automatic structuring and parsing method and system of command line interface command
CN1956394A (en) Method and device for network equipment service configuration
CN1313926C (en) Template compilation method
CN1617496A (en) Method for automaticall updating configuration for next generation network terminal
CN1744092A (en) Method and system for automatic schedule logic simulation and code coverage rate analysis
CN1859180A (en) Method and system for realizing network terminal equipment configuration automatic updating
CN1851655A (en) Method for realizing product automatic test by test environment composed of test set
CN1866283A (en) System and method for implementing regular system triggering
CN100337204C (en) Online software updating method
CN101055467A (en) IDP based industrial process dynamic optimization system and method
CN101056210A (en) An event processing system and method of network central management platform
CN1889471A (en) Automatic testing device and method for user interface
CN1913692A (en) Method for loading equipment software according to allocation
CN101047555A (en) Detection method for quality of equipment
CN1664985A (en) Manufacturing system and method for preventing process contamination
CN1866219A (en) System and method for testing measured object based on automatic test script
CN1851693A (en) Method for realizing system resources management
CN1571961A (en) Security hole diagnosis system
CN101046745A (en) Method, device for controlling relation between control piece on interface and control piece display system
CN1863102A (en) System and method for testing apparatus based on managing information base
CN1862267A (en) Method for checking circuit schematic diagram
CN1900910A (en) Identifying method of multiple target branch statement through jump list in binary translation

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20180507

Address after: London, England

Patentee after: GW partnership Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

Effective date of registration: 20180507

Address after: California, USA

Patentee after: Global innovation polymerization LLC

Address before: London, England

Patentee before: GW partnership Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080924