Keyword-driven testing
Encyclopedia
Keyword-driven testing, also known as table-driven testing or action-word testing, is a software testing
Software testing
Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test. Software testing can also provide an objective, independent view of the software to allow the business to appreciate and understand the risks of software...

 methodology for automated testing that separates the test creation process into two distinct stages: a Planning Stage, and an Implementation Stage.

Overview

Although keyword testing can be used for manual testing
Manual testing
Manual testing is the process of manually testing software for defects. It requires a tester to play the role of an end user, and use most of all features of the application to ensure correct behavior...

, it is a technique particularly well suited to automated testing. 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.

Methodology

The keyword-driven testing methodology divides test creation into two stages:-
  • Planning Stage
  • Implementation Stage

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

  • A more complex keyword (a combination of keywords into a meaningful unit), e.g. logging in.

Object Action Data
Textfield (domain) Enter text
Textfield (username) Enter text
Textfield (password) Enter text
Button (login) Click One left click

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” . Testers or test designers (who don’t have to know how to program) write test case
Test case
A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system is working correctly or not. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test...

s 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
GUIdancer
GUIdancer is an Eclipse-based automated GUI test-tool from Bredex GmbH which runs as a standalone application or as an Eclipse Plugin.GUIdancer is different from other GUI test-tools because automated tests can be written before the application under test is ready...

 and QTP

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

Cons

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

See also

  • Data-driven testing
    Data-driven testing
    Data-driven testing is a term used in the testing of computer software to describe testing done using a table of conditions directly as test inputs and verifiable outputs as well as the process where test environment settings and control are not hard-coded...

  • Test Automation Framework
    Test automation framework
    A test automation framework is a set of assumptions, concepts and tools that provide support for automated software testing. The main advantage of such a framework is the low cost for maintenance. If there is change to any test case then only the test case file needs to be updated and the Driver...

  • Test-Driven Development
    Test-driven development
    Test-driven development is a software development process that relies on the repetition of a very short development cycle: first the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new...

  • TestComplete
    TestComplete
    TestComplete is an automated testing tool, developed by SmartBear Software which aims to allow testers to create software quality tests. Tests can be recorded, manually scripted or created manually with keyword operations and used for automated playback and error logging.TestComplete is used for...


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
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK