Keyword-driven testing
From Wikipedia, the free encyclopedia
Keyword-driven testing is a Software testing technique that separates much of the programming work from the actual test steps so that the test steps can be developed earlier and can often be maintained with only minor updates, even when the application or testing needs change significantly.
The Keyword-Driven or Table-Driven Testing Framework Keyword-driven testing and table-driven testing are interchangeable terms that refer to an application-independent automation framework. This framework requires the development of data tables and keywords, independent of the test automation tool used to execute them and the test script code that "drives" the application-under-test and the data. Keyword-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.
If we were to map out the actions we perform with the mouse when we test our Windows Calculator functions by hand, we could create the following table. The "Window" column contains the name of the application window where we're performing the mouse action (in this case, they all happen to be in the Calculator window). The "Control" column names the type of control the mouse is clicking. The "Action" column lists the action taken with the mouse (or by the tester). And the "Arguments" column names a specific control (1, 2, 3, 5, +, -, and so on).
[edit] Methodology
The keyword-driven testing methodology divides test creation into two stages:
-
- Planning Stage
-
- Analyzing the application and determining which objects and operations are used by the set of business processes that need to be tested.
-
- Determining which operations require customized keywords to provide additional functionality, to achieve business-level clarity, and/or to maximize efficiency and maintainability.
-
- Implementation Stage
-
- Building the object repository and ensuring that all objects have clear names that follow any predetermined naming conventions.
-
- Developing and documenting business-level keywords in function libraries. Creating function libraries involves developing customized functions for the application that needs to be tested.
Although this methodology requires more planning and a longer initial time-investment than going directly to the test creation stage and recording your steps, this methodology makes the test creation and test maintenance stages more efficient and keeps the structure of individual tests more readable and easier to modify.