Keyword-driven testing methodology. Part 1
Automation testing is a topic that is under constant discussion and improvement. The IT industry often tries to find more and more ways to make automation more effective and applicable, though more efforts should be made to fit the QA process; this is where keyword-driven testing (KDT) excels.
KDT, also known as table-driven testing or action word based testing, is a software testing methodology suitable for both manual and automated testing. This method separates the documentation of test cases – including the data to use – from the prescription of the way the test cases are executed.
As a result, it separates the test creation process into two distinct stages: a design and development stage, and an execution stage. This approach is particularly attractive for automation testers without more advanced programming skills.
Also, the analysis and integration of very similar tests with keywords reduces the amount of code required in automated tests. Thus, a person who prepares the description of a test using already implemented keywords can, in fact, create an automated test at the same time. This methodology considers creating a table in the form of keywords for such automated actions as “Add Item” or “Delete Item.”
For example, consider a keyword for a log file messages check. First, check the message type and its code. Then, write a test method to perform automated testing with a couple of parameters: the prefix and postfix. Store the test data in a text file as a table, but use an additional middle column to transform the table into ordinary English text. Separate the records with new lines and separate three columns by tabs.
The test engine library will read through this test data and invokes the test method. For simplicity, we will not consider the test engine and test method implementation just yet. The scheme of an automated test is shown below:
A properly organized test framework according to the KDT approach can reuse the test method for a whole test scope. Keyword usage could be enough for an automated test design. Automated tests in the form of ordinary English text and stored inside text file are easy to develop and maintain. There are several KDT frameworks that implement test engine functionality. We’ll dive into some more detailed examples later, using Robot Framework as a test engine and Python as a programming language.
Read the second part here.
The article was published on Computer Technology Review.