Thursday, March 31, 2011

What is Data driven testing?

I have seen automation testers, particularly the beginners trying to understand the different types of automation frameworks. What is a keyword driven testing? What is Data-driven testing? etc. This article is targeted to explain you what is the Data driven testing and its components. If you want to know about Keyword driven testing click here.

Data-Driven testing framework:

It is an automation framework where test input and/or output values are read from data files. The different data files may include datapools, ODBC sources, csv files, Excel files, ADO objects, etc. The data is then loaded into variables in recorded or manually coded scripts.


In case of testing the login functionality for different User name/Password combinations, instead of having different user name/password combinations in variables like usr1, pwd1, usr2, pwd2, usr3, pwd3 etc we may just use one variable for the user name and one variable for password namely usr and pwd. The list of username and password may be stored in a datatable/excel sheet. The first set of data is read, and then the script is executed based on the input; now the second set of data is read, and then the script is executed based on the input; so on and so forth.

Please find below how the data is read from the data pool

Data driven testing in QTP
QTP Data driven testing flow.
In a data-driven testing, a set of user actions is run with multiple input values. Data driving allows one script to test application functionality with many sets of data.

Also learn about QTP Datasheets, data driven testing sample script and Key word driven testing.

Click here for QTP scripts


  1. You can also check the below link for detailed information and code snippets on Data Driven Framework.

    QTP Data Driven Framework with Code Snippets

  2. good explanation, Easy to understand for new learners

  3. good explanation, easy to understand for freshers

    Thank u QTP HELP guys...


Please leave your comment here...