Fact-checked by Grok 2 weeks ago

Keyword-driven testing

Keyword-driven testing (KDT), also known as action word-driven testing, is a scripting technique in which test scripts contain high-level keywords and supporting files that contain low-level scripts implementing those keywords. This methodology enables the creation of test cases using predefined keywords that represent specific user actions or application functions, typically organized in a tabular format such as a , which includes columns for steps, keywords, objects, input data, and expected results. By separating test design from execution, KDT allows both manual and automated testing, making it suitable for functional, regression, and in . The core components of keyword-driven testing include a keyword-driven test table for defining test cases, a function library mapping keywords to executable code, an for UI elements, sheets for test inputs and outputs, and driver scripts to orchestrate execution. The workflow begins with identifying and developing keywords during the design phase, followed by assembling them into test cases; automation tools then interpret and run these keywords against the application under test. This approach evolved from earlier table-driven and data-driven techniques to enhance in frameworks, forming the basis for modern low-code and no-code testing platforms. Key advantages of keyword-driven testing include promoting between technical developers and non-technical stakeholders, such as business analysts and manual testers, by reducing the need for programming expertise in creation. It also improves reusability and of tests, as changes to the application require updates only to the underlying keyword implementations rather than individual scripts, and supports language- and tool-independent test planning even before the application is fully developed. Widely adopted in agile and environments, KDT facilitates faster test execution and serves as living for test scenarios.

Fundamentals

Definition and Principles

Keyword-driven testing is a software testing methodology that employs predefined keywords to define and execute test cases, representing specific actions or verifications in a structured format suitable for both manual and automated testing. This approach organizes test cases into tables or spreadsheets, where keywords such as "click" or "verifyText" correspond to predefined functions or scripts, enabling a clear separation between test specifications and their underlying implementation. As a test case specification technique, it supports the development of automation frameworks by abstracting complex scripting into reusable components. A core principle of keyword-driven testing is the of test logic from technical implementation details, allowing non-technical stakeholders, such as business analysts or domain experts, to author and maintain test cases without deep programming knowledge. Keywords act as high-level commands that map directly to modular scripts or functions in a , fostering reusability and reducing redundancy across multiple test scenarios. This modularity promotes maintainable test structures, where changes to underlying affect only the keyword mappings rather than individual test cases. For instance, a simple might be represented in a tabular format with columns for Keyword, Object, and Parameter, as shown below:
KeywordObjectParameter
openBrowserN/A
navigateToURLhttps://example.com
verifyTextHeader"Welcome"
closeBrowserN/AN/A
This format encapsulates the test flow using keywords that link to executable code, illustrating the framework's emphasis on and .

Historical Development

Keyword-driven testing emerged in the 1990s as a response to the limitations of linear scripting in early test automation efforts, which often resulted in brittle and hard-to-maintain test cases due to their sequential, code-heavy nature. This approach built on modular test automation principles, allowing testers to abstract test steps into reusable components rather than writing extensive scripts for each scenario. The methodology drew initial influence from action-word-based practices in manual testing during the 1980s and 1990s, where testers documented procedures using descriptive action terms to improve clarity and reusability in test plans. A pivotal milestone occurred in the mid-1990s when Hans Buwalda developed the foundational concepts of what became known as action-based testing, a precursor to modern keyword-driven frameworks. In 1994, Buwalda originated this method, using spreadsheets to define tests via keywords and arguments, separating test logic from implementation to handle complex, changing requirements. He formalized the approach in publications, including a 1996 paper on "Automated Testing with Action Words: Abandoning Record & Playback," which advocated abandoning rigid record-and-playback tools in favor of keyword modularity. By 2001-2002, Buwalda presented the technique at the conference, gaining industry recognition and leading to its adoption in commercial tools. The early 2000s saw keyword-driven testing integrated into proprietary tools, notably Mercury Interactive's QuickTest Professional (QTP), which introduced a Keyword View in version 8.0 released in late 2004, enabling users to build tests visually using predefined keywords for actions like clicks and verifications. This feature, now part of Unified Functional Testing (UFT), popularized the methodology in enterprise environments by simplifying automation for non-programmers. Open-source advancements followed with the release of in 2008, which provided a keyword-driven structure for and further democratized the approach through its extensible library system. By the 2010s, keyword-driven testing evolved to align with agile methodologies and (CI) practices, facilitating faster feedback loops in iterative development. Frameworks like were adapted for CI tools such as Jenkins, allowing automated execution of keyword-based suites in pipelines, as demonstrated in industrial automation testing standards. Post-2020, the methodology has incorporated broader and integrations in to improve efficiency and coverage.

Key Components

Keywords and Actions

In keyword-driven testing, keywords serve as the fundamental building blocks that represent specific actions or operations within test scripts, allowing testers to abstract complex functionalities into reusable terms. Keywords are typically categorized into three main types: high-level, low-level, and . High-level keywords encapsulate broader processes or workflows, such as "" or "completePurchase," which often combine multiple lower-level actions to simulate end-to-end scenarios. Low-level keywords focus on granular interactions with the application under test, such as "enterText" or "clickButton," corresponding to basic manipulations like inputting data or triggering events. keywords are -defined extensions tailored to domain-specific needs, enabling teams to create specialized actions beyond standard libraries, such as "validatePaymentGateway" for testing. The keyword mapping process involves linking these abstract terms to concrete implementations, such as scripts, functions, or , to translate high-level descriptions into . This mapping is often documented in a centralized , like an Excel sheet or a dedicated file, where each keyword is associated with its underlying logic; for instance, the keyword "clickButton" might map directly to Selenium's click() , including parameters for element locators and optional waits. During execution, a driver script or engine interprets the mapped keywords sequentially, invoking the corresponding while handling any dependencies like object repositories for elements. This separation ensures that changes to the underlying implementation (e.g., updating a UI selector) only require modifying the mapping, without altering cases. Best practices for keyword creation emphasize and robustness to enhance . Reusability is achieved by designing keywords as independent, self-contained units that can be applied across multiple test scenarios, potentially reducing script duplication by up to 60%. Parameterization allows keywords to accept dynamic inputs, such as variables for usernames or URLs (e.g., login(username, [password](/page/Password))), enabling flexible adaptation to varying test data without rewriting the keyword itself. Error handling should be integrated within keywords, including try-catch blocks, validation checks, and mechanisms to gracefully manage failures like element not found exceptions, ensuring reliable execution and clear reporting. A typical keyword library structure organizes these elements in a tabular format for clarity and ease of maintenance, often using spreadsheets or framework-specific files. The following example illustrates a simple keyword library excerpt:
KeywordDescriptionParametersAssociated Code Snippet (Pseudocode)
openBrowserLaunches a instancebrowserType (e.g., )driver = new WebDriver(browserType); driver.get("");
enterTextInputs text into a specified fieldlocator, textValuedriver.findElement(locator).sendKeys(textValue);
clickButtonClicks on a elementlocatordriver.findElement(locator).();
loginPerforms complete workflowusername, passwordenterText(usernameField, username); enterText(passwordField, password); clickButton(loginBtn);

Test Case Structure

In keyword-driven testing, test cases are constructed in a structured, often tabular format to separate test logic from implementation details, enabling non-technical users to author and maintain them. Typically, these test cases are organized using spreadsheets like Excel sheets, where each row represents a test step and columns capture essential elements such as the keyword (action to perform), object locator (identifier for the UI element, e.g., or ), input data (parameters for the action), and expected result (verification criteria). Key components of a include the overall test scenario (a high-level description of the functionality being tested, such as user authentication), preconditions (initial setup actions like launching the application or navigating to a base ), postconditions (cleanup steps such as logging out or closing the browser), and the sequencing of keywords that define the step-by-step flow. This sequencing ensures linear execution unless modified by control structures, with each keyword invoking a predefined action from the keyword library. For handling complex cases, test cases incorporate control keywords to manage flow, such as "if" for conditional branching based on prior outcomes or "loop" (e.g., "FOR" in frameworks like ) for repeating sequences over datasets or iterations. These control keywords allow test cases to adapt to dynamic scenarios without embedding programming logic directly into the structure. A representative example is a for a , structured in a as follows:
StepKeywordObject LocatorDataExpected Result
1Open BrowserN/ABrowser window opens
2Navigate ToN/Ahttps://example.com/loginLogin page loads
3Input Textusername_field (ID)[email protected]Username field populated
4Input Textpassword_field (ID)password123Password field populated
5Clicklogin_button (XPath)N/AUser dashboard displays
6Verify Textwelcome_message (ID)Welcome, Test UserWelcome message matches
7Close BrowserN/AN/ABrowser closes
This sequence demonstrates how keywords form a cohesive, code-free test case that can be executed by a driver script interpreting the table row by row.

Implementation and Methodology

Building a Keyword Library

