CN103678104A - Data-based automatic testing method and data-based automatic testing device - Google Patents

Data-based automatic testing method and data-based automatic testing device Download PDF

Info

Publication number
CN103678104A
CN103678104A CN201210344282.8A CN201210344282A CN103678104A CN 103678104 A CN103678104 A CN 103678104A CN 201210344282 A CN201210344282 A CN 201210344282A CN 103678104 A CN103678104 A CN 103678104A
Authority
CN
China
Prior art keywords
data
test
test case
case configuration
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201210344282.8A
Other languages
Chinese (zh)
Other versions
CN103678104B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201210344282.8A priority Critical patent/CN103678104B/en
Publication of CN103678104A publication Critical patent/CN103678104A/en
Application granted granted Critical
Publication of CN103678104B publication Critical patent/CN103678104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a data-based automatic testing method and a data-based automatic testing device. The data-based automatic testing method includes invoking preliminarily established basic libraries and acquiring test case configuration files by the aid of processes provided by the basic libraries; invoking interface functions from preliminarily established business libraries and running the test case configuration files. The data-based automatic testing method and the data-based automatic testing device have the advantages that the test case configuration files provided by testers are acquired by the aid of the processes provided by the basic libraries which are established on the basis of commonly used operation such as register table modification, testing environments can be created, then the interface functions in the business libraries are invoked, the test case configuration files run, data tests can be automatically completed, accordingly, test operation can be simplified, the testers only need to pay close attention to input and output without compiling scripts or participating in testing procedures or maintenance, and the cost can be lowered.

Description

