CN1744054A - Automatic test auxiliary system and corresponding software automatic test method - Google Patents

Automatic test auxiliary system and corresponding software automatic test method Download PDF

Info

Publication number
CN1744054A
CN1744054A CN 200410054163 CN200410054163A CN1744054A CN 1744054 A CN1744054 A CN 1744054A CN 200410054163 CN200410054163 CN 200410054163 CN 200410054163 A CN200410054163 A CN 200410054163A CN 1744054 A CN1744054 A CN 1744054A
Authority
CN
China
Prior art keywords
case
test
process
template
file
Prior art date
Application number
CN 200410054163
Other languages
Chinese (zh)
Other versions
CN100375057C (en
Inventor
柴洪峰
单怀光
戚跃民
郭锐
胡文斌
吴金坛
黎宝华
Original Assignee
中国银联股份有限公司
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 中国银联股份有限公司 filed Critical 中国银联股份有限公司
Priority to CN 200410054163 priority Critical patent/CN100375057C/en
Publication of CN1744054A publication Critical patent/CN1744054A/en
Application granted granted Critical
Publication of CN100375057C publication Critical patent/CN100375057C/en

Links

Abstract

The system is composed of dynamic executive control module, case scheduler module, module of syntax analysis, file interface, interface for testing executive software, and interface for testing management tool. The system converts relevant testing case to script of commercial testing software. Basic operations are encapsulated as a process so as to form structured method for calling processes from case to be tested. Using dynamic implementation of testing case and technique of delayed loading, the invention broken up the procedure for testing case into to two steps: í«initialization step of case testí» and í«executive step of case testí». Thus, the invention possesses advantages: independence for editing case, reuse of cases and possesses, lowered occupancy rate of system memory and raised efficiency for executing cases.

Description

一种自动化测试辅助系统及相应的软件自动测试方法 An automated test support system and the corresponding software automatic testing method

技术领域 FIELD

本发明涉及一种计算机软件测试技术,尤其是一种对某个应用软件的功能的执行可靠性进行自动测试的测试技术。 The present invention relates to a computer software testing, in particular for performing a function of an application software for testing the reliability of automated testing techniques.

背景技术 Background technique

目前对功能软件或应用软件的自动测试有多种方法,主要方法有:一、捕捉/回放机制:直接使用商业软件脚本程序的编写测试案例100a用商业测试软件200a对被测软件300a进行自动测试,如图1所示。 There are several methods for automatic test function of the software or application software, the main methods are: First, capture / playback mechanism: Direct use of commercial software writing test cases script 100a of automated testing using commercial test software 200a 300a of the tested software ,As shown in Figure 1. 使用这种方法,测试人员不仅需要熟悉测试案例,而且需要熟悉商业软件脚本程序的编写,同时编写的测试脚本也存在正确性验证的问题。 Using this method, testers need not only be familiar with test cases and scripts need to know to write commercial software program, but also to write test scripts to verify the correctness of the problem. 因此会耗费大量的时间在脚本维护上,而不是专注于应用软件的测试本身;二、功能分解法:部分利用数据驱动引擎(Data Driven Engine)框架100c对案例100b进行测试,如图2所示。 Therefore time-consuming maintenance in the script, rather than focusing on the application of the test itself; two, functional decomposition method: driving the engine using the data part (Data Driven Engine) 100c of the case frame 100b test, shown in Figure 2 . 按照该框架所提供的案例模板和关键字,使用通用的商业软件(如EXCEL)编写案例,案例中包括了描述测试过程中进行操作所需要的控制数据、测试输入数据、预期结果数据,测试人员只需要熟悉案例编写方法(如案例的关键字等),而不必涉及测试脚本的修改和维护,也就是将测试设计和测试自动化看成为两个互相分开的过程。 According to case templates and keywords provided by the framework, using a common business software (eg EXCEL) preparation of case, including the case described the operation control data during the test required, test input data, expected results data, test personnel only need to be familiar with the case writing methods (such as keywords cases, etc.), without having to involve modification and maintenance of test scripts, that is, test design and test automation seen as two separate processes from each other.

把所有的测试任务分解为最基本的功能,将数据和功能区分开,引入了层级式的架构,使用结构化和模块化的设计。 All the test tasks broken down into the most basic functions, to separate the data and functional areas, the introduction of hierarchical architecture using structured and modular design. 包括:驱动脚本、测试案例脚本、商业功能脚本、子程序脚本、用户定义功能。 Including: driving scripts, test case scripts, scripts business functions, subroutines scripts, user-defined functions.

例如测试“进行一次支付,并验证帐户数据的准确性”。 Such as testing "pay once, and verify the accuracy of account data."

如果使用“功能分解方法”,则这个案例就可能被分解为以下商业功能,然后就每个商业功能分别编写脚本:①导航:从主菜单进入支付屏幕②进行一次支付 If you use the "functional decomposition", then the case can be broken down into the following business functions, and then write a script for each business function are: ① Navigation: Go to the main menu from the payment screen ② once payment

③验证现金流的正确性④退回主要菜单⑤接入帐户系统⑥验证帐户系统更新⑦退回到主菜单这样的测试方法,其优点非常明显:1.应用被分解为若干个基本的“商业功能”,只要对这些商业功能编写脚本,而具体的数据则通过输入数据文件和验证数据文件进行。 ③ ④ verify the correctness of the returned cash account access system main menu ⑤ ⑥ ⑦ to verify the account update system return to the main menu of this test method, obvious advantages: 1. the application is divided into several basic "business function" , as long as the data write scripts for these business functions, and concrete is carried out by entering the data file and verify the data files. 如果应用改变了,只需要更改这些“商业功能脚本”即可。 If the application has changed, you only need to change these "business feature script" button.

2.“商业功能脚本”是针对测试每一个基本商业功能的,因此,很容易组合这些商业功能脚本以实现一系列更为复杂的操作。 2. "commercial script function" is the test for each basic business functions, and therefore, it is easy to script a combination of these business functions to achieve a series of more complex operations.

方法二相比于方法一已经在测试用的案例编写上取得了很大的进步,但是,还存在如下不足之处:1.每一个商业功能都需要一个脚本,一旦有上百个商业功能的话,就需要上百个脚本;2.一旦改动测试集,就需要改动成百上千个输入数据文件/验证数据文件;3.不仅需要各种脚本,而且每个“商业功能脚本”往往需要与之对应的输入数据文件/验证数据文件;4.使用文本文件编写输入数据文件/验证数据文件,很容易犯错误。 Method Two compared to the method has been made in the preparation of test cases a lot of progress, but there is also a downside: 1. Each business function requires a script, once there are hundreds of business functions, then , we need hundreds of scripts; 2. Once the test set changes, you need to change hundreds of input data file / verification data file; 3. requires not only a variety of scripts, and each "business feature script" and often need the corresponding input data file / verification data file; 4 prepare the input data file using a text file / data file verified, it is easy to make mistakes.

三、关键字驱动方法(如:测试计划驱动方法TEST PLAN DRIVEN):属于DDE(数据驱动引擎框架)的一种,按照其所提供的模板、关键词,使用EXCEL文件编写测试案例。 Third, the keyword-driven methods (such as: test plan-driven methods TEST PLAN DRIVEN): belonging DDE (data-driven engine frame), in accordance with the template it provides, keyword, using EXCEL file write test cases. 在测试案例中包括进行操作所需要的控制数据、输入测试数据、预期结果数据等。 In the test case comprises control data required for the operation, the test data input, data expected results.

脚本编写人员与测试案例编写人员可以独立。 Scripting to write and test cases can separate. 由前者负责将案例中的关键词转换为商业测试软件的脚本,熟悉商业测试软件脚本的编写,而后者只需要关注案例的编写,即只需要熟悉案例模板的格式。 The former is responsible for converting the case of keywords for the script of the commercial test software, familiar with the preparation of commercial software test scripts, while the latter only need to focus on preparation of case, that only need to be familiar with the format of case template.

该方法主要是由如下模块实现的: The method is mainly implemented by the following modules:

驱动脚本:①进行框架的初始化;②调用特殊应用的控制脚本,将测试案例的名称传送给控制脚本(测试案例是以TAB分割的文本文件格式);控制脚本:①读入和处理以TAB分割的文本文件;②在关键词和数据之间建立一种对应关系;③根据关键词调用功能脚本;功能脚本:①处理从“控制脚本”传送过来的输入序列②执行特定的动作(如进行一次按键操作、输入一个数据、验证一个数据等);③报告一些错误情况;该方法三与方法二相比,由于采用了完全的DDE技术,其有两种主要的实现方法:其一:案例不采用结构化的编写,即在案例中直接明确每一步的具体操作,这样即使在不同的案例中包含相同的几个步骤也只能重复输入,导致使编写案例重复性太大,而且案例维护也相当不方便;其二、案例编写采用结构化方法进行,即将基本的功能抽象出来,封 Driven Script: ① initialize framework; ② control script calls for special applications, the name of the test case transferred to the control script (TAB test case is separated text file format); control script: ① read and processed to split TAB text files; to establish a corresponding relationship between keywords and data ②; ③ the keyword script function call; script features: ① perform a particular processing operation is transmitted from the "control script" ② over the input sequence (such as once key operation, a data input, a data validation, etc.); ③ to report some error conditions; the second method, compared with the three methods, the use of full DDE technology, it has two main implementations: First: case no preparation of a structured, i.e., directly in the case clearly the specific operation of each step, so that even if it contains the same steps in different cases can only re-enter, leading to reproducible preparation of case so much, but also to maintain case rather inconvenient; Second, case writing structured methods, is about the basic functions of abstracts, letters 装为流程,然后采用案例调用流程的方法,这样就大大简化了案例编写的复杂性。 Equipment for the process, and then using the case method call flow, thus greatly simplifying the complexity of the preparation of the case. 由于采用了以上的结构化设计技术,其后果必然在每次测试的时候,需要把所有的流程都装入到内存中,大大增加了系统的开销,也增加了案例测试的时间。 With the above structure design technology, the inevitable consequences when each test, we need to put all the processes are loaded into memory, greatly increasing the cost of the system, but also increases the time of the test cases. 而事实上,每次测试的时候,并不会涉及所有的案例和流程,而仅仅涉及其中一部分。 In fact, each time testing, and it does not cover all cases and processes, and involves only part of it. 如此大的系统开销,使案例的执行速度显著降低。 Such a large system overhead, the speed of execution cases significantly reduced.

发明内容 SUMMARY

本发明的目的是要解决如下技术问题,利用现有的商业化测试软件,可以更方便的生成测试案例,并且高效准确地完成特定的功能测试任务。 Object of the present invention is to solve the technical problem, the use of existing commercial test software, can more easily generate test cases, and completes the task of testing a specific function efficiently and accurately.

①案例编写的独立性:要求将案例编写相对独立于商业测试软件脚本的编写;②采用案例调用流程的方法,增加了案例维护的方便性:③降低了内存的占用率,提高了案例执行的效率:④测试正确性要求/对例外情况的处理。 ① written in case of independence: the case requires written independent of commercial software test scripts written relative; ② using the case method call flow, increasing the ease of maintenance of the case: ③ reduce memory usage and improve the execution of the case efficiency: ④ test accuracy requirements / handling of exceptions.

本发明的主要技术方案是:①采用了DDE数据驱动引擎技术,使案例编写人员与测试脚本维护人员相对独立;②定义了一定案例格式,采用了结构化的案例编写方法。 The main aspect of the present invention are: ① using the DDE data driving engine technology, so that test script writers case maintenance personnel independent; ② format defines a certain case, a case of using the preparation method of the structure. 这样就可以在具体测试应用改变的情况下不改动所有的案例文件,只需要改动调用流程的顺序或已经输入数据的数值就可以了。 So that we can not change all of the case files in the case of specific test application changes, only changes to the order of the call flow or have input numerical data on it. 因为“流程”定义了一系列基本操作的集合,即某个功能的测试需要使用若干个测试案例,而每个测试案例则由若干“基本操作”和“流程”的组成,而一个“流程”是若干个“基本操作”的集合,参见附图3。 Because the "process" defines a collection of basic operations, that is a feature of the test requires the use of several test cases, each consisting of a number of test cases by "Basic Operations" and "process", and a "process" is a collection of a number of "basic operation", see Figure 3. 通过“案例”调用“流程”和“基本操作”,“流程”调用“基本操作”的方法实现测试案例“结构化”。 By "case" call "process" and "Basic Operations", "process" call "basic operation" approach to achieve test case "structured."

③采用了案例的动态执行和延迟装载技术——即把案例名(流程名)、案例模板(流程模板)的装入与具体的案例数据(流程数据)的装入分为两步进行。 ③ The case of performing dynamic and delay loading techniques - i.e. the Case name (name of process), case template (template process) charged with a particular example data (process data) is loaded into two steps. 即将案例测试区分为:案例初始化和案例执行两步。 Test cases will soon be divided into: Case Case initialization and two-step. 相比于一次装入全部流程的方法,采用本发明,相关测试速度可以提高10倍到20倍。 Compared to a method of loading all the processes, the use of the present invention, the relevant test speed can be increased 10 to 20 times.

本发明的系统结构如下:一种自动化测试辅助系统软件测试系统,用来驱动商业测试软件,由如下模块组成:a)动态执行控制模块,b)案例调度模块,c)语法分析模块,d)文件接口,e)测试执行软件接口,f)测试管理工具接口;其中,本系统测试所需要的案例文件、流程文件和案例测试的执行序列文件,均通过所述的文件接口读入到系统运行的内存;测试执行软件接口连接到商业测试执行软件并驱动该商业测试软件,测试管理工具接口连接到测试管理工具;动态执行控制模块一端与案例调度模块连接,另一端分别连接到语法分析模块、测试执行软件接口、测试管理工具接口,通过调用案例调度模块对案例进行读入,调用语法分析模块对案例进行分析、执行,并转换为相应的商业测试软件脚本,通过测试执行软件接口驱动商业测试软件,将执行结果通过 The system structure of the present invention is as follows: an automated assistance system test software testing system for testing commercial software driver, consists of the following modules: a) a dynamic execution control module, b) scheduling module case, c) parsing module, d) file interface, e) the test execution software interfaces, f) test management tool interface; wherein the system required test case files, processes, files, and test case execution sequence files are run into the system via an interface to read the file memory; test executive software interface to a commercial test executive software and drives the commercial test software, test management tool interface is connected to the test management tool; dynamic execution control module end and case scheduling module is connected to the other terminal connected to the parsing module, test execution software interfaces, test management tool interface, by calling case scheduling module of the case reads, call syntax analysis module for case analysis, implementation, and converted to the corresponding commercial testing software scripts, interface drive commercial test by test executive software software, will perform results 试管理工具接口记载到测试管理工具中。 Test management tool interface to record test management tool.

