Data Driven Framework in selenium

If you observe several times while testing an application, it may be required to test the same functionality multiple times with the different set of input data, In that situation, if you hard-coded the test data to automation test scripts will not useful for re usability. So instead of hard-coded test data you have to store it in external files like excel, XML, properties file, database, csv.
So in order to test the application, you have to connect with external files and get the test data from them.

Advantages:
1) Re usability and code optimization
2) Execute same test case with different test data values.
3) Easy maintenance of test scripts.
3) If test data changes in external files will not affect on existing automation scripts

Data Driven Framework Structure:



Please find the below link to Download the Sample Data Driven framework

Download Data Driven Framework

5 comments:

  1. Please find the below link to Download the Sample Data Driven framework

    https://drive.google.com/open?id=0B0pJK3xnwFskbEQyc1ZGMkZneDA

    ReplyDelete
  2. Thanks for Sample. But I am getting error cannot find class in classpath. please resolve.

    ReplyDelete
    Replies
    1. Sorry I could n't get a chance to look on it. Can you just try with new Workspace.

      Delete
  3. how to run the framework pls explain

    ReplyDelete
  4. You just configure and execute the Testng.xml and same like http://www.way2selenium.com/p/page-object-model-in-selenium.html

    ReplyDelete