Keyword-Driven Testing

from Wikipedia, the free encyclopedia

Keyword-driven testing ( also table-driven testing, action-word testing) is a technique of automatic software testing .

Characteristic

Although keyword-driven testing can be used for manual testing , it is more suitable for automatic testing . The high level of abstraction of such keyword-driven tests improves the reusability and maintainability of automatic tests.

method

In keyword-driven testing, the test creation usually takes place in two stages.

planning

First, the actions or operations to be tested in the application (or in the requirements for the application) are analyzed. Recurring actions and processes are encapsulated in keywords (key words).

Examples of keywords

  • A simple keyword (an action on an object), e.g. B. Entering a user name in a text field.
object action Data
Text field (username) insert text <User name>
  • A more complex keyword (compiled from other keywords) e.g. B. Login.
object action Data
Text field (domain) insert text <domains>
Text field (username) insert text <User name>
Text field (password) insert text <password>
Button (login) click Click once with the left mouse button

implementation

The implementation differs depending on which tool or framework is used. Often times, test developers need to implement a framework to provide keywords such as "review" or "enter". A well-known open source framework is the Framework for Integrated Test . A tester with no programming knowledge can then create test cases according to the planning using these pre-coded keywords. The resulting test is carried out by a robot. The robot reads the keywords and executes the corresponding lines of code.

Other approaches do not separate test design and keyword implementation. There is only one step to implementation here - the test design is also the test automation. Keywords such as “check” or “enter” are created using ready-made modules in which the necessary code for the keywords is already available. This eliminates the need for additional technical specialists for programming in the test process. Tools such as GUIdancer and Worksoft Certify or the Robot Framework use this approach . The open source tool Selenium provides ready-made keywords for testing web applications that can be compiled into test cases in HTML tables. On it counts u. a. the free Firefox plug-in Molybdenum, which enables the combination of individual "commands" into parameterizable test modules.

advantages

With keyword-driven testing, the effort seems higher at the beginning than with recorded scripts. However, careful planning pays off in subsequent test creation and maintenance. Keyword-driven testing promotes a stable and clear test structure. The more abstract the keywords, the easier it is to reuse them. This reduces maintenance work. The modular structure of a keyword-driven test also allows new tests to be easily created using existing keywords.

Another advantage is that no technical knowledge is required. In the first approach, only the keyword developers must be able to program. In the second approach, this requirement is even eliminated. This means that tests can be automated without any programming knowledge.

Individual evidence

  1. a b Danny R. Faught: keyword-driven testing, Sticky Minds.

literature

  • Richard Seidl , Manfred Baumgartner, Thomas Bucsics: Basic knowledge of test automation - concepts, methods and techniques . 1st edition. dpunkt.verlag, 2011, ISBN 978-3-89864-724-3 .

Web links