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.

15 thoughts on “What is an Automation Framework?

  1. 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

  2. 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

  3. 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..

  4. 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.

    1. 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.

  5. 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.

    1. 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.

  6. 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.

  7. Automation Framework is not a tool to perform some specific task, but is an infrastructure that provides the solution where different tools can plug itself and do their job in an unified manner. Hence providing a common platform to the automation engineer doing their job.

    Ref: http://code.google.com/p/vauto/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s