Keyword-driven testing
Encyclopedia
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.
, 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.
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
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
and QTP
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 testingManual 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
- Maintenance is low in the long run:
- Test cases are concise
- Test cases are readable for the stake holders
- Test cases easy to modify
- New test cases can reuse existing keywords more easily
- Keyword re-use across multiple test cases
- Not dependent on a specific tool or programming language
- Division of Labor
- Test case construction needs stronger domain expertise - lesser tool / programming skills
- Keyword implementation requires stronger tool/programming skill - with relatively lower domain skill
- Abstraction of Layers
Cons
- Longer Time to Market (as compared to manual testing or record and replay technique)
- Moderately high learning curve initially
See also
- Data-driven testingData-driven testingData-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 FrameworkTest automation frameworkA 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 DevelopmentTest-driven developmentTest-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...
- TestCompleteTestCompleteTestComplete 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...