Automated testing method based on data and device
Technical field
The present invention relates to Internet technical field, relate in particular to a kind of automated testing method and device based on data.
Background technology
At current computer net environment, more and more to destroy user's environment for use or to obtain the viruses such as wooden horse of information of subscriber's local by edit the registry information.In order to resist virus, conventionally adopt the information such as testing software simulated virus edit the registry, then repair accordingly, with this, verify the security of computer protecting.
At present, the verification method of conventional testing software carries out based on sample, by the mode of craft or automatized script, carry out the information of edit the registry, then call scanning reparation interface and repair, finally by the function calling in base library, detect the repair ability that interface is repaired in scanning.
Along with the continuous renewal of trojan horse, repair script also in continuous increase.If completely by manually carrying out test operation, can be more loaded down with trivial details but also have the possibility of omitting; And if by automatized script, carry out test operation, on the one hand can produce more redundant code, increased on the other hand the maintenance cost in later stage.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of automated testing method and device based on data, is intended to simplify test operation, reduces costs.
In order to achieve the above object, the present invention proposes a kind of automated testing method based on data, comprising:
Call the base library of setting up in advance, the method providing by described base library, obtains test case configuration file;
Calling interface function from the business library of setting up in advance, moves described test case configuration file.
The present invention also proposes a kind of automatic test device based on data, comprising:
Environment construction module, for calling the base library of setting up in advance, the method providing by described base library, obtains test case configuration file;
Data test module, the business library calling interface function for from setting up in advance, moves described test case configuration file.
A kind of automated testing method and device based on data that the present invention proposes, the method that the base library of setting up based on conventional operations such as edit the registries provides, obtain the test case configuration file that tester provides, structure test environment, then call the interface function in business library, move this test case configuration file, automatically complete data test, simplified thus test operation, tester only need pay close attention to input and output, without compile script, also, without participating in test process and maintenance, reduced thus cost.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet that the present invention is based on automated testing method first embodiment of data;
Fig. 2 is the schematic flow sheet that the present invention is based on automated testing method second embodiment of data;
Fig. 3 is the schematic flow sheet that the present invention is based on automated testing method the 3rd embodiment of data;
Fig. 4 is the structural representation that the present invention is based on automatic test device first embodiment of data;
Fig. 5 is the structural representation that the present invention is based on automatic test device second embodiment of data;
Fig. 6 is the structural representation that the present invention is based on automatic test device the 3rd embodiment of data.
In order to make technical scheme of the present invention clearer, clear, below in conjunction with accompanying drawing, be described in further detail.
Embodiment
The solution of the embodiment of the present invention is mainly: the method that the base library of setting up based on conventional operations such as edit the registries provides, obtain the test case configuration file that tester provides, structure test environment, then call the interface function in business library, move this test case configuration file, automatically complete data test, to simplify test operation, reduce costs.
As shown in Figure 1, first embodiment of the invention proposes a kind of automated testing method based on data, comprising:
Step S101, calls the base library of setting up in advance, and the method providing by described base library, obtains test case configuration file;
The present embodiment method can be called API(Application Programming Interface, application programming interface) etc. interface function realize data test, make tester more be absorbed in test design, but not test automation realizes.
In order to realize data test, first construct test environment.
Particularly, after system starts, the configuration information of reading system, for runnable interface function obtains required test data, this test data is configured based on known sample by tester, forms test case configuration file.
The method that test case configuration file need to provide by base library is obtained.This base library is set up in advance by system, has encapsulated the conventional method of operating of corresponding different test case configuration files in base library.
This conventional operation comprises registry operations (such as edit the registry etc.), system operation and comparing class operation etc.
In order to realize data test, first need to simulate the viruses such as wooden horse and carry out the conventional operations such as Registry Modifications operation, system operation and comparing class operation, the test data that different operational correspondences is different.
The present embodiment encapsulates above-mentioned conventional method of operating in advance by system, as base library.
After getting test case configuration file, according to described test case configuration file, carry out data initialization.
Step S102, calling interface function from the business library of setting up in advance, moves described test case configuration file.
System is packaged into function as business library using each calling interface in advance.
After getting test case configuration file, call interface function in this business library, move described test case configuration file, realize data test.This operation result can export appointment maintenance terminal to, also can output display in this locality.
The present embodiment, by such scheme, completes data test automatically, has simplified test operation, and tester only need pay close attention to input and output, without compile script, also, without participating in test process and maintenance, has reduced thus cost.
As shown in Figure 2, second embodiment of the invention proposes a kind of automated testing method based on data, on the basis of above-mentioned the first embodiment, after above-mentioned steps S102, also comprises:
Step S103, carries out output display to operation result.
The difference of the present embodiment and above-described embodiment is, the present embodiment is played after test case configuration file in operation, and operation result is carried out to output display.
In addition, the present embodiment is also provided with daily record, for recording test run operating process; After end of run, described daily record printout can be convenient to tester and be inquired about operational process, and follow-up according to operational process situation, test data is debugged etc.
The present embodiment passes through such scheme, automatically complete data test, also can be by test run result output display, tester only need pay close attention to input and output, without compile script, not only simplified test operation, reduced cost, also be convenient to tester and check operation result and follow-up maintenance, for tester provides convenience.
As shown in Figure 3, third embodiment of the invention proposes a kind of automated testing method based on data, on the basis of above-mentioned the first embodiment, after above-mentioned steps S101, also comprises:
Step S100, sets up described base library based on conventional operation; And calling interface is packaged into function as described business library.
It is one of following that described conventional operation at least comprises: registry operations, system operation and comparing class operation.
The difference of the present embodiment and above-mentioned the first embodiment is, the present embodiment also comprises the foundation of base library and business library.
Particularly, to conventional operation, as: registry operations, system operation, comparing class operation etc. encapsulate, and as base library, become function as business library the interface encapsulation of calling interface, and the use-case information of tester's configuration is as test data.
The checking computer house keeper scanning of take is below registered person of exemplary virtue's function as example with reparation, and the present embodiment scheme is described in detail:
First, to conventional operation, as: registry operations, system operation, comparing class operation etc. encapsulate, as base library;
Then, will sweep soon and repair interface encapsulation and become the file (as: AutoTest.dll) that can call;
Afterwards, the method providing by base library, obtains the test data that tester fills in;
Finally, call and sweep soon and the file calling of repairing interface encapsulation and becoming, the test data that operation is obtained, can check operation result.
The present embodiment, by such scheme, completes data test automatically, and tester only need pay close attention to input and output, without compile script, not only simplified test operation, reduced cost, also be convenient to tester and check operation result and follow-up maintenance, for tester provides convenience.
As shown in Figure 4, first embodiment of the invention proposes a kind of automatic test device based on data, comprising: environment construction module 401 and data test module 402, wherein:
Environment construction module 401, for calling the base library of setting up in advance, the method providing by described base library, obtains test case configuration file;
Data test module 402, the business library calling interface function for from setting up in advance, moves described test case configuration file.
Described environment construction module is also for according to described test case configuration file Initial System Information.
The automatic test device of the present embodiment based on data can call API(Application Programming Interface, application programming interface) etc. interface function is realized data test, make tester more be absorbed in test design, but not test automation realize.
In order to realize data test, first by environment construction module 401 structure test environments.
Particularly, after system starts, the configuration information of reading system, for runnable interface function obtains required test data, this test data is configured based on known sample by tester, forms test case configuration file.
The method that test case configuration file need to provide by base library is obtained.This base library is set up in advance by system, has encapsulated the conventional method of operating of corresponding different test case configuration files in base library.
This conventional operation comprises registry operations (such as edit the registry etc.), system operation and comparing class operation etc.
In order to realize data test, first need to simulate the viruses such as wooden horse and carry out the conventional operations such as Registry Modifications operation, system operation and comparing class operation, the test data that different operational correspondences is different.
The present embodiment encapsulates above-mentioned conventional method of operating in advance by system, as base library.
After getting test case configuration file, data test module 402 is carried out data initialization according to described test case configuration file.
In system, also in advance each calling interface is packaged into function as business library.
After getting test case configuration file, data test module 402 is called interface function in this business library, moves described test case configuration file, realizes data test.This operation result can export appointment maintenance terminal to, also can output display in this locality.
The present embodiment, by such scheme, completes data test automatically, has simplified test operation, and tester only need pay close attention to input and output, without compile script, also, without participating in test process and maintenance, has reduced thus cost.
As shown in Figure 5, second embodiment of the invention proposes a kind of automatic test device based on data, on the basis of above-mentioned the first embodiment, also comprises:
Show output module 403, for operation result is carried out to output display; And also for passing through log recording test run operating process; After end of run, by described daily record printout.
The difference of the present embodiment and above-described embodiment is, the present embodiment is played after test case configuration file in operation, and operation result is carried out to output display.
In addition, the present embodiment is also provided with daily record, for recording test run operating process; After end of run, described daily record printout can be convenient to tester and be inquired about operational process, and follow-up according to operational process situation, test data is debugged etc.
The present embodiment passes through such scheme, automatically complete data test, also can be by test run result output display, tester only need pay close attention to input and output, without compile script, not only simplified test operation, reduced cost, also be convenient to tester and check operation result and follow-up maintenance, for tester provides convenience.
As shown in Figure 6, third embodiment of the invention proposes a kind of automatic test device based on data, on the basis of above-mentioned the first embodiment, also comprises:
Creation module 400, for setting up described base library based on conventional operation; And calling interface is packaged into function as described business library.It is one of following that described conventional operation at least comprises: registry operations, system operation and comparing class operation;
The difference of the present embodiment and above-mentioned the first embodiment is, the present embodiment also comprises the foundation of base library and business library.
Particularly, to conventional operation, as: registry operations, system operation, comparing class operation etc. encapsulate, and as base library, become function as business library the interface encapsulation of calling interface, and the use-case information of tester's configuration is as test data.
The present embodiment, by such scheme, completes data test automatically, and tester only need pay close attention to input and output, without compile script, not only simplified test operation, reduced cost, also be convenient to tester and check operation result and follow-up maintenance, for tester provides convenience.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical field, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. the automated testing method based on data, is characterized in that, comprising:
Call the base library of setting up in advance, the method providing by described base library, obtains test case configuration file;
Calling interface function from the business library of setting up in advance, moves described test case configuration file.
2. method according to claim 1, is characterized in that, also comprises:
Operation result is carried out to output display.
3. method according to claim 1, is characterized in that, described in also comprise after obtaining the step of test case configuration file:
According to described test case configuration file, carry out data initialization.
4. method according to claim 1, is characterized in that, also comprises:
By log recording test run operating process; After end of run, by described daily record printout.
5. according to the method described in any one in claim 1-4, it is characterized in that, described in also comprise before calling in advance the step of the base library of setting up:
Based on conventional operation, set up described base library; It is one of following that described conventional operation at least comprises: registry operations, system operation and comparing class operation; And calling interface is packaged into function as described business library.
6. the automatic test device based on data, is characterized in that, comprising:
Environment construction module, for calling the base library of setting up in advance, the method providing by described base library, obtains test case configuration file;
Data test module, the business library calling interface function for from setting up in advance, moves described test case configuration file.
7. device according to claim 6, is characterized in that, also comprises:
Show output module, for operation result is carried out to output display.
8. device according to claim 6, is characterized in that, described environment construction module is also for carrying out data initialization according to described test case configuration file.
9. device according to claim 6, is characterized in that, described output display module is also for passing through log recording test run operating process; After end of run, by described daily record printout.
10. according to the device described in any one in claim 6-9, it is characterized in that, also comprise:
Creation module, for setting up described base library based on conventional operation; It is one of following that described conventional operation at least comprises: registry operations, system operation and comparing class operation; And calling interface is packaged into function as described business library.
CN201210344282.8A 2012-09-17 2012-09-17 Automated testing method and device based on data Active CN103678104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210344282.8A CN103678104B (en) 2012-09-17 2012-09-17 Automated testing method and device based on data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210344282.8A CN103678104B (en) 2012-09-17 2012-09-17 Automated testing method and device based on data

