Software Testing Learning Hub

Selenium Lesson 19 – Keyword Driven Framework

Keyword Driven Framework

Keyword Driven Framework is one of well known automation framework and extensively used in various service offering companies. Keyword Driven Framework also known as table-driven Framework or action word based framework.

Definition : A Keyword or Action Word is a defined combination of actions on a test object which describes how test lines must be executed. An action word contains arguments and is defined by a test analyst.

In simple words In Keyword Driven Framework, Keywords are assigned to Reusable components for an example “Login”  keyword assigned to Login method which has automated script to perform login operation.

How it Works?: 

Keyword Driven Framework-architecture

from above image, Action Library contains the keywords and keywords has been used to create the test cases. for data driven, keyword fetches the data from data reader script and after execution it pushes the results to result files.

in many keyword driven automation frameworks we have found that test cases are written in excel file along with test data and then automation framework execute the test steps by reading the excel row one by one.

Advantages:

  • Maintenance is low in the long run:
    • Test cases are concise
    • Test cases are readable for the stake holders
    • Test cases easy to modify
    • New test cases can reuse existing keywords more easily
  • Keyword re-use across multiple test cases
  • Not dependent on a specific tool or programming language

Disadvantages:

  • Takes more time for coding.
  • Need to write more code as compare to other framework.