CN104598376B - The layering automatization test system and method for a kind of data-driven - Google Patents

The layering automatization test system and method for a kind of data-driven Download PDF

Info

Publication number
CN104598376B
CN104598376B CN201410841996.9A CN201410841996A CN104598376B CN 104598376 B CN104598376 B CN 104598376B CN 201410841996 A CN201410841996 A CN 201410841996A CN 104598376 B CN104598376 B CN 104598376B
Authority
CN
China
Prior art keywords
test
file
case
data
sut
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
Application number
CN201410841996.9A
Other languages
Chinese (zh)
Other versions
CN104598376A (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 Internet Network Information Center
Original Assignee
Computer Network Information Center of CAS
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 Computer Network Information Center of CAS filed Critical Computer Network Information Center of CAS
Priority to CN201410841996.9A priority Critical patent/CN104598376B/en
Publication of CN104598376A publication Critical patent/CN104598376A/en
Application granted granted Critical
Publication of CN104598376B publication Critical patent/CN104598376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a kind of layering automatization test system based on data-driven and method.The system includes:Profile management module, for management configuration file;Test case management module, file is described for management of test cases;Test data management module, for managing the data file under the corresponding data file path of each test case, including performs index file and supplementary data file;Layering action keyword realizes module, for system under test (SUT) to be layered according to its functional structure, is needed to define some test action keywords at each layer according to test, and carry out test action realization to each action keyword;Control module, for carrying out test execution control.It is of the invention that three levels of files index management is carried out to use-case needed for test and data file, system under test (SUT) is divided and is mapped to different levels and respectively realization action keyword behavior, clear logic, easy care adds automatic test coverage, improves testing efficiency.

Description

The layering automatization test system and method for a kind of data-driven
Technical field
The invention belongs to software automated testing technical field, and in particular to a kind of layering automatic test of data-driven System and method.
Background technology
As the effective technology means for improving test job efficiency and measuring accuracy, automatization testing technique application is increasingly Extensively, the design method of the necessary condition carried out as automatic test, testing tool and framework is even more important.Generally use at present Automated test frame do not have efficient, easy-to-use and highly versatile feature concurrently typically, they generally have following some drawbacks:
A, using first being recorded to test operation, then playback mode, this pattern inefficiency, the variation to system under test (SUT) Adaptability is very weak, and the test script of recording easily fails, and modification amount is big, and is only used for regression test.
Even if b, not using recording playback mode, but still need need out in more development, test process The test code for sending out more, it is high to tester's skill set requirements, and script maintenance cost is high.
C, versatility be not strong, a system be difficult and meanwhile cover Web UI, Web service, Server (background service), The testing requirement of DB (database) type.
D, system be not high to test case coverage rate, it is impossible in a large proportion performs test exemple automation.
If there is data dependence relation with other system in e, measurand, it is difficult to manipulate multiple systems carry out data interactions from And implement automatic test.
The content of the invention
The present invention carries out layering automatic test based on data-driven in view of the above-mentioned problems, offer is a kind of to system under test (SUT) System and method, continuously run by data-driven system, by system under test (SUT) layering carry out automatic test.
To achieve the above object, the present invention is adopted the following technical scheme that:
A kind of layering automatization test system of data-driven, it is characterised in that including:
Profile management module, for management configuration file, carries out test relevant configuration in configuration file;
Test case management module, file is described for management of test cases;
Test data management module, for managing the data file under the corresponding data file path of each test case, Including performing index file and supplementary data file;In the execution index file comprising variable define, use-case operating procedure The index of description, the basic input data needed for per step and the supplementary data file to needs;The supplementary data file In include per step perform needed for complementarity input data;
Layering action keyword realizes module, for system under test (SUT) to be layered according to its functional structure, according to test Need to define some test action keywords at each layer, and test action realization is carried out to each action keyword;
Control module, connects above-mentioned each module, for carrying out test execution control, is successively read first each pending Test case, obtains its data storage path, carries out variable replacement in storage path, then order performs use-case and performs index Each testing procedure of file, performs according to action keyword and is interacted with system under test (SUT), is held according to interaction results judgement use-case Capable correctness;If desired additional input data in implementation procedure, then by perform index file description can search out it is corresponding defeated Enter file, obtain input.
Further, layering action keyword realize module by system under test (SUT) be divided into Web UI, Web service, One or more layers in Server, database layer, and in every layer of definition and realize corresponding action keyword.
Further, the layering automatization test system of the data-driven also includes following module:
Test report is generated and log pattern, for the log in use-case implementation procedure, and is updated in test report The corresponding test result state of use-case, whole use-cases complete test report after being finished;
Test report sending module, for being chosen whether to send the file such as test report and test log according to system configuration To associated mailbox.
Further, the test relevant configuration carried out in configuration file, different according to measurand, potentially include: Test case file title and catalogue, system under test (SUT) title, IP address, port service URL, database description URL, test report Accuse recipient's mailbox.
Further, the test case, which describes file, includes the description of each use-case, if the setting of execution, Yi Jiyong Data file path needed for the corresponding test of example.
A kind of layering automated testing method of use said system data-driven, its step includes:
1) system under test (SUT) is layered according to its functional structure, needed according to test dynamic in some tests of each layer of definition Make keyword, and test action realization is carried out to each action keyword;
2) test relevant configuration is carried out in configuration file;
3) test case is write in test case file, each use-case correspondence shows its corresponding test data storage road Footpath;
4) under each test case data storage path, set up the corresponding use-case of each use-case and perform index file, its Content is the specific descriptions of this use-case testing procedure, including this test involved action keyword and required basic number According to, and required supplementary data storage file path and title;
5) when performing, each pending test case is successively read first, its data storage path is obtained, on storage road Variable replacement is carried out in footpath, then order performs each testing procedure that use-case performs index file, held according to action keyword Row is interacted with system under test (SUT), and the correctness that use-case is performed is judged according to interaction results.
Further, step 1) system under test (SUT) is divided into one in Web UI, Web service, Server, database layer Layer or multilayer.
Further, step 5) during each testing procedure of use-case execution index file is performed, by test result Update in test report file, all pending test case generates test report after being finished, and is sent according to configuration The file such as test report and necessary test log.
The present invention's is mainly characterized by:1) test case and the required data of test use the indexed mode pipe of three levels of files altogether Reason:One-level:Test case;Two grades:The execution index file of test data, part needed for describing and perform containing testing procedure is basic Data;Three-level:Supplementary data file, can be found by performing index file needed for the step of test data is performed;Clear logic, Maintain easily;2) system under test (SUT) is divided and is mapped to Web UI, Web service, Server, database this four levels, point Realization action keyword behavior, does not add automatic test coverage, improves testing efficiency;3) supported in test data Variable replacement, is easy to data maintenance and reuse;4) supporting to only need to write data in test process just can be real as system input Existing automatic test, and carry out test result automatic Verification according to data.
Compared with prior art, beneficial effects of the present invention are as follows:
1) after system is realized, tester need not write any code in test process, it is only necessary to setup test data, use Data-driven system tests different service logics.
2) different levels of system or many levels function of multiple systems can be tested simultaneously.System under test (SUT) level Between there are execution sequence requirement or interactive requirements to act key sequence realize by combination or conversion.
3) by Web UI, Web service, Server, the division of database this four levels and action is separately designed After keyword, most of tested software systems can be covered, because one layer that most systems may map in four layers of the above Or multilayer, so as to improve test exemple automation implementation rate.
4) system can extend, can be with if the corresponding action keyword of four levels can not meet test automation demand Continue expanded definition action keyword, it is only necessary to which test action realization is carried out to it.
5) three levels of files index management, clear logic, easy care are carried out to use-case needed for test and data file.
6) only need to know the motion characteristic of measurand, just can be with action keyword and input data to testing procedure It is described, and expected result is contrasted with actual result, complete automatic test, and is not limited to carry out regression test.
7) use-case data supports variable replacement, can improve test data and write efficiency and easy to maintain.
8) multiple measurands of data dependence relation can be manipulated simultaneously, solve the difficult mould of interaction data in test process The problem of plan.
Brief description of the drawings
Fig. 1 is the system module composition figure in embodiment.
Fig. 2 is the automatic testing process figure in embodiment.
Embodiment
In order to facilitate the understanding of the purposes, features and advantages of the present invention, below by specific embodiment and Accompanying drawing, the present invention will be further described.
System and method that layering automatic test is carried out to system under test (SUT) proposed by the present invention based on data-driven, it is main Realize following purpose:
1) continuously run by data-driven system, automatic implementation of test cases and generation test report.
2) by reasonably designing, make test case and test data is convenient easily manages.
3) system under test (SUT) layering is subjected to automatic test, makes most of test case can be with automated execution.
4) make tester only need to write test data, just can realize automatic test.
5) system is made to be used for regression test incessantly, it may also be used for the first run to measurand is tested.
To achieve the above object, the system is included with lower module or subsystem, as shown in Figure 1.
1) configuration file management, is configured in configuration file config.properties to measurand, according to being Unite its IP of feature configuration, port, database, mail server, test report recipient's mailbox etc., while nominative testing performs institute Corresponding test case describes filename and place path.
2) test case management, the content that test case describes file is as shown in table 1 below, except the description of each use-case, Data file path needed for the setting also whether performed, and the corresponding test of this use-case.
The test case of table 1. describes the contents list of file
3) test data is managed, and has volume of data file under the corresponding data file path of each test case, its In one it is prerequisite be use-case perform index file:index.properties.Have under each use-case file path and only There is one to perform index file, wherein the description of progress variable-definition and use-case operating procedure, can be included in this file multiple There are an action keyword and some basic input datas in step, each step, if having also needed to supplementary data file with rich Richness input, then demand draws its filename, such as input1.txt.When testing procedure is designed, different system level can be flexibly selected Keyword is acted, can crossover operation and the measurand for testing different levels.
4) layering action keyword and realization, by system under test (SUT) according to functional structure, be divided into Web UI (Website page), One or more layers in Webservice (Web service interface), Server (background service), database layer, to each of which layer It is secondary to carry out automatic test respectively, and as needed in some test action keywords of each hierarchical Design:A1, A2 ..., B1, B2 ..., C1, C2 ..., D1, D2 ..., herein test action refer to specific behavioral test, such as inquiry operation to system under test (SUT), repair Change database manipulation, certain business operation etc..Realization is designed to each test action keyword, by it according to input data Drive system simulation test is acted, and the expected result of input data description is compared with system under test (SUT) response results, judges to survey Example on probation performs correctness.
5) control module, control module carries out test execution control, first according to configuration file, obtains use case description file, And read the use-case for having been set to perform wherein successively, and the data of this use-case deposit path, and this use is read according to path The corresponding execution index file of example and supplementary data file content.To the execution index file and supplementary data required for this use-case File carries out variable replacement.After variable replacement, each testing procedure that order performs use-case execution index file (is included in step Basic input data), performed and interacted with system under test (SUT) according to action keyword, input data is supplemented needed for interaction can be from Read in corresponding document.Judge that use-case performs correctness according to interaction results.
6) log in generation daily record, renewal test report and transmission report, use-case implementation procedure, and update test report The corresponding test result state of the use-case of this in announcement.Whole use-cases are finished, and complete test report, optional according to system configuration Select and whether send the files such as test report and test log to associated mailbox.
A specific embodiment is provided below.The automatic testing process of the present embodiment is as shown in Fig. 2 its step is described such as Under:
1) to system under test (SUT) logic higher slice, general ubiquitous system can be divided into Web UI, Web service, Server, number According to one or more layers in this four levels of storehouse.According to testing requirement, every layer defines one or more action keywords.To each Act keyword and carry out test action realization, allow it to perform test action, and discriminating test result correctness according to data.
2) test relevant configuration, such as test case file title and catalogue, system under test (SUT) title, IP are carried out in configuration file Address, port, service URL, database description URL, test report recipient's mailbox etc..
3) test case is write in test case file, each use-case correspondence shows its corresponding test data storage road Footpath.
4) under each test case data storage path, set up the corresponding use-case of each use-case and perform index file, its Content is the specific descriptions of this use-case testing procedure, including this test involved action keyword and required basic number According to if desired supplementary data, need to set up corresponding document, and index its filename in description the step of index file is performed.
5) when performing, each pending test case is successively read, its data storage path is obtained.In storage path In, variable replacement is first carried out, index file is then performed according to it, corresponding action keyword behavior is performed by step, and sentence Disconnected test result, updates into test report file.If performing the input data required supplementation with, indicated in being described according to step Supplementary data filename read specific data.
6) implementation procedure log, generates report, and send out according to configuration after all pending test case is finished Send the file such as test report and necessary test log.
The above embodiments are merely illustrative of the technical solutions of the present invention rather than is limited, the ordinary skill of this area Personnel can modify or equivalent substitution to technical scheme, without departing from the spirit and scope of the present invention, this The protection domain of invention should be to be defined described in claim.

