5/12/14

UFT - Data Tables


A DataTable, similar to Microsoft Excel helps testers to create data driven test cases that can be used to run an Action multiple times. There are two types of Datatables.
  • Local Data Table - Each action has its own private data table also known as local data table which is can also be accessed across actions.
  • Global Data Table - Each test has one global data sheet that is accessible across actions.
The Data sheet can be accessed from the "Data" Tab of QTP as shown below:
Data Table in QTP
To execute a test case for some specified number of iterations,one can set the iterations of global data table in the Test Settings dialog, that can be accessed using File -> Settings -> Run(Tab) as shown below:
Data Table in QTP

Example:

For Instance, if user wants to parameterize "compound Interest" of "http://easycalculation.com/" that can be accessed using "http://easycalculation.com/compound-interest.php". The Parameters can be created as shown below. Most of the functionalities of Excel can be used in Data table as well.
Data Table in QTP

Data Table Operations:

There are three types of objects to access Data Table. Data Table Operations can be well understood by traversing through the below link:
Object TypeDescription
Data Table MethodsGives Detailed information about the data table methods.
DTParameter Object MethodsGives Detailed information about the DTParameter methods.
DTSheet Object MethodsGives Detailed information about the DTSheet methods.




0 comments:

Post a Comment