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.





Related Posts:

  • GIT in Practical World GIT in Practical World We have discussed about meaning of different GIT commands. Now biggest challenge is how exactly GIT is being used in ou… Read More
  • Strings in Java : Part 4 String Methods As we know that string class has variety of methods for String manipulation. We would be explaining the mostly used methods available… Read More
  • Strings in Java : Part 5 String Methods Continuing with commonly used method in the stings we are covering here charAt()  method is more detailed manner. String char… Read More
  • What is JIRA? We have been hearing about JIRA a lot these day. Aren’t we? So, let us discuss some key pointers on JIRA today. JIRA is a project managemen… Read More
  • GIT Introduction GIT Introduction Any automation testing project, we need to develop around 100 + testcases in the limited span of time. It is impossible if you… Read More

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.