Keyword-driven testing

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Keyword-driven testing, also known as table-driven testing or action-word testing, is a software testing methodology for automated testing that separates the test creation process into two distinct stages: a Planning Stage, and an Implementation Stage.

Contents

[edit] Overview

Although keyword testing can be used for manual testing, it is a technique particularly well suited to automated testing[1]. The advantages for automated tests are the reusability and therefore ease of maintenance of tests that have been created at a high level of abstraction.

[edit] Methodology

The keyword-driven testing methodology divides test creation into two stages:-

  • Planning Stage
  • Implementation Stage

[edit] Definition

A keyword in it's simplest form is a aggregation of one or more atomic test steps.

[edit] Planning Stage

[edit] Examples of keywords*

  • A simple keyword (one action on one object), e.g. entering a username into a textfield.
Object Action Data
Textfield (username) Enter text <username>
  • A more complex keyword (a combination of test steps into a meaningful unit), e.g. logging in.
Object Action Data
Textfield (domain) Enter text <domain>
Textfield (username) Enter text <username>
Textfield (password) Enter text <password>
Button (login) Click One left click

[edit] Implementation Stage

The implementation stage differs depending on the tool or framework. Often, automation engineers implement a framework that provides keywords like “check” and “enter” [1]. Testers or test designers (who don’t have to know how to program) write test cases based on the keywords defined in the planning stage that have been implemented by the engineers. The test is executed using a driver that reads the keywords and executes the corresponding code.

Other methodologies use an all-in-one implementation stage. Instead of separating the tasks of test design and test engineering, the test design is the test automation. Keywords, such as “edit” or “check” are created using tools in which the necessary code has already been written. This removes the necessity for extra engineers in the test process, because the implementation for the keywords is already a part of the tool. Tools such as GUIdancer and QTP

[edit] Pros

  1. Maintenance is low in the long run:
    1. Test cases are concise
    2. Test cases are readable for the stake holders
    3. Test cases easy to modify
    4. New test cases can reuse existing keywords more easily
  2. Keyword re-use across multiple test cases
  3. Not dependent on a specific tool or programming language
  4. Division of Labor
    1. Test case construction needs stronger domain expertise - lesser tool / programming skills
    2. Keyword implementation requires stronger tool/programming skill - with relatively lower domain skill
  5. Abstraction of Layers

[edit] Cons

  1. Longer Time to Market (as compared to manual testing or record and replay technique)
  2. Moderately high learning curve initially

[edit] See also

[edit] References

  1. ^ a b [1], Danny R. Faught, Keyword-Driven Testing, Sticky Minds

[edit] External links

  1. Hans Buwalda, success factors for keyword driven testing.
  2. SAFS (Software Automation Framework Support)
  3. Test automation frameworks
  4. Automation Framework - gFast: generic Framework for Automated Software Testing - QTP Framework
  5. Robot Framework Open Source Test Automation Framework
Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages