CN105912460A - Software test method and system based on QTP - Google Patents

Software test method and system based on QTP Download PDF

Info

Publication number
CN105912460A
CN105912460A CN201610203852.XA CN201610203852A CN105912460A CN 105912460 A CN105912460 A CN 105912460A CN 201610203852 A CN201610203852 A CN 201610203852A CN 105912460 A CN105912460 A CN 105912460A
Authority
CN
China
Prior art keywords
test
qtp
target detection
target
library
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.)
Pending
Application number
CN201610203852.XA
Other languages
Chinese (zh)
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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610203852.XA priority Critical patent/CN105912460A/en
Publication of CN105912460A publication Critical patent/CN105912460A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version

Abstract

The invention provides a software test method and system based on QTP. The method comprises running a test script corresponding to an interface to be tested in a test script library; calling an object identification function in a function library and recognizing at least one test objects included in the test interface; determining at least one target test object based on at least one test object; storing at least one test object to a keyword table and configuring operation and parameters corresponding to each target test object in the keyword table; reading the keyword table and utilizing operation and parameters corresponding to each target test object configured in the keyword table to carry out an automatic test to each target test object. According to the scheme, software testing efficiency can be increased.

Description

A kind of method for testing software based on QTP and system
Technical field
The present invention relates to software testing technology field, particularly to a kind of method for testing software based on QTP And system.
Background technology
Along with the efficiency of software engineering and the great development of coding techniques, software design and coding is more and more higher. Wherein, the important step in soft project during software test, it is directly connected to the quality of software, exploitation Progress and cost.
At present, software test typically can write corresponding test script for test object, utilizes this test Test object is tested by script.
But, traditional method for testing software, after object changes in test, need again for Test object after change writes test script, affects the efficiency of software test.
Summary of the invention
Embodiments provide a kind of method for testing software based on QTP and system, to realize software Test.
First aspect, the embodiment of the present invention has been passed through a kind of method for testing software based on QTP, has been applied to QTP tests system, and described QTP test system includes: test script library and function library, described method bag Include:
Run test script corresponding with tested interface in described test script library;
Call the Object identifying function in described function library, identify included by described tested interface at least One test object;
According at least one test object described, determine at least one target detection object to be tested;
At least one target detection object described is stored in keywords table, and at described key table Lattice configure the operation corresponding with each target detection object and parameter;
Read described keywords table, utilize each target detection pair of configuration in described keywords table As corresponding operation and parameter carry out automatic test to respective objects test object.
Preferably, described QTP test system farther includes: test database, described test database Including the data form of the most corresponding different test case, in each data form, storage has corresponding survey Multiple test data that example on probation is corresponding;
Operation that described each the target detection object utilizing in described keywords table configuration is corresponding and Parameter carries out automatic test to respective objects test object, including: join in described keywords table The parameter that each target detection object of putting is corresponding, determines corresponding target detection use-case;And according to Described target detection use-case searches corresponding target data form in described test database;Read one by one Test data in described target data form, and utilize corresponding operation that respective objects test object is entered Row automatic test.
Preferably, described QTP test system farther includes: configuration file storehouse, corresponds to including multiple The configuration file of different test environments;
Test script corresponding with tested interface in the described test script library of described operation, including: root According to the test environment at described tested interface, described configuration file storehouse is searched corresponding target configuration literary composition Part;The first of the test script corresponding with described tested interface is determined according to described target configuration file Path, calls this test script corresponding with described tested interface according to described first path;
Described in described test database, search corresponding target matrix according to described target detection use-case Lattice, including: the second path of described target detection use-case is determined according to described target configuration file, according to Described second path obtains described target data form.
Preferably, described QTP test system farther includes: library of object;
Farther include: described in identifying, at least one test object stores in described library of object, and Determine each test invoked number of times of object at least one test object described, by called number of times It is set to shared model more than the test object setting threshold value, called number of times is not more than described setting threshold The test object of value is set to local mode.
Preferably, farther include: set journal format and reporting format according to testing requirement;
Farther include: in automatic test course, raw according to the journal format set and reporting format Become corresponding test log and defect report.
Second aspect, embodiments provides a kind of QTP and tests system, including:
Test script library and function library;
Drive module, for running test script corresponding with tested interface in described test script library, And call the Object identifying function in described function library, identify at least included by described tested interface Individual test object;
Keywords table, at least one the target detection object to be tested determined for storage, and often Operation that one target detection object is corresponding and parameter;
QTP testing tool, is used for reading described keywords table, utilizes in keywords table the every of configuration Operation and parameter that one target detection object is corresponding carry out automatic test to respective objects test object.
Preferably, farther including: test database, described test database includes that correspondence is not respectively With the data form of test case, in each data form, storage has corresponding multiple of corresponding test case Test data;
Described QTP testing tool, specifically for for each target of configuration in described keywords table The parameter that test object is corresponding, determines corresponding target detection use-case;And use according to described target detection Example searches corresponding target data form in described test database;Read described target matrix one by one Test data in lattice, and utilize corresponding operation that respective objects test object is carried out automatic test.
Preferably, farther include: configuration file storehouse, including multiple joining corresponding to different test environment Put file;
Described driving module, specifically for the test environment according to described tested interface, in described configuration Library is searched corresponding target configuration file;Determine tested with described according to described target configuration file The first path of the test script that examination interface is corresponding, calls this according to described first path tested with described The test script that examination interface is corresponding;
Described QTP testing tool, specifically for determining described target detection according to described target configuration file Second path of use-case, obtains described target data form according to described second path.
Preferably, farther include: library of object;
Described library of object, for store identification described at least one test object, and according to described at least Each test invoked number of times of object in one test object, by called number of times more than setting threshold value Test object be set to shared model, called number of times is not more than the test object of described setting threshold value It is set to local mode.
Preferably, farther include: logger module, for setting journal format according to testing requirement And reporting format, and in the automatic test course of described QTP testing tool, according to the daily record set Form and reporting format generate corresponding test log and defect report.
Embodiments provide a kind of method for testing software based on QTP and system, to tested When interface is tested, only need to the target detection object of required test be stored in keywords table, This keywords table arranges the corresponding operation of each target detection object and parameter, utilizes this setting Operation and parameter to respective objects test object carry out automatic test, it is not necessary to treat test interface In all test objects identified test, such that it is able to improve software test efficiency.
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 reality Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below, Accompanying drawing in description is some embodiments of the present invention, for those of ordinary skill in the art, not On the premise of paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is a kind of method flow diagram that one embodiment of the invention provides;
Fig. 2 is the another kind of method flow diagram that one embodiment of the invention provides;
Fig. 3 is the system construction drawing that one embodiment of the invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments, based on Embodiment in the present invention, those of ordinary skill in the art are institute on the premise of not making creative work The every other embodiment obtained, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, embodiments provide a kind of method for testing software based on QTP, application Testing system in QTP, described QTP test system includes: test script library and function library, the method May comprise steps of:
Step 101: run test script corresponding with tested interface in described test script library;
Step 102: call the Object identifying function in described function library, identifies described tested interface institute Including at least one test object;
Step 103: according at least one test object described, determine that at least one target to be tested is surveyed Examination object;
Step 104: at least one target detection object described is stored in keywords table, and in institute State and keywords table configures the operation corresponding with each target detection object and parameter;
Step 105: read described keywords table, utilizes each configured in described keywords table Operation and parameter that target detection object is corresponding carry out automatic test to respective objects test object.
According to such scheme, when tested interface is tested, only the target of required test need to be surveyed Examination object stores in keywords table, arranges each target detection object phase in this keywords table Corresponding operation and parameter, utilize the operation of this setting and parameter to carry out respective objects test object automatically Change and test, it is not necessary to treat all test objects identified in test interface and test, thus can To improve the efficiency of software test.
In an embodiment of the invention, the test for test object needs to utilize test case to realize, One test case can include multiple test data, and its form of data form of storage test data is permissible Including multiple, such as, XML, Excel, DataBase, each form has different acquisition modes. Therefore, this QTP test system farther includes: test database, and described test database includes point The data form of not corresponding different test cases, in each data form, storage has corresponding test case pair The multiple test data answered;
Operation that described each the target detection object utilizing in described keywords table configuration is corresponding and Parameter carries out automatic test to respective objects test object, including: join in described keywords table The parameter that each target detection object of putting is corresponding, determines corresponding target detection use-case;And according to Described target detection use-case searches corresponding target data form in described test database;Read one by one Test data in described target data form, and utilize corresponding operation that respective objects test object is entered Row automatic test.
In an embodiment of the invention, can be under different test environments due to this QTP test system Interface to be tested realize software test, this implementation can arrange difference for different test environments Configuration file, therefore, this QTP test system may further include: configuration file storehouse, including many The individual configuration file corresponding to different test environments;
Test script corresponding with tested interface in the described test script library of described operation, including: root According to the test environment at described tested interface, described configuration file storehouse is searched corresponding target configuration literary composition Part;The first of the test script corresponding with described tested interface is determined according to described target configuration file Path, calls this test script corresponding with described tested interface according to described first path;
Described in described test database, search corresponding target matrix according to described target detection use-case Lattice, including: the second path of described target detection use-case is determined according to described target configuration file, according to Described second path obtains described target data form.
According to above-described embodiment, by utilizing configuration storage test script and the path of test case, drive Module and QTP testing tool directly can call corresponding test script and test case by this path, Realize treating the target detection object of required test in test interface to test.
In an embodiment of the invention, in order to realize the test to test object, this QTP tests system Farther include: library of object;
Farther include: described in identifying, at least one test object stores in described library of object, and Determine each test invoked number of times of object at least one test object described, by called number of times It is set to shared model more than the test object setting threshold value, called number of times is not more than described setting threshold The test object of value is set to local mode.
According in above-described embodiment, by library of object according to the test invoked number of times of object, it is achieved Shared model or the setting of local mode to test object, so that utilizing this QTP to test system Carry out in the escalation process at follow-up interface to be tested, for institute's reservation function pair in the test interface of upgrading The test object answered can directly call by the test object under the shared model in library of object, or The amendment adapted to after test object reference under to shared model, such that it is able to improve test interface Liter stage efficiency, and reduce to test object maintenance cost.
In an embodiment of the invention, before target detection object is carried out automatic test, first open Open log recording, record the time of every single stepping, the operating procedure of test case, test data Mistake in use, test and abnormal conditions.The Log Report test knot carried due to QTP testing tool Fruit is more single, and for large batch of test execution, tester cannot obtain the fortune of complete test case Row result, searches certain test case result inefficient.Therefore, it can farther include: according to survey Examination requirements set journal format and reporting format;Farther include: in automatic test course, according to The journal format set and reporting format generate corresponding test log and defect report.
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with the accompanying drawings and specifically real The present invention is described in further detail to execute example.
As in figure 2 it is shown, embodiments provide a kind of method for testing software based on QTP, the party Method may comprise steps of:
Step 201: build QTP and test system.
Refer to Fig. 3, this QTP test system may include that driving layer (drives module and QTP test Instrument), test script library, function library, test database, library of object, configuration file storehouse, daily record storehouse With defect report storehouse.
Step 202: determine tested interface.
In the present embodiment, tested interface generally is directed to the application platform that some functional developments complete, After this application platform development completes, need to verify whether application platform can normally realize corresponding function, The QTP test system that therefore, it can utilize the present embodiment is verified.
Step 203: according to the test environment at tested interface, searches tested with this in configuration file storehouse Try the target configuration file that the test environment at interface is corresponding.
Configuration file storehouse, including multiple configuration files corresponding to different test environments.
Wherein, this test environment may include that the operating system at tested interface, browser configuration etc..
Wherein, this configuration file may include that the Initialize installation of QTP testing tool, operating system, Browser configuration requirement, the example of data base and password, test case deposit path, test script Deposit the information such as path.
Configuration file, primarily to arrange test configurations environment, is made up of xml document, at configuration file Storehouse can show with the form of " data=Environment ".
Step 204: drive module to determine the test corresponding with tested interface according to target configuration file The path of script, calls this test script corresponding with tested interface according to this path.
Deposit path due to what configuration file included test script, therefore, it can configure according to this target This test script is called in the path of the test script in file, by running this test script, it is possible to achieve Testing process to tested interface.
In the present embodiment, test script is the test write according to operating process whole in manual test Coding, in test script this it appears that to interface element operation process.Test script is QTP Core tie in test system, corresponding with test case, the corresponding library of object of run time call, survey Examination data base.As long as the test environment at tested interface is identical, can with the same set of test script of multiplexing, from And testing efficiency can be improved, reduce testing cost, and reduce the maintenance cost to test script.
Step 205: drive module to call the Object identifying function in function library, identify tested interface institute Including at least one test object.
In an embodiment of the invention, may further include: at least one the test object that will identify Store in library of object, and determine each test invoked number of times of object at least one test object, Called number of times is set to shared model, by little for called number of times more than the test object setting threshold value Test object in described setting threshold value is set to local mode.
Wherein, the test invoked number of times of object can determine in the following manner: this QTP tests system System is possible not only to realize the functional test to tested interface, it is also possible to realize the structure to tested interface And upgrading, therefore, it can by this QTP test the tested interface process of system constructing in use each The number of times of test object determines the test invoked number of times of object.
Such as, this setting threshold value can be 3 times, when called number of times is more than 3 times, can will test Object is set to sharing module, and in a shared mode, test object can be called by any Action, can By presented in the entitled .tsr of suffix;When called number of times is not more than 3 times, can be by right for test As being set to local mode, in local mode, test object is merely able to be called by local Action.
During building tested interface, the method for descriptive programming can be used to add test right As, can avoid searching the situation less than this element because of interface element change.One can also be set up reflect Firing table represents the relation of interface element title and its attribute.
In an embodiment of the invention, this QTP testing tool can be with VBS (Microsoft Visual Basic Script Editon, Microsoft's visual basic script version) it is script, script can be at mould Checkpointing, conditional judgment, event time interval etc. in block.
Wherein, deposit in function library is that script calls required method and interface, including public letter Number storehouse and business function library etc..Public function storehouse includes logging in Login (), searches the file path specified PathFind () etc..Business function library sets up Function according to business real needs, in order to script is carried out Call, such as, check user balance balance (), check the table tarifffBill () at one's own expense that fixes a price.
Step 206: test object according at least one, determine this at least one target detection object.
In an embodiment of the invention, this tested interface can be the application platform after a upgrading, Before upgrading, may some functions at the tested interface before upgrading be tested accordingly, After upgrading, it may not be necessary to having been carried out the function retest of test, can be only to newly-increased merit Occur that the function of test failure carries out specific test before function and/or upgrading, can be revised, such that it is able to Improve testing efficiency.
Step 207: at least one target detection object is stored in keywords table, and at keyword Form configures the operation corresponding with each target detection object and parameter.
In an embodiment of the invention, at least one target detection object to be tested can be stored In keywords table, when these target detection objects are carried out automatic test, only need to be according to this key Respective objects test object is carried out by the operation and the parameter that in word table lattice arrange each target detection object Automatic test.
Step 208: read each the target detection object in keywords table one by one, for each The parameter that target detection object is corresponding, determines corresponding target detection use-case.
Step 209: search corresponding target data form in test database according to target detection use-case, Read the test data in described target data form one by one, and utilize corresponding operation that respective objects is surveyed Examination object carries out automatic test.
In the present embodiment, test database can include the tables of data of the most corresponding different test case Lattice, in each data form, storage has multiple test data that corresponding test case is corresponding.
Path is deposited due to what target configuration file also included test case, therefore can be according to target Configuration file determines the path of target detection use-case, obtains target data form according to path.
In an embodiment of the invention, the management for test data can be realized by multiple format, Such as, XML, Excel, DataBase etc., the corresponding different acquisition mode of each form.Its In, the form of Excel has ease for operation and intuitive, it is thereby possible to select Excel form is as survey The carrier of examination data.
For substantial amounts of test data, modular thought can be taked, test data are entered according to function Row divides, and is followed successively by test set, test case, test data.
Wherein, test set is the index of test case, can realize the covering to test case by it, Preferably management of test cases file.Each during each step represents concrete business in test case Step testing process, it is possible to use the method for keyword search obtains the value of concrete field.Every test row In Business Name correspond to concrete class class;Operational motion needs script to realize, and correspond to Title in Function;Every record also includes test data and the Call Condition called.
Step 210: open log recording, in automatic test course, according to daily record set in advance Form and reporting format, generate corresponding test log and defect report.
In an embodiment of the invention, operating procedure in test process, test errors are checked for convenience With the situation such as abnormal, can be realized by journal function, each step behaviour can be recorded at test log Time, the operating procedure of test case, the mistake tested in the use of data, test and the abnormal feelings made Condition.
Wherein, the Log Report test result that QTP testing tool carries is more single, for large batch of Test execution, tester cannot obtain the operation result of complete test case, searches certain test case Result is inefficient.Therefore, in an embodiment of the invention, user can set according to self-demand Determine journal format and defect report form, export test log and test report with on-demand.
When end of run, obtain test report by analytic statistics, check the implementation status of test case (by or failure or hang-up) and time of test institute cost.Tester can be according to daily record storehouse In test log and defect report in defect report storehouse check in detail, determine and navigate to tool The position of body mistake.
The embodiment of the present invention additionally provides a kind of QTP and tests system, and this QTP test system may include that
Test script library and function library;
Drive module, for running test script corresponding with tested interface in described test script library, And call the Object identifying function in described function library, identify at least included by described tested interface Individual test object;
Keywords table, at least one the target detection object to be tested determined for storage, and often Operation that one target detection object is corresponding and parameter;
QTP testing tool, is used for reading described keywords table, utilizes in keywords table the every of configuration Operation and parameter that one target detection object is corresponding carry out automatic test to respective objects test object.
In an embodiment of the invention, farther include: test database, in described test database Including the data form of the most corresponding different test cases, in each data form, storage has corresponding test Multiple test data that use-case is corresponding;
Described QTP testing tool, specifically for for each target of configuration in described keywords table The parameter that test object is corresponding, determines corresponding target detection use-case;And use according to described target detection Example searches corresponding target data form in described test database;Read described target matrix one by one Test data in lattice, and utilize corresponding operation that respective objects test object is carried out automatic test.
In an embodiment of the invention, farther include: configuration file storehouse, including multiple corresponding to not Configuration file with test environment;
Described driving module, specifically for the test environment according to described tested interface, in described configuration Library is searched corresponding target configuration file;Determine tested with described according to described target configuration file The first path of the test script that examination interface is corresponding, calls this according to described first path tested with described The test script that examination interface is corresponding;
Described QTP testing tool, specifically for determining described target detection according to described target configuration file Second path of use-case, obtains described target data form according to described second path.
In an embodiment of the invention, farther include: library of object;
Described library of object, for store identification described at least one test object, and according to described at least Each test invoked number of times of object in one test object, by called number of times more than setting threshold value Test object be set to shared model, called number of times is not more than the test object of described setting threshold value It is set to local mode.
In an embodiment of the invention, farther include: logger module, for according to test need Ask setting journal format and reporting format, and in the automatic test course of described QTP testing tool, Corresponding test log and defect report is generated according to the journal format set and reporting format.
In sum, the embodiment of the present invention at least can realize following beneficial effect:
1, in embodiments of the present invention, when tested interface is tested, only need to be by required test Target detection object stores in keywords table, arranges each target detection in this keywords table Operation that object is corresponding and parameter, utilize the operation of this setting and parameter to enter respective objects test object Row automatic test, it is not necessary to treat all test objects identified in test interface and test, Such that it is able to improve the efficiency of software test.
2, in embodiments of the present invention, by library of object according to the test invoked number of times of object, real Now shared model or the setting of local mode to test object, so that utilizing this QTP to test system System carries out in the escalation process at follow-up interface to be tested, for institute's reservation function in the test interface of upgrading Corresponding test object can directly call by the test object under the shared model in library of object, or The amendment that person adapts to after the test object reference under to shared model, such that it is able to improve test circle The liter stage efficiency in face, and reduce the maintenance cost to test object.
3, in embodiments of the present invention, by setting journal format and reporting format according to testing requirement, and In automatic test course, generate corresponding test log according to the journal format set and reporting format And defect report, such that it is able to on-demand output test log and defect report, search effect such that it is able to improve Rate.
The contents such as the information between each unit in said apparatus is mutual, execution process, due to the present invention Embodiment of the method is based on same design, and particular content can be found in the narration in the inventive method embodiment, this Place repeats no more.
It should be noted that in this article, the relational terms of such as first and second etc be used merely to by One entity or operation separate with another entity or operating space, and not necessarily require or imply this Relation or the order of any this reality is there is between a little entities or operation.And, term " includes ", " comprise " or its any other variant is intended to comprising of nonexcludability, so that include that one is The process of row key element, method, article or equipment not only include those key elements, but also include the brightest Other key elements really listed, or also include intrinsic for this process, method, article or equipment Key element.In the case of there is no more restriction, statement " include one " and limit Key element, it is not excluded that there is also another in including the process of described key element, method, article or equipment Outer same factor.
One of ordinary skill in the art will appreciate that: realize all or part of step of said method embodiment Can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in embodied on computer readable Storage medium in, this program upon execution, performs to include the step of said method embodiment;And it is aforementioned Storage medium include: various Jie that can store program code such as ROM, RAM, magnetic disc or CD In matter.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate this The technical scheme of invention, is not intended to limit protection scope of the present invention.All spirit in the present invention and former Any modification, equivalent substitution and improvement etc. done within then, are all contained in protection scope of the present invention.

Claims (10)

1. a method for testing software based on QTP, it is characterised in that be applied to QTP and test system, Described QTP test system includes: test script library and function library, and described method includes:
Run test script corresponding with tested interface in described test script library;
Call the Object identifying function in described function library, identify included by described tested interface at least One test object;
According at least one test object described, determine at least one target detection object to be tested;
At least one target detection object described is stored in keywords table, and at described key table Lattice configure the operation corresponding with each target detection object and parameter;
Read described keywords table, utilize each target detection pair of configuration in described keywords table As corresponding operation and parameter carry out automatic test to respective objects test object.
Method the most according to claim 1, it is characterised in that
Described QTP test system farther includes: test database, and described test database includes point The data form of not corresponding different test cases, in each data form, storage has corresponding test case pair The multiple test data answered;
Operation that described each the target detection object utilizing in described keywords table configuration is corresponding and Parameter carries out automatic test to respective objects test object, including: join in described keywords table The parameter that each target detection object of putting is corresponding, determines corresponding target detection use-case;And according to Described target detection use-case searches corresponding target data form in described test database;Read one by one Test data in described target data form, and utilize corresponding operation that respective objects test object is entered Row automatic test.
Method the most according to claim 2, it is characterised in that
Described QTP test system farther includes: configuration file storehouse, including multiple corresponding to difference test The configuration file of environment;
Test script corresponding with tested interface in the described test script library of described operation, including: root According to the test environment at described tested interface, described configuration file storehouse is searched corresponding target configuration literary composition Part;The first of the test script corresponding with described tested interface is determined according to described target configuration file Path, calls this test script corresponding with described tested interface according to described first path;
Described in described test database, search corresponding target matrix according to described target detection use-case Lattice, including: the second path of described target detection use-case is determined according to described target configuration file, according to Described second path obtains described target data form.
Method the most according to claim 1, it is characterised in that
Described QTP test system farther includes: library of object;
Farther include: described in identifying, at least one test object stores in described library of object, and Determine each test invoked number of times of object at least one test object described, by called number of times It is set to shared model more than the test object setting threshold value, called number of times is not more than described setting threshold The test object of value is set to local mode.
5. according to described method arbitrary in claim 1-4, it is characterised in that
Farther include: set journal format and reporting format according to testing requirement;
Farther include: in automatic test course, raw according to the journal format set and reporting format Become corresponding test log and defect report.
6. a QTP tests system, it is characterised in that including:
Test script library and function library;
Drive module, for running test script corresponding with tested interface in described test script library, And call the Object identifying function in described function library, identify at least included by described tested interface Individual test object;
Keywords table, at least one the target detection object to be tested determined for storage, and often Operation that one target detection object is corresponding and parameter;
QTP testing tool, is used for reading described keywords table, utilizes in keywords table the every of configuration Operation and parameter that one target detection object is corresponding carry out automatic test to respective objects test object.
QTP the most according to claim 6 tests system, it is characterised in that
Farther including: test database, described test database includes that the most corresponding different test is used The data form of example, in each data form, storage has multiple test data that corresponding test case is corresponding;
Described QTP testing tool, specifically for for each target of configuration in described keywords table The parameter that test object is corresponding, determines corresponding target detection use-case;And use according to described target detection Example searches corresponding target data form in described test database;Read described target matrix one by one Test data in lattice, and utilize corresponding operation that respective objects test object is carried out automatic test.
QTP the most according to claim 7 tests system, it is characterised in that
Farther include: configuration file storehouse, including multiple configuration files corresponding to different test environments;
Described driving module, specifically for the test environment according to described tested interface, in described configuration Library is searched corresponding target configuration file;Determine tested with described according to described target configuration file The first path of the test script that examination interface is corresponding, calls this according to described first path tested with described The test script that examination interface is corresponding;
Described QTP testing tool, specifically for determining described target detection according to described target configuration file Second path of use-case, obtains described target data form according to described second path.
QTP the most according to claim 6 tests system, it is characterised in that
Farther include: library of object;
Described library of object, for store identification described at least one test object, and according to described at least Each test invoked number of times of object in one test object, by called number of times more than setting threshold value Test object be set to shared model, called number of times is not more than the test object of described setting threshold value It is set to local mode.
10. test system according to described QTP arbitrary in claim 6-9, it is characterised in that
Farther include: logger module, for setting journal format and report lattice according to testing requirement Formula, and in the automatic test course of described QTP testing tool, according to the journal format set and report Accuse form and generate corresponding test log and defect report.
CN201610203852.XA 2016-04-05 2016-04-05 Software test method and system based on QTP Pending CN105912460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610203852.XA CN105912460A (en) 2016-04-05 2016-04-05 Software test method and system based on QTP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610203852.XA CN105912460A (en) 2016-04-05 2016-04-05 Software test method and system based on QTP

Publications (1)

Publication Number Publication Date
CN105912460A true CN105912460A (en) 2016-08-31

Family

ID=56745225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610203852.XA Pending CN105912460A (en) 2016-04-05 2016-04-05 Software test method and system based on QTP

Country Status (1)

Country Link
CN (1) CN105912460A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391367A (en) * 2017-07-11 2017-11-24 千寻位置网络有限公司 The keyword driving test method of deformation monitoring monitoring system
CN107423209A (en) * 2017-03-08 2017-12-01 北京数码大方科技股份有限公司 Method for testing software and device
CN108415922A (en) * 2017-09-30 2018-08-17 平安科技(深圳)有限公司 Database update method and application server
CN109101420A (en) * 2018-07-20 2018-12-28 中国邮政储蓄银行股份有限公司 Determine the method, apparatus and system, terminal of Test Strategy
CN109254912A (en) * 2018-08-13 2019-01-22 北京金堤科技有限公司 A kind of method and device of automatic test
CN109783388A (en) * 2019-01-16 2019-05-21 北京金山云网络技术有限公司 UI automated testing method, device and electronic equipment
CN112631938A (en) * 2020-12-31 2021-04-09 北京弘远博学科技有限公司 Automatic regression testing method
CN113900562A (en) * 2021-12-09 2022-01-07 深圳佑驾创新科技有限公司 Excel-based testing method and device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174774A1 (en) * 2009-01-08 2010-07-08 Inernational Business Machines Corporation Method for server-side logging of client browser state through markup language
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN103605609A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Automatic test framework applicable to cloud computing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174774A1 (en) * 2009-01-08 2010-07-08 Inernational Business Machines Corporation Method for server-side logging of client browser state through markup language
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN103605609A (en) * 2013-12-10 2014-02-26 浪潮电子信息产业股份有限公司 Automatic test framework applicable to cloud computing

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423209A (en) * 2017-03-08 2017-12-01 北京数码大方科技股份有限公司 Method for testing software and device
CN107391367A (en) * 2017-07-11 2017-11-24 千寻位置网络有限公司 The keyword driving test method of deformation monitoring monitoring system
CN107391367B (en) * 2017-07-11 2020-12-01 千寻位置网络有限公司 Keyword driving test method of deformation monitoring system
CN108415922A (en) * 2017-09-30 2018-08-17 平安科技(深圳)有限公司 Database update method and application server
CN108415922B (en) * 2017-09-30 2021-10-22 平安科技(深圳)有限公司 Database modification method and application server
CN109101420A (en) * 2018-07-20 2018-12-28 中国邮政储蓄银行股份有限公司 Determine the method, apparatus and system, terminal of Test Strategy
CN109254912A (en) * 2018-08-13 2019-01-22 北京金堤科技有限公司 A kind of method and device of automatic test
CN109783388A (en) * 2019-01-16 2019-05-21 北京金山云网络技术有限公司 UI automated testing method, device and electronic equipment
CN112631938A (en) * 2020-12-31 2021-04-09 北京弘远博学科技有限公司 Automatic regression testing method
CN112631938B (en) * 2020-12-31 2024-02-09 北京弘远博学科技有限公司 Automatic regression testing method
CN113900562A (en) * 2021-12-09 2022-01-07 深圳佑驾创新科技有限公司 Excel-based testing method and device and storage medium

Similar Documents

Publication Publication Date Title
CN105912460A (en) Software test method and system based on QTP
CN107273286B (en) Scene automatic test platform and method for task application
CN103164328B (en) The regression testing method of a kind of business function, Apparatus and system
US20140181793A1 (en) Method of automatically testing different software applications for defects
CN101339534B (en) Software test apparatus and test method
CN105760296B (en) Automatic test control method, device and terminal
CN100451988C (en) Method and system for realizing unit test
CN107665171A (en) Automatic regression test method and device
CN109614324A (en) A kind of method for generating test case and device
CN109726105A (en) Test data building method, device, equipment and storage medium
CN102650938A (en) Management method for log system and log system
CN112433948A (en) Simulation test system and method based on network data analysis
CN110018954A (en) Code quality detection, the appraisal procedure of code detection quality, device and equipment
CN103678116A (en) Method and system for facilitating automated program testing
CN111258881B (en) Intelligent test system for workflow test
CN114996127A (en) Intelligent test method and system for solid state disk firmware module
CN110069414A (en) Regression testing method and system
EP3547143A1 (en) System and method for model-based and behaviour-driven testing
CN113127331B (en) Test method and device based on fault injection and computer equipment
CN110750457B (en) Automatic unit testing method and device based on memory database
CN104536897B (en) Automatic test approach and system based on keyword
Jayathilake A mind map based framework for automated software log file analysis
CN117236304A (en) Method for realizing Excel general import based on template configuration
CN105653445A (en) Implementation method capable of meeting DO-178C test result
Thooriqoh et al. Selenium Framework for Web Automation Testing: A Systematic Literature Review

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160831