CN1851664A - Keyword driving havigation method - Google Patents

Keyword driving havigation method Download PDF

Info

Publication number
CN1851664A
CN1851664A CN 200510037185 CN200510037185A CN1851664A CN 1851664 A CN1851664 A CN 1851664A CN 200510037185 CN200510037185 CN 200510037185 CN 200510037185 A CN200510037185 A CN 200510037185A CN 1851664 A CN1851664 A CN 1851664A
Authority
CN
China
Prior art keywords
key word
script
navigation
function
test
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 200510037185
Other languages
Chinese (zh)
Other versions
CN100357910C (en
Inventor
林培兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005100371854A priority Critical patent/CN100357910C/en
Publication of CN1851664A publication Critical patent/CN1851664A/en
Application granted granted Critical
Publication of CN100357910C publication Critical patent/CN100357910C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention provides key word driven navigation method, wherein adopting static script and dynamically script composed navigation script, storing key word, navigation key word and correlation among key word realizing function in central data base, then static script completing central data base loading and to establish relevant dynamically script according to required key word. Said dynamical script obtains corresponded key word realizing function through finding said central data base according to key word and navigation key word, said dynamical script transmitting key word parameter in testing logic to said key word realizing function, through executing said key word realizing function capable of completing relevant test function and feeding back result to testing logic. Said invented method can raise development efficiency and reduce navigation script maintenance cost.

Description

The air navigation aid that a kind of key word drives
Technical field
The present invention relates to automatization testing technique, more particularly, relate to the air navigation aid that a kind of key word drives.
Background technology
In the process that telecommunication apparatus or software are tested, typically use Key-Word Driven (key word driving) technology, it is based on the Robot tool platform of Rational company and realizes, is applied to usually in the automatic test of GUI (graphic user interface).
In the key word Driving technique, the tester can use the form of similar Excel worksheet, sets up test case in the mode of input key word (Key-Word).The whole process (comprising function) of this method is all driven by key word, and whole test process controlled in key word.
It shown in the table one an exemplary test case.
Table one
COLUMN1 KeyWord1 COLUMN2 Field/Screen Name COLUMN3 Input/Verification Data COLUMN4 Comment COLUMN5 Pass/Fail
Start_Test: Screen Main Menu Verify Starting Point
Enter: Selection 3 Select Payment Option
Action: Press_Key F4 Access Payment Screen
Verify: Screen Payment Posting Verify Screen accessed
Enter: Payment Amount 125.87 Enter Payment Data
Payment Method Check
Action: Press_Key F9 Process Payment
Verify: Screen Payment Screen Verify Screen remains
Verify_Data: Payment Amount $125.87 Verify updated data
Current Balance $1,309.77
Status Message Payment Posted
Action: Press_Key F12 Return to Main Menu
Verify: Screen Main Menu Verify return to Menu
Wherein, first row are key words, are used to illustrate the action that will carry out; Second to the 4th row are necessary parameters of action of carrying out first row; The 5th row are used to represent whether this step is passed through.
As shown in Figure 1, the operating mechanism of key word Driving technique is as follows:
(1) tester sets up as shown in Table 1 test case file with Excel, but called after KeyWords_Web.xls for example; Test case file is made up of key word (as Enter, Action, Verify etc.) and parameter thereof.
When (2) test case is moved, drive script (Drive TSL script) and can move initialization script (LogonTSL script), for initial work is made in whole test, and be written into control documents (Run.txt), to obtain the current test case that will move (* .xls, for example KeyWords_Web.xls).
(3) drive script (Drive TSL script) after initial work is finished, start-up control script (Controller TSL script), originally be responsible for resolving the key word of whole test case file by control pin, for example Enter, Action, Verify etc., and call corresponding with it realization script (User Defined TSL script) according to these key words.
(4) Utility script (promptly realizing the TSL script) is actual carries out each test action, and uses other row as parameter, after executing the result is returned to the control script.When controlling script executing delegation to the end, whole test case just finishes to carry out.
(5) all the use-case files (* .xls) in control documents (Run.txt) have all moved and have finished, and then this test process finishes.
From the above, in the process that telecommunication apparatus or software are tested, the key word Driving technique has following shortcoming:
(1) is mainly used in the GUI automatic test, and based on the Robot tool platform of Rational company and realize, (a) its cross-platform (refering in particular to operating system) transplantability is more weak, (b) it is also more weak to stride the tool platform transplantability, (c) and be not suitable for being applied to the automatic test of communication facilities series products.
(2) lack central database (CDB), AW (key word) itself is exactly NKey (navigation keyword), the navigation of key word directly realizes in driver module, normally case statement that provides by programming language or if statement are realized, as shown in Figure 2, therefore, if newly-increased key word then must be revised driver module; Its result will cause: (a) cost of development increases in the automatic test course, and (b) key word will have a large amount of redundancies, (c) need safeguard the driver module of a plurality of versions simultaneously.
(3) can't realize the routine transplanting on probation of different product/version intermittent gauging.
(4) implementation of key word can only realize by script, can't wait by other programming language such as C, Pascal and realize.
Summary of the invention
At the above-mentioned defective of prior art, the technical problem to be solved in the present invention is how to improve the airmanship of key word, makes needn't revise navigation script when increasing key word newly.
For solving the problems of the technologies described above, the solution of the present invention provides the air navigation aid that a kind of key word drives, and adopts static scenario and dynamic script to form navigation script, may further comprise the steps:
(S1) finish the loading of central database by described static scenario, and create the corresponding dynamic script;
(S2) described dynamic script obtains corresponding key word and realizes function according to described key word and corresponding with it navigation keyword.
Purpose in order to realize testing also comprises among the present invention:
(S3) described dynamic script is passed to described key word with the parameter of the key word in the test logic and is realized function;
(S4) carry out described key word and realize function, to finish corresponding test function.
Among the present invention, realize the information of mutual relationship between the function relevant for key word, navigation keyword and key word in described central database stored; In described step (S1), after described static scenario is finished the loading of central database, create the corresponding dynamic script according to required key word; In described step (S2), described dynamic script obtains corresponding key word realization function according to described key word and corresponding with it navigation keyword by searching described central database.
Among the present invention, described navigation script can be realized by script or compiler language.Described static scenario is the initialization script; In described step (S1), described static scenario can be created described dynamic script by the characteristic of script dynamic creation order.Described script can be Tool Command Language (TCL).
Adopt after the solution of the present invention, pass through central database, maintain keyword and and navigation keyword, key word when realizing corresponding relation between the function, only needing to revise central database gets final product, and needn't revise navigation script again, thus having improved key data drives the development efficiency of automatic test, and reduced the follow-up maintenance cost of key word driving automatic test, can avoid simultaneously the redundancy of key word, avoid safeguarding the navigation script of a plurality of versions; In addition, the configuration with the testing tool of identical function or testing tool with control also the identical key word of definable one cover and realize.
And, by having taked technique scheme, function realized in the key word that just key word can be navigate to different testing tools or testing tool by navigation keyword, function realized in the key word that also key word can be navigate to the different editions of different product or identical product, thus for test script different product or identical product not the transplanting between version lay a good foundation.
In addition, because the navigation script is in the present invention realized by script (as TCL script, Python), and script possesses cross-platform (refering in particular to operating system) and stride the characteristic of tool platform, therefore, the solution of the present invention can improve cross-platform transplantability and stride the tool platform transplantability, thereby is more suitable for being applied to the automatic test of communication facilities series products.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 be in the prior art key word Driving technique the motion mechanism synoptic diagram;
Fig. 2 is the schematic flow sheet when increasing key word newly in the prior art;
Fig. 3 is the structural representation of the navigation script among the present invention;
Fig. 4 is the initialization flowchart of navigation script among the present invention;
Fig. 5 is the implementation synoptic diagram of test logic among the present invention.
Embodiment
Realization of the present invention is based on every development of prior art, and for example, the characteristic of script (as TCL, PYTHON etc.) characteristic such as carries out, can embed, can expand as explaining, for automatization testing technique is laid a good foundation; Simultaneously, various products (as telecommunication apparatus or software) not only provide graphical interfaces, also provide command line interface or man-machine interface simultaneously, also lay a good foundation for the automatization testing technique of product; In addition, the applicant puts into practice through automatic test for many years, summed up a whole set of automatic test script Design Mode, comprised that linear test script Design Mode, structuring test script Design Mode, shared test script Design Mode, data-driven test script Design Mode, key word drive test script Design Mode etc.
For ease of the understanding of the present invention, below simple an introduction done in terms more used herein, specifically as shown in Table 2:
Table two
English name Chinese Definition
TestCluster Test set 1), the same test environment configurations of some test logics and networking configuration; 2), test set is test environment division logically; 3), test set is a minimum material of forming test environment.
TestLogic Test logic 1), the identical testing process of some test cases, the script describing of one group of test case that promptly testing process is identical, test data is different; 2), test logic can move under different test environments;
AW Key word 1), test action, the expression test logic a testing procedure; 2) minimum material of, forming test logic; 3), AW is exactly Key-Word herein, all represents the meaning of key word.
The key word function Generate by navigation script, belong to navigation script, be used to finish function realized in key word to key word navigation
Function realized in key word The function of key word realizes function, is used to finish corresponding test function;
TCL Tool Command Language A kind of explanation execution script language
NKey Navigation keyword By navigation keyword, key word can be realized by different product or the different functions of different product.By NKey, key word just can find correspondent keyword to realize function
CDB Central database The incidence relation between the function realized in storage key, NKey, key word
NScripts Navigation script Be driver module, according to Nkey, key word navigate to different key words realize function by navigation script
By aforementioned content as can be known, the objective of the invention is to improve the navigation scheme of key word, make and to revise navigation script when increasing key word newly.
As shown in Figure 3, among the present invention, navigation script is made up of two parts: (1) part is static scenario, it is the initialization script, be mainly used in the loading of finishing central database, and pass through the characteristic of script (as TCL) dynamic creation order, create the dynamic script of navigation script; (2) another part is a dynamic script, i.e. key word function, and it finishes the navigation of key word according to navigation keyword (NKey), carries out key word and realizes function, and the result is returned to test logic.During concrete enforcement, navigation script can be realized by script (as Python) or compiler language (as C).
As shown in Figure 4, navigation script loads central database at initial phase, and realize the corresponding relation between the function according to the key word that defines in the central database and key word and navigation keyword, key word, utilize the characteristic that can dynamically generate order of script (as TCL), generate the key word function, i.e. dynamic script; With the part of key word function, finish function realized in key word to key word navigation function then as navigation script.
As shown in Figure 5, test logic is in the process of implementation:
(1) key word will trigger the key word function, then carry out the key word function, promptly carry out the dynamic script in the navigation script;
(2) the key word function is searched central database according to key word and corresponding with it navigation keyword, realizes function to obtain the key word corresponding with key word; Loading herein is meant that a central database all the elements is loaded in the calculator memory or is connected to database; Search and be meant and in central database, search certain bar record;
(3) dynamic script in the navigation script is also passed to key word simultaneously with the parameter of the key word in the test logic and is realized function, carries out key word then and realizes function, to finish corresponding test function;
(4) result is returned to test logic, and whether definite test logic continue to carry out next key word, if for otherwise finish whole flow process.
As seen, among the present invention,, needn't revise navigation script,, reduce the maintenance cost of navigation script so improved development efficiency because the corresponding relation of key word that increases newly and navigation keyword, key word realization function only needs to revise central database.Navigation script wherein can be realized by script (as Python) or compiler language (as C).

Claims (8)

1, a kind of air navigation aid of key word driving is characterized in that, adopts static scenario and dynamic script to form navigation script, may further comprise the steps:
(S1) finish the loading of central database by described static scenario, and create the corresponding dynamic script;
(S2) described dynamic script obtains corresponding key word and realizes function according to described key word and corresponding with it navigation keyword.
2, method according to claim 1 is characterized in that, and is further comprising the steps of:
(S3) described dynamic script is passed to described key word with the parameter of the key word in the test logic and is realized function;
(S4) carry out described key word and realize function, to finish corresponding test function.
3, method according to claim 2 is characterized in that, realizes the information of mutual relationship between the function relevant for key word, navigation keyword and key word in described central database stored.
4, method according to claim 3 is characterized in that, in described step (S1), after described static scenario is finished the loading of central database, creates the corresponding dynamic script according to required key word.
5, method according to claim 4 is characterized in that, in described step (S2), described dynamic script obtains corresponding key word realization function according to described key word and corresponding with it navigation keyword by searching described central database.
According to each described method among the claim 1-5, it is characterized in that 6, described navigation script is realized by script or compiler language.
7, method according to claim 6 is characterized in that, described static scenario is the initialization script; In described step (S1), described static scenario is created described dynamic script by the characteristic of script dynamic creation order.
8, method according to claim 7 is characterized in that, described script is Tool Command Language (TCL).
CNB2005100371854A 2005-09-08 2005-09-08 Keyword driving havigation method Expired - Fee Related CN100357910C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100371854A CN100357910C (en) 2005-09-08 2005-09-08 Keyword driving havigation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100371854A CN100357910C (en) 2005-09-08 2005-09-08 Keyword driving havigation method

Publications (2)

Publication Number Publication Date
CN1851664A true CN1851664A (en) 2006-10-25
CN100357910C CN100357910C (en) 2007-12-26

Family

ID=37133143

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100371854A Expired - Fee Related CN100357910C (en) 2005-09-08 2005-09-08 Keyword driving havigation method

Country Status (1)

Country Link
CN (1) CN100357910C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101669114B (en) * 2007-04-27 2012-09-05 微软公司 Dynamically loading scripts
CN103019928A (en) * 2011-09-27 2013-04-03 北京新媒传信科技有限公司 Automatic testing method and system
CN106294145A (en) * 2016-08-05 2017-01-04 珠海市魅族科技有限公司 A kind of method of software test and software testing device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6502102B1 (en) * 2000-03-27 2002-12-31 Accenture Llp System, method and article of manufacture for a table-driven automated scripting architecture
US20020032538A1 (en) * 2000-05-09 2002-03-14 Lee Young-Seok Software test system and method
US6993748B2 (en) * 2001-10-26 2006-01-31 Capital One Financial Corporation Systems and methods for table driven automation testing of software programs
CN1328689C (en) * 2002-11-22 2007-07-25 中兴通讯股份有限公司 Automatic test method for system products

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101669114B (en) * 2007-04-27 2012-09-05 微软公司 Dynamically loading scripts
CN103019928A (en) * 2011-09-27 2013-04-03 北京新媒传信科技有限公司 Automatic testing method and system
CN103019928B (en) * 2011-09-27 2016-06-29 北京新媒传信科技有限公司 A kind of automated testing method and system
CN106294145A (en) * 2016-08-05 2017-01-04 珠海市魅族科技有限公司 A kind of method of software test and software testing device

Also Published As

Publication number Publication date
CN100357910C (en) 2007-12-26

Similar Documents

Publication Publication Date Title
CN100401265C (en) Keyword-driven automatic testing system and method
CN100377109C (en) Method for completing product automation test utilizing test kit
CN100353327C (en) Method for realizing product automatic test by test environment composed of test set
CN1877543A (en) Data-driven automatic testing system and method
CN1149470C (en) Object heap analysis techniques for discovering memory leaks and other run-time information
CN1197003C (en) Method and device for treating abnormal as normal control flow
US7818730B1 (en) Automatic minimal build dependency determination and building an executable with source code
US8495567B2 (en) Transferring annotations across versions of the data
CN102541521B (en) Automatic operating instruction generating device based on structured query language and method
CN105760168A (en) Automatic code file generation method and system
CN1734417A (en) Application with multiple embedded drivers
CN103631601A (en) Code generation method and code generation device
CN100595756C (en) Navigation method for keyword driving
US20220198269A1 (en) Big automation code
CN1728106A (en) Method for positioning malfunction of application program
CN1851664A (en) Keyword driving havigation method
CN1976320A (en) Data access control method and system
CN1949173A (en) Software assembling method and apparatus thereof
CN108595810B (en) Intelligent generation method of digital satellite simulation report
CN105786710A (en) Program code review method and engine
CN100346308C (en) Automatic test method based on database operation
CN117289841A (en) Interaction method and device based on large language model, storage medium and electronic equipment
CN107025105A (en) code generating method and device
CN109918074B (en) Compiling link optimization method
CN1278223C (en) Scropt executing method for computer game

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
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: 20071226

Termination date: 20170908