1.What is keyword driven testing?
According to ISO/IEC/IEEE 29119-5: Keyword-Driven Testing is a way of describing test cases by using a predefined set of Keywords. These Keywords are names which are associated with a set of actions that are required to perform a specific step in a test case. By using keywords to describe test steps instead of natural language, test cases can be easier to understand, to maintain and to automate.
Keyword driven testing divides the test case creation process into two stages: The first stage is Design and Development stage, and the second stage is Implementation stage.
- Design and Development stage: In the first stage, the set of actions that would denote each keyword is designed. This means that all the actions that need to be taken under a single keyword are sequentially identified and laid down.
- Implementation stage: In this stage, the final execution can be either manual or automated or a combination of the two, depending on the situation. These commands are executed in a set and precise order which is determined in the first stage.
eyword driven testing (also known as table-driven testing or action keyword based testing) can be applied for both manual and automated testing. By using this technique, the test designer doesn’t have to know how to program or need any knowledge of test tool. Basically, this method provides a comprehensive set of Keywords which is used to create test cases.
In keyword driven testing, every keyword describes a testing action such as keystrokes, mouse click,... A keyword symbolizes a function and is defined as a set of actions that must be executed on a test object. A keyword-driven test consists of high and low-level keywords, including the keyword arguments, which is composed to describe the action of a test case.
2.Advantages and disadvantages of Keyword-driven testing
- One of the advantages of Keyword driven testing is that it helps reduce the sensitivity associated with maintenance caused by System/Software Under Test (SUT).
- Test cases are concise, understandable and easy to modify.
- Keyword driven testing has a high level of reusability because the keyword defines an entire sequence of operations that need to be performed, a single keyword is enough to chart the whole course. This means that new test cases can reuse the existing keywords more easily.
- Keyword driven testing can be performed without programming knowledge.
- Due to the keywords have been already defined as a set of actions that need to be taken, the test can be performed by almost anyone.
- Keyword driven testing allows you to perform test automation in the earlier stages of software development lifecycle even before an application is delivered for testing. This not only makes it cheaper and easier to fix the bugs at the early stages but also save your precious time.
- Developing the keywords and its related functionalities is a time-consuming process.
- It might act as a restriction to the technically abled testers. It happens if the keywords prevent the testers from making use of their technical knowledge and years of experience while driving the test.
3. What is the difference between Keyword-driven testing and Data-driven testing?
In automated testing, to get larger test coverage in test automation, you can perform tests with different input of data. The basic working of Data-driven testing is that you run your test with different set of input data to ensure that with different various values, the application will perform as expected. In this method, you use data as inputs to your script actions. Each data set you have in the script, provides a test case. So the more data sets you provide, the more test cases you have.
On the other hand, the basic working of Keyword driven testing is that you use a keyword to represent an action. A sequence of keywords drives a script. So you can use the same set of keywords to build a variety of test scripts.
- Ex: Making appointment Function
- Ex: In this test case, all the keywords are specified and each keyword will have a description for ease of understanding.
The table below illustrates how keyword excel sheet would look like: