- Keyword-driven testing
Overview
Keyword-driven testing (also: table-driven testing, action-word testing) is a
software testing methodology. Although keyword testing can be used formanual testing , it is a technique particularly well suited toautomated testing [ [http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectType=COL&ObjectId=8186] , Danny R. Faught, Keyword-Driven Testing, Sticky Minds] . 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: the Planning Stage, and the Implementation Stage.
Planning Stage
Examples of keywords
* A simple keyword (one action on one object), e.g. entering a username into a textfield.
* A more complex keyword (a combination of other keywords in a meaningful unit), e.g. logging in.
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” [ [http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectType=COL&ObjectId=8186] , Danny R. Faught, Keyword-Driven Testing, Sticky Minds] . 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 “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 andWorksoft Certify use this approach.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.
ee also
*
Data-driven testing
*Test Automation Framework
*Test-Driven Development References
External links
* [http://www.logigear.com/newsletter/key_success_factors_for_keyword_driven_testing.asp Hans Buwalda] , success factors for keyword driven testing.
* [http://safsdev.sourceforge.net/DataDrivenTestAutomationFrameworks.htm Test automation frameworks]
Wikimedia Foundation. 2010.