What is an Automation Framework?
An Automation Framework is collection of assumptions,concepts and practices you bring in while developing the automation project, so it helps in constituting a work platform or support for automated testing.It would be great, if the framework is application independent.
If you look into the any existing framework,it will be block of function libraries for reporting , error handling , and driver scripts.So the test automation framework is an execution environment for automated tests. It is the overall system in which our tests will be automated.
What is the advantage of using framework?
The straight forward one is easy maintenance and reusable.
To support the above point let us consider an example,your are automating login page functionality for Gmail and later you have to automate WordPress login page. Manual step for this will be entering Username, Password and clicking Login button in both case.The same can be achieved on automation by capturing these objects and performing actions on them with available methods(read OOPS article to know the basics).
We may need to perform some validation and error handling before performing actions on these objects,like whether the object exist in the page or is it enabled? Also we might need to report the results using a reporting function. So If you look we have to create the same piece of code to perform these tasks both in Gmail and WordPress login page.Can we make them common?
To make them common first figure out what are all common between them and what are unique for them.All the error handling,validations, and report generation will be common to both,but objects are different because they are different application.Also methods we perform on those depends on the functionality .
Create all those error handling,validations ,reporting script as function libraries,to which you pass objects and methods as parameter.We got the solution
. But how to pass these arguments to those functions? This can be achieved by using an excel sheet or Database or even XML as input data. Now you need a script to read those data(that is the driver) and based on the data, appropriate functions will be executed. Generally the input data will have the Objects and Methods
Now both Gmail or WordPress can use the same scripts, now just create object repository and an input data sheet for each application. Also when there is change to test case or if you want to add new test case, then only the input data sheet needs to be updated, no need to update the scripts making maintenance easier.
That’s it , application independent framework is ready
Will come up with another article on types of framework and their Pros and Cons soon.
Click this link to get read more about automation framework
Click this link to understand different types of framework
Summary:
I have explained basics of automation framework.
Automation Framework is practice of keeping all reusable, common components in one place making them as the platform to execute your automation scripts, all application specific data are passed as arguments to those functions.



RSS - Comments
Hi Dhanasekar,
that was a wonderful explanation for beginners like me…
I was wandering here and there to get to know whats framework all about…everyone gave thier own ones…but yours simple and clean…thanks for creating strong base to proceed further
Harikrishnan
October 9, 08 at 10:50 AM
Hi, I agree with you.
But in my interview person asked me. If Index and logical name both getting change frequently of an button. how do you handle such situation.
I need to click on the button.
Thanks
praveen
November 7, 08 at 10:46 PM
Hi Dhansekhar,
I am learning QTP. I want QTP scripting tutorial.Can you suggest me any site or if you provide me any link I would be appreciate..
sudhakar
May 12, 09 at 10:38 PM
Hi Dhanasekar,
This is a wonderful introductions to automation frameworks. I’d also recommend you Bj Rollison’s blogs on automation. [ http://blogs.msdn.com/imtesty/archive/tags/Test+Automation/default.aspx ]
I’ve also blogged about ab OO approach to automation framworks that may be of interest to you.
Regards
Rajesh
Rajesh K
September 12, 09 at 8:14 PM
Thanks for your comments.I do follow I.M.Testy blog.Looking into your blog.
Keep in loop
dhanasekars
September 12, 09 at 8:20 PM
Dhana,
Good write-up. Generally any framework will come under one of following two categories.
First is based on data. All recent talks are about Data-driven, Keyword driven and table driven frameworks. In this type, you can develop framework as application independent.
Second is based on re-usable libraries. In this case, application or platform dependency is there.
For reading, You can have a look at http://tips-testing.blogspot.com/2008/02/automation-white-papers.html Unfortunately first link is not available.
Palani Selvam
September 15, 09 at 8:45 PM
Thanks Palani.
Your blog is really a good collection of resource on automation framework.And the last reference to IBM is where I learn what is a automation Framework,which I totally forget to Refer in my blog.Thanks for reminding that.
dhanasekars
September 15, 09 at 10:30 PM
Hi,
I would like to know about Keyword Driven Framework in detail. I read some material from web but I am not satisfied with that.
Can you plz explain with example or send me some links for that.
Sanket
September 17, 09 at 10:46 AM
What ever I’ve explained above can be called as Keyword or Table driven framework,the links I’ve given in this article is the best source to understand a framework.
dhanasekars
September 17, 09 at 11:07 AM
Awesome explanation about Framework, Thanks Dhanka for your time to explain about this
Kishore
December 15, 09 at 4:42 AM
That’s the first article on automation framework, which was really helpful for me. I tried searching about it at many places. finally I got the right place.
I really liked the way you explained it.
Shunty
December 15, 09 at 10:53 PM