Publications (2)

Publication Number Publication Date
CN103678104A true CN103678104A (en) 2014-03-26
CN103678104B CN103678104B (en) 2018-04-27

Family

ID=50315744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210344282.8A Active CN103678104B (en) 2012-09-17 2012-09-17 Automated testing method and device based on data

Country Status (1)

Country Link
CN (1) CN103678104B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484249A (en) * 2014-11-28 2015-04-01 北京百度网讯科技有限公司 Smart check system of hardware product quality and server
CN104598377A (en) * 2014-12-29 2015-05-06 大唐移动通信设备有限公司 Piling test method and device
CN104765686A (en) * 2015-04-08 2015-07-08 小米科技有限责任公司 Application program testing method and device
CN107066380A (en) * 2017-02-23 2017-08-18 青岛海信电器股份有限公司 The authentication method and device of a kind of application comprising redundancy feature
CN107547299A (en) * 2017-06-01 2018-01-05 新华三信息安全技术有限公司 A kind of method of testing and system
CN110543424A (en) * 2019-09-06 2019-12-06 安徽航天信息有限公司 Testing method and device for electronic tax platform
CN110704323A (en) * 2019-09-30 2020-01-17 交控科技股份有限公司 Data automatic testing method and device based on rail transit line data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866219A (en) * 2005-12-09 2006-11-22 华为技术有限公司 System and method for testing measured object based on automatic test script
US20100306590A1 (en) * 2009-06-02 2010-12-02 Rajan Anand Automated Testing Platform for Event Driven Systems
CN102236602A (en) * 2011-07-21 2011-11-09 南京大学 Visual software test design platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866219A (en) * 2005-12-09 2006-11-22 华为技术有限公司 System and method for testing measured object based on automatic test script
US20100306590A1 (en) * 2009-06-02 2010-12-02 Rajan Anand Automated Testing Platform for Event Driven Systems
CN102236602A (en) * 2011-07-21 2011-11-09 南京大学 Visual software test design platform

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484249A (en) * 2014-11-28 2015-04-01 北京百度网讯科技有限公司 Smart check system of hardware product quality and server
CN104484249B (en) * 2014-11-28 2018-04-17 北京百度网讯科技有限公司 For the intelligent checks system and server of hardware product quality
CN104598377A (en) * 2014-12-29 2015-05-06 大唐移动通信设备有限公司 Piling test method and device
CN104765686A (en) * 2015-04-08 2015-07-08 小米科技有限责任公司 Application program testing method and device
CN104765686B (en) * 2015-04-08 2017-12-08 小米科技有限责任公司 The method and device of test application program
CN107066380A (en) * 2017-02-23 2017-08-18 青岛海信电器股份有限公司 The authentication method and device of a kind of application comprising redundancy feature
CN107066380B (en) * 2017-02-23 2023-05-16 海信视像科技股份有限公司 Authentication method and device for application containing redundancy function
CN107547299A (en) * 2017-06-01 2018-01-05 新华三信息安全技术有限公司 A kind of method of testing and system
CN110543424A (en) * 2019-09-06 2019-12-06 安徽航天信息有限公司 Testing method and device for electronic tax platform
CN110704323A (en) * 2019-09-30 2020-01-17 交控科技股份有限公司 Data automatic testing method and device based on rail transit line data
CN110704323B (en) * 2019-09-30 2023-05-23 交控科技股份有限公司 Automatic data testing method and device based on rail transit line data

Also Published As

Publication number Publication date
CN103678104B (en) 2018-04-27

Similar Documents

Publication Publication Date Title
CN103678104A (en) Data-based automatic testing method and data-based automatic testing device
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
CN104407980B (en) Mobile solution automatic test device and method
US9465718B2 (en) Filter generation for load testing managed environments
US8266578B2 (en) Virtual validation of software systems
CN103577324B (en) Static detection method for privacy information disclosure in mobile applications
CN109726107A (en) Test method, device, equipment and storage medium
US20130212435A1 (en) Integrated Fuzzing
CN103399814B (en) The method and device of automatic test
CN106909510A (en) A kind of method and server for obtaining test case
CN104156224B (en) A kind of software building continuous integrating method and system
Weigert et al. Practical experiences in using model-driven engineering to develop trustworthy computing systems
Geiger et al. BPMN conformance in open source engines
CN103377120A (en) Test method and device for application programs
CN103186463B (en) Determine the method and system of the test specification of software
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN106155903A (en) Apparatus and method for system design validation
Tiwari et al. Reuse: reducing test effort
CN106648762A (en) Development environment building method and device
CN106933642B (en) Application program processing method and processing device
CN111176971A (en) Code quality testing system and method based on UI automation
CN110334523B (en) Vulnerability detection method and device, intelligent terminal and storage medium
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium
Rodrigues et al. A model driven approach for software systems reliability
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant