As Agile Testing updated the CP-SAT syllabus to include Hybrid Framework along with Data Driven Framework, I thought of penning this interesting topic and give a brief what different frameworks are commonly used in Selenium
3 frameworks which are commonly used in Selenium are Data-Driven, Keyword-Driven and Hybrid Framework
Data-Driven Framework – Data-Driven Frameworks are mostly used with having the test data in an external file like .xls, csv or DB and there will be code which will read this data and feed into AUT. Mostly Dataprovider annotation provided by TestNG is used.
Keyword-Driven Framework – Keyword-Driven Framework also known as Action Driven Framework uses much more structured way of keeping all the actions, reading excel file, object repository, main execution script separate. It can be shown in this form of mind-map as below
Hybrid Frameworks is a combination of Data-Driven Framework and Keyword-Driven Framework. The best part of Hybrid is that not much changes are required to convert a Keyword-Driven Framework project to Hybrid Framework. project. So we add the Dataprovider to the main script for reading the test data in the xls and we still continue to use keywords in the xls which we created in Keyword-Driven Framework.
This is just one way of using Frameworks. Different companies follow different approaches for all the 3 frameworks. Overall objective of any framework is to structure your code in a more re-usable and readable format. This also helps in maintaining the code as the project grows and new automation resources are added into the project.
Please visit CP-SAT webpage for details on updated Course Content, upcoming Training programs and more. Please click on the URL below or click on the image below.