[go: up one dir, main page]

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

An automated 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
file
flow
template
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 200410054163
Other languages
Chinese (zh)
Other versions
CN100375057C (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CNB2004100541634A 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
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

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

A kind of automatic test backup system and corresponding software automatic test method
Technical field
The present invention relates to a kind of computer software testing technology, the measuring technology that especially a kind of execution reliability of the function to certain application software is tested automatically.
Background technology
Automatic test to functional software or application software at present has several different methods, and main method has:
One, seizure/playback mechanism: directly use the test cases 100a that writes of business software shell script tested software 300a to be tested automatically, as shown in Figure 1 with the commercial 200a of testing software.Make in this way, the tester not only needs to be familiar with test cases, and needs to be familiar with writing of business software shell script, and also there is the problem of verification of correctness in the test script of writing simultaneously.Therefore can expend a large amount of time on script is safeguarded, rather than be absorbed in the test of application software itself;
Two, Function Decomposition method: part utilizes data-driven engine (Data Driven Engine) framework 100c that case 100b is tested, as shown in Figure 2.According to case template and the key word that this framework provided, use general business software (as EXCEL) to write case, comprised in the case and operated needed control data, test input data, expected results data in the description test process, the tester only need be familiar with case write method (as key word of case etc.), and needn't relate to the modification and the maintenance of test script, just Test Design and test automation being regarded as is two processes separated from each other.
All test assignments are decomposed into basic functions, with data and functional areas separately, have introduced framework, utilization structureization and the modular design of level formula.Comprise: drive script, test cases script, commercial function script, subroutine script, user definition function.
For example test " once pay, and the accuracy of verifying account data ".
If use " functional decomposition methods ", then this case just may be broken down into following commercial function, then with regard to each commercial function difference compile script:
1. navigation: enter the payment screen from master menu
2. once pay
3. verify the correctness of cash flow
4. return main menu
5. insert the system of accounts
6. verifying account system update
7. return to master menu
Such method of testing, its advantage is very obvious:
1. use and be broken down into several basic " commercial functions ", as long as to these commercial function compile scripts, concrete data are then undertaken by input data file and verification msg file.Changed if use, only needed change these " commercial function scripts " to get final product.
2. " commercial function script " therefore, is easy to make up these commercial function scripts to realize a series of more complicated operations at each basic commercial function of test.
Method two has been write in the case of test usefulness than method one and has been made significant headway, and still, also has following weak point:
1. each commercial function all needs a script, in case up to a hundred commercial functions are arranged, just needs up to a hundred scripts;
In a single day 2. change test set, just need to change hundreds and thousands of input data file/verification msg files;
3. not only need various scripts, and each " commercial function script " often needs corresponding with it input data file/verification msg file;
4. use text to write input data file/verification msg file, be easy to make mistakes.
Three, key word driving method (as: test plan driving method TEST PLAN DRIVEN):
Belong to a kind of of DDE (data-driven engine framework),, use EXCEL file edit test cases according to template, the keyword that it provided.In test cases, comprise and operate needed control data, input test data, expected results data etc.
Personnel write by script and the test cases personnel of writing can be independent.Be responsible for the keyword in the case is converted to the script of commercial testing software by the former, be familiar with writing of commercial testing software script, and the latter only need pay close attention to writing of case, promptly only need to be familiar with the form of case template.
This method is mainly by realizing as lower module:
Drive script: 1. carry out the initialization of framework;
2. call the control script of special applications, send the title of test cases to control
System script (test cases is the text file format of cutting apart with TAB);
Control script: 1. read in and handle the text of cutting apart with TAB;
2. between keyword and data, set up a kind of corresponding relation;
3. according to keyword calling function script;
Function script: 1. handle the list entries that sends from " control script "
2. carry out specific action (as carry out one-touch operation, data of input,
Data of checking etc.);
3. report some error situations;
This method three is compared with method two, owing to adopted DDE technology completely, it has two kinds of main implementation methods: one: case does not adopt structurized writing, the i.e. directly concrete operations in clear and definite each step in the case, also can only repeat input even in different cases, comprise identical several steps like this, cause making that to write case repeatability too big, and case is safeguarded also quite inconvenient; Two, case is write and is adopted structural method to carry out, and is about to that basic functions is abstract comes out, and is encapsulated as flow process, adopts the method for case call flow then, has so just simplified the complicacy that case is write greatly.Owing to adopted above Structured Design technology, its consequence is inevitable need all to be encased in all flow processs in the internal memory in each test, has increased the expense of system greatly, has also increased the time of case test.And in fact, in the time of each the test, can't relate to all cases and flow process, and only relate to a wherein part.So big system overhead significantly reduces the execution speed of case.
Summary of the invention
The objective of the invention is to solve following technical matters, utilize existing commercialization testing software, can generate test cases more easily, and finish specific functional test task efficiently and accurately.
1. the case independence of writing: require case write and be relatively independent of writing of commercial testing software script;
2. adopt the method for case call flow, increased the convenience that case is safeguarded:
3. reduce the occupancy of internal memory, improved the efficient that case is carried out:
4. test correctness require/to the processing of exception.
Main technical schemes of the present invention is:
1. adopted DDE data-driven engine technique, made case write personnel and the test script maintainer is relatively independent;
2. define certain case form, adopted structurized case write method.So just can under the situation that concrete Test Application changes, not change all case files, only need the numerical value changing the order of call flow or imported data just passable.Because " flow process " defined the set of a series of basic operations, the test that is certain function need be used several test cases, each test cases is being made up of some " basic operations " and " flow process " then, and the set that " flow process " is several " basic operations ", referring to accompanying drawing 3.Call " flow process " and " basic operation " by " case ", the method that " flow process " calls " basic operation " realizes test cases " structuring ".
3. adopted the dynamic execution of case and postponed the loading technology---promptly packing into of case name (process name), case template (flow template) was divided into for two steps with packing into of concrete case data (flow data) and carries out.Being about to the case test section is divided into: case initialization and case carried out for two steps.Than the method for whole flow processs of once packing into, adopt the present invention, dependence test speed can improve 10 times to 20 times.
System architecture of the present invention is as follows:
A kind of automatic test backup system software testing system is used for driving commercial testing software, by forming as lower module:
A) dynamically carry out control module,
B) case scheduler module,
C) syntax Analysis Module,
D) file interface,
E) test execution software interface,
F) test and management tool interface;
Wherein, native system is tested the execution sequential file of needed case file, flow file and case test, all is read into the internal memory of system's operation by described file interface;
The test execution software interface is connected to commercial test execution software and drives this commerce testing software, and the test and management tool interface is connected to the test and management instrument;
Dynamically carrying out control module one end is connected with the case scheduler module, the other end is connected respectively to syntax Analysis Module, test execution software interface, test and management tool interface, by calling the case scheduler module case is read in, calling syntax Analysis Module analyzes, carries out case, and be converted to corresponding commercial testing software script, drive commercial testing software by the test execution software interface, execution result is logged in the test and management instrument by the test and management tool interface.
Use the software automatic test method of automatic test backup system of the present invention mainly to comprise the steps:
A) initialization is loaded;
B) carry out the case scheduling;
C) analyze case, loading case data;
D) carrying out case and generation script function tests for commercial testing software;
E) test result and expected data are compared;
F) write journal file, simultaneously operation result is input to the test and management instrument.
Initialization is wherein loaded and is comprised following content:
System is moved the correlation parameter of needed configuration file and calls in internal memory, comprised case filename, flow file name, case carry out the sequential file name, with the relevant parameter of tested software, with test and management instrument relevant parameter,
Read in case file and flow file according to case file name and flow file name respectively, case template part is wherein analyzed, also the flow template in the flow file is analyzed simultaneously, (but do not pack into case data or flow data),
Carry out the sequential file name according to case case execution sequence is called in internal memory.
It can be to leave in a plurality of files that described case file, flow file and case are carried out sequential file, also can leave in a plurality of different worksheet of a file.
Described case scheduling is to carry out the case scheduling by dynamic execution control module.
Described case is carried out and has been put down in writing the case that this sequence will carry out in the sequence and belong to which test set.
Case template part is wherein analyzed the instruction sequence that comprises this template carry out initial analysis, in internal memory, form the corresponding relation between case template and the case template instruction sequence.Also comprise discerning, in internal memory, form the corresponding relation between case, case template, the position of case in case file based on the case of each case template.
Similarly, also comprise the instruction sequence of this flow process is carried out initial analysis, in internal memory, form the corresponding relation between flow template and the flow template instruction sequence; Flow process based on each flow template is discerned, in internal memory, formed the corresponding relation between flow process, flow template, the flow process position in flow file.
Described analysis case, loading case data refer to judge whether case data is loaded in the internal memory, and load case data according to analysis result, and this step is finished by dynamic execution control module.
In the method for testing of the present invention, described case scheduling also can be undertaken by the test and management instrument, to the case of carrying out Failure cases or need reruning, can select easily to carry out sequence by the use test management tool with the case that constitutes next time, thereby realize unartificial input case execution sequence, thereby make the automaticity of system higher, because by the test and management instrument, case is carried out sequence and can be generated automatically, and can flexible combination.
Test cases generation method of the present invention is as follows:
Adopt structurized case to write mode, reduced the repeated workload during case is write, and improved the repeatability of case.
Based on the dynamic execution of case with postpone the loading technology, this system has adopted multiplexing mechanism to operating process writing of case on the mode, specific as follows:
Introducing is similar to the semanteme of the invocation of procedure in the program design, when writing case, if all need carry out identical a series of operation steps at every turn, just can come out these a series of operation stepss are abstract, definition is called a flow template, each group has different input data but is different flow processs with the sets definition with same operation step, these flow processs belong to a flow template, write these flow processs and flow template earlier, then in case is write, call the flow process that has defined, thereby both simplified the compiling procedure of case, increase the maintainability of case, also can improve the execution speed of case simultaneously, reduced the memory consumption in the case implementation.
Case has been carried out sequence definition need carry out data such as case title, calls corresponding case according to the case title of its demonstration, its basic structure such as table 1:
Table 1
Running mark whether Affiliated test set The case title Case is described
TRUE (needing to carry out) TEST_A A Test a function
FALSE (not carrying out) TEST_B B Test b function
Wherein, whether " running mark " represents that this tests this case and whether need operation, uses this sign can avoid importing the case name at every turn, and directly this sign being made amendment just can revise easily needs the test cases that moves; " affiliated test set " then is decomposed into different test sets according to the difference of function with all test cases, in configuration file the test set that this need be carried out can be set, thereby realizes the batch testing of certain class function easily; Whether " case title " is then corresponding with the case title in " case file ", both can arrive according to this title and search this case in the internal memory and load, and also can arrive and search relevant case data in the case file; " case description " then describes the test purpose of this test cases simply.
Case file has then defined the title that needs test cases, operation steps (call flow or directly carry out basic operation), and its structure is for example as table 2:
Table 2
Describe 1 Describe 2 Describe 3
TRUE TRUE TRUE TRUE TRUE TRUE TRUE
The case name The test purpose of case The son numbering of case CALL Type of transaction is selected
Case name A Purpose A Process name C Step B
As shown in table 2, " case file " mainly comprised compositions such as case template, case data, case name." case template ": the structure that is case, this organization definition the keyword of case operation, it is the operation of carrying out in each step itself, do not relate to concrete data (as " call flow keyword ", " assignment keyword ", only record is to carry out what operation, and do not write down the process name that calls, how much concrete numerical value of giving is), when loading, the initialization of case test can analyze the test cases template, in last table from top to bottom once being considered to a case template to four lines, by the corresponding relation of record case and case template, just can know that first row of this case are " case names ", secondary series is represented " purpose of test ", " call flow " shown in the 5th tabulation, " option dealing type " shown in the 6th tabulation; " case data " is meant concrete " flow process " and " basic operation ", can be considered to case data as " flow process A " in the table 2 and " step B ".
Flow file: its structure and case file basically identical.
Beneficial effect of the present invention
Improve the efficient of case read-write:
Test backup system of the present invention utilizes file interface directly to carry out based on the case file of certain general format, has guaranteed the high-level efficiency of test process, has reduced the release maintenance problem of the case file that document converting process brought simultaneously.
The usability degree of system improves:
Test backup system provided by the present invention by the interface layer function with concrete commercial testing software is provided, just can use with corresponding commercial testing software is collaborative, so the present invention is easy to be transplanted on the different commercial test software platform.
The execution efficient of test improves:
The dynamic execution of case is loaded with delay, and this is the main technology point of the present invention.Because after a large amount of cases and the flow process graftabl, can cause memory usage too high, the speed of carrying out test cases slows down.And technical scheme of the present invention is finished the initialization procedure of test and the different phase that is distributed in test of obtaining of case data, has reduced the time of the initialization procedure of case file on the one hand; On the other hand, technology is loaded in the delay of case can load case data according to the concrete case of carrying out, and in operational process, the data of certain case or flow process only need load once, the case of back is if need call same flow process, only need arrive in the internal memory and directly obtain, and needn't load once more, improve execution speed to a certain extent.
Description of drawings
Describe the present invention in detail below in conjunction with accompanying drawing, but the description of embodiment is for the solution of the present invention is described, rather than limits content of the present invention.
Fig. 1 is the procedure chart that directly uses commercial testing software to test;
The procedure chart that Fig. 2 is to use the DDE framework to test;
Fig. 3 is the call graph of case, flow process, basic operation;
Fig. 4 is the network connection layout of software test operation;
Fig. 5 is the graph of a relation of automatic test backup system and commercial testing software, tested software;
Fig. 6 is automatic test backup system modular structure figure;
Fig. 7 is the procedure chart of test cases automatic test;
Fig. 8 is the initialization procedure figure of automatic test;
Fig. 9 is the implementation figure of test cases;
Figure 10 is a process flow diagram of analyzing and carry out case.
Figure 11 is the operational flow diagram that generates the test execution sequence with the test and management instrument;
Figure 12 is the detailed process figure of the embodiment of the invention " consumer sale " test.
Embodiment
In order to be illustrated more clearly in the present invention, special with some concept explanations following (referring to Fig. 3):
Case is carried out sequence: defined the case that need test, comprised case name, the affiliated test run collection of case that needs are carried out, and whether needed the Status Flag tested etc.Carry out sequence by the definition case, also just specified whole cases of required execution in this test.At " initialization procedure " afterwards promptly, at first should call in this " execution sequence ", system can carry out the relevant case of sequential calling according to this then.
Case: the general software with certain format is write, and for example writes with EXCEL, is made up of case title, flow process, basic operation, data, note etc.
Case (flow process) template: the structure that is case, this organization definition the operation keyword of case (flow process), it is the operation of carrying out in each step itself, do not relate to concrete data (as " call flow keyword ", " assignment keyword ", only the record be what the operation, and do not write down the process name that calls, how much concrete numerical value of giving is).The case test initialization the time can analyze the test cases template, simultaneously flow template is analyzed.
Flow process: the set that is a series of orderly basic operations.
Basic operation: being the ingredient of flow process, is the smallest executable unit that can not cut apart again, comprises input, inspection, assignment etc.
Referring to shown in Figure 4, its for use this automatic test backup system carry out the network software test the representative network connection diagram, transmit leg is connected by tested network 3 with the take over party, commercial testing software 2 is by testing the correctness of data that simultaneous verification transmits with just realizing the process that transmit leg is sent to the take over party being connected of transmit leg software 4, take over party's software 5;
After having increased being connected of automatic test backup system and commercial testing software, just can increase the automaticity of test, directly read case by automatic test backup system 1, and be converted into specific commercial testing software script, by commercial testing software system is carried out automatic test, and test result is fed back to this automatic test backup system analyze, and then can carry out next step test.As shown in Figure 5, automatic test backup system 1 of the present invention has been served as the bridge that is connected between case file 6 and the commercial testing software 2 to a certain extent, when utilizing native system to carry out automatic test, at first need to write case file 6 according to certain rule, by crossing this automatic test backup system relevant case file 6 is converted to the script of commercial testing software then, tests being input to 2 pairs of tested software 7 of commercial testing software.
Referring to Fig. 6, it is depicted as automatic test backup system modular structure of the present invention, wherein, native system is tested the execution sequential file 18 of needed case (flow process) file 6 and case test, all is read into the internal memory of system's operation by described file interface 11; Test execution software interface 15 is connected to commercial test execution software and drives this commerce testing software 2, and test and management tool interface 16 is connected to test and management instrument 17; Dynamically carrying out control module 13 1 ends is connected with case scheduler module 12, the other end is connected respectively to syntax Analysis Module 14, test execution software interface 15, test and management tool interface 15, read in by calling 12 pairs of cases of case scheduler module, calling 14 pairs of cases of syntax Analysis Module analyzes, carries out, and be converted to corresponding commercial testing software script, drive commercial testing software 2 by test execution software interface 15, execution result is logged in the test and management instrument 17 by test and management tool interface 16.
Each functions of modules is introduced:
Case scheduler module: the dispatching center that is test cases, its working method is at first to read in case by the file interface module to carry out sequence, carry out sequence according to the case of being read in then and dispatch corresponding test cases, it is read in internal memory by the file interface module.
Dynamic flow is carried out control: be the nucleus module of native system, this module comprises three main effects: one, by calling the case scheduler module case is read in; Two, call syntax Analysis Module case is analyzed, carried out, and be converted to corresponding commercial testing software script, be input to commercial testing software by the test execution software interface, thereby finish automatic test tested software; Three, execution result is fed back to the test and management tool interface.
Syntax Analysis Module: this module has two effects greatly, and one, at the initial phase of case is analyzed the template of test cases, thereby builds the reflection of all operations step in internal memory of test cases; Simultaneously flow process is analyzed, distinguished the action key word and be mapped to information such as corresponding processing capacity, input data, expected data; Two, in the process of implementation, case data is carried out grammatical analysis.
The file interface module: this interface mainly is converted to the form that native system case scheduler module is supported with the test cases of certain format, the execution sequence of case.
The characteristics that this automatic test backup system is the most outstanding not only are to have adopted the DDE framework to drive, and be that it has adopted dynamic execution and has postponed the loading technology, be about to automatic test course and be decomposed into " initialization procedure of case " and " implementation of case " two steps, in initialization procedure, only case template, flow template, case name, process name are recorded in the internal memory, and form case template name, case template instruction sequence, case title, case corresponding relations such as position hereof; Form flow template name, flow template instruction sequence, process name, flow process corresponding relations such as position hereof simultaneously, only when carrying out, just load the relevant case and the data of flow process as required, rather than directly load all case datas, reduced taking to Installed System Memory.And adopted the case call flow, two step usefulness of process invocation basic operation have been simplified writing of case greatly.
Referring to Fig. 7, it is depicted as automatic test course figure of the present invention, earlier writes case 100, the initialization process 200 to carrying out case then according to certain rule, carries out the execution and the result treatment 300 of case at last.
Referring to Fig. 8, it is depicted as initialization process 200 processes in the automatic test flow process of the present invention:
1, writes initialized configuration file 201, comprising: filename, the case-work table name of carrying out sequence with the relevant parameter of test and management instrument, with the relevant parameter of database, case;
2, read in configuration file, simultaneously the set parameter 202 of analysis configuration file;
3, read in the case template according to configuration file, the keyword of analysis case template, the corresponding relation 203 of formation case template name and case template instruction sequence in internal memory;
4, the case (flow process) based on each template is discerned, in internal memory, formed the corresponding relation 204 between case (flow process) title, case (flow process) template name, case (flow process) position hereof.
Passed through the processing of these two steps, in internal memory, formed the corresponding relation between case name (process name), the case template, simultaneously in order to support delay to load also preservations together of information such as needed document location.At this moment, the initialization procedure of case itself is finished.Therefore, in the implementation of case, only need the core image of visit case (flow process), needn't be concerned about whether concrete case data loads.Do not exist if find the data of certain case (flow process) in the process of implementation, the delay load function of dynamically carrying out control module can load the data of specifying case (flow process) automatically from case file; If the data of the case of being visited (flow process) have existed, then do not need repetition loading, all like this cases (flow process) no matter use what times, also only need be loaded once in test process, have improved the processing speed to case.
Each test often only relates to certain or certain several test sets, caused EMS memory occupation after all case datas of therefore just having avoided packing into are in a large number packed into, thus improve the efficient of carrying out; Also avoided simultaneously carrying out sequence and searched case, and the back analyzes that case is carried out on case template limit and the replicate analysis and the execution speed that cause are slack-off by case.
Structurized case is write, and has reduced repeated workload, and has improved the repeatability of case.
Based on the dynamic execution of case with postpone the loading technology, this system has realized multiplexing mechanism to operating process writing of case on the mode, specific as follows:
Introducing is similar to the semanteme of the invocation of procedure in the program design, when writing case, if all need carry out identical a series of operation steps at every turn, just can come out these a series of operation stepss are abstract, definition is called a flow template, each group has different input data but is different flow processs with the sets definition with same operation step, these flow processs belong to a flow template, write these flow processs and flow template earlier, then in case is write, call the flow process that has defined, thereby both simplified the compiling procedure of case, increase the maintainability of case, also can improve the execution speed of case simultaneously, reduced the memory consumption in the case implementation.
Referring to Fig. 9, it is depicted as the implementation 300 of case in the automatic test flow process of the present invention:
Owing in the initialization procedure of case, in Installed System Memory, write down corresponding relation, position, certain flow process on stream the position of certain case in case file of instruction sequence, case (flow process) template name and case (flow process) name of case (flow process) template, therefore mainly comprised the steps: in the process of implementation
1. read in case and carry out sequence 301;
2. according to the execution sequence of this case, read in relevant case file 302 by file interface; Carry out the case title that to carry out in the sequence according to case and search relevant " case " in the internal memory and whether exist, judge then whether the data of relevant case load; If data unloaded still, then in the case file, read case data by the memory location of this case of having existed in the internal memory;
3. analyze and carry out case 303;
4. drive commercial testing software and test 304;
5. compare test result and expected data 305;
6. certain case is finished, and then the result that will be correlated with feeds back in the test and management instrument 306 by the test and management tool interface.
Referring to Figure 10, analyze and carry out case 303, judge that according to the keyword in the instruction sequence of template under this case that forms in the initialization procedure this step calls certain flow process or carry out certain basic operation; If belong to the execution basic operation, then directly this operation is converted to commercial testing software script by this automatic test backup system, drive commercial testing software by commercial testing software interface then; If whether call flow is then searched flow data according to process name in the internal memory and is loaded, if do not load, then load, if load, then, finish until this flow performing directly according to flow template analysis process and execution basic operation one by one.After a basic operation or flow performing finished, this automatization test system was obtained the next keyword of case instruction sequence by syntax Analysis Module, carries out the execution of next step, is finished fully up to this case.(annotate: because flow process has been represented the set of a series of basic operations, so under the situation that a large amount of cases need be tested, the repetition degree of flow process is very high, and it is once just passable that therefore a lot of flow processs need only loading, the loss of time of having avoided the repetition loading flow data to bring).
Referring to Figure 11, test and management instrument of the present invention both can be analyzed automatically to the result of test, was combined to form the case that need test once again neatly, to replace the process of manual compiling " case execution sequence "; Also can case relevant case information (being mainly the test cases collection that case name, case function, case belong to) be input to test and management instrument (step 401) by interface before the test, need to select the case (step 402) of test again by the test and management instrument, form " case execution sequence "; This automatic test backup system is carried out the initialization setting then, and analyzes and execution relevant case (step 403) according to " the case execution sequence " of automatic formation; Test (step 404) by commercial testing software; At last, test result is fed back in the test and management instrument (step 405) again; Then,, then still can analyze automatically the result of test, be combined to form the case that to test once again neatly, to replace the process of manual compiling " case execution sequence " by the test and management instrument if need carry out the test of case again.The execution sequence of choosing case by the test and management instrument mainly comprises following several mode: with regard to the selection of case: a kind of mode is directly to operate by the interface that the test and management instrument provides, tested number of times, the case of test set, case that has listed under all case names, case description, the case at the interface of test and management instrument tested successful number of times, the information such as number of times of case test crash, and operating personnel can choose the case of needs test by the interface; Another kind of mode is directly the database of test and management instrument to be handled by the backstage, chooses the case that needs execution.Choose finish after, the test and management instrument promptly can generate the execution sequence of the test cases of certain form automatically, should carry out sequence by file interface then and read in, and carries out case test thus; Also can generate the execution sequence of test cases, but directly these case informations be read in internal memory, and then carry out the case test.
Embodiment 1:
Referring to Figure 12, be that example elaborates to the present invention so that certain " consumer sale " function is tested below:
" consumer sale ": mainly be that test is imported data necessary at transmitting terminal, be submitted to tested network, transfer by network then, send to reciever and carry out necessary inspection and processing, give transmitting terminal by the network loopback again.
The test process of case:
1, write test cases, write test cases and carry out sequence, write the initial configuration file.
1. test cases is carried out write (step 501) of sequence: the mode with form is represented, comprised whether this case needs to carry out, the title of affiliated casebook (classification foundation that casebook is present be to use, as can being divided into: the pre-authorization casebook, consume casebook, the casebook etc. of withdrawing the money), information such as case title, case description.
2. the writing of test cases (step 501): the form with form occurs equally.Mainly by few component parts such as case title, keyword, process name, master datas, wherein the action type that will carry out represented in the keyword of each row, or call a flow process, or carry out an assign operation etc.(writing of testing process: some the most basic operation is abstract come out to be written as flow template).
3. the writing of initial configuration (CONFIG.XLS) (step 502): some constants that use in parameter, the parameter relevant, the case set name (can specify this to move and consume casebook, and not move other casebooks) of carrying out sequential file name, execution and case or the flow process that mainly comprise the setting of environment, connects about database with the test and management instrument.
2, initialization procedure (step 503):
1. configuration file is called in internal memory, carry out the environment configurations of test macro.
2. the case template is analyzed, flow template is analyzed (but do not pack into case data and flow data), and in internal memory, form several groups of corresponding relations like this:
Template graftabl with " consumption case ", promptly in internal memory, write down the instruction sequence of this template, but do not loaded concrete data, carried out assign operation, second step with flow process etc. as: the first step, as for concrete what value of composing, calling which flow process does not need to load in initialization procedure;
Set up the corresponding relation of " each consumes case " and " consumption case template ", promptly write down each " consumption case " position in " case " file, and the title of each consumption case;
Load all " flow process " templates simultaneously, and form: the corresponding relation of flow process and flow template; The information such as particular location of certain flow process in flow file.
3, " certain consumption case POS-1 " detailed process of testing:
Owing in initialization procedure, formed the corresponding relation of case and case template, just pass through initialization, write down the instruction sequence of certain case template in the internal memory, promptly should carry out what operation step by step, and write down which case and belong to which case template.Therefore, in the process of implementation, at first, import the execution sequence of case, carry out the case title POS-1 that the specified needs of sequence are carried out according to this then, search and whether have this case data in the internal memory, this case name is arranged in the lookup result internal memory, but this case data not, then load this case data, analyze according to the instruction sequence of the case template under this case that in initialization procedure, in internal memory, forms again, if this instruction needs to carry out, then judge and belong to call flow or carry out basic operation, call flow if desired then judges whether that according to process name data load, if do not load, then relevant flow data is called in internal memory, carry out the basic operation in the flow process then by relevant mapping; If belong to basic operation, then directly carry out basic operation.
Instruction sequence according to the case template under the case POS-1 that forms in internal memory in the initialization procedure shows, the instruction sequence of this case be " call flow---call flow---assignment---send message---call flow---call flow---call flow---call flow ... call flow ".
Therefore, in the process of implementation, after loading the data of case POS-1, will carry out case data and case template instruction sequence coupling, data as the case POS-1 first step are A, be " call flow " then, just know be operating as " the call flow A " of this case first step according to the instruction sequence first step.
1. the side's of accepting page setup, call flow A (step 504)
The action that is operating as the side of accepting of flow process A, as card media, type of transaction, heading are set select (band header, be not with header), new and old key to select, send control (directly sends, do not send, delayed delivery, repeat to send), encryption selection.In the process of call flow A504, judge at first whether the data of this flow process have been loaded into internal memory, if also do not load, then carry out loading process, if load, then directly from internal memory, obtain flow data;
2. card issuer's page setup, call flow B (step 505)
Flow process B is operating as: carry out card issuer's action (similar with the side of accepting) automatically;
3. type of transaction is selected: be set to " consumption " (step 506)
This step is used for carrying out the setting of the domain of dependence and the parameter setting of heading for assign operation;
As be provided with case and number: EXP010XXN01;
4. send message (step 507)
Sending message is a basic operation, and directly the data with the card issuer send, directly execution of this operation, and the dynamic execution control module by native system is converted to the business software test script;
5. the side's of accepting emulator log acquisition, call flow C (step 508)
Whether the effect of flow process C is that the numerical value that sends the message daily record and the numerical value of expection are compared, consistent with expected value;
6. transmit leg emulator log acquisition, call flow D (step 509)
Whether the effect of flow process D is that the numerical value that sends the message daily record and the numerical value of expection are compared, consistent with expected value;
7. the side's of accepting message audit, call flow E (step 510)
The effect of flow process E is the message of the side of accepting to be checked judged result;
8. card issuer's message audit, call flow F (step 511)
The effect of flow process F is card issuer's message to be checked judged result;
9. database obtains data, call flow G (step 512);
What this flow process mainly realized is that the data in the database are compared;
10. check the switching daily record that response message is write,
Comparison result, generation LOG file (step 513).
Test result is fed back to test and management instrument (step 514).Other cases need test if the execution sequence of case indicates in addition, and---initialization---carried out then to continue to read case, and the flow process of just calling, the step of execution are different.
Owing to adopted technological means of the present invention, obtained following obvious effects:
Each run is not to carry out at all operation collection, is not to relate to all flow processs yet, and therefore all case datas are called in internal memory needs long time, also is a kind of waste to a certain extent.
The execution of case is distinguished mutually with the initialization of case, in initialization procedure, only need be called in information such as case template, keyword, case title.This has just been avoided calling in of mass data, has also avoided the plenty of time that all information of case are together in series and need expend simultaneously.
In theory, when dispatching a case, call this case by the case name, while analysis of key speech, if scheduling flow represented in keyword, also need according to relevant operation and the step of process name scheduling, the execution meeting than original single case on the time increases to some extent, but according to our test and experimental data, this temporal increase is not almost felt.
For example: test 400 cases, originally its initialization procedure need expend 20 to 30 minutes, every transaction test execution speed nearly 2 to 3 minutes; And adopted after the dynamic execution and delay loading of case, speed increases substantially, and its initialization procedure only needs 2 to 3 minutes, and the execution speed of every transaction test does not have big variation basically.
Case is carried out sequence can be by manual compiling, and has specified the case subclass at its place and the sign of whether carrying out for each case.Also can be the dynamic operation scheduling that realizes case by the test and management instrument, can control case automatically by the test and management instrument and carry out sequence, utilize the test and management instrument that all cases are carried out dynamically and easily scheduling.For example: some case that we rerun, need that perhaps all are carried out Failure cases and rerun, as long as utilizing the test and management instrument to revise, we carry out sequence.

