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
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:
|test123||pass@word||Hi test123, welcome back|
|demoTest||demo@test||Hi demoTest, welcome back|
|$pec!alUser||specialUser1||Hi $pec!alUser, welcome back|