Difference between Keyword-driven testing and Data-driven testing
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.
2.Advantages and disadvantages of Keyword-driven testing
Advantage:
- 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.
Disadvantage:
- 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 Tips for Effective Test Data Management
- What is Test Data? Why is Data-driven testing necessary?
- Behavior Driven Testing in Automated testing
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.- 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.