Claims (15)

1. automatic test backup system is used for the commercial testing software of drive software test macro, it is characterized in that this system is by forming as lower module:
A) dynamically carry out control module,
B) case scheduler module,
C) syntax Analysis Module,
D) file interface,
E) test execution software interface,
F) test and management tool interface;
Wherein, native system is tested the execution sequential file of needed case file, flow file and case test, all is read into the internal memory of system's operation by described file interface;
The test execution software interface is connected to commercial test execution software and drives this commerce testing software, and the test and management tool interface is connected to the test and management instrument;
Dynamically carrying out control module one end is connected with the case scheduler module, the other end is connected respectively to syntax Analysis Module, test execution software interface, test and management tool interface, by calling the case scheduler module case is read in, calling syntax Analysis Module analyzes, carries out case, and be converted to corresponding commercial testing software script, drive commercial testing software by the test execution software interface, execution result is logged in the test and management instrument by the test and management tool interface.
2. automatic test backup system as claimed in claim 1 is characterized in that, described syntax Analysis Module comprises case template analysis unit, and dynamically carries out control module and be connected to this unit.
3. automatic test backup system as claimed in claim 1 is characterized in that described file interface module also has the function that execution sequence with test cases, case is converted to the form that native system case scheduler module supported.
4. a software automatic test method of using system of the present invention comprises the steps:
A) initialization is loaded,
B) case is carried out sequence and call in internal memory, and carry out the case scheduling in view of the above;
C) analyze case, loading case data;
D) carrying out case and generation script function tests for commercial testing software;
E) test result and expected data are compared;
F) write journal file, simultaneously operation result is input to the test and management instrument.
5. method as claimed in claim 4, it is characterized in that, described initialization is loaded and comprised following content: the correlation parameter that system is moved needed configuration file is called in internal memory, comprised case filename, flow file name, case carry out the sequential file name, with the relevant parameter of tested software, with test and management instrument relevant parameter; Read in case file and flow file according to case file name and flow file name respectively, case template part is wherein analyzed, also the flow template in the flow file is analyzed simultaneously.
6. method as claimed in claim 4 is characterized in that, it can be to leave in a plurality of files that described case file, flow file and case are carried out sequential file, also can leave in a plurality of different worksheet of a file.
7. method as claimed in claim 4 is characterized in that, described case scheduling is to carry out the case scheduling by dynamic execution control module.
8. method as claimed in claim 4 is characterized in that, described analysis case, loading case data refer to judge whether case data is loaded in the internal memory, and load case data according to analysis result, and this step is finished by dynamic execution control module.
9. method as claimed in claim 5 is characterized in that, described case is carried out and put down in writing the case that this sequence will carry out in the sequence and belong to which test set.
10. method as claimed in claim 5, it is characterized in that, described case template part is wherein analyzed, also comprised the instruction sequence of this template is carried out initial analysis, in internal memory, form the corresponding relation between case template and the case template instruction sequence.
11. method as claimed in claim 10, it is characterized in that, described case template part is wherein analyzed, also comprised the case based on each template is discerned, in internal memory, form the corresponding relation between case, case template, the position of case in case file.
12. method as claimed in claim 5, it is characterized in that, described flow template is wherein partly analyzed, also comprised the instruction sequence of this flow process is carried out initial analysis, in internal memory, form the corresponding relation between flow template and the flow template instruction sequence.
13. method as claimed in claim 12, it is characterized in that, described flow template is wherein partly analyzed, also comprised the flow process based on each template is discerned, in internal memory, form the corresponding relation between flow process, flow template, the flow process position in flow file.
14. method as claimed in claim 6 is characterized in that, described case scheduling is undertaken by the test and management instrument.
15. method as claimed in claim 14 is characterized in that, the case to carrying out Failure cases or need reruning on-the-fly modifies with the test and management instrument, carries out sequence with the case that automatic generation is new.
CNB2004100541634A 2004-08-31 2004-08-31 An automated test auxiliary system and corresponding software automatic test method Expired - Lifetime CN100375057C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100541634A CN100375057C (en) 2004-08-31 2004-08-31 An automated test auxiliary system and corresponding software automatic test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100541634A CN100375057C (en) 2004-08-31 2004-08-31 An automated 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
CNB2004100541634A Expired - Lifetime CN100375057C (en) 2004-08-31 2004-08-31 An automated test auxiliary system and corresponding software automatic test method

