Monday, April 11, 2016

Data Driven Framework in QTP

In Data Driven Framework, the data is NOT hard-coded in the test scripts. Instead, it is stored in some external files. The test script first connects to the external data source and then extracts the data from that source. Most of the times, excel sheets are used to store the data. Other external data sources that are frequently used are –

  • Text files.
  • XML files.
  • Databases.
  • Combination of more than one external file.

Components and Workflow of Data Driven Framework


Advantages of Data Driven Framework
  • Since the data is kept separate from the test script, the same script can be run multiple times for different sets of data (which can be kept in multiple rows in the data sheet).
  • Changes made in the test data don’t affect the test scripts in any way and vice versa.

Disadvantages of Data Driven Framework
  • Additional effort and good technical expertise is required to create functions that connect to the external data sources to retrieve the data.
  • Additional amount of time is required in identifying which external data source to use and deciding how the data should be stored or grouped in that external data source.

No comments:

Post a Comment