Open In App

Keyword Driven Testing in Software Testing

Last Updated : 23 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The keyword-driven testing is based upon a keyword-driven framework that defines functional automation testing and is categorized into four different parts test steps for test cases, objects, actions, and data sets.

What is Keyword Driven Testing?

It is a software engineering technique or approach that is used in functional automation testing that’s why called a type of functional automation testing. A table format is used for defining keywords or action words in this technique which is why called table-driven testing and the keywords or action words are defined for each function/method in this technique which is why called Action word-based testing.

In this type of testing a table or spreadsheet format is used to define keywords or action words for every instruction that is under the execution stage. Different types of actions and test data are used combinable and by providing these inputs the driver script plays a vital role in producing the output of the test result accordingly.

For Example:

Example of  Keyword Driven Testing example

Example of Keyword Driven Testing

  • login to “geeksforgeeks” website – Keyword “Sign in” will be used in to automation purpose for login to the Website, to the test the login function or function related with the same.

Example of Keyword

  • Excel Sheet: Storing the keywords for test cases.
  • Function Library: It contains functions for business false(e.g., login button).
  • Data Sheets: Storing the test data which used in the application.
  • Object Repository: using the object repository based on the framework which you want.
  • Test Scripts: Developing the test scripts for manual test cases or a single driver script.

Why do Keyword Driven Testing

  • By studying the above scenario we conclude that the testing may be performed in the manual and automated way but many times it is done in the automated way.
  • The objective of automated testing is to reuse maintenance costs and avoid duplicate specifications. Higher reusability of function scripting and good support for testing and portability.
  • Simply, identify the low and high-level keywords and implement the keywords in a running manner likewise. After that creation of test cases and driver scripts and finally, the execution of the automation scripts are generally required for this testing.

Phases of Keyword Driven Testing

There are two phases of development for keyword-driven testing like Design and Development phase and the Implementation phase. 

1. Design and Development Phase 

In the design and development phase, the set of actions briefly explains the mentioned keywords that are designed. The number of actions performed in this type is assigned with a single keyword and accordingly, it is working sequentially.

2. Implementation Phase

In the implementation stage, the final stage of execution may be performed in manual or automatic ways and sometimes it may be performed in both of the ways based upon the situation. The whole commands are executed in a set very precisely that can be determined in the primary stage of the function execution.

Advantages of Keyword Driven Testing

  • One of the major advantages of this testing is that functional testers can plan test automation even before the application is ready.
  • For considering with no programming knowledge the test cases could be developed.
  • Another key advantage is that it is independent of any specific programming language or any other tool.
  • Most automation tools available are compatible with this testing technique.

Disadvantages of Keyword Driven Testing

  • The bigger disadvantage is that it is a time-consuming process to develop the keywords and the functionalities of the testing.
  • The obstacles are driven by the technical testers. The keywords may prevent the testers from preventing their technological idea and years of experience during the test.

Conclusion

Keyword-driven testing gives a systematic approach to functional automation testing, using a table format to main keywords or action words for each testing step. While it focus testing processes and improve a reuse, it also include a challenges in development and technical implementation. Its disadvantages, its advantages in planning automation firstly, easily of test case development, and tool compatibility make it a valuable technique in software testing.


Next Article

Similar Reads