Country Status (1)

Country Link
CN (1) CN100375057C (en)

Cited By (21)

* 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 of automatic script generation for testing the effectiveness of operating software of a system on board an aircraft and device for implementing the method
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
CN105824747A (en) * 2015-01-27 2016-08-03 程文彬 Cloud service system for software automated testing
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
CN107704392A (en) * 2017-09-30 2018-02-16 华为技术有限公司 The processing method and server of a kind of test case
CN108182142A (en) * 2016-12-08 2018-06-19 武汉安天信息技术有限责任公司 Test resource integration method, system and function test method, system
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device
CN112132176A (en) * 2020-08-14 2020-12-25 中信银行股份有限公司 Difference extraction method and device, electronic equipment and computer-readable storage medium
CN112418230A (en) * 2020-11-14 2021-02-26 武汉光庭信息技术股份有限公司 Automatic testing method and system based on vehicle-mounted display

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6966013B2 (en) * 2001-07-21 2005-11-15 International Business Machines Corporation Method and system for performing automated regression tests in a state-dependent data processing system
CN1248116C (en) * 2002-09-23 2006-03-29 上海贝尔有限公司 General purpose testing arrangement for embedded module and subsystem based on host machine platform
CN1310150C (en) * 2002-11-21 2007-04-11 中兴通讯股份有限公司 Embedded software test method

