Pros & Cons Of Data Driven Versus Keyword Driven Automation Frameworks - Presentation Transcript
Pros & Cons of Data-driven versus Keyword-driven Automation Frameworks
Many types of test automation frameworks are being practiced by the industry. There are several benefits /
drawbacks of each one of them. However it depends upon the testing expert as to how he/she makes the
selection based upon many considerations of reusability of test scripts and all other test assets.
Here we shall try to differentiate between Data-driven Framework and Keyword-driven or Table-driven
Framework.
Data-Driven Testing Framework:
In data-driven testing the input and output values for the test are fetched from data files. These data files can be
Excel files, CVS files, ADO objects, DAO objects or any ODBC source etc. Subsequently these get loaded into
various variables in scripts which might be either manually created or can be captured ones.
For input values as well as output verification values, variables are used in data-driven framework. The test
scripts contain all the coded information regarding reading of the data files, navigation through the application &
test status logs etc.
This has a similarity with table-driven testing in a way that our test case is encapsulated in the data file as
against in the test script. The test script just remains a "driver," or a means of delivery for the data. Here in data-
driven testing, data files contain just the test data only.
Advantages of data-driven testing:
The advantages of the Data-Driven test automation framework are as follows,
a) We can create our scripts even when development of application is still going on.
b) Redundancy & unnecessary duplication of creation of automated testing scripts gets greatly reduced due to
the modular type of design & due to the use of files or records for both input as well as verifying the data.
c) In case of any change in functionality, we just need to revise the particular "Business Function" script.
d) Information like data inputs or outputs, expected results get stored in the form of conveniently managed text
records.
e) This permits better error handling, thereby the resulting test scripts are more robust. This is due to the fact that
when a script is called, the functions return "TRUE" or "FALSE" values, instead of aborting. By having a nicely
created "recovery" program, we can execute our test scripts virtually unattended.
Disadvantages of data-driven testing
The disadvantages of the Data-Driven test automation framework are as follows,
a) This calls for great expertise of scripting language required by the automation tool.
b) For every test case we need many data-files. According to the number of screens being accessed we may
have many data-inputs and may require many verifications. Hence the test case needs to keep the data-files in
different directories.
c) The test engineer is required to re-enter the test plan data in various concerned data files in addition to
managing the detailed test plan.
d) In case for creating & maintaining the data-files, we use text editor like Notepad, extra care is needed in
having the desired format needed by the functions or scripts which would process the concerned files; otherwise
we shall get script-processing errors due to incorrect data-file format or its content.
4) Keyword-Driven Testing Framework:
In keyword driven framework we need to create a set of keywords & data tables, which are not dependent either
on the test automation tool being used by us or on the test scripts driving the data & the application under test.
Keyword-driven tests have large resemblance with manual test cases.
In a keyword driven framework, the entire functionality of our application under test gets captured as step by step
instructions for every test as well as in a table. In a keyword driven framework, the complete functionality as well
as the process is data-driven.
Advantages of keyword driven testing:
The advantages of the Keyword Driven Testing are as follows,
a) We can write the detailed test plan having desired inputs and verification data in the form of simple &
convenient spreadsheets.
b) In case some expert having expertise of scripting language used by the automation tool, can create utility
scripts well before the creation of the detailed test plan, then the testing engineer is able to use the Automation
Tool immediately through the spreadsheet input method & for this he/she need not master the concerned
scripting language actually used by the automation tool.
c) The testing engineer becomes productive with the new testing tool far quickly, since he/she is required to
understand the particular format for use in the test plan & various desired Key Words. This permits deferment /
rescheduling of more exhaustive training on new tool at some more convenient time in future.
Disadvantages of keyword driven testing:
The disadvantages of the Keyword Driven Testing are as follows,
a) The tester is required to have great expertise over the scripting language of the test tool, so that he/she can
successfully create customized functions and utilities required for the particular application. Although this
statement is valid for all other methods as well.
b) The tester is required to learn several special formats & keywords for creating the customized utilities required
for the application. This process can take considerable time & can have adverse effect on the test plan
development. However these problems arise in the beginning only, and when the test engineers get enough
acquaintance with the process, they are able to create test cases much faster.
Conclusion:
In actual practice, what has been seen is that people land up with implementation of a framework, which
happens to be an amalgam of all both these techniques, by taking advantage out of their strong points &
intelligently tackling their weaknesses.
By & large majority of frameworks turn out to be such a hybrid framework over a passage of time. Such hybrid
frameworks utilizing keyword-driven testing & data-driven test scripts tend to be more successful in test
automation.
Article By:
http://www.softwaretestinggenius.com
A Storehouse of Complete Knowledge on Software Testing & QA under one Roof
0 comments
Post a comment