Thursday, February 24, 2011

Data Driven Framework

Data-Driven Framework 

Data-driven testing is a framework where test input and output values are read from data files (data pools, ODBC sources, CSV files, Excel files, DAO objects, ADO objects etc.) and are loaded into variables in captured or manually coded scripts. In this framework, variables are used for both input values and output verification values. Navigation through the program, reading of the data files, and logging of test status information are all coded in the test script.

This is similar to table-driven testing where test case is contained in the data file and not in the script; the script is just a "driver," or delivery mechanism, for the data. Unlike in table-driven testing, though, the navigation data isn't contained in the table structure, In data-driven testing, only test data is contained in the data files.
                  
Advantages:
§    Data sheets can be designed while application development is still in progress
§    Reduces data redundancy
§    Data input/output and expected results are stored as easily maintainable text records in    database
§    Changes to the Test Scripts do not affect the Test Data
§    Test Cases can be executed with multiple Sets of Data

Disadvantages:
§    Requires database proficiency
§ Maintenance of database is required