Building a keyword library involves creating a centralized of reusable keywords that represent specific actions or operations in the application under test, serving as the foundational building blocks for keyword-driven testing frameworks. This library enables testers to compose s by sequencing keywords without delving into underlying implementation details, promoting modularity and between test logic and execution. According to ISO/IEC/IEEE 29119-5 (2024 edition), keywords are defined by identifying sets of actions expected to occur frequently, ensuring they are named naturally and documented with parameters for clarity and reusability. The process of constructing a keyword library begins with identifying common actions through analysis of test requirements, exploratory testing, or consultation with domain experts to pinpoint reusable operations such as navigation, verification, or data manipulation. Next, developers create scripts or functions for each keyword, typically implementing low-level interactions with the in a programming language like or , while higher-level composite keywords combine these to form more abstract actions. Documentation follows, recording each keyword's name, description, parameters, expected outcomes, and usage examples in a structured format such as tables or resource files to facilitate understanding across teams. Finally, is integrated using tools like to track changes, manage dependencies, and enable rollback, ensuring the library evolves alongside the application. Organization of the keyword library emphasizes categorization to enhance accessibility and scalability, often grouping keywords by application module—such as (UI) elements like "click_button" or application programming interface () calls like "send_request"—or by layers like domain-specific versus test interface actions. Hierarchical structures, including base keywords for atomic operations and composite ones for sequences, support this organization to accommodate new keywords without disrupting existing structures. This modular approach, as seen in frameworks like , permits easy import of libraries via settings files, fostering extensibility for diverse testing needs. In practice, the library is stored externally, such as in resource files or databases, independent of specific test cases to maximize reuse. The 2024 edition of ISO/IEC/IEEE 29119-5 enhances library specifications with an initial list of generic technical keywords (e.g., "inputData", "checkValue") and emphasizes hierarchical keywords at various abstraction levels. Maintenance practices focus on keeping the library aligned with application evolution, involving regular reviews—such as monthly audits—to update keywords for changes or new features, deprecate obsolete ones by marking them with warnings or removing them after impact analysis, and enforce consistency through a dedicated or process. Cross-references track keyword usage across test cases, minimizing ripple effects from modifications, while continuous support requires allocated staff, budget, and training to handle ongoing refinements. In agile environments, this reduces overall maintenance effort by localizing changes to affected keywords rather than entire test suites. Challenges in library development include balancing abstraction levels, where overly low-level keywords increase complexity and high-level ones may lack precision, potentially leading to verbose test cases or implementation mismatches. Avoiding over-generalization is critical, as broad keywords like "select" can introduce redundancy or ambiguity if not scoped properly, complicating maintenance and requiring careful initial design to ensure uniqueness and specificity. Additionally, initial setup demands significant effort in identification and scripting, with risks of uncoordinated changes causing conflicts if version control and reviews are not rigorously applied.

Executing Tests

In keyword-driven testing, the execution process begins with a test execution engine or parser that reads the test case, typically structured as a table or sequence of keywords with associated parameters. This engine interprets the keywords by mapping them to predefined scripts or executable code stored in a keyword library, where each keyword corresponds to a specific action or function. The tests then proceed sequentially, invoking the mapped scripts in the order specified, which allows for modular and repeatable execution across different test scenarios. Results are logged throughout, capturing outcomes such as pass/fail status, timestamps, and execution durations for each keyword step. For automated execution, the framework integrates with drivers for web or interactions, where the bridge connects high-level keywords to low-level operations such as locating elements, handling inputs, and . This integration enables the execution of actions including with application responses, assertions to verify expected states (e.g., element presence or text matching), and reporting mechanisms that generate summaries or detailed logs in formats like or XML. The same keyword structure supports execution, where testers follow the sequence using a test assistant to perform and record steps without , though automated runs require a central driver script to orchestrate the flow and handle environment setup. Error handling occurs at the keyword level, where the execution engine detects exceptions such as unimplemented keywords, timeouts, or assertion failures, marking the affected step as blocked or failed while allowing continuation or cleanup via predefined exception handlers. Failures trigger detailed reporting, including error messages, stack traces, and screenshots if applicable, to facilitate and incident without halting unrelated test portions. This granular approach ensures and supports partial test completion even in the presence of isolated issues.

Advantages and Challenges

Benefits

Keyword-driven testing offers enhanced by allowing modifications to the underlying of a keyword in a centralized , which propagates across all associated test cases without requiring updates to individual scripts. This modularity reduces sensitivity to application changes, minimizing overall maintenance effort compared to monolithic scripts. Studies on evolving keyword-driven test suites have demonstrated potential reductions of approximately 70% in changes, further underscoring its efficiency in long-term upkeep. Reusability is a core strength, as keywords—defined as modular, generic components—can be applied across multiple test cases, projects, or even similar systems, promoting portability and reducing redundancy in test development. For instance, a keyword encapsulating a common action like "" can be reused in various scenarios, streamlining the creation of comprehensive test suites without duplicating effort. The approach enhances accessibility for non-programmers, such as business analysts or domain experts, by employing English-like keywords that abstract technical details, enabling them to author and edit test cases without requiring coding expertise. This lowers the barrier to participation in testing activities, allowing contributions from stakeholders who understand business requirements but lack programming skills. Improved collaboration arises from the readable, domain-oriented nature of keyword-driven test cases, which bridge the gap between technical testers and business-level experts by using terminology familiar to all parties for review and validation. Such clarity facilitates joint efforts in test design and ensures alignment on business correctness without necessitating deep technical knowledge from non-developers. Scalability is supported through efficient expansion of test suites, as new cases can be composed from an existing keyword library with minimal additional , leading to cost and schedule savings in both manual and automated contexts. This structure accommodates growing project needs without proportional increases in development or maintenance overhead.

Limitations

