Saturday, March 9, 2013

Difference between keyword driven and data driven framework ?

Data-Driven Testing
Simple test scripts have test data embedded into them. This leads to a problem that when test data needs to be updated actual script code must be changed. This might not be a big deal for the person who originally implemented the script but for a test engineer not having much programming experience the task is not so easy. If the script is long and non-structured the task is hard for everyone. Another problem with having the test data inside test scripts is that creating similar tests with slightly different test data always requires programming. The task may be easy original script can be copied and test data edited but at least some programming knowledge is still required. This kind of reuse is also problematic because one particular change in the tested system may require updating all scripts. Because of these problems embedding test data into scripts is clearly not a viable solution when building larger test automation frameworks. A better approach is reading the test data from external data sources and executing test based on it. This approach is called data-driven testing External test-data must be easily editable by test engineers without any programming skills. It is often in tabular format and edited in spreadsheet programs.

Keyword-Driven Testing
Previous section introduced data-driven testing and stated that it has multiple promises. It also mentioned that its biggest limitation is that all test cases are similar and creating totally new tests requires programming effort. A solution for this limitation, among others, is the keyword-driven approach where not only the test data but also directives telling what to do with the data are taken from test scripts and put into external input files. These directives are called keywords and test engineers can use them to construct test cases freely. The basic idea reading test data from external files and running tests based on it stays the same as in data-driven testing. keyword-driven testing is a logical extension to data-driven testing. 


Data Driven Framework :
It is nothing but data driven test, performing the same functionality with multiple input values by using parametrization with the help of data table or data source is called Data Driven Test.

Keyword Driven Framework :
It is nothing but keyword driven test or keyword view, used for parametrization.
It is dividing into 4 parts.
1. item     2. operation     3. value      4. documentation     ----> in QTP 8.2
In QTP 6.5 keyword view is nothing but Tree View. It displays the list of objects along with logical names.

Parametrization:
passing the run-time input values with the help of data-table or data-source is called parametrization.
Any queries

prashantlogic@gmail.com

1 comment:

  1. HI,

    Thank you so much for posting this. I really appreciate your work. Keep it up. Great work

    http://kosmiktechnologies.com/selenium/

    ReplyDelete