Cited By (29)

* 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 of automatic script generation for testing the effectiveness of operating software of a system on board an aircraft and device for implementing the method
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
CN102043714A (en) * 2010-12-10 2011-05-04 成电汽车电子产业园(昆山)有限公司 Automatic testing system of embedded software
CN102043714B (en) * 2010-12-10 2013-01-02 成电汽车电子产业园(昆山)有限公司 Automatic testing system of embedded software
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN102135938B (en) * 2011-03-21 2015-04-15 中国工商银行股份有限公司 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
CN102789401B (en) * 2012-07-12 2014-11-05 北京泛华恒兴科技有限公司 Test process control method and device on basis of flexible testing technology
CN102789401A (en) * 2012-07-12 2012-11-21 北京泛华恒兴科技有限公司 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
CN105824747A (en) * 2015-01-27 2016-08-03 程文彬 Cloud service system for software automated testing
CN106354628A (en) * 2016-08-12 2017-01-25 北京小米移动软件有限公司 Payment app test method and device thereof
CN108182142A (en) * 2016-12-08 2018-06-19 武汉安天信息技术有限责任公司 Test resource integration method, system and function test method, system
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
CN107704392A (en) * 2017-09-30 2018-02-16 华为技术有限公司 The processing method and server of a kind of test case
CN107704392B (en) * 2017-09-30 2021-05-18 华为技术有限公司 A test case processing method and server
WO2019084861A1 (en) * 2017-11-02 2019-05-09 深圳市汇顶科技股份有限公司 Software testing method and device
CN110023913A (en) * 2017-11-02 2019-07-16 深圳市汇顶科技股份有限公司 Method and apparatus for testing software
CN112132176A (en) * 2020-08-14 2020-12-25 中信银行股份有限公司 Difference extraction method and device, electronic equipment and computer-readable storage medium
CN112132176B (en) * 2020-08-14 2024-11-26 中信银行股份有限公司 A differential extraction method, device, electronic device and computer-readable storage medium
CN112418230A (en) * 2020-11-14 2021-02-26 武汉光庭信息技术股份有限公司 Automatic testing method and system based on vehicle-mounted display

Also Published As

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

Similar Documents

Publication Publication Date Title
CN1744054A (en) An automated test auxiliary system and corresponding software automatic test method
CN1811702A (en) System and method for developing portal applications and automatically deploying them into a portal server application
CN1265207A (en) System and method for generating year 2000 test cases
CN1732459A (en) Web content decoding system and method for smaller display devices
CN1773508A (en) Method for converting source file to target web document
CN1882959A (en) Product data exchange
CN1439137A (en) Method, process and system for optimized outcome driven workflow synthesis and reduction
CN1776643A (en) Method and device for testing software product robustness
CN1908892A (en) System and method for test examples design
CN100347682C (en) Automatic detection building method
CN1851667A (en) Graphic user interface test method and system
CN1737598A (en) Method and apparatus for configuration of automated debug of in-circuit tests
CN1841328A (en) Automaton method for script language
CN101046812A (en) Method of data base table recording structure and detection and its device
CN101055569A (en) Function collection method and device for electronic data sheet
CN1920837A (en) Complex equipment faced multi-subject design software integrated parameter mapping method
CN1875343A (en) Systems and methods for building software suites
CN1420467A (en) File managing system and method
CN1560741A (en) Structure method of five-hierarchical system structure base on J2EE
CN1766835A (en) A framework for seamlessly authoring and editing workflows at design and runtime
CN1301362A (en) Apparatus for producing software and method for producing software
CN1270687A (en) Method for determining the probability of the occurrence of a sequence of at least two words in a speech recognition process
CN1588256A (en) Method and system for changing ladder diagram program into instruction listing program
CN1991765A (en) Developing apparatus and method for hand-held terminal application program
CN1746694A (en) Automatic tester and test thereof

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
CX01 Expiry of patent term

Granted publication date: 20080312

CX01 Expiry of patent term