One significant limitation of keyword-driven testing is the high initial setup effort required to develop a comprehensive keyword library. Creating reusable, application-independent keywords demands substantial time and expertise, often delaying the of automated tests compared to simpler scripting approaches. This upfront can extend project timelines, especially for large-scale applications where extensive coverage is needed. To mitigate this, teams can prioritize developing a minimal viable library focused on core functionalities and leverage open-source tools for pre-built keywords, gradually scaling as benefits accrue. Another drawback is the performance overhead introduced by the interpretation layer in keyword-driven frameworks. The need to parse and map keywords to underlying scripts during execution can result in slower test runs compared to direct code execution, particularly for GUI-intensive tests where keyword failures trigger retries and timeouts. For instance, failing keywords may significantly prolong overall execution time unless optimized. Mitigation strategies include setting appropriate time limits for keywords and optimizing the framework's parsing efficiency through streamlined library design. Keyword-driven testing also exhibits limited flexibility for handling complex logic, such as highly conditional or dynamic scenarios, without developing keywords. This approach struggles with intricate decision trees or asynchronous behaviors, often requiring additional low-level scripting that undermines the framework's benefits. Poor handling of such cases can lead to brittle tests that fail unexpectedly during application evolution. To address this, practitioners can balance high-level and low-level keywords carefully, incorporating conditional logic within the library while avoiding over-ization. The quality of the keyword library heavily influences the framework's effectiveness, as poorly designed keywords—such as those with or tight to specific applications—can create ongoing challenges. Inadequate libraries amplify fragility, making tests prone to breakage from even minor software under test changes. This dependency often results in higher long-term costs if keywords lack . Mitigation involves enforcing design principles like reusability and independence during library creation, coupled with regular refactoring to ensure robustness. Finally, keyword-driven testing presents a for advanced customization, necessitating proficiency in scripting languages and framework integration for testers. Non-technical users may initially struggle with extending libraries or keyword mappings, limiting adoption in diverse teams. This barrier can slow progress, particularly in agile environments requiring rapid adaptations. To overcome it, organizations should provide targeted training on tool-specific scripting and encourage knowledge transfer from experienced architects.

Tools and Frameworks

Several popular tools and frameworks facilitate keyword-driven testing by providing built-in support for keyword libraries, intuitive interfaces for test creation, and features like detailed reporting and cross-platform execution, which are key criteria for tool selection in this methodology. is an open-source, Python-based framework that inherently employs a keyword-driven approach, using a tabular format to define tests with extensible keywords for web, mobile, and desktop applications. It emphasizes ease of keyword creation through user-defined libraries and offers rich reporting via outputs, logs, and screenshots, while supporting cross-platform testing on Windows, macOS, and . Micro Focus Unified Functional Testing (UFT), now part of , is a commercial tool that supports keyword-driven testing through its visual Keyword View, enabling users to build tests by dragging and dropping keywords without extensive scripting. It includes advanced features for keyword management, such as reusable function libraries, and provides comprehensive reporting with dashboards and integration options for pipelines, alongside support for testing , , , and applications across multiple platforms. Tricentis Tosca is a , model-based tool that incorporates keyword-driven testing with visual, reusable test modules and risk-based optimization. It supports codeless keyword creation for end-to-end testing across , , , and applications, featuring AI-assisted test design, detailed execution reports, and seamless integration for agile environments as of 2025. Selenium, an open-source framework primarily for web testing, is frequently adapted for keyword-driven testing by integrating with wrapper libraries or custom frameworks that abstract actions into reusable keywords, simplifying test maintenance for browser-based applications. This combination enhances keyword creation via predefined action words and supports reporting through plugins like Allure or ExtentReports, with cross-browser and cross-platform compatibility via drivers for , , and more. Other notable tools include , which offers built-in keyword support for web, API, mobile, and desktop testing, featuring a low-code interface for easy keyword development, , and broad platform coverage. by SmartBear provides keyword-driven testing via its drag-and-drop Keyword Tests, with strong extensibility, detailed execution reports, and support for multiple application types across platforms. , an open-source tool for mobile automation, extends keyword-driven capabilities through integrations with frameworks like , allowing keyword-based tests for and apps with reporting via external tools and cross-device support. TestRigor, an AI-powered codeless automation tool, enables keyword-driven testing using commands for web, mobile, and , with self-healing capabilities, built-in reporting, and support for cross-platform execution as of 2025.

Integration Examples

In , keyword-driven testing can be implemented by defining custom keywords that interact with web elements via the SeleniumLibrary. For instance, a keyword named "Verify " might encapsulate the process of entering credentials and asserting successful on a page. This keyword could be structured as follows, using arguments for username and password:
*** Keywords ***
Verify Login
    [Arguments]    ${username}    ${password}
    Input Text    id=username    ${username}
    Input Text    id=password    ${password}
    Click Button    id=login
    Page Should Contain    Welcome
    [Teardown]    Close Browser
To integrate this with web elements, the SeleniumLibrary is imported in the settings section, enabling actions like Input Text and Click Button on locators such as IDs or XPaths. A can then invoke this keyword within a , such as:
*** Test Cases ***
Valid Login Test
    Open Browser    http://example.com/login    chrome
    Verify Login    demo    mode
