Data Driven Framework

Automation testing revolves around data, as data plays a vital role in managing the automation framework. Apart from developing a reliable automation framework, maintaining the framework becomes a major concern.

Performing the same functionality with multiple input values by using parameterization with the help of data tables or data sources is called Data Driven Test. In automation testing, we come across scenarios where we need to check the same functionality with different data, in such scenarios we do not include the data in the test framework. This data can be stored in an external database outside the test cases.

In a data-driven framework, the test case logic and test data are separated from each other. This simplifies the test case logic and reduced the size of the test cases. Whereas the test data can be maintained in CSV, XML, excel files. The data is stored in ‘Key-Value’ pairs, accessing the key through the test cases allows the data to be populated in test cases

For example:
Logging into any application with a user credential, the username of the respective user shows up on the Homepage. When verifying such scenarios the test approach would be login using different credentials and check the username appearing. In such scenario, the data can be maintained into a CSV or an excel in the following Key-Value pair, as mentioned below:

username password message
test123 pass@word Hi test123, welcome back
demoTest demo@test Hi demoTest, welcome back
$pec!alUser specialUser1 Hi $pec!alUser, welcome back


  • To reduce the number of test cases required to cover all the possible combination of tests, improving test coverage
  • Changing the data would not hamper the product testing
  • A single test case can be used for altering test data values, creating reusability of test cases

Not For?

  • Complex products where all the test cases are not data dependent
  • Products where UI and functionality changes for the same data

24, February - 2022

Try it now for Free