使用本发明自动化测试辅助系统的软件自动测试方法主要包括如下步骤:a)初始化装载;b)进行案例调度;c)分析案例、加载案例数据;d)执行案例并生成脚本函数供商业测试软件进行测试;e)将测试结果与期望数据进行比较;f)写日志文件,同时将运行结果输入到测试管理工具。 Automated testing assistance system according to the present invention, automatic software testing method includes the following steps: a) initializing load; b) for case scheduling; c) Analysis case, loading case data; D) performing case and generates a script function for commercial test software test; e) the test results with the expected data are compared; f) write the log file, while operating results input to the test management tool.

其中的初始化装载包括如下内容:把系统运行所需要的配置文件的相关参数调入内存,包含了案例文件名、流程文件名、案例执行序列文件名、跟被测软件相关的参数,和跟测试管理工具相关的参数,分别根据案例文件名和流程文件名读入案例文件和流程文件,对其中的案例模板部分进行分析,同时也对流程文件中的流程模板进行分析,(但不装入案例数据或者流程数据),根据案例执行序列文件名把案例执行序列调入内存。 Where the initialization load include the following: the relevant parameters of the system needed to run the configuration file into memory, the case file contains the name, the process file name, file name case execution sequence, with the tested software-related parameters, and with test management tools related parameters, respectively, according to the case file names and processes the file name to read case files and process documents, case template part of it for analysis, but also on the process file process templates for analysis, (but not into the case data or flow data), according to the case execution sequence file name case execution sequence into memory.

所述的案例文件、流程文件和案例执行序列文件可以是存放在多个文件中,也可以存放在一个文件的多个不同的工作表中。 The case file, case files, and perform the process sequence file may be stored in multiple files may be stored in a plurality of files of different worksheet.

所述的案例调度是由动态执行控制模块进行案例调度。 Case according to scheduling is performed by the dynamic scheduling case the control module.

所述的案例执行序列中记载了该序列要执行的案例是属于哪个测试集的。 The case describes a case execution sequence to be executed in the sequence which belongs to the test set.

对其中的案例模板部分进行分析包括对该模板的指令序列进行初步分析,在内存中形成案例模板与案例模板指令序列之间的对应关系。 Wherein the template part of the case will be analyzed include a preliminary analysis of the instruction sequence of the template to form a template correspondence between the case and the case template sequence of instructions in memory. 还包括对基于每个案例模板的案例进行识别,在内存中形成案例、案例模板、案例在案例文件中的位置之间的对应关系。 Further comprising a case to case basis for each of the identified template, the case is formed, the template case, a correspondence relationship between the position of the case in the case file in memory.

同样地,还包括对该流程的指令序列进行初步分析,在内存中形成流程模板与流程模板指令序列之间的对应关系;对基于每个流程模板的流程进行识别,在内存中形成流程、流程模板、流程在流程文件中的位置之间的对应关系。 Likewise, further comprising a preliminary analysis of the instruction sequence process, the memory is formed in the process template and process instruction corresponding relationship between the template sequence; template based on each process to identify the process, the flow is formed in the memory, the flow templates, processes correspondence between the location of the file in the process.

所述的分析案例、加载案例数据指判断案例数据是否已经装载到内存中,并根据分析结果加载案例数据,该步骤由动态执行控制模块来完成的。 Analysis of the case, the case data loading means determines whether case data has been loaded into memory, and the analysis result data loading case, the step performed by the dynamic control module to complete.

本发明的测试方法中,所述的案例调度也可以由测试管理工具进行,对执行失败的案例或者需要重新运行的案例,可以使用测试管理工具方便地选择以构成下一次的案例执行序列,从而实现非人工输入案例执行序列,从而使系统的自动化程度更高,因为通过测试管理工具,案例执行序列可以自动生成,并且可以灵活组合。 Test method of the present invention, the case may be performed by the test schedule management tool, for performing failure cases or case needs to be rerun, the test management tools can be used to easily select a lower case constituting an execution sequence so that to achieve non-manual input case execution sequence, so that a higher degree of automation systems, since the sequence can be generated automatically, and may be performed by a combination of flexibility test management tool case.

本发明的测试案例生成方法如下:采用结构化的案例编写方式,减少了案例编写中的重复工作量,并且提高了案例的可重复性。 Generating a test case of the present invention is as follows: the preparation of Case structured manner, reducing the duplication of effort in the case of the preparation, and improves the repeatability of the case.

基于案例的动态执行和延迟装载技术,该系统在案例的编写方式上采用了对操作流程的复用机制,具体如下:引入类似于程序设计中过程调用的语义,在编写案例的时候,如果每次均需执行相同的一系列的操作步骤,就可以将这一系列操作步骤抽象出来,定义称为一个流程模板,每一组具有不同的输入数据但与具有相同操作步骤的集合定义为不同的流程,这些流程同属于一个流程模板,先编写这些流程与流程模板,然后在案例编写中,调用已经定义好的流程,从而既简化了案例的编写过程,增加了案例的可维护性,同时也能提高了案例的执行速度,减少了案例执行过程中的内存消耗。 Dynamic loading techniques performed and delay case, the system uses in the preparation of the way cases multiplexing process operation mechanism, as follows: the introduction of the design procedure call semantics analogy to the procedure, in the preparation of the case, if each time required to perform the same series of steps, can abstract these series of operational steps, referred to define a process template, each group having a different set of input data but with the same procedure defined for different processes that belong to a process template, write your these processes and process templates, and then in the case of writing, the call has been defined process, which not only simplifies the process of preparing the case, increase the maintainability of the case, but also can improve the speed of execution cases, reduces memory consumption process cases execution.

案例执行序列定义了需要执行了案例名称等数据,根据其显示的案例名称调用相应的案例,其基本结构如表1: Case defines the execution sequence need to perform a case name data, call the appropriate name display case according to the case, the basic structure as shown in Table 1:

表1 Table 1

其中,“是否运行标志”表示本次测试该案例是否需要运行,使用该标志可以避免每次输入案例名,直接对该标志进行修改就可以便捷地修改需要运行的测试案例;“所属测试集”则根据功能的不同将所有的测试案例分解为不同的测试集,在配置文件中可以设置本次需要执行的测试集,从而方便地实现某类功能的批量测试;“案例名称”则与“案例文件”中的案例名称相对应,根据该名称既可以到内存中查找该案例是否已经装载,也可以到案例文件中查找相关的案例数据;“案例描述”则简单地描述该测试案例的测试目的。 Among them, "whether the run flag" indicates that this test needs to be run if the case, to avoid the use of the flag each time you enter the name of the case, the flag can be easily modified directly modify test cases to be run; "belongs to the test set." Depending on the function of all the test cases divided into different test set in the configuration file can be set in this set of tests need to be performed, in order to facilitate the realization of batch testing certain functions; "case name" and then "case file "in the case corresponding to the name under which name can either look into memory the case is already loaded, you can also go to the case file, find the relevant case data;" case description "is simply described the test purpose of the test cases .

案例文件则定义了需要测试案例的名称、操作步骤(调用流程或直接执行基本操作),其结构举例如表2:表2 Case file defines the name of the test case requires, the steps (or direct the call flow to perform basic operations), the structure example shown in Table 2: Table 2

如表2所示,“案例文件”主要包括了案例模板、案例数据、案例名等组成。 As shown in the table, "Case File" Case 2 includes a template, case data, case name and other components. “案例模板”:是案例的结构,该结构定义了案例操作的关键词,即每一步执行的操作本身,并不涉及具体数据(如“调用流程关键词”、“赋值关键词”,仅仅记录的是进行什么操作,而不记录调用的流程名称、赋予的具体数值是多少),在案例测试的初始化装载时会对测试案例模板进行分析,在上表中的从上往下一到四行就可以被认为是一个案例模板,通过记录案例与案例模板的对应关系,就可以知道该案例的第一列是“案例名”、第二列表示“测试的目的”、第五列表示“调用流程”、第六列表示“选择交易类型”;“案例数据”是指具体的“流程”和“基本操作”,如表2中的“流程A”和“步骤B”都可以被认为是案例数据。 "Case Template": a case structure, which defines the operation of the keyword case, every step of the operation that is performed by itself, does not involve specific data (such as "call flow keyword," "keyword assignment", only records It is what action, without recording process name calling, the values ​​given how much), the test case template will be analyzed in the case when the test initialization loaded on the table from the down one to four lines It can be considered as a case template, by correspondence between the record cases and case templates, you can know the case of the first column is the "case name" and the second column represents "testing purposes" fifth column represents the "call process ", the sixth column represents" select transaction type ";" case data "means that a particular" flow "and" basic operation ", as shown in table 2 in the" process a "and" step B "may be considered to be the case data.

流程文件:其结构与案例文件基本一致。 Process file: its structure is consistent with the case file.

本发明的有益效果·提高案例读写的效率:本发明的测试辅助系统利用文件接口可以直接基于某种通用格式的案例文件进行执行,保证了测试过程的高效率,同时减小了文件转换过程所带来的案例文件的版本维护问题。 Advantageous Effects · cases improve efficiency of reading and writing of the present invention: auxiliary testing system of the invention may be performed using the direct file interface based on some common file format case, the testing process to ensure high efficiency while reducing the file conversion process case file version brings maintenance problems.

·系统的可适用性程度提高:本发明所提供的测试辅助系统,通过提供与具体的商业测试软件的接口层函数,就可以与相应的商业测试软件协同使用,因此本发明易于移植到不同的商业测试软件平台上。 · System can improve the degree of suitability: test assistance system according to the present invention, provided, by providing an interface layer specific business function test software, can be used in conjunction with the respective commercial test software, the present invention is readily portable to different commercial test software platform.

·测试的执行效率提高:案例的动态执行与延迟装载,这是本发明最主要技术点。 · Improve the efficiency of the test: dynamic and delayed loading case, which is the main technical points of the invention. 因为大量案例和流程装入内存之后,会导致内存占用率过高,执行测试案例的速度减慢。 Since then a large number of cases and processes into memory, can lead to excessive memory usage, slow down the speed of execution of test cases. 而本发明的技术方案将测试的初始化过程与案例数据的获取分布在测试的不同阶段完成,一方面减少了案例文件的初始化过程的时间;另一方面,案例的延迟装载技术可以根据执行的具体案例加载案例数据,而且在一次运行过程中,某个案例或者流程的数据只需要加载一次,后面的案例若需要调用同一个流程,只需要到内存中直接获取,而不必再次加载,在一定程度上提高了执行速度。 The initialization process aspect of the present invention with the test cases data acquired in different stages of completion of the test, on the one hand reduces the time of initialization file cases; on the other hand, in the case delay loading techniques may be performed according to the specific case load case data, and in a single run, a case or process data only needs to be loaded once the latter case, if you need to call the same process, only to get memory directly, without having to load again, to a certain extent the increase execution speed.

附图说明 BRIEF DESCRIPTION

以下结合附图详细描述本发明,但实施例的描述是为了说明本发明的方案,而不是限制本发明的内容。 The present invention is described below with reference to the drawings in detail, but the embodiment is described to illustrate the present invention and not to limit the present invention.

图1是直接使用商业测试软件进行测试的过程图;图2是使用DDE框架进行测试的过程图;图3是案例、流程、基本操作的调用关系图;图4是软件测试运行的网络连接图;图5是自动化测试辅助系统与商业测试软件、被测软件的关系图;图6是自动化测试辅助系统模块结构图;图7是测试案例自动化测试的过程图;图8是自动化测试的初始化过程图;图9是测试案例的执行过程图;图10是分析并且执行案例的流程图。 FIG 1 is a direct commercial testing software testing process; Figure 2 is the use of DDE framework testing process; Figure 3 is the case, the flow, the call graph basic operation; FIG. 4 is a network connection diagram of software test run ; FIG. 5 is a graph of automated test systems and auxiliary commercial test software, the software under test; FIG. 6 is an automated test system module configuration diagram of an auxiliary; FIG. 7 is a process view of a test case of automated test; FIG. 8 is a test initialization process automation FIG.; FIG. 9 is a test case execution; Figure 10 is a flowchart of the case and performing analysis.

图11是用测试管理工具生成测试执行序列的运行流程图;图12是本发明实施例“消费交易”测试的具体过程图。 FIG 11 is a flowchart illustrating operation of generating the test sequence is performed with a test management tool; FIG. 12 is a "consumer transaction" procedure to test the specific embodiment of the present invention FIG.

具体实施方式 Detailed ways

为了更清楚地说明本发明,特将若干概念解释如下(参见图3):案例执行序列:定义了需要进行测试的案例,包括需要执行的案例名、案例所属的测试运行集,以及是否需要测试的状态标志等。 In order to more clearly illustrate the present invention, especially the several concepts explained as follows (see FIG. 3): Case execution sequence: definition of cases need to be tested, including the case were to be executed, the test run set of cases belongs, and the need to test the state signs. 通过定义案例执行序列,也就指定了本次测试中所需要执行的全部案例。 By defining the execution sequence case, it specifies all the cases this test to be performed. 即在“初始化过程”之后,首先应当调入该“执行序列”,然后系统会根据该执行序列调用相关的案例。 Ie after the "initialization process" should first be transferred to the "execution sequence", then the system will call the relevant cases in accordance with the execution sequence.