Running the suite with robot test_suite.robot executes the test, producing logs and reports that detail keyword execution and outcomes. For Selenium integration in a Java-based environment, a keyword-driven can be built using TestNG for test execution and management. The typically includes an object repository for locators, a keyword library class implementing actions like click or sendKeys, and an execution engine that maps Excel-based test steps to these methods. A Java keyword driver class, such as ActionKeywords, might define methods corresponding to keywords:
java
public class ActionKeywords {
    public void openBrowser(String browser) {
        if (browser.equals("firefox")) {
            driver = new [FirefoxDriver](/page/Firefox)();
        }
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    }
    
    public void inputUsername(String username) {
        driver.findElement(By.id("log")).sendKeys(username);
    }
    
    public void clickLogin() {
        driver.findElement(By.id("login")).click();
    }
}
The TestNG execution class reads test data from an Excel sheet (e.g., rows specifying "inputUsername" as the keyword and "testuser" as the value) and invokes the corresponding method via or a . Annotations like @Test in TestNG organize suites, allowing parallel execution and reporting. This setup automates a login flow by sequencing keywords like openBrowser, inputUsername, inputPassword, and clickLogin. In , keywords can handle calls using libraries like RequestsLibrary in , enabling declarative test scripts for endpoints. For example, a keyword for a request to create a might be defined as:
*** Keywords ***
Create User
    [Arguments]    ${user_data}
    [POST](/page/POST)    /users    ${user_data}
    Response Status Code Should Be    201
    Output    ${response.json()}
A integrates this by providing data, such as {"name": "John", "email": "[email protected]"}, and verifying the response. Similarly, a GET keyword like Retrieve User /users/1 Integer response body id 1 asserts specific values in the JSON response. These keywords abstract HTTP methods and validations, allowing suites to test full API workflows without scripting low-level details. While tools like Postman support scripting extensions via Newman CLI for keyword-like chaining in collections, 's tabular syntax provides native keyword support for interactions. Keyword-driven tests can integrate into pipelines using Jenkins, where suites are executed via plugins, and results are reported through Allure for visual dashboards. In Jenkins, the plugin schedules builds triggered by commits, running commands like robot --listener allure_robotframework:allure_results tests/. The allure-robotframework listener generates XML outputs during execution, which Allure merges into reports accessible post-build. For example, a Jenkins pipeline script might include stages for checkout, test execution (sh 'robot test_suite.robot'), and reporting (allure serve allure_results), providing metrics like pass/fail rates and step traces. This setup ensures automated with historical trend analysis in Allure. A real-world scenario involves an login test using hybrid keywords across and platforms in , leveraging SeleniumLibrary for and AppiumLibrary for . A shared keyword like "Login To " accepts a platform argument:
*** Keywords ***
Login To E-Commerce
    [Arguments]    ${platform}    ${username}    ${password}
    IF    '${platform}' == 'web'
        Open Browser    [https://shop.example.com/login](/page/HTTPS)    [chrome](/page/Chrome)
        SeleniumLibrary.Input Text    [id](/page/ID)=email    ${username}
    ELSE IF    '${platform}' == 'mobile'
        Open Application    [http://localhost:4723/wd/hub](/page/Localhost)    platformName=[Android](/page/Android)
        AppiumLibrary.Input Text    [id](/page/ID)=email    ${username}
    END
    Input Text    id=password    ${password}
    Click Element    id=login-button
    Page Should Contain Element    class=welcome-message
Test cases invoke this for cross-platform validation, such as Login To [E-Commerce](/page/E-commerce) web [email protected] pass123 followed by mobile execution, ensuring consistent behavior like secure and session handling in an online store. This hybrid approach reuses keywords while adapting locators for (e.g., CSS selectors) and (e.g., IDs).

Comparisons

With

Data-driven testing is an automation approach that separates test data from the underlying test scripts, enabling the execution of the same test logic with multiple sets of input values to validate functionality across varied scenarios. This method typically stores data in external files such as spreadsheets, CSV files, or databases, which the script reads to parameterize tests and reduce code duplication. By focusing on data variation rather than action definition, it supports exhaustive validation of inputs, such as testing form submissions with diverse user details. In contrast to keyword-driven testing, which abstracts reusable actions through predefined keywords to promote modularity and accessibility for non-technical users, data-driven testing prioritizes the parameterization of inputs to cover edge cases and boundary conditions within a fixed script structure. For instance, keyword-driven testing might define a login action via keywords like "Enter Username" and "Click Submit," executed once per test case, whereas data-driven testing applies the same login script to numerous credential sets sourced from a CSV file to simulate different users. This distinction highlights keyword-driven testing's emphasis on action reusability across diverse scenarios, while data-driven testing excels in scenarios requiring broad input coverage without altering the core logic. Keyword-driven testing is particularly suitable for building maintainable test suites where actions need to be shared and adapted across multiple test flows, such as workflows involving search, add-to-cart, and checkout steps. , however, is ideal for applications demanding rigorous validation of data-dependent behaviors, like financial systems processing varied transaction amounts or user registrations with international formats. Selecting between them depends on project needs: keyword-driven for in complex, action-heavy environments, and data-driven for efficiency in data-intensive validations. Hybrid approaches integrate both methodologies to leverage their strengths, such as using keyword-driven structures to define actions while incorporating data-driven elements like external data tables for parameterization, resulting in more comprehensive and flexible test suites. For example, a login test could employ keywords for the action sequence but iterate over multiple user credentials from a to test under various conditions, enhancing coverage without redundant scripting. This combination is increasingly adopted in agile teams to balance reusability with thorough input testing.

With Script-Based Testing

Script-based testing, also known as linear or programmable scripting, involves directly coding test procedures in programming languages such as , , or C#, where testers write line-by-line logic to simulate user interactions, verify conditions, and handle exceptions. This approach provides full programmatic control, allowing for complex conditional statements, loops, and custom functions tailored to specific application behaviors. In contrast, keyword-driven testing abstracts the underlying into reusable keywords that represent high-level actions, such as "" or "navigate," stored in tables or external files and interpreted by a driver script. The key differences lie in and : script-based testing requires programming expertise for and , offering precise control but resulting in verbose, application-specific that is less for non-technical stakeholders. Keyword-driven testing enhances and enables domain experts to contribute to test design without coding, though it relies on a predefined keyword that must map accurately to scripted implementations. Trade-offs between the two highlight maintenance priorities: keyword-driven testing reduces scripting overhead by promoting reusability across tests, lowering long-term costs, but introduces interpretation overhead from the driver layer. Script-based testing accelerates for , one-off tests due to its directness but becomes brittle to UI changes, demanding frequent code rewrites and increasing fragility in evolving applications. For scalability, keyword-driven methods better support large test suites by test logic from details. Migration from script-based to keyword-driven testing often involves refactoring existing scripts into modular functions that serve as keywords, enabling gradual adoption for better scalability in enterprise environments. This process typically starts by identifying common patterns in scripts, extracting them into a , and replacing direct calls with keyword references, which can reduce redundancy and improve team collaboration over time. A representative example is a test flow. In script-based testing, the procedure might be hardcoded as follows in using :
python
from selenium import webdriver
driver = webdriver.[Chrome](/page/Chrome)()
driver.get("[https](/page/HTTPS)://example.com/[login](/page/Login)")
driver.find_element("id", "username").send_keys("user")
driver.find_element("id", "password").send_keys("pass")
driver.find_element("id", "submit").click()
assert "Welcome" in driver.page_source
driver.quit()
This embeds all logic inline, making modifications UI-dependent. Conversely, keyword-driven testing represents the same flow in a tabular format, such as:
ObjectKeywordValue
LoginPageEnterusername, user
LoginPageEnterpassword, pass
LoginButton
WelcomePageVerifytext, Welcome
The driver interprets these keywords by calling corresponding functions from the library, promoting reusability for other tests.

References

  1. [1]
    keyword-driven testing - ISTQB Glossary
    A scripting technique in which test scripts contain high-level keywords and supporting files that contain low-level scripts that implement those keywords.
  2. [2]
    Keyword‑driven testing: Definition, workflow & benefits - Tricentis
    Aug 13, 2025 · Keyword-driven testing is a method in which test cases are constructed using high-level keywords that represent user actions. Each keyword ...
  3. [3]
    Keyword Driven Testing in Software Testing - GeeksforGeeks
    Jul 23, 2025 · Keyword-driven testing is a functional automation technique using a table format to define keywords for each testing step, providing a ...
  4. [4]
    What is Keyword Driven Testing: A Detailed Tutorial With Examples
    Keyword driven testing is one of such software testing methodologies that involves describing test cases using a predefined set of keywords.
  5. [5]
  6. [6]
    Introduction to Keyword Driven Testing - Qualitest
    Feb 25, 2021 · KDT is the next generation test automation approach that separates the task of automated test case implementation from the automation infrastructure.
  7. [7]
    (PDF) A Keyword Driven Framework for Testing Web Applications
    Aug 6, 2025 · The goal of this paper is to explore the use of Keyword driven testing for automated testing of web application. In Keyword driven testing, ...Missing: emergence | Show results with:emergence
  8. [8]
    [PDF] Experiences of Test Automation - Pearsoncmg.com
    They developed what they call command-driven testing, which is based on a form of keyword-driven testing and worked well for them. This case study takes ...<|separator|>
  9. [9]
    Keyword-Driven Test Automation: An Interview with Hans Buwalda
    Mar 28, 2014 · In this interview, Hans talks about using keywords effectively, tests that have too many details, and the changing testing industry. Hans ...
  10. [10]
    [PDF] Architectures of Test Automation
    Aug 13, 2000 · (1996) “Automated testing with Action Words, Abandoning Record & Playback”; Buwalda,. H. (1998) “Automated testing with Action Words”, STAR ...
  11. [11]
    [PDF] Managing the Test Execution Process - Software Testing Courses
    Action Based Testing. Originated by Hans Buwalda in 1994. See Integrated Test Design and Automation Using the TestFrame Method. By Hans Buwalda, Dennis Janssen ...
  12. [12]
    QTP/UFT Version History
    Mar 15, 2016 · QuickTest Professional 8.0 was released in late 2004. The major new features added in this version were: * Unicode Support * Keyword View * ...
  13. [13]
    Robot Framework: Past, Present and Future - Eficode.com
    Jun 20, 2016 · So, after the legal fine-tuning was out of the way, Robot Framework 2.0 was released as open source, in 2008. Nowadays Robot Framework has ...
  14. [14]
    (PDF) Agile Testing Concepts Based on Keyword-driven Testing for ...
    This paper presents an agile and keyword-driven test approach with focus on testing implementations based on both important industrial standards and illustrates ...
  15. [15]
    [PDF] Adopting Keyword-driven Testing Framework into Jenkins ...
    The framework is integrated with existing Jenkins Continuous Integration tool in the case study. Based on our experience in the integration, the selected KDT ...<|separator|>
  16. [16]
    (PDF) Future of Software Test Automation Using AI/ML - ResearchGate
    Aug 9, 2025 · Quantitative comparisons between traditional and AI/ML-driven testing approaches reveal substantial improvements in test efficiency, coverage, ...
  17. [17]
    Keyword Driven Framework for Selenium - BrowserStack
    Advantages And Disadvantages of Keyword Driven Testing Framework ; Advantages, Disadvantages ; Code Reusability, Keyword Management ; Platform independent Test ...What is Keyword Driven... · Why perform Keyword Driven... · Advantages And...
  18. [18]
    Keyword Driven Testing (KDT): Ultimate Guide + Best Tools
    Rating 4.7 (28) Sep 12, 2025 · Keyword-driven testing (KDT) is a testing approach that separates what your tests do from how they're implemented.
  19. [19]
    How to Use Keyword Driven Testing - Ranorex
    Oct 20, 2022 · 1. Identify Low- and High-Level Keywords · 2. Implement the Keywords · 3. Create Test Cases · 4. Create a Driver Script · 5. Execute Automation Test ...1. Identify Low- And... · 5. Execute Automation Test... · Benefits Of Keyword-Driven...
  20. [20]
    How To Build a Keyword-driven Framework in Selenium?
    Aug 7, 2025 · Keyword-driven framework is a framework where test scripts are composed of sequences of keywords. These keywords are code snippets for actions in the system.
  21. [21]
    Data-Driven and Keyword-Driven Framework [Must Know Guide]
    Oct 3, 2022 · Here's simple but descriptive guide on Data-Driven and Keyword-Driven Framework with Challenges, Benefits and guide to create framework.
  22. [22]
    Robot Framework
    Robot Framework 7.0.1 is out! Robot Framework 7.0.1 is out—fixing regressions, bugs from earlier release & introduces Japanese localization.✨Note: Two ...User Guide · BuiltIn · Robot framework · Guides
  23. [23]
    ISO/IEC/IEEE 29119-5:2016 - Keyword-Driven Testing
    This standard is applicable to all those who want to create keyword-driven test specifications, create corresponding frameworks, or build test automation based ...Missing: library | Show results with:library
  24. [24]
    [PDF] ISO/IEC/IEEE 29119-5, Software and systems engineering
    Nov 15, 2016 · The fundamental idea in Keyword-Driven Testing is to provide a set of "building blocks", referred to as keywords, that can be used to create ...
  25. [25]
    Robot Framework User Guide
    Robot Framework is a Python-based, extensible keyword-driven automation framework for acceptance testing, acceptance test driven development (ATDD), behavior ...Missing: challenges | Show results with:challenges
  26. [26]
    [PDF] Exploring a keyword driven testing framework - DiVA portal
    Mar 27, 2017 · Keyword-driven testing describes how modular and maintainable test cases may be designed and implemented and automated. The remainder of the ISO ...Missing: seminal | Show results with:seminal
  27. [27]
    An In-Depth Review of Test Automation Frameworks: Types and ...
    Oct 10, 2023 · This paper presents a comprehensive guide to the different types and trade-offs of test automation frameworks, equipping software professionals with the ...
  28. [28]
    (PDF) A Study of Automated Software Testing: Automation Tools and ...
    Dec 31, 2019 · This article presents a comprehensive study of test automation tools and frameworks. Firstly, automated testing and their categories are explained.
  29. [29]
    [PDF] A Keyword Driven Framework for Testing Web Applications
    Today, keyword-driven testing is getting more popular. It is a technique that separates much of the programming work from the actual test steps so that the ...Missing: emergence | Show results with:emergence
  30. [30]
    29119-5-2024 - ISO/IEC/IEEE International Standard Software and ...
    Dec 19, 2024 · This standard defines requirements on frameworks for Keyword-Driven Testing to enable test engineers to share their test artefacts, such as test ...Missing: advantages | Show results with:advantages
  31. [31]
    Achieving test automation with testers without coding skills
    Such automated test steps represent user actions in the system under test and specified by a natural language which is understandable by a non-technical person.
  32. [32]
    [PDF] Comparative Study of Software Test Automation Frameworks
    Nov 11, 2019 · The benefits and limitation of the three generation of testing framework: record/playback, modular, data driven, and keyword driven framework ...<|control11|><|separator|>
  33. [33]
    [PDF] Model-Based Testing with a General Purpose Keyword-Driven Test ...
    The state of the art test automation, the keyword-driven testing process, abstracts ... The failing GUI keywords slow down the keyword execution, but the ...
  34. [34]
    [PDF] On the Evolution of Keyword-Driven Test Suites - Mike Papadakis
    These tests are generated manually and, typically, designed as a set of usage scenarios describing the manual steps to be performed [2]. In the context of agile ...
  35. [35]
    Popular Test Automation Frameworks - The 2025 Guide - Testlio
    Feb 11, 2025 · This framework is widely used in tools like Katalon Studio, which offers a built-in keyword-driven approach, and Robot Framework, which supports ...
  36. [36]
    10 Best Tools for Automated Testing in 2025 - TestDevLab
    Mar 21, 2025 · Robot Framework is an open-source, keyword-driven automation framework. It's known for its flexibility and extensibility, allowing users to ...
  37. [37]
    Create a keyword-driven GUI test - ADM Help Centers
    Jun 5, 2025 · This task describes how to create a test using the keyword-driven methodology. After creating your test, run it to test your application and ...Missing: Micro Focus
  38. [38]
    UFT Test Automation: Key Benefits, Features and Pricing - Devonblog
    Jun 16, 2025 · UFT offers record-and-playback and keyword-driven testing, making it easy for non-programmers or manual testers to start automating tests. 2 ...
  39. [39]
    Selenium - Keyword Driven Framework - Tutorials Point
    A keyword driven framework uses reusable keywords and actions to automate test cases, hiding implementation logic and technical details.
  40. [40]
    Methodologies | Katalon
    Keyword-Driven Testing. Prebuilt with hundreds of keywords that cover all web, API, mobile, and desktop testing. · Page Object Model Testing. Support building ...
  41. [41]
    Keyword-Driven Testing | Scriptless Test Automation | TestComplete
    Keyword-driven testing is an approach to software testing that separates test case design from execution. Each automated UI test is built on a series of ...Missing: definition | Show results with:definition
  42. [42]
  43. [43]
  44. [44]
    Steps to Set up Keyword Driven Framework - Tools QA
    Nov 12, 2021 · Steps to Set up Keyword Driven Framework ; STEP 1: Automate an End 2 End flow ; STEP 2: Identify & Implement Action Keywords ; STEP 3: Set Up Data ...
  45. [45]
    REST API testing with Robot framework - IWConnect
    Nov 14, 2018 · It has easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach. ... The first Robot Framework API testing example ...
  46. [46]
    Robot Framework - Allure Report Docs
    Learn how to integrate Allure with Robot Framework tests to generate rich, interactive test reports. Follow step-by-step setup, test execution, ...
  47. [47]
    Robot Test Framework for Mobile Test Automation - Kobiton
    Jul 27, 2021 · Discover how Robot Framework streamlines mobile test automation with keyword-driven scripts, cross-platform support, and easy integration.
  48. [48]
    Data-Driven Testing vs. Keyword-Driven Testing - Xray Blog
    Mar 20, 2025 · Keyword-driven testing takes a more modular approach by defining test steps as keywords or actions, making it easier for non-technical testers ...
  49. [49]
    What is difference between Keyword Driven and Data Driven Testing?
    Keyword driven testing is more focused on defining the actions to be performed, while data-driven testing is more focused on defining the test data and ...
  50. [50]
    Difference between Data Driven Testing and Keyword Driven Testing
    Jul 23, 2025 · Both Data Driven Testing and Keyword Driven Testing are great for automating software testing, but they are used for different purposes.<|control11|><|separator|>
  51. [51]
    Data Driven vs Keyword Driven Frameworks for Test Automation
    Mar 24, 2020 · Keyword Driven Framework: In keyword driven frameworks, the test logic is divided into keywords and functions. A sequence of keywords is used to ...
  52. [52]
    [PDF] Automated Software Testing Frameworks: A Review
    The main benefit of keyword-driven frameworks is that it reduces the overall cost of test scripts maintenance because of the high level of abstraction. Moreover ...
  53. [53]
    [PDF] Test Automation and Keyword-driven testing - cs.aau.dk
    Test Automation and. Keyword-driven testing. Brian Nielsen, bnielsen@cs.aau.dk. Page 2. 3 Script Based Testing. 3. Script-Based Testing. +/- test impl. = ...
  54. [54]
    QTP - Keyword Driven and Linear Framework - Software Testing Help
    May 9, 2025 · Data Driven Framework is one of the most popular Automation Testing Frameworks in the current market. Data Driven automated testing is a method ...Test Automation Frameworks · Linear Framework · Keyword-Driven Framework