What is keyword Driven Testing?

Keyword-Driven Testing which is also known as table driven testing is a kind of QTP framework which is best suited for functional automation testing.

Keyword-Driven testing separates the implementation of automated test cases from the automated test design. Test cases identify the keywords which are organized into the tables or spreadsheet which are used to execute the functions.

In keyword-driven testing keywords are usually the sequence of the operations or functions in the keyword format which are arranged into the table format. In this testing technique each keyword belongs to the actions like opening window, closing window, mouse click, selecting the menu items, etc.

Its easy to create the key-driven test case by simply adding or deleting the functions or operations which we want to execute or we can directly edit the function parameters.

For implementing the keyword-Driven testing we need to implement the following steps:

1. First identify the test cases of the functionality we need to perform.

2. Identify the keywords which corresponds to  the functions which will be needed to execute the functions and store the keywords in the table format.

3. Then identify the Functions.

4. Associate the functions with the keywords stored in the table format.

We will consider one example which will help us to understand the keyword-driven testing.

Let us consider that we need to perform the following task. we need to login into the Gmail account, then we need to count the number of unread mails in the inbox and then last we need to logout the Gmail account. So to perform these tasks we need to do the following steps.

1. Login into the Gmail account.

2. Count the number of unread mails.

3. Logout from the Gmail account.

We need to perform three test cases. So we will require three different functions to perform these three different test cases. The functions which we require are Login(), Count(), Logout() . We require the keywords to execute these three different functions. The keywords which we require are mail_in, mail_count, mail_out.

istqb Keyword driven testing

The above given diagram shows how the function gets executed with the help of keywords.

Advantages of keyword driven testing:

  • The degree of reusability is high. Test cases can be executed easily by anyone as the execution steps are mentioned in detail.
  • Test cases are easy to modify- keywords are reusable across multiple test cases
Share This: