A Framework defines a set of guidelines/best practices that enforces a set of standards, which makes it easy to use for the end users to work with. There are different types of automation frameworks and the most common ones are listed below −
Keyword driven testing is a type of functional automation testing framework which is also known as table-driven testing or action word based testing.
In Keyword-driven testing, we use a table format, usually a spreadsheet, to define keywords or action words for each function that we would like to execute.
It is best suited for novice or a non-technical tester.
Enables writing tests in a more abstract manner using this approach.
Keyword driven testing allows automation to be started earlier in the SDLC even before a stable build is delivered for testing.
There is a high degree of reusability.
Initial investment in developing the keywords and its related functionalities might take longer.
It might act as a restriction to the technically abled testers.
Data-driven testing is creation of test scripts where test data and/or output values are read from data files instead of using the same hard-coded values each time the test runs. This way, the testers can test how the application handles various inputs effectively. It can be any of the following data files −
Data Driven Testing can be best understood by the following diagram −
Hybrid Framework is a combination of Keyword driven and data Driven framework that can be best described using the following flow diagram.
Following are the parameters one should take into account while developing the framework. The affects factors are listed below −
Framework files should support versioning controlling software such as SVN, CVS, MS Source Control
Framework should support executing the scripts in different environments viz- QA, SAT, DEV
Upon Object changes, scripts should execute with minimal changes.
Framework should configure itself and take care of prerequisite such as creating folders/databases.
Framework should have robust reporting structure so that issues in the script/application can be easily spotted
Framework should have greater flexibility so that it should be easy to use
Framework should follow coding standards so that files, functions, and history of changes are maintained correctly.
In the next chapter, we will learn how to design a simple framework.