Keyword-driven testing

From Wikipedia, the free encyclopedia


Contents

[edit] Overview

Keyword-driven testing (also: table-driven testing, action-word testing) is a software testing methodology. 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 which have been created at a high level of abstraction.

[edit] Methodology

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

[edit] Planning Stage

In this stage, the application (or the requirements for the application) is analyzed to determine which operations and objects will need to be tested. For example, a web-questionnaire application will require a large amount of text entries. By identifying which operations should be encapsulated into keywords, the efficiency and maintainability of the tests are maximized.

[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 other keywords in a meaningful unit), e.g. logging in.
Object Action Data
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 used. Often, automation engineers implement a framework that provides keywords like “check” and “enter” [2]. 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, which have been implemented by the engineers. The test is executed using a driver which 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 “enter” 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 Worksoft Certify use this approach.

[edit] Benefits

Although this methodology requires more planning and a longer initial time-investment than going directly to the test creation stage and recording a test, it does make the test creation and test maintenance stages more efficient and keeps the structure of individual tests more readable and easier to modify. The more abstract keywords are, the more reusable they are, and therefore the easier a test is to maintain. As well as reducing the cost and time spent maintaining and updating tests, the modular structure of keyword-driven testing means that new tests can easily be created from pre-existing modules.

Another advantage is the reduction in technical know-how required for the test automation process. In the first approach, technical know-how is only required by the engineers that implement the keywords. In the second approach, even this is not required, which means that the test team is capable of entirely automating tests, even without programming knowledge.

[edit] References

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

[edit] External links

Languages