The process in which the test cases are separated into four parts in order to differentiate coding from test cases and test steps for better automation are called keyword-driven frameworks. Segregated by a keyboard-driven testing framework, the test cases are divided into objects of test steps, data for test objects, test steps, and actions on test steps for better comprehension.
What is Keyword Driven Testing?
A scripting technique that involves data files to hold the keywords related to the application being tested is keyboard-driven testing. With the help of these keywords, we can describe the set of actions that have to perform a specific step. High and low-level keywords are included in a keyword revision test and they also comprise keyword arguments that are made up to describe the action of a test case, this process is called table-driven testing or action word-based testing. The initial step of keyword-driven testing would be to identify a group of keywords and then link a function or an action related to these keywords. Each and every testing action could be either opening or closing of the browser, or even a mouse click is described as a keyword such as an open browser click, etc.
What do you need for a keyword-driven framework?
End-to-End Testing on real iOS, Android Devices & Browsers
- Excel Sheet– Identify the keywords and store in an Excel sheet.
- Data Sheets– The test data used in the application is stored in data sheets.
- Function Library– The functions of particular business flows is what a function library comprises of. Hence whenever a test is being performed it will read the keyword from Excel sheet. Then, the functions will be carried out accordingly.
- Test Scripts– We can have test scripts for every manual test case or a single driver script depending upon the design of the framework.
- Object Repository– An object repository is used based on the keyword driven framework being used.
Why use Keyword Driven Testing?
Keyword-driven testing is used in software engineering for the following reasons:
- The components that are common well handled by a standard library
- The amount of reusability is much higher
- With the help of keyword driven testing, a more abstract manner can be adopted in the way of writing tests.
- It is not necessary for the users to use the scripting languages.
- The script detail is not visible to the users.
- Hence the test is not only concise but it is also flexible as well as easily maintainable.
How to perform Keyword Driven Testing?
Usually, keyword-based testing is done with automated testing. But it can also be done manually as well as automated.
The main reasons why automated keyword-based testing is preferred are:
- Avoid duplicated specifications.
- Reduces maintenance cost.
- Portability and testing support is way better than manual testing.
- More amount of testing can be done with lesser effort.
- Function scripting can be reused efficiently.
Recording tests is the best way to compose keyword-driven testing. Once the test is done, you can modify and fix them if required. In the earlier stages of development, you can create a very simple functional test. It requires the help of keyboard revision testing which can help you in testing the application piece by piece.
Every keyword is linked with one command if not many or test scripts or functions. This carries forward the actions that are related to that keyword. A test automation framework ie is when the test cases are executed and these keywords are comprehended by a test library.
There are a few tools that I have been used widely in keyword-driven testing are HP QTP and Selenium.
There are a lot of benefits of Keyword Driven Testing; like how programming knowledge is not required to develop tests. And before the application is ready, functional testing can help prepare the final testing sequence. They are also compatible with any automation tools that are available in the market and are not dependent on any particular programming language or tool.
The most important steps included in keyword-driven testing are –
Step 1. Identifying both low-level and high-level keywords.
Step 2. Putting into effect the keywords as they can be implemented.
Step 3. Test case creation.
Step 4. Driver scripts creation.
Step 5. Automation test scripts have to be executed.