Data Driven Framework is a systematic approach to test an application. In data-driven framework test input and output values are read/write from/to data files (Mostly Excel files) 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 and information are all coded in the test script.
Merits of Data Driven Framework:-
- Scripts may be developed while application development is still in progress.
- Utilizing a modular design, and using files or records to both input and verify data, reduces redundancy and duplication of effort in creating automated test scripts.
- If functionality changes, only the specific “Business Function” script needs to be updated.
- Data input/output and expected results are stored as easily maintainable text records.
- Functions return “TRUE” or “FALSE” values to the calling script, rather than aborting, allowing for more effective error handling, and increasing the robustness of the test scripts. This, along with a well-designed “recovery” routine, enables “unattended” execution of test scripts.
Demerits of Data Driven Framework:-
- Requires proficiency in the scripting language used by the tool (technical personnel).
- Multiple data-files are required for each Test Case. There may be any number of data-inputs and verifications required, depending on how many different screens are accessed. This usually requires data-files to be kept in separate directories by Test Case.
- Tester must not only maintain the Detail Test Plan with specific data, but must also re-enter this data in the various required data-files
- If a simple “text editor” such as Notepad is used to create and maintain the data-files, careful attention must be paid to the format required by the scripts/functions that process the files, or script-processing errors will occur due to data-file format and/or content being incorrect