案例:用一定格式的通用的软件来编写,例如用EXCEL编写,由案例名称、流程、基本操作、数据、注释等组成。 Case: use common software written in a certain format, for example, written in EXCEL, the case name, process, basic operations, data, comments, and other components.

案例(流程)模板:是案例的结构,该结构定义了案例(流程)的操作关键词,即每一步执行的操作本身,并不涉及具体数据(如“调用流程关键词”、“赋值关键词”,仅仅记录的是什么操作,而不记录调用的流程名称、赋予的具体数值是多少)。 Case (process) template: the structure of the case, which defines the cases (process) operation keywords that perform each step of the operation itself, does not involve specific data (such as "call flow keyword," "keyword assignment "just record what operating without recording process name calling, the values ​​given how much). 在案例测试初始化的时会对测试案例模板进行分析,同时对流程模板进行分析。 In the case when the test initialization test case template will be analyzed at the same time the process template for analysis.

流程:是一系列有序基本操作的集合。 Process: is a collection of ordered basic operations.

基本操作:是流程的组成部分,是不能再分割的最小执行单位,包括输入、检查、赋值等。 Basic operation: an integral part of the process, the smallest unit of execution can not be subdivided, comprising an input, checks, and other assignment.

参见图4所示,其为使用本自动化测试辅助系统进行网络软件测试的的典型网络连接示意图,发送方和接收方通过被测试网络3进行连接,商业测试软件2通过与发送方软件4、接收方软件5的进行连接就能够实现对发送方传送给接收方的过程进行测试,同时验证所传送数据的正确性;增加了自动化测试辅助系统与商业测试软件的连接后,就可以增加测试的自动化程度,直接通过自动化测试辅助系统1读取案例,并将其转换为特定的商业测试软件脚本,通过商业测试软件对系统进行自动化测试,并将测试结果反馈到该自动化测试辅助系统进行分析,进而可以进行下一步测试。 Referring to Figure typical network, which network testing software for automated testing using the present connection diagram assistance system 4, the sender and the receiver via the network 3 is connected to the test, commercial test software by sender 2 4 software, receiving 5-party software to connect to the transmission side can be realized to transfer the test procedure recipient, while verify the correctness of the transmitted data; increased after connecting automated test system with the aid of commercial software testing, automated testing can be increased degree, directly through the automated test system reads auxiliary 1 case, and convert it to a specific commercial software test scripts to automate testing of the system through commercial software testing, and the test results back to the assist automated test system for analysis, and then You may be the next test. 如图5所示,本发明的自动化测试辅助系统1在一定程度上充当了案例文件6与商业测试软件2之间的连接桥梁,利用本系统进行自动化测试的时候,首先需要根据一定的规则编写案例文件6,然后通过过本自动化测试辅助系统将相关的案例文件6转换为商业测试软件的脚本,在输入到商业测试软件2对被测试软件7进行测试。 5, the automatic test system of the present invention is an aid to some extent acts as a bridge 6 and the case files between the commercial test software, automated testing system using the present time, first need to write according to certain rules 6 case file, and then through the case files of this automated system will test support related 6 converted to script the commercial test software, test input to test software business software to be tested two pairs 7.

参见图6,其所示为本发明的自动化测试辅助系统模块结构,其中,本系统测试所需要的案例(流程)文件6和案例测试的执行序列文件18,均通过所述的文件接口11读入到系统运行的内存;测试执行软件接口15连接到商业测试执行软件并驱动该商业测试软件2,测试管理工具接口16连接到测试管理工具17;动态执行控制模块13一端与案例调度模块12连接,另一端分别连接到语法分析模块14、测试执行软件接口15、测试管理工具接口15,通过调用案例调度模块12对案例进行读入,调用语法分析模块14对案例进行分析、执行,并转换为相应的商业测试软件脚本,通过测试执行软件接口15驱动商业测试软件2,将执行结果通过测试管理工具接口16记载到测试管理工具17中。 Referring to FIG. 6, case (Scheme) automated test module configuration assistance system that the present invention is shown, wherein the system files required for testing and 6 cases of performing test sequence file 18 are read through the file interface 11 into the memory system operation; test executive software interface 15 is connected to the commercial test executive software and drives the commercial test software 2, test management tool interface 16 is connected to the test management tool 17; dynamic execution control module 13 at one end and case scheduling module 12 is connected and the other terminal connected to the syntax analysis module 14, a test execution of the software interface 15, the test management tool interface 15, be read by invoking the case scheduling module 12 of the case, calls the parsing module 14 of the case analysis performed, and is converted to corresponding commercial test script software, software 15 drives the commercial test 2 test execution software interfaces, the test results performed according to the management tool interface 16 to the test management tool 17.

各个模块功能介绍:案例调度模块:是测试案例的调度中心,其工作方式是首先通过文件接口模块读入案例执行序列,然后根据所读入的案例执行序列调度相应的测试案例,通过文件接口模块将其读入内存。 Each module Application: Case scheduling module: test case dispatch center, which work is performed first sequence is read into the case through the file interface module, and then perform a corresponding test case sequence scheduling according to the case being read, via file interface module it is read into memory.

动态流程执行控制:是本系统的核心模块,该模块包括三个主要作用:其一、通过调用案例调度模块对案例进行读入;其二、调用语法分析模块对案例进行分析、执行,并转换为相应的商业测试软件脚本,通过测试执行软件接口输入到商业测试软件,从而完成对被测软件的自动化测试;其三、将执行结果反馈到测试管理工具接口。 Dynamic process execution control: is the core module of the system, the module includes three main roles: First, read the case of the case by calling the scheduling module; Second, call syntax analysis module for case analysis, implementation, and conversion the corresponding commercial software test scripts, test execution software interface input through to commercial test software to automate the testing of the software under test; Third, the results will be fed back into the test management tool interface.

语法分析模块:该模块有两大作用,其一、在案例的初始化阶段,对测试案例的模板进行分析,从而构建起测试案例的所有操作步骤在内存中的映像;同时对流程进行分析,区分出动作关键字映射到相应的处理功能、输入数据、期望数据等信息;其二、在执行过程中,对案例数据进行语法分析。 Parsing module: This module has two effects. First, during the initialization phase of the case, the test case template analyzed to build the image of all the steps from test case in memory; simultaneous analysis of processes, distinguished an operation key mapped to the corresponding processing function, input data, the desired information data and the like; Second, during execution, for example data parsing.

文件接口模块:该接口主要将一定格式的测试案例、案例的执行序列转换为本系统案例调度模块所支持的格式。 File Interface module: The interface is mainly the execution sequence of test cases certain format, case-based format conversion system case scheduling module supports.

本自动化测试辅助系统最突出的特点不仅仅在于采用了DDE框架驱动,而且在于其采用了动态执行和延迟装载技术,即将自动化测试过程分解为“案例的初始化过程”和“案例的执行过程”两步,在初始化过程中只将案例模板、流程模板、案例名、流程名记录到内存中,并形成案例模板名、案例模板指令序列、案例名称、案例在文件中的位置等对应关系;同时形成流程模板名、流程模板指令序列、流程名称、流程在文件中的位置等对应关系,只有在执行的时候才根据需要装载有关的案例和流程的数据,而不是直接装载所有的案例数据,减少了对系统内存的占用。 The most prominent feature of the automated test system not only is the use of the auxiliary frame DDE drive, and in that it uses a dynamic delay execution and loading techniques, automated testing is about to process into "execution of cases", "the case of the initialization process", and two step, during initialization only the case of the template, the process template, case name, process name recorded in the memory, and forms case template name, the corresponding relationship case template instruction sequence, case name, case location in the file; formed simultaneously correspondence between the process template name, process templates instruction sequences, process name, process location in the file, only loaded in the implementation of necessary data relating to cases and processes, rather than directly load all case data, reduce the use of system memory. 并且采用了案例调用流程,流程调用基本操作的两步调用,大大简化了案例的编写。 And the use of case studies call flow, call a two-step process invokes the basic operation, greatly simplifies the preparation of cases.

参见图7,其所示为本发明的自动化测试过程图,先根据一定的规则编写案例100、然后对进行案例的初始化处理200,最后进行案例的执行与结果处理300。 Referring to Figure 7, which automate the testing process of the present invention shown in FIG., In accordance with certain rules to preparation of case 100, and case of the initialization processing 200, the final result of the execution process 300 cases.