Claims (8)

1. a kind of layering automatization test system of data-driven, it is characterised in that including:
Profile management module, for management configuration file, carries out test relevant configuration in configuration file;
Test case management module, file is described for management of test cases;
Test data management module, for managing the data file under the corresponding data file path of each test case, including Perform index file and supplementary data file;In the execution index file comprising variable define, the description of use-case operating procedure, The index of basic input data needed for per step and the supplementary data file to needs;Included in the supplementary data file Complementarity input data needed for being performed per step;
Layering action keyword realizes module, for system under test (SUT) to be layered according to its functional structure, according to test needs Some test action keywords are defined at each layer, and test action realization is carried out to each action keyword;
Control module, connects above-mentioned each module, for carrying out test execution control, each pending test is successively read first Use-case, obtains its data storage path, carries out variable replacement in storage path, then sequentially perform the execution index file Each testing procedure, performed and interacted with system under test (SUT) according to action keyword, use-case execution is judged according to interaction results Correctness;If desired additional input data in implementation procedure, then search out corresponding input file by performing index file description, Obtain input.
2. the system as claimed in claim 1, it is characterised in that:The layering action keyword realizes module by system under test (SUT) point For one or more layers in Web UI, Web service, Server, database layer.
3. system as claimed in claim 1 or 2, it is characterised in that also including following module:
Test report is generated and log pattern, for the log in use-case implementation procedure, and updates use-case in test report Corresponding test result state, whole use-cases complete test report after being finished;
Test report sending module, for choosing whether to send test report and test log file to related according to system configuration Mailbox.
4. system as claimed in claim 1 or 2, it is characterised in that:The test relevant configuration carried out in configuration file, root It is different according to measurand, including one of the following or a variety of:Test case file title and catalogue, system under test (SUT) title, IP Address, port, service URL, database description URL, test report recipient's mailbox.
5. system as claimed in claim 1 or 2, it is characterised in that:The test case, which describes file, includes each use-case Description, if data file path needed for the setting of execution, and the corresponding test of use-case.
6. a kind of layering automated testing method of the data-driven of system described in use claim 1, its step includes:
1) system under test (SUT) is layered according to its functional structure, is needed to define some test actions passes at each layer according to test Key word, and test action realization is carried out to each action keyword;
2) test relevant configuration is carried out in configuration file;
3) test case is write in test case file, each use-case correspondence shows its corresponding test data storage path;
4) under each test case data storage path, set up each use-case and perform index file accordingly, its content is this The specific descriptions of use-case testing procedure, including this involved action keyword of test and required master data, and Required supplementary data storage file path and title;
5) when performing, each pending test case is successively read first, its data storage path is obtained, in storage path Carry out variable replacement, then sequentially perform it is described execution index file each testing procedure, according to action keyword perform with The interaction of system under test (SUT), the correctness that use-case is performed is judged according to interaction results.
7. method as claimed in claim 6, it is characterised in that:Step 1) system under test (SUT) is divided into Web UI, Web One or more layers in service, Server, database layer.
8. method as claimed in claim 6, it is characterised in that:Step 5) performing each test for performing index file In step process, test result is updated into test report file, generates and surveys after all pending test case is finished Examination report, and test report and necessary test log file are sent according to configuration.
CN201410841996.9A 2014-12-30 2014-12-30 The layering automatization test system and method for a kind of data-driven Active CN104598376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410841996.9A CN104598376B (en) 2014-12-30 2014-12-30 The layering automatization test system and method for a kind of data-driven

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410841996.9A CN104598376B (en) 2014-12-30 2014-12-30 The layering automatization test system and method for a kind of data-driven

