devxlogo

Keyword-Driven Testing

Definition

Keyword-Driven Testing, also known as table-driven testing or action-word testing, is a software testing methodology that separates the test creation process from test execution. It involves creating a table with keywords that describe the action to be performed on a GUI (graphical user interface), allowing non-programmers to define and modify tests. The keywords represent functionality to be tested and parameters needed for testing.

Phonetic

The phonetics of the keyword “Keyword-Driven Testing” is: /ˈkiː.wɜːd ˈdrɪv.ən ˈtɛs.tɪŋ/

Key Takeaways

 

  1. Reduces Code Duplication: Keyword-driven testing promotes code reuse by enabling testers to write test scripts using simple keywords which can be understood and used by other team members. This drastically reduces code duplication and simplifies the maintenance of the test suite.
  2. Improves Collaboration: Given its simplicity and ease of understandability, Keyword-driven testing allows stakeholders, including product managers, designers, and developers, to contribute to the testing process. This integrated approach improves teamwork, accelerates delivery times and improves the overall quality of the software.
  3. Fosters Flexibility: In Keyword-driven testing, test automation is largely independent of the actual UI. Any changes in the UI would only require alterations in the Object Repository and not in the main test scripts. This encapsulation makes Keyword-driven testing highly adaptable to UI changes.

 

Importance

Keyword-Driven Testing is important in technology and software development because it provides a practical and efficient approach to conducting automated testing. This technique separates the programming aspect from the test case design, thereby making it easy for those who lack extensive programming knowledge to create and manage tests. With Keyword-Driven Testing, the focus shifts towards business-related keywords which allows the creation of test scenarios that are easily understandable and enhances communication between teams.

Furthermore, it improves test case reusability and maintainability which ultimately saves costs and time. Therefore, Keyword-Driven Testing is a crucial element in facilitating effective and streamlined testing processes in the field of software development.

Explanation

Keyword-Driven Testing, also known as Action Word Based Testing, is an integral part of software testing methodologies that eases the testing process, improves efficiency, and reduces the technical knowledge burden on testers. The main purpose of Keyword-Driven Testing is to separate the test creation process from the test execution process. This provides a universal, simplified interface for creating test cases, making it easier for non-programmers to design tests. This method is achieved by defining a set of keywords where each keyword corresponds to an individual testing action. This set of pre-defined keyword actions make it easier for anyone, regardless of their technical know-how, to create comprehensive test cases.

Keyword-Driven Testing is widely used for automating test cases in a way it becomes easy to maintain and understand. Each keyword in this testing corresponds to an individual testing operation or navigation step, making it an ideal choice for teams that include members with varied levels of technical expertise. This approach allows for detailed documentation, making it easier to reproduce and fix bugs, and consequently enhancing the software’s overall quality.

Keyword-Driven Testing not only simplifies the test creation process but also promotes the reuse of existing test cases, reducing costs and time involved in the testing process. With this approach, testers can build a more systematic, structured, and flexible testing framework.

Examples

1. eCommerce Sites: Keyword-Driven Testing is frequently used to test eCommerce platforms, like Amazon or eBay. Here, it can be used to check if certain functionalities are working correctly. Keywords could represent actions like “login”, “search for a product”, “add to cart”, “checkout”, etc. With Keyword-Driven Testing, programmers provide a series of these actions to mimic a typical buyer’s journey, allowing them to detect any glitches or issues rapidly.

2. Banking Applications: Banks often handle sensitive data and complex operations. This makes regular and rigorous testing crucial. Keyword-Driven Testing can be extensively used to test UI and transaction functionalities. Actions like “open account”, “transfer money”, or “pay bills” can serve as keywords and can be sequenced in testing scenarios to ensure the software’s stability and security.

3. Travel Booking Systems: In travel websites or apps like Expedia or Airbnb, Keyword-Driven Testing can be used for booking processes. They test if the user is able to search for destinations, select dates, pick a room or flight, and successfully make a booking. In such systems, keywords might be “search flight”, “choose date”, “select seat”, “payment”, etc.

Frequently Asked Questions(FAQ)

Q1: What is Keyword-Driven Testing?

A1: Keyword-Driven testing is a type of software testing methodology that separates out the test scripting phase from the execution phase. This makes it easier to prepare and use test designs and allows non-technical users to define the tests.

Q2: What is the use of Keyword-Driven Testing?

A2: Keyword-Driven Testing is used to reduce the amount of code needed to write test scripts, enables easier maintenance and scalability, and makes the test design process more efficient. It also encourages the reusability of code.

Q3: How is a keyword associated with a function in Keyword-Driven Testing?

A3: In Keyword-Driven Testing, a keyword is associated with a function by defining a unique keyword for each function that is to be performed. The keyword will reflect the specific action being tested.

Q4: What makes Keyword-Driven Testing more efficient than other testing methods?

A4: Keyword-Driven Testing is more efficient because it simplifies the test design process. By using keywords in place of complex codes, it is easier for testers (including non-technical testers) to create tests. It also helps in managing and maintaining tests because changes in test scripts don’t affect the test case design.

Q5: Is specialist knowledge necessary to perform Keyword-Driven Testing?

A5: While it can be beneficial, specialist knowledge is not essential for conducting Keyword-Driven Testing. This testing technique is designed to be user-friendly and simple so that even non-technical team members can play a role in the testing process.

Q6: What are the main steps in Keyword-Driven Testing?

A6: The main steps in Keyword-Driven Testing are: identify test scenarios, define unique keywords for each function, create a keyword table and functions map, create the test scripts using the keyword table, and execute and evaluate the test scripts.

Q7: What could be a potential disadvantage of Keyword-Driven Testing?

A7: Keyword-Driven Testing might require more time in initial setup, as it involves identification of keywords. Luckily, these keywords can be reused for other tests. Furthermore, lack of understanding on the framework can make it difficult for new testers.

Related Tech Terms

  • Test Automation Framework
  • Data-Driven Testing
  • Test Script
  • Keyword Library
  • Functional Test Case

Sources for More Information

devxblackblue

About The Authors

The DevX Technology Glossary is reviewed by technology experts and writers from our community. Terms and definitions continue to go under updates to stay relevant and up-to-date. These experts help us maintain the almost 10,000+ technology terms on DevX. Our reviewers have a strong technical background in software development, engineering, and startup businesses. They are experts with real-world experience working in the tech industry and academia.

See our full expert review panel.

These experts include:

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

More Technology Terms

Technology Glossary

Table of Contents