参见图8,其所示为本发明的自动化测试流程中初始化处理200过程:1、编写初始化的配置文件201,包括:跟测试管理工具相关的参数、跟数据库相关的参数、案例执行序列的文件名、案例工作表名;2、读入配置文件,同时分析配置文件所设置的参数202;3、根据配置文件读入案例模板,分析案模板的关键词,在内存中形成案例模板名与案例模板指令序列的对应关系203;4、对基于每个模板的案例(流程)进行识别,在内存中形成案例(流程)名称、案例(流程)模板名称、案例(流程)在文件中的位置之间的对应关系204。 Referring to Figure 8, which automate the testing process of the present invention, shown in the process of initialization processing 200: 1, 201 writing initialization configuration file, comprising: a test management tool with parameters associated with the database-related parameters, the case file execution sequence name, table name casework; 2 reads the configuration file and the configuration file 202 analyzes the parameter set; 3 reads case template, template text keyword analysis based on the profile, is formed in the case and case template name memory template corresponding relationship between a sequence of instructions 203; 4, each template of the case (Scheme) based on the identification, the case is formed (process) name, case (Scheme) template name, case (process) location in the file in the memory correspondence between the 204.

经过了这两个步骤的处理,在内存中已经形成了案例名(流程名)、案例模板之间的对应关系,同时为了支持延迟装载所需要的文件位置等信息也一起保存。 After these two steps of the process, the name of the case has been formed (Scheme name) in the memory, the correspondence relationship between the template case, and in order to support the information needed for loading the delay and the like are also stored with the file location. 此时,案例本身的初始化过程已经完成。 At this point, the case itself, the initialization process has been completed. 因此,在案例的执行过程中,只需访问案例(流程)的内存映象,不必关心具体的案例数据是否已经装载。 Therefore, during the execution of the case, simply visit Case (process) memory image, do not care whether specific case data has been loaded. 如果在执行过程中发现某个案例(流程)的数据不存在,动态执行控制模块的延迟装载功能会自动从案例文件中装载指定案例(流程)的数据;如果所访问的案例(流程)的数据已经存在,则不需重复装载,这样所有的案例(流程),在一次测试过程中不管使用多少遍,也仅需装载一次,提高了对案例的处理速度。 If it is found one case (flow) there is no data, a delay control is performed dynamically load function module automatically load certain cases (flow) from the case data file during execution; Case (process) if the accessed data already exists, you do not need reloading, so that all cases (process), in a testing process no matter how many times, is also only loaded once, improve the processing speed of the case.

每次测试往往仅仅涉及到某个或某几个测试集,因此就避免了大量装入所有案例数据装入之后所引起的内存占用,从而提高执行的效率;同时也避免了通过案例执行序列查找案例,而后边分析案例模板边执行案例而引起的重复分析与执行速度变慢。 Each test usually involves only one or a few test set, thus avoiding a lot of memory footprint after loading all the data into the cases caused, thereby improving the efficiency of the implementation; while avoiding the execution sequences through the case to find case, repeat the analysis behind the analysis and case template side execution cases caused by the slower execution.

结构化的案例编写,减少了重复工作量,并且提高了案例的可重复性。 Preparation of case structured, reducing the duplication of work and improve the repeatability of the case.

基于案例的动态执行和延迟装载技术,该系统在案例的编写方式上实现了对操作流程的复用机制,具体如下:引入类似于程序设计中过程调用的语义,在编写案例的时候,如果每次均需执行相同的一系列的操作步骤,就可以将这一系列操作步骤抽象出来,定义称为一个流程模板,每一组具有不同的输入数据但与具有相同操作步骤的集合定义为不同的流程,这些流程同属于一个流程模板,先编写这些流程与流程模板,然后在案例编写中,调用已经定义好的流程,从而既简化了案例的编写过程,增加了案例的可维护性,同时也能提高了案例的执行速度,减少了案例执行过程中的内存消耗。 Dynamic loading techniques performed and delay case, the system is written in a manner to achieve the case of the operation flow multiplexing mechanism, as follows: introducing programming semantics similar procedure calls, in the preparation of the case, if each time required to perform the same series of steps, can abstract these series of operational steps, referred to define a process template, each group having a different set of input data but with the same procedure defined for different processes that belong to a process template, write your these processes and process templates, and then in the case of writing, the call has been defined process, which not only simplifies the process of preparing the case, increase the maintainability of the case, but also can improve the speed of execution cases, reduces memory consumption process cases execution.

参见图9,其所示为本发明的自动化测试流程中案例的执行过程300:由于在案例的初始化过程中已经在系统内存中记录了案例(流程)模板的指令序列、案例(流程)模板名与案例(流程)名的对应关系、某个案例在案例文件中的位置、某个流程在流程中的位置,因此在执行过程中主要包括如下步骤:①读入案例执行序列301;②根据该案例的执行序列,通过文件接口读入相关的案例文件302;根据案例执行序列中要执行的案例名称到内存中查找相关“案例”是否存在,然后判断相关案例的数据是否已经装载;若数据尚未装载,则通过内存中已经存在的该案例的存储位置到案例文件中读取案例数据;③分析并且执行案例303;④驱动商业测试软件进行测试304;⑤比较测试结果与期望数据305;⑥某个案例执行完毕,则将相关的结果通过测试管理工具接口反馈到测试管 Referring to Figure 9, during the execution of the test cases in which automated process 300 of the present invention as shown: Since the case has been recorded (process) in the system memory initialization process in case the template sequences of instructions, the case (Scheme) template name correspondence between the case (flow) name, the location of a file in the case of the case, a position in the process flow, thus includes the steps in the implementation process: ① case reads execution sequences 301; ② according to this execution sequence case, the relevant case file 302 through the file interface to read; the case execution case name sequence to be executed in memory to find relevant "case" exists, and then determine whether the relevant case data already loaded; if the data has not been loading already exists in memory through a storage location of the case into the case to read the data file cases; ③ analysis and performing case 303; ④ commercial test drive for testing software 304; ⑤ comparing test results with the expected data 305; ⑥ a the results of a case is finished, it will pass the relevant test management tool interface back to the test tube 理工具中306。 Processing tool 306.

参见图10,分析并且执行案例303,根据初始化过程中形成的该案例所属模板的指令序列中的关键词判断这一步骤是调用某个流程还是执行某个基本操作;若属于执行基本操作,则直接通过本自动化测试辅助系统将该操作转换为商业测试软件脚本,然后通过商业测试软件接口驱动商业测试软件;若为调用流程,则根据流程名到内存中查找流程数据是否已经装载,若没有装载,则进行装载,若已经装载,则直接根据流程模板分析流程并执行一个一个的基本操作,直至该流程执行完毕。 Referring to FIG. 10, and performs analysis of the case 303, the case according to the instruction sequence formed during initialization belongs template keyword determination step that the process of calling a basic or perform an operation; if belonging to perform basic operations, the direct assistance through this automated test system converts the operating software for the commercial test script, and then test interface driver software business through commercial testing software; whether to call if the process is to find the name of the process according to the flow of data has been loaded into memory, if not loaded , then a load is already loaded if, directly and perform a basic operation according to a process template analysis process, until the process is finished. 当一个基本操作或者流程执行完毕之后,该自动化测试系统通过语法分析模块取得案例指令序列的下一个关键词,进行下一步骤的执行,直到该案例完全执行完毕。 When a process is finished or the basic operation of the automated test system made by the syntax analysis module case instruction sequence next keyword, execution of the next step, until the case is completely finished. (注:由于流程代表了一系列基本操作的集合,所以当有大量案例需要测试的情况下,流程的重复程度是很高的,因此很多流程只要装载一次就可以了,避免了重复装载流程数据带来的时间损失)。 (Note: Due Process represents a collection of basic operations, so when a large number of cases to be tested, the process is very high degree of repetition, so many processes as long as the load it once, to avoid duplication of data loading processes It caused loss of time).

参见图11,本发明的测试管理工具既可以对测试的结果进行自动分析,灵活地组合形成需要再度测试的案例,以取代人工编写“案例执行序列”的过程;也可以案件测试之前把相关的案例信息(主要为案例名、案例功能、案例所属于的测试案例集)通过接口输入到测试管理工具(步骤401),再通过测试管理工具选择需要测试的案例(步骤402),形成“案例执行序列”;然后本自动化测试辅助系统进行初始化设置,并根据自动形成的“案例执行序列”分析和执行相关案例(步骤403);通过商业测试软件进行测试(步骤404);最后,将测试结果再反馈到测试管理工具中(步骤405);接着,若需要再进行案例的测试,则仍然可以通过测试管理工具可以对测试的结果进行自动分析,灵活地组合形成需要再度测试的案例,以取代人工编写“案例执行序列”的过程。 Referring to Figure 11, test management tool of the present invention may be performed on the results of the test automatic analyzer flexibly combined to form a case requires re-tested, instead of the process of "case execution sequence" manual written; the relevant prior may be cases tested case information (mainly the case name, case function, the case belongs to a test set) via an interface to the test management tool (step 401), and then select the cases to be tested (step 402) through the test management tool, to form a "case execution sequence "; then, the present automated test assistance system initialization settings, and automatic formation of the" execution sequence "analysis and implementation of related cases (step 403) cases; test (step 404) by a commercial testing software; Finally, the results again feedback to the test management tool (step 405); then, if necessary to carry cases tested, it can still be automatically analyzing the results of the test by the test management tool flexibly combined to form cases require re-testing, in order to replace the manual the process of writing "case execution sequence" of. 通过测试管理工具选取案例的执行序列主要包括下面几种方式:就案例的选择而言:一种方式是通过测试管理工具提供的界面直接进行操作,测试管理工具的界面列明了所有的案例名、案例描述、案例所属的测试集、案例被测试的次数、案例测试成功的次数、案例测试失败的次数等信息,操作人员可以通过界面对需要测试的案例进行选取;另一种方式是通过后台直接对测试管理工具的数据库进行处理,选取需要执行的案例。 By performing a sequence of test management tools include the following selected cases in several ways: in terms of the choice of cases: one way is provided by the test management tool interface for direct manipulation interface test management tool lists all cases of name , described case, the number of test cases set belongs, cases are tested, the test number of successful cases, the number of test information like the case of failure, the operator can select for the case to be tested through the interface; another way is through the background test management tools directly to the database for processing, selecting cases to be executed. 在选取完成之后,测试管理工具即可以自动生成某种格式的测试案例的执行序列,然后通过文件接口将该执行序列读入,由此进行案例测试;也可以不必生成测试案例的执行序列,而是直接将这些案例信息读入内存,进而进行案例测试。 After the registration is completed, i.e., test management tools can automatically generate some test case execution sequence format, then the file interface by execution sequence is read, thereby performing a test case; may be necessary to generate a sequence of execution of the test cases, and these case information directly into memory, and then perform a test case.

实施例1:参见图12,下面以对某个“消费交易”功能进行测试为例对本发明做详细说明:“消费交易”:主要是测试在发送端输入必要的数据,提交到被测试网络,然后由网络进行转接,发送到接受方进行必要的检查和处理,再通过网络回送给发送端。 Example 1: Referring to Figure 12, the following test for a "consumer transactions" function as an example of the present invention is described in detail: "consumer transactions": at the transmitting end primarily test input necessary data, to be submitted to the test network, then the network switches, is sent to the recipient and the processing necessary checks, through the network back to the sender.

案例的测试过程:1、编写测试案例、编写测试案例执行序列、编写初始化配置文件。 Case of the testing process: 1, the preparation of test cases, test case execution sequence write, write the initial configuration file.

①测试案例执行序列的编写(步骤501):以表格的方式表示,包含了该案例是否需要执行、所属案例集的名称(案例集目前的分类依据的是应用,如可以分为:预授权案例集、消费案例集、取款案例集等)、案例名称、案例描述等信息。 ① test case writing (step 501) execution sequence: expressed in tabular form, including whether the case needs to be performed, the name (case set based on the current classification set belongs cases of application, such as can be divided into: pre-authorization Case set, set of consumer cases, withdrawals case set, etc.), case name, case description and other information.

②测试案例的编写(步骤501):同样以表格的形式出现。 ② write test cases (step 501): the same in the form of a table. 主要由案例名称、关键词、流程名称、基本数据等几个组成部分,其中每一列的关键词表示所要进行的操作类型,或调用一个流程,或进行一次赋值操作等。 Case composed mainly of several names, keyword, name of the process, part of the basic data and the like, where each column represents a type of operation of the keyword to be performed, or a calling process, or an assignment operation. (测试流程的编写:把某些最基本的操作抽象出来编写为流程模板)。 (Testing process of writing: the basic operation of some abstracts prepared for the process template).

③初始化配置的编写(CONFIG.XLS)(步骤502):主要包括环境的设定、关于数据库连接的参数、与测试管理工具相关的参数、执行序列文件名、执行的案例集名(可以指定本次运行消费案例集,而不运行其他案例集)、以及案例或者流程中所使用到一些常数。 Write (CONFIG.XLS) (step 502) ③ initial configuration: including setting environment, on connection parameters database, associated with the test management tool parameters, execution sequence file name, in case of execution set name (may be specified according to the present runs consumption case set without running the other case set), as well as cases or processes used to constants.

2、初始化过程(步骤503):①把配置文件调入内存,进行测试系统的环境配置。 2, the initialization process (step 503): ① the configuration file into memory test system for environment configuration.

②对案例模板进行分析、对流程模板进行分析(但不装入案例数据与流程数据),并在内存中形成这样几组对应关系:将“消费案例”的模板装入内存,即在内存中记录了该模板的指令序列,但并不装载具体数据,如:第一步进行赋值操作、第二步调用流程等,至于具体赋什么值,调用哪个流程在初始化过程中并不需要加载;建立“每个消费案例”与“消费案例模板”的对应关系,即记录每个“消费案例”在“案例”文件中的位置,以及每个消费案例的名称;同时装载所有“流程”模板,并形成:流程与流程模板的对应关系;某个流程在流程文件中的具体位置等信息。 ② case template for the analysis of process templates for analysis (but not load case data and process data), and the correspondence between the formation of such groups in memory: the "Consumer case" template into memory, that memory record the instruction sequence of the template, but does not load specific data, such as: assignment first step, the second step call flow, etc. as for what specific assigned value, which processes invoked during initialization does not need to be loaded; build "every consumer case" correspondence between the "consumer case template", ie the recording position in the "case" file, as well as the name of each consumer in each case "consumer cases"; at the same time to load all the "process" template, and forming: a correspondence relationship of processes and process template; specific location information of a process in the process file.

3、“某个消费案例POS-1”进行测试的详细过程:由于在初始化过程中已经形成案例与案例模板的对应关系,也就是经过初始化,内存中记录了某个案例模板的指令序列,即一步步应该进行什么操作,并且记录了哪个案例属于哪个案例模板。 3, "a consumer cases POS-1" in detail the process of testing: As in the initialization process has been formed correspondence between the case and case templates, that is, after initialization, memory record the sequence to a case template, that is What should be a step by step operation, and recorded cases which belongs to which case template. 因此,在执行过程中,首先,导入案例的执行序列,然后根据该执行序列所指定的需要执行的案例名称POS-1,查找内存中是否存在该案例数据,查找结果内存中有该案例名,但没有该案例数据,则加载该案例数据,再根据在初始化过程中在内存中形成的该案例所属的案例模板的指令序列进行分析,若该指令需要执行,则判断是属于调用流程还是进行基本操作,如果需要调用流程的话,则根据流程名称判断是否数据已经装载,如果没有装载,则通过相关的映射把相关的流程数据调入内存,然后执行流程中的基本操作;若属于基本操作,则直接执行基本操作。 Thus, in the implementation process, first, a sequence introduced into the case, and according to the case of the execution sequence specified need to perform a name POS-1, to find whether there is the case of the data in memory, the search result memory contains the case name, but not the case data, load the case data, and then analyzed according to the instruction sequence case template of the case is formed in memory during initialization belongs, if the instruction needs to be performed, it is determined that belongs to the calling process is carried out substantially operation, if desired call flow, then according to the name of the process determines whether the data has been loaded, if not loaded, through the associated mapping the relevant process data into memory, then the basic operation executed process; if it belongs to the basic operation is direct perform basic operations.

根据初始化过程中在内存中形成的案例POS-1所属的案例模板的指令序列表明,该案例的指令序列为“调用流程——调用流程——赋值——发送报文——调用流程——调用流程——调用流程——调用流程……调用流程”。 According to the instruction sequence case template case initialization formed in memory POS-1 belongs to show that this case is a sequence of instructions "and calls the process - the calling process - assignment - to send the message - call flow - call process - the calling process - the calling process ...... invoke the process. "

因此,在执行过程中,加载案例POS-1的数据后,将会进行案数据和案例模板指令序列匹配,如案例POS-1第一步的数据为A,则根据指令序列第一步为“调用流程”,就知道该案例第一步的操作为“调用流程A”。 Thus, in the implementation process, after the data is loaded Case POS-1, will be the case data and case instruction sequence template matching, as in the case of POS-1 the first step for the data A, the first step is a command sequence " call flow ", you know the first step in the case of operating as a" call flow a ".

①受理方页面设置,调用流程A(步骤504)流程A的操作为受理方的动作,如设置卡介质、交易类型、报文头选择(带报头、不带报头)、新旧密钥选择、发送控制(直接发送、不发送、延迟发送、重复发送)、加密选择。 ① acquirer page setup, the calling process A operates (step 504) Scheme A for operation reception side, such as setting card medium, transaction type, the message header selection (with a header, without a header), the new and old key selection, sending control (direct transmission is not sent, transmission delay, transmission is repeated), the encryption selecting. 在调用流程A504的过程中,首先判断该流程的数据是否已经装载到内存,如果还没有装载,则执行装载过程,若已经装载,则直接从内存中取得流程数据;②发卡方页面设置,调用流程B(步骤505)流程B的操作为:自动进行发卡方的动作(与受理方类似);③交易类型选择:设置为“消费”(步骤506)这步为赋值操作,用来进行相关域的设置和报文头的参数设置;如设置用案例编号:EXP010XXN01;④发送报文(步骤507)发送报文为一个基本操作,直接将发卡方的数据发送,该操作直接执行,通过本系统的动态执行控制模块转换为商业软件测试脚本;⑤受理方仿真器日志获取,调用流程C(步骤508)流程C的作用是对发送报文日志的数值与预期的数值进行比对,是否与预期数值一致;⑥发送方仿真器日志获取,调用流程D(步骤509)流程D的作用是对发送报文日志的数值与预期 During call flow A504, first determines whether the data of the process has been loaded into memory, if not already loaded, perform the loading process, if already loaded, the acquisition process data directly from memory; ② issuer page setup, call Scheme B (step 505) the operation process B is: issuer operates (the acquirer and the like) automatically; ③ transaction type selection: set to "consume" (step 506) this assignment step is used to perform related domains parameter is set and the packet header is set; as provided by case number: EXP010XXN01; ④ transmits the message (step 507) sending packets to a basic operation, directly to the card issuer data transmission, the operation is directly performed by the system dynamic execution control module converts commercial software test script; ⑤ acquirer emulator log acquisition, call flow C effect (step 508) Scheme C is a value of the expected transmission packet logs values ​​for comparison, if the expected Numerical consistent; ⑥ emulator log acquisition sender, call Scheme D (step 509) the role of Scheme D is the transmission packets with the expected value of the log 数值进行比对,是否与预期数值一致;⑦受理方报文检查,调用流程E(步骤510)流程E的作用是对受理方的报文进行检查,判断结果;⑧发卡方报文检查,调用流程F(步骤511)流程F的作用是对发卡方的报文进行检查,判断结果; Value for comparison, is consistent with the expected value; ⑦ acquirer packet checking, call Scheme E (step 510) the role of Scheme E is a packet acquirer is checked, the determination result; ⑧ issuer packet checking, call Scheme F (step 511) the flow effect F is the card issuer packet inspection, the determination result;

