Learn Selenium and Java for Selenium

Tuesday, 24 May 2016

Automation Framework


Author : Ashwini Velapure (Test Automation Engineer) https://www.linkedin.com/in/ashwinivelapure

What is Automation Framework?
In simple words ,it is nothing but structure of code.
While starting for Automation Testing ,we need to have clear understanding for different types of  automation framework.
Types of Automation Framework:

  • Linear  FrameWork:
It is just sequential code. Steps  are collected one by one. More hard coding of values is one of the  drawback  of linear framework.
In selenium IDE, we can record flow. If we extract testcase,We will get  the java  code.You will get piece of code,which we can say linear automation framework.
For example, if we are automating Login application.Within linear frame work we will follow below steps:
a) Open URL for login page.
b) Enter the details.
c)  Click on Login.
d) Verify the home page

  • Modular Framework
In modular framework,there is dedicated doe for particular functionality, which can be called as ‘Module’.
For achieving this modularity, we are using JAVA,VB etc.
For example, if we are automating Login application and we need to save screenshots.
Within Modular frame work we will have separate  module for take Screenshot. This module will have code for taking screenshot and saving it on desire location
Whenever we land on page we will call take Screenshot  module
Steps :
a)Load Login Page
b)Call take Screenshot
c) Enter the details.
d) Click on Login.
e) Call takes Screenshot

  • Data Driven Framework:
When an application need to test with different set of data, Data driven Frame wok comes into picture.
For example:
If we are automating any login application and we need to check with different username and password. In this scenario we can keep separate data sheet for username  and password. Here we can use JXL/Apache POI for reading data sheet

  • Keyword Driven Framework:
It is similar data driven. Here we are reading keyword from data sheet instead of test data. This keyword may have one of the module associate with it.

  • Hybrid Framework
Hybrid Framework is combination of Data Driven framework and Modular Framework. This is commonly used framework.

  • TestNG Framework
This is advanced framework. It is famous for its reporting feature. We had  already had discussion on the previous blogs

Why Automation  Framework?
Definite structure of code  is very important ,below are some advantages:

  • Reusability
  • Maintainability
  • Readability
  • Scalability
How to select Type of Framework?

  • Based on Complexity of Web Application
This complexity can be determined  by number of pages and their web elements.
Also Number of scenarios incorporated for particular web application workflows.
So, for less complex application we can go with Data Driven FrameWork and for more complex application we can Hybrid framework

  • Based on Reporting requirement
Most of the Business people are not bother with code sctructure.They are only interested in Output.
So, reporting comes into the picture.TestNG  framework gives excellent reporting feature.





0 comments:

Post a Comment

Popular Posts

Recent Posts



Newsletter

Join our newsletter to get secret tips directly in your inbox!


*We Hate Spam!

Powered by Blogger.