Publications (2)

Publication Number Publication Date
CN104598376A CN104598376A (en) 2015-05-06
CN104598376B true CN104598376B (en) 2017-09-15

Family

ID=53124187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410841996.9A Active CN104598376B (en) 2014-12-30 2014-12-30 The layering automatization test system and method for a kind of data-driven

Country Status (1)

Country Link
CN (1) CN104598376B (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893243A (en) * 2015-12-14 2016-08-24 乐视网信息技术(北京)股份有限公司 Test frame used for test tool, and test tool
CN106201894A (en) * 2016-07-21 2016-12-07 浪潮电子信息产业股份有限公司 A kind of software testing device and method
CN106294150B (en) * 2016-08-09 2019-03-26 北京神州绿盟信息安全科技股份有限公司 A kind of test loading method and device
CN108182142A (en) * 2016-12-08 2018-06-19 武汉安天信息技术有限责任公司 Test resource integration method, system and function test method, system
CN107133177A (en) * 2017-05-12 2017-09-05 郑州云海信息技术有限公司 A kind of automated test frame
CN107688534A (en) * 2017-07-26 2018-02-13 平安科技(深圳)有限公司 Zonal testing method, apparatus, computer equipment and storage medium
CN107515803A (en) * 2017-08-25 2017-12-26 郑州云海信息技术有限公司 A kind of storing performance testing method and device
CN107643981A (en) * 2017-08-29 2018-01-30 顺丰科技有限公司 A kind of automatic test platform and operation method of polynary operation flow
CN107729234A (en) * 2017-09-29 2018-02-23 郑州云海信息技术有限公司 The scheduling of test case performs method, apparatus, equipment and computer-readable storage medium
CN107665171B (en) * 2017-10-11 2020-08-04 中国民生银行股份有限公司 Automatic regression testing method and device
CN107819507B (en) * 2017-11-21 2020-06-05 上海航天测控通信研究所 Configuration method and test method of multi-level test system for satellite measurement and control system
CN108170601A (en) * 2017-12-28 2018-06-15 上海璞恒新能源科技有限公司 A kind of test path indexing means, device, terminal and computer-readable medium
CN108304329B (en) * 2018-02-13 2020-12-15 论客科技(广州)有限公司 Test case design method and device, terminal and readable storage medium
CN108829590B (en) * 2018-05-31 2021-11-16 网易(杭州)网络有限公司 Software testing method, device and system
CN109062752A (en) * 2018-07-19 2018-12-21 郑州云海信息技术有限公司 A kind of fault-tolerant automation safety detecting method of height and device of BMC
CN109446085A (en) * 2018-10-26 2019-03-08 长飞光纤光缆股份有限公司 Zonal testing method for WEB application system
CN110046091B (en) * 2019-03-12 2023-10-20 创新先进技术有限公司 Automatic test method and device
CN110119351B (en) * 2019-04-09 2023-11-10 微梦创科网络科技(中国)有限公司 Test case execution method and device
CN110888818A (en) * 2019-12-22 2020-03-17 普信恒业科技发展(北京)有限公司 Test case configuration system and method, automatic test system and method
CN111338965A (en) * 2020-03-02 2020-06-26 五八有限公司 Case testing method and device, electronic equipment and storage medium
CN111797027A (en) * 2020-07-22 2020-10-20 睿智合创(北京)科技有限公司 Method and system for carrying out automatic test on H5 page
CN113778845A (en) * 2020-11-17 2021-12-10 北京沃东天骏信息技术有限公司 System testing method and device
CN112346986B (en) * 2020-11-25 2022-10-21 武汉光庭信息技术股份有限公司 Test case layered storage method and system, electronic device and storage medium
CN112882931B (en) * 2021-02-06 2023-05-09 重庆富民银行股份有限公司 Automatic test method and device based on DDT
CN113076249B (en) * 2021-04-13 2024-04-12 深圳前海联动云软件科技有限公司 Automatic test application platform and test method based on enterprise demand development
CN117707875B (en) * 2024-02-06 2024-05-14 西安简矽技术有限公司 Method for generating test hardware circuit connection

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN103699478A (en) * 2012-09-27 2014-04-02 中国银联股份有限公司 Test case generation system and test case generation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8930772B2 (en) * 2011-10-03 2015-01-06 Verizon Patent And Licensing Inc. Method and system for implementing a test automation results importer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831052A (en) * 2011-06-16 2012-12-19 中国银联股份有限公司 Automatic generating device and method for test case
CN103699478A (en) * 2012-09-27 2014-04-02 中国银联股份有限公司 Test case generation system and test case generation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于关键字驱动的自动化测试的研究与实践;吴伶琳;《电脑与信息技术》;20131231;第21卷(第6期);第46-48、51页 *

Also Published As

Publication number Publication date
CN104598376A (en) 2015-05-06

Similar Documents

Publication Publication Date Title
CN104598376B (en) The layering automatization test system and method for a kind of data-driven
Moni et al. Life cycle assessment of emerging technologies: A review
CN102341781A (en) Software test bed generation
CN104123227A (en) Method for automatically generating testing cases
CN102135938A (en) Software product testing method and system
Lagerström et al. Visualizing and measuring enterprise application architecture: an exploratory telecom case
CN103699693A (en) Metadata-based data quality management method and system
CN110321113A (en) Using project batch as the integrated pipeline system and its working method of standard
CN103488674B (en) Calculating system and the execution control method of the system of calculating
CN102053912A (en) Device and method for automatically testing software based on UML (unified modeling language) graphs
Chen et al. Model-based rapid redesign using decomposition patterns
JP2008090762A (en) Method and system for finding combination of failure component from distributed component tree
CN103761189A (en) Test case management method and system
CN103605512A (en) System and method for data verification based on GTechnology platform
CN114357088A (en) Nuclear power industry data warehouse system
CN105279089B (en) A kind of method and device for obtaining page elements
CN108845942A (en) Product feature management method, device, system and storage medium
US9613168B2 (en) Computer aided modeling
CN103069382A (en) Migrating artifacts between service-oriented architecture repositories
CN104954196A (en) Automatic test method and system for DNS incremental data update service
CN105808748A (en) MIB (Management Information Base) version contrast method and device
CN113127955A (en) Building anti-seismic performance evaluation method, system, device and storage medium
KR20220041600A (en) Method of evaluating quality of smart factory data
CN106155665A (en) Accordance puts to the proof system and method
CN105354671A (en) Universal configuration management system and enterprise-level information system comprising same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210303

Address after: 100190 room 506, building 2, courtyard 4, South 4th Street, Zhongguancun, Haidian District, Beijing

Patentee after: CHINA INTERNET NETWORK INFORMATION CENTER

Address before: 100190 No. four, 4 South Street, Haidian District, Beijing, Zhongguancun

Patentee before: Computer Network Information Center, Chinese Academy of Sciences

TR01 Transfer of patent right