⑨数据库获取数据,调用流程G(步骤512);该流程主要实现的是对数据库中的数据进行比对;⑩检查应答报文写的转接日志,比对结果、生成LOG文件(步骤513)。 ⑨ acquired data database, call flow G (step 512); the main realization procedure is to data in the database for comparison; ⑩ check response packet written in the log transfer, a comparison result, generating a LOG file (step 513) .

将测试结果反馈到测试管理工具(步骤514)。 The test results back to the test management tool (step 514). 如果案例的执行序列指明还有其他案例需要测试,则继续读取案例——初始化——执行,只是调用的流程、执行的步骤有所不同而已。 If there are other cases execution sequence specified cases to be tested, it continues reading the case - Initialization - perform, just call the process steps performed was different.

由于采用了本发明所述的技术手段,取得了如下明显的效果:每次运行并非针对所有运行集进行,也并非会涉及所有的流程,因此把所有案例数据调入内存需要很长的时间,在某种程度上也是一种浪费。 As a result of the technical means of the present invention, it achieved the following significant results: for each run not run against all sets, will not be directed to all processes, so all cases the data into memory takes a long time, in a way is a waste.

将案例的执行与案例的初始化相区分,在初始化过程中只需要调入案例模板、关键词、案例名称等信息。 Will perform the initialization phase of the case the case to distinguish, during initialization only needs to call in case template, keyword, case name and other information. 这就避免了大量数据的调入,同时也避免了将一个案例所有信息串联起来需要耗费的大量时间。 This avoids a lot of data transferred, but also to avoid a lot of time will be a case of all the information it takes a series.

从理论上说,调度一个案例的时候,通过案例名调用该案例,同时分析关键词,如果关键词表示调度流程的话,还需要根据流程名称调度相关的操作与步骤,时间上比原来单个案例的执行会有所增加,但根据我们的测试和实验数据,这种时间上的增加几乎感觉不出。 In theory, when scheduling a case by case invoked the name of the case, and keyword analysis, keyword indicates that the scheduled process if the words, but also operations related to step scheduling process according to the name than the original individual cases on time execution will increase, but according to our tests and experimental data, this increase in time is almost not feel.

例如:要测试400个案例,原先其初始化过程需要耗费20到30分钟,每笔交易测试执行速度将近2到3分钟;而采用了案例的动态执行和延迟装载之后,速度大幅度提高,其初始化过程只需要2到3分钟,而每笔交易测试的执行速度基本上没有大的变化。 For example: To test the 400 cases, the original initialization process which takes 20-30 minutes per transaction execution speed test nearly 2-3 minutes; the use of dynamic and performed after a delay loading case, increase in the speed, initialized process takes only 2-3 minutes, and test execution speed of each transaction is essentially no major changes.

案例执行序列可以是由人工编写的,并给各个案例指定了其所在的案例子集,和是否执行的标志。 Case execution sequence may be written by hand, and give each case specify a subset of cases in which it is, and whether the flag. 也可以是由测试管理工具实现案例的动态运行调度,可以由测试管理工具自动控制案例执行序列,利用测试管理工具对所有案例进行动态而便捷的调度。 Can also be achieved by the test case management tool to run dynamic scheduling, you can perform a sequence of test case management tool automation, dynamic and convenient scheduling of all cases using a test management tool. 例如:我们重新运行的某些案例,或者需要对所有执行失败的案例重新运行的话,我们只要利用测试管理工具修改执行序列即可。 For example: Some of the cases we re-run, or the need to re-run all cases of failure to execute it, as long as we make use of test management tools to modify the execution sequence.

Claims (15)

1.一种自动化测试辅助系统,用于驱动软件测试系统中的商业测试软件,其特征在于,该系统由如下模块组成:a)动态执行控制模块,b)案例调度模块,c)语法分析模块,d)文件接口,e)测试执行软件接口,f)测试管理工具接口;其中,本系统测试所需要的案例文件、流程文件和案例测试的执行序列文件,均通过所述的文件接口读入到系统运行的内存;测试执行软件接口连接到商业测试执行软件并驱动该商业测试软件,测试管理工具接口连接到测试管理工具;动态执行控制模块一端与案例调度模块连接,另一端分别连接到语法分析模块、测试执行软件接口、测试管理工具接口,通过调用案例调度模块对案例进行读入,调用语法分析模块对案例进行分析、执行,并转换为相应的商业测试软件脚本,通过测试执行软件接口驱动商业测试软件,将执行结果通 An automated test assistance system, software for driving test system test software business, characterized in that the system consists of the following modules: a) a dynamic execution control module, b) scheduling module case, c) parsing module , d) file interface, e) the test execution software interfaces, f) test management tool interface; wherein the system required test case files, processes, files, and test case execution sequence files, each file interface through said read the memory system operation; test executive software interface to a commercial test executive software and drives the commercial test software, test management tool interface is connected to the test management tool; dynamic execution control module end and case scheduling module is connected to the other terminal connected to the grammar analysis module, test execution software interfaces, test management tool interface, by calling case scheduling module of the case reads, call syntax analysis module for case analysis, implementation, and converted to the corresponding commercial test software script, pass the test execution software interfaces drive test software business, the execution results through 测试管理工具接口记载到测试管理工具中。 Test management tool interface to record test management tool.
2.如权利要求1所述的自动化测试辅助系统,其特征在于,所述的语法分析模块包括案例模板分析单元,并且动态执行控制模块连接到该单元。 The automatic test assistance system as claimed in claim 1, wherein said parsing module comprises a case template analysis unit, and performs dynamic control module connected to the unit.
3.如权利要求1所述的自动化测试辅助系统,其特征在于所述的文件接口模块还具有将测试案例、案例的执行序列转换为本系统案例调度模块所支持的格式的功能。 Auxiliary automated test system according to claim 1, characterized in that said interface module file format also has a function to perform a sequence of test cases, case conversion system of the present case scheduling module supports.
4.一种使用本发明的系统的软件自动测试方法,包括如下步骤:a)初始化装载,b)把案例执行序列调入内存,并据此进行案例调度;c)分析案例、加载案例数据;d)执行案例并生成脚本函数供商业测试软件进行测试;e)将测试结果与期望数据进行比较;f)写日志文件,同时将运行结果输入到测试管理工具。 4. A system according to the present invention using software automatic testing method, comprising the steps of: a) loading the initialization, b) the case execution sequence into the memory, and accordingly the case scheduling; c) analysis of case data loading case; d) cases and generate scripts to perform the function for commercial testing software testing; e) the test results with the expected data are compared; f) write the log file, while operating results input to the test management tool.
5.如权利要求4所述的方法,其特征在于,所述的初始化装载包括如下内容:把系统运行所需要的配置文件的相关参数调入内存,包含了案例文件名、流程文件名、案例执行序列文件名、跟被测软件相关的参数,和跟测试管理工具相关的参数;分别根据案例文件名和流程文件名读入案例文件和流程文件,对其中的案例模板部分进行分析,同时也对流程文件中的流程模板进行分析。 5. The method according to claim 4, wherein said initialization comprising the following loading: the relevant parameters of the system needed to run the configuration file into memory, the file name includes the case, the process file name, case execution sequence file name, with the tested software-related parameters, and with test management tools related parameters; were read case files and process files based on the case file names and process file name, for case template part of it for analysis, but also on process flow template file for analysis.
6.如权利要求4所述的方法,其特征在于,所述的案例文件、流程文件和案例执行序列文件可以是存放在多个文件中,也可以存放在一个文件的多个不同的工作表中。 6. The method according to claim 4, wherein said case file, case files, and perform the process sequence file may be stored in multiple files may be stored in a plurality of files of different worksheet in.
7.如权利要求4所述的方法,其特征在于,所述的案例调度是由动态执行控制模块进行案例调度。 7. The method according to claim 4, wherein said case scheduling is performed by the dynamic scheduling case the control module.
8.如权利要求4所述的方法,其特征在于,所述的分析案例、加载案例数据指判断案例数据是否已经装载到内存中,并根据分析结果加载案例数据,该步骤由动态执行控制模块来完成的。 8. The method according to claim 4, wherein said case analysis, case data loading case means determining whether data has been loaded into memory, and based on the analysis of data loading case, this step is performed dynamically by the control module to complete.
9.如权利要求5所述的方法,其特征在于,所述的案例执行序列中记载了该序列要执行的案例是属于哪个测试集的。 The method according to claim 9, wherein said case execution sequence of the sequence described in the case of which test to be performed is set belongs.
10.如权利要求5所述的方法,其特征在于,所述的对其中的案例模板部分进行分析,还包括对该模板的指令序列进行初步分析,在内存中形成案例模板与案例模板指令序列之间的对应关系。 10. The method according to claim 5, characterized in that said part of the case where the template is analyzed, further comprising a preliminary analysis of the instruction sequence of the template, the template is formed and case case template sequence of instructions in memory correspondence between the.
11.如权利要求10所述的方法,其特征在于,所述的对其中的案例模板部分进行分析,还包括对基于每个模板的案例进行识别,在内存中形成案例、案例模板、案例在案例文件中的位置之间的对应关系。 11. The method according to claim 10, wherein the template portion of the case wherein the analyzing further comprising case for each template-based identification, in case the memory is formed, the template case, in the case correspondence between the location of the case file.
12.如权利要求5所述的方法,其特征在于,所述的对其中的流程模板部分进行分析,还包括对该流程的指令序列进行初步分析,在内存中形成流程模板与流程模板指令序列之间的对应关系。 12. The method according to claim 5, wherein said portion of the template where the process is analyzed, further comprising a preliminary analysis of the instruction sequence flow, and the flow process template forming a template sequence of instructions in memory correspondence between the.
13.如权利要求12所述的方法,其特征在于,所述对其中的流程模板部分进行分析,还包括对基于每个模板的流程进行识别,在内存中形成流程、流程模板、流程在流程文件中的位置之间的对应关系。 13. The method of claim 12, wherein the template part of the process wherein the analysis further comprises for each template-based recognition processes, the flow is formed in the memory, the flow template, the process in the process correspondence between the position in the file.
14.如权利要求6所述的方法,其特征在于,所述的案例调度是由测试管理工具进行的。 14. The method according to claim 6, wherein said case scheduling is performed by the test management tools.
15.如权利要求14所述的方法,其特征在于,对执行失败的案例或者需要重新运行的案例,用测试管理工具动态修改,以自动生成新的案例执行序列。 15. The method according to claim 14, characterized in that the case of failed or the need to re-run case, dynamic modification with the test management tools to automatically generate a new case execution sequence.
CN 200410054163 2004-08-31 2004-08-31 Automatic test auxiliary system and corresponding software automatic test method CN100375057C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410054163 CN100375057C (en) 2004-08-31 2004-08-31 Automatic test auxiliary system and corresponding software automatic test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410054163 CN100375057C (en) 2004-08-31 2004-08-31 Automatic test auxiliary system and corresponding software automatic test method

