
- QTP Tutorial
- QTP - Home
- QTP - Introduction
- QTP - Test Automation
- QTP - Environment Setup
- QTP - Record and Play Back
- QTP - Object Repository
- QTP - Actions
- QTP - DataTables
- QTP - Checkpoints
- QTP - Synchronization
- QTP - Smart Identification
- QTP - Debugging
- QTP - Error Handling
- QTP - Recovery Scenarios
- QTP - Environment Variables
- QTP - Library Files
- QTP - Test Results
- QTP - GUI Objects
- QTP - Virtual Objects
- QTP - Accessing Databases
- QTP - Working with XML
- QTP - Descriptive Programming
- QTP - Automation Object Model
- QTP - Frameworks
- QTP - Designing a Framework
- QTP Useful Resources
- QTP - Questions and Answers
- QTP - Quick Guide
- QTP - Useful Resources
- QTP - Discussion
QTP - Datatables
A DataTable, similar to Microsoft Excel, helps the testers to create data-driven test cases that can be used to run an Action multiple times. There are two types of Datatables −
Local DataTable − Each action has its own private datatable, also known as local datatable, which is can also be accessed across actions.
Global DataTable − 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 −

To execute a test case for some specified number of iterations, one can set the iterations of global datatable in the Test Settings dialog, that can be accessed using File → Settings → Run(Tab) as shown below −

Example
For example, if a 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.

DataTable Operations
There are three types of objects to access DataTable. DataTable operations can be well understood by traversing through the following −
Sr.No. | Object Type & Description |
---|---|
1 | Data Table Methods
Gives detailed information about the data table methods. |
2 | DTParameter Object Methods
Gives detailed information about the DTParameter methods. |
3 | DTSheet Object Methods
Gives detailed information about the DTSheet methods. |