CN103838672B - The automated testing method of a kind of all-purpose financial statements and device - Google Patents
The automated testing method of a kind of all-purpose financial statements and device Download PDFInfo
- Publication number
- CN103838672B CN103838672B CN201410077108.0A CN201410077108A CN103838672B CN 103838672 B CN103838672 B CN 103838672B CN 201410077108 A CN201410077108 A CN 201410077108A CN 103838672 B CN103838672 B CN 103838672B
- Authority
- CN
- China
- Prior art keywords
- test
- data
- software
- case
- program
- 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.)
- Active
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention provides automated testing method and the device of a kind of all-purpose financial statements, method includes: resolve software requirements specification by the keyword preset, and generates the software test requirement data of report form;Test case template according to software test requirement data and pre-stored generates test case;UML program flow diagram according to software test requirement data and pre-stored generates test data;The test program of corresponding test case is generated according to software test requirement data splicing SQL statement;According to test data and the expected test result form of each test case of test program generation;Automatized script parameter configuration according to software test requirement data and pre-stored generates testing tool discernible automatized script parameter list;Testing tool is utilized to generate the simulation test result form of each test case according to test data and automatized script parameter list;Comparison expected test result form and simulation test result report generation test result.
Description
Technical field
The present invention relates to the technical field of measurement and test of computer application software, particularly relate to a kind of based on all-purpose financial statements from
Dynamicization method of testing and device.
Background technology
Along with becoming increasingly popular of computer information technology, incorporated business's absorption of technology management, use the form of electronics, these
A form thousand sheets at least, several ten million at most.Statement form, for the form that other data provide, has simple, directly perceived
With features such as specifications, but all departments in all trades and professions and the most same unit are different for the call format of form, and
The pattern of the add-inses such as the title of form, gauge outfit, table tail is the most varied.
In the testing process of existing form, test designer first have to understand report capability to business personnel, then
Writing test case according to software requirement, test execution personnel use various ways to test according to this test case afterwards
Data and test result prepare, such as oracle programming mode, excel formula or macroprogramming mode, computer manual calculation side
Formula etc., finally according to the form generated in the result prepared and system by artificial its correctness of naked eyes comparison.This survey
Method for testing, needs possess higher professional knowledge, technology and experience for test designer, and test execution personnel are also required to foot
Enough responsibility, if demand has change, it is necessary to test designer increase in time or revise corresponding use case description, and test is held
Administrative staff carries out data and the amendment of result preparation, frequently with the design test of a form, may result in human cost significantly
Improving, the probability that verification of data is made mistakes rises the most relatively.
Summary of the invention
It is an object of the invention to be to realize can generating form test number conveniently, flexibly in the way of using configurationization
Preparing result according to the form of, automatized script parameter list and correspondence, batch carries out form result comparison.
Embodiments providing the automated testing method of a kind of all-purpose financial statements, method includes:
Resolve software requirements specification by the keyword preset, generate the software test requirement data of report form;
Test case template according to described software test requirement data and pre-stored generates test case;
According to described software test requirement data and the Modeling language UML(Unified of pre-stored
ModelingLanguage) program flow diagram generates test data;
The test program of corresponding described test case is generated according to described software test requirement data splicing SQL statement;
According to described test data and the expected test result form of each test case of test program generation;
Automatized script parameter configuration according to described software test requirement data and pre-stored generates testing tool and can know
Other automatized script parameter list;
Survey according to the simulation that described test data and automatized script parameter list utilize testing tool to generate each test case
Test result form;
Expected test result form described in comparison and simulation test result report generation test result.
Additionally, present invention also offers the automatic test device of a kind of all-purpose financial statements, device includes:
Parsing module, for resolving software requirements specification by the keyword preset, generates the software test of report form
Demand data;
Test cases technology module, raw for the test case template according to described software test requirement data and pre-stored
Become test case;
Test data generation module, for according to described software test requirement data and the UML program circuit of pre-stored
Figure generates test data;
Test program generation module, for generating corresponding described according to described software test requirement data splicing SQL statement
The test program of test case;
Expected test result generation module, pre-for according to described test data and each test case of test program generation
Phase test result form;
Automatized script parameter list generation module, for according to described software test requirement data and the automatization of pre-stored
Script argument configuration generates testing tool discernible automatized script parameter list;
Simulation test result-generation module, for utilizing test work according to described test data and automatized script parameter list
Tool generates the simulation test result form of each test case;
Test result generation module, generates test result for expected test result described in comparison and simulation test result.
The present invention can facilitate, obtain test case flexibly, it is achieved the management to test case, improves tester and surveys
The efficiency of examination software, uses the mode of configurationization, convenient, flexibly generation form test data, automatized script parameter list and
Corresponding form prepares result, and batch carries out form result comparison.
For the above and other objects, features and advantages of the present invention can be become apparent, preferred embodiment cited below particularly,
And coordinate institute's accompanying drawings, it is described in detail below.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, also may be used
To obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of automated testing method based on all-purpose financial statements of the present invention;
Fig. 2 is the block diagram of a kind of automatic test device based on all-purpose financial statements of the present invention;
A kind of all-purpose financial statements automatic test device structure chart that Fig. 3 provides for the embodiment of the present invention;
Fig. 4 is the structure chart of the data administrator of embodiment of the present invention all-purpose financial statements automatic test device;
Fig. 5 is the cut-away view of the data processing equipment of embodiment of the present invention all-purpose financial statements automatic test device;
Fig. 6 is the internal structure of the testing factor generating means of embodiment of the present invention all-purpose financial statements automatic test device
Figure;
A kind of all-purpose financial statements automated testing method flow chart that Fig. 7 provides for the embodiment of the present invention
Fig. 8 is the step exploded view of embodiment of the present invention all-purpose financial statements automated testing method;
Fig. 9 is the all-purpose financial statements automated testing method process step exploded view of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Describe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premise
Embodiment, broadly falls into the scope of protection of the invention.
Embodiments provide a kind of automated testing method based on all-purpose financial statements, as it is shown in figure 1, the method bag
Include:
Step S101, resolves software requirements specification by the keyword preset, and generates the software test requirement of report form
Data;
The software test requirement data of the report form in the present embodiment include: item base information, form essential information,
Report query interface, data source information, table sample and logical message, described item base information, form essential information, report query
Interface, data source information, table sample and logical message are respectively provided with flag bit, need to generate the software test requirement data mark of test case
Will position is 1, and table sample and logical message include: the respective field content of corresponding SQL statement.
The item base information of storage, as shown in table 1:
Table 1
Project name | Program member | PROJECT TIME | Project background | System address | Use number of users | Flag bit |
Form essential information, as shown in table 2:
Table 2
Report query interface (foreground parameter), as shown in table 3:
Table 3
Data source information, as shown in table 4:
Table 4
Table sample and logic, as shown in table 5:
Table 5
Step S102, generates test case according to the test case template of software test requirement data and pre-stored;
In the present invention, determine the software test requirement list of the test case that need to generate according to flag bit;According to institute
The test case template stating software test requirement list and pre-stored generates test case.
Step S103, generates test data according to the UML program flow diagram of software test requirement data and pre-stored;
Step S104, generates the test journey of corresponding described test case according to software test requirement data splicing SQL statement
Sequence;Respective field content splicing SQL statement according to corresponding SQL statement, generates the test program of corresponding test case.
Step S105, according to test data and the expected test result form of each test case of test program generation;
Generate the expected test result form of each test case specifically, determine institute according to test program testing results data
State the numerical value of each unit lattice in table sample and logical message;
According to the expected test result form of each test case of numerical generation of each unit lattice in the table sample information determined.
Step S106, generates testing tool according to the automatized script parameter configuration of software test requirement data and pre-stored
Discernible automatized script parameter list;
Step S107, utilizes testing tool to generate the mould of each test case according to test data and automatized script parameter list
Intend test result form;
Step S108, comparison expected test result form and simulation test result report generation test result.
UML program flow diagram according to described software test requirement data and pre-stored generates test data and includes:
Corresponding UML program flow diagram according to software test requirement data acquisition pre-stored;
Test path is determined according to described UML program flow diagram;
Test data are generated according to the genetic algorithm after improving and the test path determined.
Additionally, present invention also offers a kind of automatic test device based on all-purpose financial statements, as in figure 2 it is shown, device bag
Include:
Parsing module 201, for resolving software requirements specification by the keyword preset, the software generating report form is surveyed
Examination demand data;
Test cases technology module 202, for according to described software test requirement data and the test case mould of pre-stored
Plate generates test case;
Test data generation module 203, for according to described software test requirement data and the UML program flow of pre-stored
Journey figure generates test data;
Test program generation module 204, for generating corresponding institute according to described software test requirement data splicing SQL statement
State the test program of test case;
Expected test result generation module 205, for according to described test data and each test case of test program generation
Expected test result form;
Automatized script parameter list generation module 206, for according to described software test requirement data and pre-stored from
The configuration of dynamicization script argument generates testing tool discernible automatized script parameter list;
Simulation test result-generation module 207, surveys for utilizing according to described test data and automatized script parameter list
Trial work tool generates the simulation test result form of each test case;
Test result generation module 208, generates test knot for expected test result described in comparison and simulation test result
Really.
Test cases technology module 202 in the embodiment of the present invention includes:
Inventory determines unit, for determining the software test requirement number of the test case that need to generate according to described form attribute
According to inventory;
Test cases technology unit, for according to described software test requirement list and the test case mould of pre-stored
Plate generates test case.
Test data generation module 203 includes:
Flow chart determines unit, for obtaining the corresponding UML program flow diagram of pre-stored;
Test path determines unit, determines test path according to described UML program flow diagram;
Test data generation unit, for generating test number according to the genetic algorithm after improving and the test path determined
According to.
Expected test result generation module 205 includes:
Cell numeral determines unit, for determining in described table sample information according to described test program testing results data
The numerical value of each unit lattice;
Test result report generation unit, according to each test case of numerical generation of each unit lattice in the table sample information determined
Expected test result form.
Below in conjunction with specific embodiment, the embodiment of the present invention is described in further details:
The invention provides a kind of all-purpose financial statements automatic test device and method.First pass through software requirements specification
Resolving to structurized document data, be divided into demand element, data source key element, form logic, further according to automatic of parameter configuration
Joining test case and the test program of template generation form, to selected coordinates measurement test data, tester can be with
Time according to the change of business demand, use device again to resolve the soft content that need to change, device automatic decision change point is also revised
Test case, test data, automatized script and the form of the comparison result for test.
First term involved in the embodiment of the present invention is illustrated:
Structuring: refer to the principle of tree file system to be applied in single file so that single file also can be as literary composition
Part system equally comprises " subdirectory ", and " subdirectory " can also comprise deeper " subdirectory ", and each " catalogue " can contain
Multiple files, are saved in the original content needing the storage of multiple files in one file by tree and level, it is simple to
The attaching relation of the single file just clear and definite content of energy and classification relation.
Flag bit: to the mark carried out in requisition for the content generating test case, if the flag bit set that need to generate,
Otherwise reset.
Dominant parameter: in B/S or C/S framework, the parameter that form screens on foreground.
Recessive parameter: when form back-end data processes, the parameter used in where condition.
Below technical scheme is described in detail.
Fig. 3 is a kind of all-purpose financial statements automatic test device structure chart that the embodiment of the present invention provides, including input equipment
1, data administrator 2, data processing equipment 3, testing tool 4.
Input equipment 1: be responsible for receiving the software requirements specification of form and software requirements specification being passed to data processing
Device 3.
Data administrator 2: be responsible for all data in storage data handling procedure, and preserve the test use ultimately produced
Example, test data, automatized script parameter list and the form of the comparison result for test.
Data processing equipment 3: be responsible for receiving the project software statement of requirements book of input equipment 1 transmission, and this document is entered
Row resolve, will resolve after document data be stored in data administrator 2 by bullets, the most respectively from functional test,
Flow testing and performance test multi-angle generate test case;SQL statement splicing is used to generate test program;According to program specification
Procedures/modules flow chart described in book, to the coverage criteria optimum option test controlled employed in stream and data links
Path, and with the genetic algorithm after improving as core, in the genetic algorithm after improvement, according to genetic algebra D, population P and every
The code length T of individual variable, test path and corresponding parameter, use random number to initialize the variable in this path, by each input
Parameter separately encoded one-tenth bit string, then calculates the adaptive value function of these initializing variables, then judges adaptive value letter
Whether numerical value is equal to 0, if 0, then retain best individuality, convert thereof into decimal number and store in data administrator, continue
Continuous circulation, eliminates the individuality that fitness function is big, and little individuality replicates self, adds some at random and become in the individuality retained
Different, after producing new individuality, recalculate adaptive value function, it is judged that whether adaptive value functional value is 0, until P=0 and actual generation
< D, loop ends generate test data to algebraically.
After Test data generation, testing results program, obtain the form for the comparison result tested;Use form foreground
The strategy that parameter combines entirely, the step type in Gou Qu automatization parameter configuration table, object type, type of action, object properties,
Generate test automation script argument table, finally bullets is transferred to testing tool 4.
Testing tool 4: be the business tool supporting software test, mainly complete the bottom function of test job, it is possible to complete
Become system implementation to control, the page browse operation and error message acquisition etc., testing tool can be that the program of specialty is surveyed
Trial work tool, debugging acid etc..This device is responsible for receiving the bullets of data processing equipment 3 transmission, according to bullets from number
According to managing device 2 reads project testing data, run in a test system, after batch data end of run, the artificial behaviour of simulation
Point out form as implementation of test cases, in batches comparison form, use-case is performed result record simultaneously in data administrator 2.
Fig. 4 is the internal structure of the data administrator 2 of the all-purpose financial statements automatic test device in the embodiment of the present invention
Figure, including: the soft memory element 21 that needs of structuring, test case template memory element 22, project testing use case storage unit 23, item
Range estimation examination data storage cell 24, project testing program storage unit (PSU) 25, project automatized script parameter list memory element 26, item
Mesh is for the form memory element 27 of the comparison result of test, automatic parameter allocation list memory element 28, project procedure/module
Flow chart memory element 29, the form memory element 30 that project testing system is pointed out, test user's memory element 31.
The soft memory element 21 that needs of structuring: be responsible for the software test of the report form that storage data processing equipment 3 parses
Demand data, i.e. item base information, form essential information, report query interface (foreground parameter), data source information, table sample and
Logic.
Test case template memory element 22: be responsible for test main points, step and the method for storage individual feature component.Permissible
It is structure as shown in table 6 below:
Table 6
Project testing use case storage unit 23: be responsible for test main points, step and the method for stored items.Can be such as following table
Structure shown in 7:
Table 7
Project testing data storage cell 24: be responsible for the test data of stored items.It can be knot as shown in table 8 below
Structure:
Table 8
Project name | DSN | Text formatting | Field 1 | 。。。 | Field N |
Project testing program storage unit (PSU) 25: be responsible for the test program of stored items.It can be knot as shown in table 9 below
Structure:
Table 9
Project name | Report name | Sequence number | CELL numbers | SQL statement | Use-case is numbered |
Project automatized script parameter list memory element 26: be responsible for the automatized script parameter list of stored items.Can be
Structure such as table 10 below:
Table 10
Project name | Report name | Step type | Object type | Type of action | Object properties | Data | Use-case is numbered |
Project is for the form memory element 27 of the comparison result of test: be responsible for the storage excel form ratio for test
Form to result.
Automatic parameter allocation list memory element 28: be responsible for storage for complete for foreground combination parameter is converted to testing tool
4 discernible parameter lists, as shown in table 11.
Table 11
Control explanation | Step type | Object type | Type of action | Object properties |
Project procedure/block flow diagram memory element 29: be responsible for storage UML procedures/modules flow chart, the most oriented
Figure.
The form memory element 30 that project testing system is pointed out: the excel form that responsible memory test system is pointed out.
Test user's memory element 31: be responsible for the username and password of storage each authority of system, as shown in table 12.
Table 12
Field name | Explanation of field |
Form accesses user | User is accessed, such as: head office user with the form in " form essential information " |
User name | The user's English name pre-defined, such as: icbc |
User cipher | The user cipher pre-defined, such as: 12345679 |
Fig. 5 is the cut-away view of the data processing equipment 3 of all-purpose financial statements automatic test device in the embodiment of the present invention,
Including: document analysis device 31, test inventory judgment means 32, testing factor generating means 33, report generation device 34.
Document analysis device 31: be responsible for obtaining the software requirements specification of WORD pattern from data administrator 3, and lead to
Crossing the existing form of WORD, according to keywords from software requirements specification, Extraction Projects Back ground Information, form essential information, form are looked into
Ask interface, data source information, table sample and logic, these information are stored in that structuring is soft to be needed in memory element 21, and by project
Numbered transmission gives test inventory judgment means 32.
Wherein the concrete handling process of the structuring of table sample and logic is as follows:
Obtain table sample information in excel table, and counterlogic, utilize cell own characteristic in excel, position form table
Head, with cell as least unit, if occurring, a row or column is same peek logic, then use " scope " to describe and position
Position;When being stored in data base, for a cell, the data using multiple data source to take out collect, then " class
Type " select compound logic, what finally value was inserted is " collecting rank "=1;If in the content of certain cell is other cells
Hold sum, then " type " selects level logic, fills in the grid of use, " collecting rank "=1 at " Select " lattice.
Test inventory judgment means 32: be responsible for receiving the bullets of document analysis device 31 transmission, according to bullets
From structuring soft need, memory element 21 reads item base information, form essential information, report query interface, data source letter
Breath, table sample and logic.Judge the form attribute in form essential information, if " increasing newly ", flag bit all sets;If " repairing
Change ", need and data base deposited report messages to compare, the content of comparison includes: table sample, data source, form logic, use
Authorities etc., comparison goes out needs the content of amendment in flag bit set;Otherwise flag bit all resets;All flag bits are " 1 "
The inventory of use-case need to be generated as project report, and transmit bullets to testing factor generating means 33.
Testing factor generating means 33: be responsible for receiving the bullets of test inventory judgment means 32 transmission, according to project
Number from structuring soft need memory element 21 read item base information, form essential information, report query interface, data source letter
Breath, table sample and logic, generating item mesh test case, test data, test automation script argument table, test program, after completing
Transmission bullets is to report generation device 34.
Report generation device 34: be responsible for receiving the bullets of testing factor generating means 32 transmission, according to bullets
Testing results program, i.e. generates the numerical value of each CELL in form, by the position of its correspondence, each CELL numerical value is inserted excel
In form, generate the form expected results containing table sample.
Fig. 6 is the inside of the testing factor generating means 33 of the all-purpose financial statements automatic test device in the embodiment of the present invention
Structure chart, including: Test cases technology device 331, Test data generation device 332, test program generation device 333, test
Automatized script parameter list generating means 334.
Test cases technology device 331: be responsible for receiving the bullets of document analysis device 31 transmission is soft from structuring
Need that memory element 21 obtains this project report and need to generate the inventory of use-case, by by the form place road of form essential information
Restriction relation between the explanation of foreground optional parameters in footpath and report query interface, codomain, default option, control, foreground parameter
Content and test case template in " function title " mate, generate project functional test use-case;To user right and
The dominant parameter in foreground is combined into all parameters entirely, using each combination as a flow testing use-case;Simultaneously will " table sample and patrolling
Volume " in information press report name, CELL numbers, and CELL logic synthesizes, each CELL table sample and data accuracy one stream of generation
Journey test case;According to information such as use number of users, report form showing speed, matching test use-case template generation performance test is used
Example.The use-case generated is stored in project testing use case storage unit 23 by project.
Test data generation device 332: be responsible for receiving the bullets of document analysis device 31 transmission is soft from structuring
Need memory element 21 obtains project UML procedures/modules flow chart, by the coverage criteria optimization employed in project testing
Choose test path, with the genetic algorithm after improvement as core, to selected coordinates measurement test data.The test number generated
It is stored in project testing data storage cell 24 according to by project.According to the procedures/modules flow chart described in program specification book,
To the coverage criteria optimum option test path controlled employed in stream and data links, and with the genetic algorithm after improving it is
Core, in the genetic algorithm after improvement, according to genetic algebra D, population P and the code length T of each variable, test path and
Corresponding parameter, uses random number to initialize the variable in this path, by each input parameter separately encoded one-tenth bit string, then
Calculate the adaptive value function of these initializing variables, then judge whether adaptive value functional value is equal to 0, if 0, then retain best
Individuality, converts thereof into decimal number and stores in data administrator, continue cycling through, and eliminates the individuality that fitness function is big, little
Individuality self replicate, random in the individuality retained add some variations, after producing new individuality, recalculate adaptive value
Function, it is judged that whether adaptive value functional value is 0, until P=0 and actual generation algebraically < D, loop ends, generation test data.
Test program generation device 333: be responsible for receiving the bullets of document analysis device 31 transmission is soft from structuring
Needing to obtain SELECT corresponding to each CELL in memory element 21, the value of FROM, WHERE, Groupby, ORDERBY, by these
Value is spliced into SQL statement, runs SQL statement, generates the numerical value of each CELL in form, then each CELL numerical value is corresponding by it
Position insert in excel form, generate containing the form expected results of table sample.The form expected results containing table sample generated presses item
Mesh is stored in project testing program storage unit (PSU) 25.
Test automation script argument table creating device 334: be responsible for from structuring soft need memory element 21 obtain user
Authority, hooks taking-up in test user's memory element 31 and logins user name and user cipher;Obtain in item base information simultaneously
System address and form essential information in path, form place;Again the foreground in report query interface (foreground parameter) table is shown
Property parameter be entirely combined into all parameters, finally by report query interface (foreground parameter) control title hook take automatic parameter
Step type in allocation list memory element 28, object type, type of action, object properties, be converted to the automatic of set form
Change script argument table.It is single that the test automation script argument table generated is stored in the storage of project automatized script parameter list by project
In unit 26.
Fig. 7 is a kind of all-purpose financial statements automated testing method flow chart that the embodiment of the present invention provides.Including step:
Step S701: importing software requirements specification, input equipment 1 receives the project software statement of requirements of word form
Book, and bullets is transferred to document analysis device 31.
Step S702: resolving software requirements specification, document analysis device 31 parses item from software requirements specification
Mesh Back ground Information, form essential information, report query interface, data source information, table sample and logic, be saved in soft need of structure and store
In unit 21.
Step S703: judge that the form attribute in form essential information, test inventory judgment means 32 are deposited from the soft need of structure
Storage unit 21 reads item base information, form essential information, report query interface, data source information, table sample and logic, root
According to the form attribute in form essential information, other information are arranged flag bit, simultaneously to the conduct item that all flag bits are " 1 "
Mesh form need to generate the inventory of use-case.
Step S704: generate test case, Test cases technology device 331 obtains this from structure soft need memory element 21
Secondary project report need to generate the inventory of use-case, generates test case respectively, and be stored in project testing use-case by project in terms of 3
In memory element 23.
Step S705: generate test data, Test data generation device 332 is single from project procedure/block flow diagram storage
Unit 29 obtains UML procedures/modules flow chart, by the coverage criteria optimum option employed in project testing is tested road
Footpath, to selected coordinates measurement test data, and is stored in project data memory element 24.
Step S706: generate test program, test program generation device 333 obtains memory element 21 from structuring soft need
Table sample and logic, testing results program is spliced the SQL program of every form in this project, the test data of generation is deposited by project
Storage is in project testing program storage unit (PSU) 25.
Step S707: generating the form result containing table sample, report generation device 34 receives test program generation device 333
The bullets sent, obtains test program, in order testing results program from project testing program storage unit (PSU) 25, generates
Form expected results containing table sample.
Step S708: generating test automation script argument, test automation script argument table creating device 334 receives
The bullets that report generation device 34 sends, by obtaining the data such as user right, system address, the dominant parameter in foreground, and
Read automatization's parameter configuration table memory element, generate automatic test script parameter list.
Step S709: read and want to buy test data, testing tool 4 receives the bullets of data processing equipment 3 transmission,
From project data memory element 24, project testing data are read according to bullets.
Step S710: testing tool 4 simulation test human users, starts test system.
Step S711: after batch data end of run, testing tool 4 simulation test human users, implementation of test cases point
Go out form, and form test system pointed out is stored in the form memory element 30 that project testing system is pointed out by project.
Step S712: batch form comparison instrument transferred by testing tool 4, expection and the actual form pointed out is compared
Right.
Step S713: during a form and comparison form, testing tool 4 is by error information and comparison result, same
Step updates the test case of data administrator 2.
Fig. 8 is the exploded view of step S704 of the all-purpose financial statements automated testing method flow process of the present invention.Including:
Step S801: after Test cases technology device 331 receives the bullets that document analysis device 31 transmits, from knot
Structureization is soft to be needed to obtain this project report in memory element 21 and need to generate the inventory of use-case.
Step S802: the content in use-case inventory and test case template are carried out by Test cases technology device 331 respectively
Coupling, generates project functional test use-case.
Step S803: Test cases technology device 331 parameter dominant to user right and foreground is combined into all parameters entirely
Table, using each combination as a flow testing use-case;Each CELL table sample and data accuracy are generated a flow process simultaneously
Test case.
Step S804: information and the tests such as Test cases technology device 331 obtains and uses number of users, report form showing speed
Use-case template is mated, and generates performance test case.
Step S805: Test cases technology device 331 by all use-cases all according to task-driven project testing use case storage
In unit 23.
Fig. 9 is the exploded view of step S706 of the all-purpose financial statements automated testing method flow process of the present invention, including:
Step S901: test program generation device 333 from the soft table sample needing to obtain form memory element 11 of structuring and
The logic that each CELL is corresponding, where condition (recessive parameter), before obtaining from " report query interface (foreground parameter) " simultaneously
Platform optional parameters (dominant parameter).
Step S902: test program generation device 333 obtains each CELL correspondence from structuring soft need memory element 11
SELECT, the value of FROM, WHERE, Groupby, ORDERBY, these values are spliced into SQL statement, and lead-in item test
Program storage unit (PSU) 25.
Step S903: test program generation device 333 is pressed project order and run in project testing program storage unit (PSU) 15
Select statement, generates the numerical value of each CELL in form.
Step S904: each CELL numerical value is inserted excel form by the position of its correspondence by test program generation device 333
In, generate the form expected results containing table sample.
Step S905: test program generation device 333 is stored in the project report for the comparison result of test according to project
In table memory element 27.
Below in conjunction with electronic banking income statistics project, the embodiment of the present invention is done into once elaborating:
The first step: use data processing equipment 3 to resolve software requirements specification.
Second step: as a example by electronic banking Income situation table, form attribute is " increasing newly ", and structuring is soft need to store list
Mark position " 1 " in unit 21.
The structurized document data of soft need after parsing is as follows:
● item base information
● form essential information
● report query interface (foreground parameter)
● data source information
● table sample and logic
3rd step: obtain flow process, first Test cases technology device 331 with reference to Fig. 6 test case respectively that structuring is soft
Need in memory element 21 in " the foreground optional parameters ", " codomain ", " default option " of mark position " 1 " etc. and test case template
" function title " mate, generate project functional test use-case and performance test case (such as: use-case numbering 1,2,3);So
After dominant to user right and foreground parameter be combined into entirely all in all parameter lists be entirely combined into flow testing use-case (such as: use
Example numbering 4), then the information in " table sample and logic " is pressed report name, CELL numbers, and the synthesis of CELL logic is (such as: use-case is numbered
5).
Detailed programs use-case is as follows: starting with T is functional test use-case, P operation flow test case, and L performance test is used
Example.
4th step: with reference to Fig. 7 test program obtain flow process, will resolve after the structurized form of soft need and logic in
Numerical value in the cell that Select, From, Where, Groupby, Orderby are corresponding, by Select*From*Where*
Groupby*Orderby is spliced into Simple SQL statement, and detailed programs test program is as follows:
5th step: after Test data generation, the test program generation device testing results journey in order of data processing equipment 3
Sequence, generates the value of corresponding CELL.
6th step: each CELL numerical value is inserted in excel form by the position of its correspondence
7th step: the user right in the form Basic Information Table parsed by document analysis device 31 is head office user,
In test user's memory element, hook taking-up login user name icbc, user cipher 12345679;Simultaneously by report query interface
The dominant parameter in foreground in (foreground parameter) table is combined into the combination of all parameters entirely, such as following table:
8th step: test automation script argument table creating device 334, obtains path, form place in form essential information
" group financial statements-> e-bank ";Joined by the control title Gou Qu automatization of report query interface (foreground parameter) parameters
Step type in number allocation list memory element 18, object type, type of action, object properties, the ginseng that the 7th step is combined into
Array closes the concrete automatized script parameter list being converted to following form, and this example only describes one group of scene, and frequency & is drop-down for form
Option (the first tenday period of a month), statement dates calendar option (on January 10th, 2012), service line drop-down option (e-bank), product class
Type & drop-down option (channel):
9th step: testing tool 4 receives the bullets of data processing equipment 3 transmission, according to bullets from project
Data storage cell 24 reads project testing data.
Tenth step: testing tool 4 loading data in a test system, simulation test human users, start test system.
11st step: after batch data end of run, testing tool 4 simulation test human users, implementation of test cases point
Go out form, and form test system pointed out is stored in the form memory element 30 that project testing system is pointed out by project.
12nd step: batch form comparison instrument transferred by testing tool 4, expection and the actual form pointed out is compared
Right.
13rd step: during a form and comparison form, testing tool 4 is by error information and comparison result, same
Step updates the test case of data administrator 2.
The invention provides a kind of all-purpose financial statements automatic test device and method.By the parsing to soft need, employing is joined
Putting method completes test case, test data, automatized script and the preparation of form of the comparison result for test, uses
The program test instrument of specialty realizes full-automatic testing operation, and its effect and advantage are embodied in the following aspects:
1, instant invention overcomes and manually carry out test preparation and the deficiency of system test at present when form is tested,
It is greatly improved the automatic test efficiency to form, software quality will be effectively improved, ensure the production stability and security of enterprise;
2, the present invention is by a kind of form test and management method, obtains test case conveniently, flexibly, it is achieved use test
The management of example, improves tester and tests the efficiency of software.
3, the present invention solve that script present in current automatic test is compatible, the asking of versatility and durability difference
Topic, overcomes traditional recording and writes under script mode tester's technology requirement height, it is achieved automatization carries out test system
Unified test tries, and improves the versatility of automatic test, durability, ease for use and maintainability, reduces the manpower of test job
Resources costs.
The present invention applies specific embodiment principle and the embodiment of the present invention are set forth, above example
Explanation be only intended to help to understand method and the core concept thereof of the present invention;Simultaneously for one of ordinary skill in the art,
According to the thought of the present invention, the most all will change, in sum, in this specification
Hold and should not be construed as limitation of the present invention.
Claims (10)
1. the automated testing method of an all-purpose financial statements, it is characterised in that described method includes:
Resolve software requirements specification by the keyword preset, generate the software test requirement data of report form, wherein, described
The software test requirement data of report form include: item base information, form essential information, report query interface, data
Source information, table sample and logical message;Described item base information, form essential information, report query interface, data source information,
Table sample and logical message are respectively provided with flag bit, and the software test requirement Data Labels position that need to generate test case is 1;Logical message
For the logic that each CELL is corresponding, logic includes recessive parameter and dominant parameter, and wherein, dominant parameter refers at B/S or C/S frame
The parameter that in structure, form screens on foreground, recessive parameter refers to the parameter used in where condition when form back-end data processes;
Test case template according to described software test requirement data and pre-stored generates test case;
Modeling language UML program flow diagram according to described software test requirement data and pre-stored generates test number
According to, specifically include: according to the corresponding UML program flow diagram of described software test requirement data acquisition pre-stored;According to described
UML program flow diagram determines test path;Test data are generated according to the genetic algorithm after improving and the test path determined;
The test program of corresponding described test case is generated according to described software test requirement data splicing SQL statement;
According to described test data and the expected test result form of each test case of test program generation;
It is discernible that automatized script parameter configuration according to described software test requirement data and pre-stored generates testing tool
Automatized script parameter list;
Testing tool is utilized to generate the simulation test knot of each test case according to described test data and automatized script parameter list
Retribution table;
Expected test result form described in comparison and simulation test result report generation test result.
2. automated testing method as claimed in claim 1, it is characterised in that described table sample and logical message include: right
Answer the respective field content of SQL statement.
3. automated testing method as claimed in claim 1, it is characterised in that described according to described software test requirement number
Generate test case according to the test case template with pre-stored to include:
The software test requirement list of the test case that need to generate is determined according to flag bit;
Test case template according to described software test requirement list and pre-stored generates test case.
4. automated testing method as claimed in claim 2, it is characterised in that described according to described software test requirement number
The test program generating corresponding described test case according to splicing SQL statement includes:
Respective field content splicing SQL statement according to described corresponding SQL statement, generates the test journey of corresponding described test case
Sequence.
5. automated testing method as claimed in claim 4, it is characterised in that described according to described test data and test
The expected test result of each test case of Program Generating includes:
The numerical value of each unit lattice in described table sample and logical message is determined according to described test program testing results data;
According to the expected test result form of each test case of the numerical generation of each unit lattice in the table sample determined and logical message.
6. the automatic test device of an all-purpose financial statements, it is characterised in that described device includes:
Parsing module, for resolving software requirements specification by the keyword preset, generates the software test requirement of report form
Data, wherein, the software test requirement data of described report form include: item base information, form essential information, form
Query interface, data source information, table sample and logical message, described item base information includes bullets, form essential information
Including form attribute, described item base information, form essential information, report query interface, data source information, table sample and logic
Information is respectively provided with flag bit, and the software test requirement Data Labels position that need to generate test case is 1;Logical message is each CELL
Corresponding logic, logic includes recessive parameter and dominant parameter, and wherein, dominant parameter refers to that form exists in B/S or C/S framework
The parameter of foreground screening, recessive parameter refers to the parameter used in where condition when form back-end data processes;
Test cases technology module, generates for the test case template according to described software test requirement data and pre-stored and surveys
Example on probation;
Test data generation module, for according to described software test requirement data and the Modeling language UML of pre-stored
Program flow diagram generates test data;
Test program generation module, for generating corresponding described test according to described software test requirement data splicing SQL statement
The test program of use-case;
Expected test result generation module, surveys for the expection according to described test data and each test case of test program generation
Test result form;
Automatized script parameter list generation module, for according to described software test requirement data and the automatized script of pre-stored
Parameter configuration generates testing tool discernible automatized script parameter list;
Simulation test result-generation module, for utilizing testing tool raw according to described test data and automatized script parameter list
Become the simulation test result form of each test case;
Test result generation module, generates test result for expected test result described in comparison and simulation test result,
Wherein, described Test data generation module includes:
Flow chart determines unit, for the corresponding UML program circuit according to described software test requirement data acquisition pre-stored
Figure;
Test path determines unit, determines test path according to described UML program flow diagram;And
Test data generation unit, for generating test data according to the genetic algorithm after improving and the test path determined.
7. automatic test device as claimed in claim 6, it is characterised in that described table sample and logical message include: right
Answer the respective field content of SQL statement.
8. automatic test device as claimed in claim 6, it is characterised in that described Test cases technology module includes:
Inventory determines unit, for determining that the software test requirement data of the test case that need to generate are clear according to described form attribute
Single;
Test cases technology unit, raw for the test case template according to described software test requirement list and pre-stored
Become test case.
9. automatic test device as claimed in claim 7, it is characterised in that described test program generation module is further
Respective field content splicing SQL statement according to described corresponding SQL statement, generates the test program of corresponding described test case.
10. automatic test device as claimed in claim 9, it is characterised in that described expected test result generation module
Including:
Cell numeral determines unit, for determining described table sample and logical message according to described test program testing results data
The numerical value of middle each unit lattice;
Test result report generation unit, respectively tests use according to the numerical generation of each unit lattice in the table sample determined and logical message
The expected test result form of example.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410077108.0A CN103838672B (en) | 2014-03-04 | 2014-03-04 | The automated testing method of a kind of all-purpose financial statements and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410077108.0A CN103838672B (en) | 2014-03-04 | 2014-03-04 | The automated testing method of a kind of all-purpose financial statements and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103838672A CN103838672A (en) | 2014-06-04 |
CN103838672B true CN103838672B (en) | 2016-12-07 |
Family
ID=50802195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410077108.0A Active CN103838672B (en) | 2014-03-04 | 2014-03-04 | The automated testing method of a kind of all-purpose financial statements and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103838672B (en) |
Families Citing this family (41)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104462933A (en) * | 2014-12-01 | 2015-03-25 | 中广核工程有限公司 | Nuclear power station safety level software verification and validation method and system |
CN104536885A (en) * | 2014-12-17 | 2015-04-22 | 记忆科技(深圳)有限公司 | Method for generating Soc random verification platform |
CN106293661A (en) * | 2015-05-22 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The generation of pictorial statement, generation processing method and processing device |
CN104881469B (en) * | 2015-05-27 | 2018-12-18 | 北京京东尚科信息技术有限公司 | A kind of data export method and device |
CN104866426B (en) * | 2015-05-28 | 2017-10-17 | 华北计算技术研究所 | Software test integrated control method and system |
CN106484605A (en) * | 2015-08-28 | 2017-03-08 | 中兴通讯股份有限公司 | A kind of method and system realizing software automated testing |
CN105373472B (en) * | 2015-10-10 | 2017-11-28 | 北京中创信测信息技术有限公司 | A kind of method of testing and test system of the statistical accuracy based on database |
CN107015903B (en) * | 2016-01-27 | 2021-08-10 | 菜鸟智能物流控股有限公司 | Interface test program generation method and device and electronic equipment |
CN105930262B (en) * | 2016-03-02 | 2018-04-20 | 平安科技(深圳)有限公司 | Application program user interface automated testing method and electronic equipment |
CN105808437B (en) * | 2016-03-09 | 2020-05-12 | 广州优视网络科技有限公司 | Automatic test method and system based on test case data sheet |
CN106201886B (en) * | 2016-07-18 | 2019-04-09 | 优酷网络技术(北京)有限公司 | A kind of Proxy Method and device of the verifying of real time data task |
CN106201887B (en) * | 2016-07-18 | 2019-04-09 | 优酷网络技术(北京)有限公司 | A kind of verification method and device of off-line data task |
CN107391372A (en) * | 2017-07-19 | 2017-11-24 | 中国银行股份有限公司 | A kind of data mart modeling function test method and system |
CN107562955A (en) * | 2017-09-30 | 2018-01-09 | 北京酷我科技有限公司 | A kind of rapid generation of SQL statement |
CN107885710A (en) * | 2017-11-10 | 2018-04-06 | 中国银行股份有限公司 | A kind of generation method and device of bank's parameter report |
CN108399130A (en) * | 2018-02-28 | 2018-08-14 | 平安科技(深圳)有限公司 | Automatically generate the method, apparatus, equipment and readable storage medium storing program for executing of test cases |
CN108920382B (en) * | 2018-07-31 | 2022-04-01 | 惠州市德赛西威汽车电子股份有限公司 | Test case generation method and device, storage medium and server |
CN109254988A (en) * | 2018-08-03 | 2019-01-22 | 京信通信系统(中国)有限公司 | Report automatic test approach, device, computer storage medium and equipment |
CN109542794A (en) * | 2018-12-04 | 2019-03-29 | 中国航空工业集团公司西安航空计算技术研究所 | A kind of Software Automatic Testing Method applied to embedded system |
CN109685626A (en) * | 2018-12-27 | 2019-04-26 | 北京顺丰同城科技有限公司 | A kind of lower single test method and device |
CN110457224B (en) * | 2019-08-15 | 2023-08-18 | 中国银行股份有限公司 | Method and device for generating test data |
CN110806969A (en) * | 2019-09-18 | 2020-02-18 | 北京你财富计算机科技有限公司 | Test case integrity evaluation method and device and electronic equipment |
CN110780850B (en) * | 2019-10-24 | 2021-01-05 | 上海复深蓝软件股份有限公司 | Requirement case auxiliary generation method and device, computer equipment and storage medium |
CN111078526A (en) * | 2019-11-04 | 2020-04-28 | 泰康保险集团股份有限公司 | Test case generation method and device and storage medium |
CN111813653B (en) * | 2020-05-28 | 2023-07-04 | 杭州览众数据科技有限公司 | Data exception testing method and automatic testing tool related to field content |
CN111625467B (en) * | 2020-06-03 | 2021-08-03 | 深圳华锐金融技术股份有限公司 | Automatic testing method and device, computer equipment and storage medium |
CN112000557B (en) * | 2020-07-16 | 2023-09-12 | 浙江众合科技股份有限公司 | Automatic testing device for rail transit signal system |
CN112104526A (en) * | 2020-09-21 | 2020-12-18 | 中国人民解放军陆军装备部驻北京地区军事代表局驻石家庄地区第一军事代表室 | Test system and test method |
CN112327815A (en) * | 2020-11-30 | 2021-02-05 | 北京一雄信息科技有限公司 | Method and device for batch testing of accuracy of data stream of automobile diagnostic instrument |
CN112667494A (en) * | 2020-12-08 | 2021-04-16 | 上海纳恩汽车技术股份有限公司 | Automobile UDS automatic testing method and system based on configuration table and storage medium |
CN112579474A (en) * | 2020-12-30 | 2021-03-30 | 中国科学院长春光学精密机械与物理研究所 | Software test requirement extraction system and test requirement extraction method thereof |
CN112800009A (en) * | 2021-01-28 | 2021-05-14 | 重庆富民银行股份有限公司 | Centralized management system for automated test data based on compatible configuration |
CN112906362A (en) * | 2021-02-05 | 2021-06-04 | 广东智能财税数据科技发展有限公司 | Report summarizing method, device, equipment and storage medium |
CN112906363A (en) * | 2021-02-05 | 2021-06-04 | 广东智能财税数据科技发展有限公司 | Report adding method, device, equipment and storage medium |
CN112965909B (en) * | 2021-03-19 | 2024-04-09 | 湖南大学 | Test data, test case generation method and system and storage medium |
CN113407441A (en) * | 2021-05-25 | 2021-09-17 | 威胜集团有限公司 | Software testing method, device, equipment and storage medium |
CN113282498B (en) * | 2021-05-31 | 2024-04-05 | 深圳赛安特技术服务有限公司 | Method, device, equipment and storage medium for generating test cases |
CN113220588A (en) * | 2021-06-02 | 2021-08-06 | 北京锐安科技有限公司 | Automatic testing method, device and equipment for data processing and storage medium |
CN113535548B (en) * | 2021-06-21 | 2023-01-03 | 上汽通用五菱汽车股份有限公司 | Test script generation method, device, equipment and computer readable storage medium |
CN113238966A (en) * | 2021-06-22 | 2021-08-10 | 中国农业银行股份有限公司 | Report platform front end testing method, device, equipment and storage medium |
CN115203057B (en) * | 2022-08-16 | 2023-03-28 | 北京永洪商智科技有限公司 | Low code test automation method, device, equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487340A (en) * | 2010-12-02 | 2012-06-06 | 中兴通讯股份有限公司 | Test method of message interaction and apparatus thereof |
CN103186457A (en) * | 2011-12-29 | 2013-07-03 | 阿里巴巴集团控股有限公司 | Method and device for automatically generating test case |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100790470B1 (en) * | 2005-12-05 | 2008-01-02 | 한국전자통신연구원 | Method and apparatus for automatically generating test case for device driver test |
-
2014
- 2014-03-04 CN CN201410077108.0A patent/CN103838672B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102487340A (en) * | 2010-12-02 | 2012-06-06 | 中兴通讯股份有限公司 | Test method of message interaction and apparatus thereof |
CN103186457A (en) * | 2011-12-29 | 2013-07-03 | 阿里巴巴集团控股有限公司 | Method and device for automatically generating test case |
Also Published As
Publication number | Publication date |
---|---|
CN103838672A (en) | 2014-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103838672B (en) | The automated testing method of a kind of all-purpose financial statements and device | |
CN104866426B (en) | Software test integrated control method and system | |
CN104133772B (en) | Automatic test data generation method | |
CN104239073B (en) | Data maintenance system rapid prototyping development system and method | |
CN106446412B (en) | Model-based test method for avionics system | |
CN106104472A (en) | Specify logic checking rule and logic checking rule is applied to data | |
CN110275861B (en) | Data storage method and device, storage medium and electronic device | |
CN106372044B (en) | A method of based on the typing dimension XBRL report of report generation | |
CN107291450A (en) | A kind of quick code automatic generation method for programming friendly | |
CN107273117A (en) | A kind of quick Code automatic build system for programming friendly | |
CN104572122A (en) | Software application data generating device and method | |
CN107798017B (en) | Method and system for generating execution plan information in distributed database | |
CN104992022A (en) | Aeronautics electronic system interface management method based on models | |
CN108762808A (en) | The generation method and system of interface document | |
CN104951623A (en) | Avionics system interface management system based on models | |
CN110221975A (en) | Create the method and device of interface use-case automatic test script | |
CN106815366A (en) | A kind of method and system of Mass production data | |
CN107506190A (en) | XML file amending method and device based on Spring frameworks | |
CN111158656A (en) | Method and device for generating test codes based on fruit tree method | |
CN116468010A (en) | Report generation method, device, terminal and storage medium | |
CN115114146A (en) | Interface test method, device, equipment and storage medium | |
CN103885341A (en) | Performance analysis system and method based on automobile performance simulator | |
CN109582906A (en) | Determination method, apparatus, equipment and the storage medium of data reliability | |
CN113342692A (en) | Test case automatic generation method and device, electronic equipment and storage medium | |
CN111143228B (en) | Test code generation method and device based on decision table method |
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 |