Publications (2)

Publication Number Publication Date
CN1744054A true CN1744054A (en) 2006-03-08
CN100375057C CN100375057C (en) 2008-03-12

Family

ID=36139438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410054163 CN100375057C (en) 2004-08-31 2004-08-31 Automatic test auxiliary system and corresponding software automatic test method

Country Status (1)

Country Link
CN (1) CN100375057C (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043714A (en) * 2010-12-10 2011-05-04 成电汽车电子产业园(昆山)有限公司 Automatic testing system of embedded software
CN102135939A (en) * 2011-03-30 2011-07-27 镇江睿泰信息科技有限公司 Test case operation dispatching device and method
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
WO2012075889A1 (en) * 2010-12-08 2012-06-14 深圳市茁壮网络股份有限公司 Browser testing method and system
CN102591775A (en) * 2011-12-30 2012-07-18 苏州汉清投资管理有限公司 System for implementing automatic test of software
CN102789401A (en) * 2012-07-12 2012-11-21 北京泛华恒兴科技有限公司 Test process control method and device on basis of flexible testing technology
CN101802792B (en) 2007-09-14 2012-12-26 空中客车运营简易股份公司 Method for automatic script generation for testing the validity of operational software of a system of aircraft and device for implementing the same
CN101587441B (en) * 2008-05-20 2013-01-16 株式会社理光 Apparatus, method, and system of assisting software development
CN101789002B (en) * 2010-01-22 2013-09-11 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
CN101098200B (en) * 2006-06-27 2014-02-19 中兴通讯股份有限公司 Method for implementing customizable test procedure
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN103942138A (en) * 2013-01-23 2014-07-23 纽海信息技术(上海)有限公司 Testing method and device
CN106354628A (en) * 2016-08-12 2017-01-25 北京小米移动软件有限公司 Payment app test method and device thereof
CN106951349A (en) * 2017-03-16 2017-07-14 郑州云海信息技术有限公司 A kind of method and apparatus for carrying out cpu test to domestic server using SPEC CPU
CN107656846A (en) * 2017-09-19 2018-02-02 郑州云海信息技术有限公司 A kind of acquisition methods and device of the hardware information of equipment
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098200B (en) * 2006-06-27 2014-02-19 中兴通讯股份有限公司 Method for implementing customizable test procedure
CN101802792B (en) 2007-09-14 2012-12-26 空中客车运营简易股份公司 Method for automatic script generation for testing the validity of operational software of a system of aircraft and device for implementing the same
CN101587441B (en) * 2008-05-20 2013-01-16 株式会社理光 Apparatus, method, and system of assisting software development
CN101789002B (en) * 2010-01-22 2013-09-11 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
WO2012075889A1 (en) * 2010-12-08 2012-06-14 深圳市茁壮网络股份有限公司 Browser testing method and system
CN102043714B (en) * 2010-12-10 2013-01-02 成电汽车电子产业园(昆山)有限公司 Automatic testing system of embedded software
CN102043714A (en) * 2010-12-10 2011-05-04 成电汽车电子产业园(昆山)有限公司 Automatic testing system of embedded software
CN102135938B (en) * 2011-03-21 2015-04-15 中国工商银行股份有限公司 Software product testing method and system
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN102135939A (en) * 2011-03-30 2011-07-27 镇江睿泰信息科技有限公司 Test case operation dispatching device and method
CN102135939B (en) * 2011-03-30 2014-01-22 镇江睿泰信息科技有限公司 Test case operation dispatching device and method
CN102591775A (en) * 2011-12-30 2012-07-18 苏州汉清投资管理有限公司 System for implementing automatic test of software
CN102789401A (en) * 2012-07-12 2012-11-21 北京泛华恒兴科技有限公司 Test process control method and device on basis of flexible testing technology
CN102789401B (en) * 2012-07-12 2014-11-05 北京泛华恒兴科技有限公司 Test process control method and device on basis of flexible testing technology
CN103810094A (en) * 2012-11-14 2014-05-21 中国农业银行股份有限公司 Executing method and device for test case and test tool
CN103810094B (en) * 2012-11-14 2016-10-05 中国农业银行股份有限公司 Execution method, device and the testing tool of a kind of test cases
CN103942138A (en) * 2013-01-23 2014-07-23 纽海信息技术(上海)有限公司 Testing method and device
CN106354628A (en) * 2016-08-12 2017-01-25 北京小米移动软件有限公司 Payment app test method and device thereof
CN106951349A (en) * 2017-03-16 2017-07-14 郑州云海信息技术有限公司 A kind of method and apparatus for carrying out cpu test to domestic server using SPEC CPU
CN107656846A (en) * 2017-09-19 2018-02-02 郑州云海信息技术有限公司 A kind of acquisition methods and device of the hardware information of equipment
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device

Also Published As

Publication number Publication date
CN100375057C (en) 2008-03-12

Similar Documents

Publication Publication Date Title
US5634127A (en) Methods and apparatus for implementing a message driven processor in a client-server environment
US7200588B1 (en) Method and mechanism for analyzing trace data using a database management system
JP4684376B2 (en) Method, computer program product, system and recording medium for interconnecting software drivers in kernel mode
US6810494B2 (en) Software system and methods for testing transactional servers
CN100347696C (en) Method and system for enterprise business process management
US7954059B2 (en) Automatic conversion of text-based code having function overloading and dynamic types into a graphical program for compiled execution
CN100440141C (en) Customizable information processing apparatus
US20030070119A1 (en) Method and system for testing a software product
JP2007519073A (en) Administrative tool environment
US8185877B1 (en) System and method for testing applications
Apfelbaum et al. Model based testing
EP1089172A2 (en) Compiler and method for compiling specification language into implementation language
US6978440B1 (en) System and method for developing test cases using a test object library
US7624401B2 (en) Reflection-based processing of input parameters for commands
US6421822B1 (en) Graphical user interface for developing test cases using a test object library
US20140075242A1 (en) Testing rest api applications
EP2026212B1 (en) Automatic test generation for reference testing
US8572437B2 (en) Multi-platform test automation enhancement
JP2004503841A (en) Method and system for reporting XML data from legacy computer systems
US7398514B2 (en) Test automation stack layering
US7603658B2 (en) Application functionality for a test tool for application programming interfaces
US7685604B2 (en) Business process execution language (BPEL) application generator for legacy interfaces
US7734492B2 (en) Validation and analysis of JDF workflows using colored petri nets
EP1027648B1 (en) Apparatus for semi-automated generation and application of language conformity tests
US7634756B2 (en) Method and apparatus for dataflow creation and execution

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted