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.
Example:
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
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
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.
Example:
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
QTP Data driven testing flow. |
Also learn about QTP Datasheets, data driven testing sample script and Key word driven testing.
Click here for QTP scripts
You can also check the below link for detailed information and code snippets on Data Driven Framework.
ReplyDeleteQTP Data Driven Framework with Code Snippets
good explanation, Easy to understand for new learners
ReplyDeletegood explanation, easy to understand for freshers
ReplyDeleteThank u QTP HELP guys...