Friday, November 25, 2011

Designing QTP Framework

What is framework?
Automation Framework is a set of guidelines and process you use to manage and optimize your automation testing. In simple words, Framework is a way to do the things in fashioned and organized manner! Framework is nothing but a concept.
It’s always possible to work without framework but you’ll be doing a lot of rework, everything will be here & there and in most of the time you will end-up with a mess, specially in the large projects.

Framework lets you predefine your automation plans, strategies and how you are going to proceed.
Types of Framework:
Framework can be of several types, but here are three main types of frameworks-
1. Keyword driven framework
2. Data driven framework
3. Hybrid framework
But this is only theoretical. Practically, there is no ‘Chinese Wall’ between the framework types.
In every organization you work, you’ll find that it’s quite different from the other and not only on organization level, you can feel the difference within different projects!
Yess, but most of the them could be mapped with Hybrid type and I like it!! :)
Hybrid framework has no boundaries and open to take benefit of all possible type of frameworks.

How to design a framework?
I have done a lot of automation projects and designed a lot a frameworks, but seriously guys, I never used any particular type of framework!
Practically, every application/project has its own expectation. You just need to start your work in organized way and believe me friends, at the end of the day; your framework will be ready automatically!! Sounds crazy??
You can’t design a complete framework and then start automation! You start automation and framework will start building simultaneously.

The first step of any test automation framework is to do a quick POC with few high priority test cases. By doing POC, you will identify the object identification issues, challenges, complexities, required test-data and limitation you have. Once you are ready with this information, you can proceed with next steps. On the basis of above information, you can decide what type of framework is most suitable to you.

But before starting, you must take some time to decide your strategies about..
1. Object Identification
2. Test-Data
3. Function Library
4. Error Handling
5. Controller script
6. Documents and Manuals
1. Object Identification:
How to identify objects i.e. using Object Repository or Descriptive programming or both. As per my understanding, dont’t try to stick on one particular. Depending on the application/object types, mixed approach is most fruitful most of the time.
2. Test-Data:
How to manage you data? DataTable or Excel or may be flat/csv files.
3. Function Library:
Be clear about what type of function libraries you are going to use and why.
4. Error Handling:
Whets your plan to handle errors? Be clear about it.
5. Controller script:
Design a controller script, which will control all your automation. It should be neat. This helps to understand what actually you are going to call.
6. Documents and Manuals:

No comments:

Post a Comment