I am having problems fully understanding the purpose of keyword driven frameworks compared to data-driven frameworks.

What circumstances would make a keyword-driven framework more appropriate for an automated test suite than a data-driven framework?

  • your question is a little generic and open to interpretation. Can you try rephrasing it? Is there a particular scenario you want to overcome?
    – ECiurleo
    Commented Jul 21, 2016 at 8:36
  • @ECiurleo I mean that i realize well when data driven framework should be used like when you want to test your application against different sets of data, but I can't think of an application to which keyword driven framework would apply best. Let us get this covered.
    – Richardson
    Commented Jul 21, 2016 at 8:56
  • 1
    each method has pros and cons, but what they are depends on the scenario you are working in. Could you expend your answer to give a bit more background of where you want to implement the framework?
    – ECiurleo
    Commented Jul 21, 2016 at 9:00
  • Keyword-driven or data-driven frameworks simply help you (actually the purpose of nearly all frameworks) concentrate on your actual tasks by simplyfing your activities. Otherwise you have to create software that parses your keywords, stimulate your SUT, etc. That is time consuming and error-prone. But as @ECiurleo said specify your question to get a more comprehensive answer. Commented Jul 21, 2016 at 15:21
  • Editing the question to make it easier to answer and less broad
    – Kate Paulk
    Commented Jul 22, 2016 at 11:10

3 Answers 3


Difference between Keyword driven and Data driven framework :

Data Driven Framework :

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

While automating or testing any application, at times it may be required to test the same functionality multiple times with the different set of input data. Thus, in such cases, we can’t let the test data embedded in the test script. Hence it is advised to retain test data into some external data base outside the test scripts.

Data Driven Testing Framework helps the user segregate the test script logic and the test data from each other. It lets the user store the test data into an external database. The external databases can be property files, xml files, excel files, text files, CSV files, ODBC repositories etc. The data is conventionally stored in “Key-Value” pairs. Thus, the key can be used to access and populate the data within the test scripts.

Ex: Let us consider the “Gmail – Login” Functionality.

First and the foremost step are to create an external file that stores the test data (Input data and Expected Data). Let us consider an excel sheet for instance.

Data Driven


  • The most important feature of this framework is that it considerably reduces the total number of scripts required to cover all the possible combinations of test scenarios. Thus lesser amount of code is required to test a complete set of scenarios.
  • Any change in the test data matrix would not hamper the test script code.
  • Increases flexibility and maintainability.
  • A single test scenario can be executed altering the test data values.

Keyword Driven Testing Framework:

The Keyword driven testing framework is an extension to Data driven Testing Framework in a sense that it not only segregates the test data from the scripts, it also keeps the certain set of code belonging to the test script into an external data file.

These set of code are known as Keywords and hence the framework is so named. Key words are self-guiding as to what actions needs to be performed on the application.

The keywords and the test data are stored in a tabular like structure and thus it is also popularly regarded as Table driven Framework. Take a notice that keywords and test data are entities independent of the automation tool being used.

Ex: For example keywords like login, clickLink and verifyLink are defined within the code.

Keyword Data Driven


  • In addition to advantages provided by Data Driven testing, Keyword driven framework doesn’t require the user to possess scripting knowledge unlike Data Driven Testing.
  • A single keyword can be used across multiple test scripts.

I think Shailendra hit the nail on the head.

The main goal of keyword driven tests is greater test coverage through reuse and maintanability through defining functionality -- steps.

And the main goal of data driven tests is greater test coverage through multiplying scenarios.

It really depends on how your features are structured -- are most scenarios much the same, but with different data, or are most scenarios different combinations of repeatable steps.

The two are not mutually exclusive, but in practice, frameworks tend to focus on one or the other extreme.


Purpose of keyword driven frameworks compared to data driven frameworks.

Keyword-driven testing is a technique that separates much of the programming work from the actual test steps so that the test steps can be developed earlier and can often be maintained with only minor updates, even when the application or testing needs change significantly. The keyword-driven testing methodology divides test creation into two stages: Planning Stage, Implementation Stage

Data- Driven testing is a framework where test input and output values are read from data files (datapools, ODBC sources, csv files, Excel files, DAO objects, ADO objects, and such) 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.

What circumstances would make a keyword-driven framework more appropriate for an automated test suite than a data-driven framework?

The keyword driven automation framework is initially the hardest and most time-consuming data driven approach to implement. After all, we are trying to fully insulate our tests from both the many failings of the automation tools, as well as changes to the application itself.

To accomplish this, we are essentially writing enhancements to many of the component functions already provided by the automation tool: such as error correction, prevention, and enhanced synchronization.

Fortunately, this heavy, initial investment is mostly a one-shot deal. Once in place, keyword driven automation is arguably the easiest of the data driven frameworks to maintain and perpetuate providing the greatest potential for long-term success.

For More Understanding read this http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.