An approach to build a QTP framework

Saturday, November 15, 2008

Hello Friends,

You might have encountered question or terminology “what do you mean by QTP framework?” Let us target the word “Framework” first.

Framework is a simplified description of the structure or a process.
In QTP terms it is the baseline of a process that describes the rules to follow while automating an application.

Framework depends on the approach towards the test automation from the project perspective as it differes from project to project the framework will too differ from project to project.

For Quality deliverables, important things that should be followed are:

· Following common coding structure for all the scripts

· Consistent coding conventions

· Use of Reusability for making code efficient and minimal

· Efficient use of Object Repository

· Use of Error and Exception handling Functions

· Use of Data table object, Environment variables for using data

An organized approach is very much necessary for the automation project success.

Approach for Test Automation is used for building a strategy for automation starting from the requirement phase till the deployment phase. Approach for automation begins with finding out the conditions and business rules given by the client and grouping similar conditions, business rules together as Test cases or Test Scenarios.

Steps involved in Approach for Test Automation are as follows:

· Requirement gathering from the client

· Understanding and Analyzing the Requirement

· Grouping the requirement into Test cases

· Preparing the Design for Automation

· Building Scripts depending on the Design

· Review of Scripts at Offshore

· Delivery to the Client

There are following frameworks being followed in the industry.

1) Linear
2) Modular
3) Keyword
4) Hybrid

We are free to invent our own ;-)

The combination of two or more can also be used to build the framework.
For any automation project manual test case plays an important role, now following are some guidelines to identify the best candidate for automation.

Guidelines followed for identification of Test Cases for Automation

· Tests that need to run once and those that need frequent human intervention are usually not worth the investment to automate and have not been considered for automation.

· As Automated testing can be used to verify the performance of application paths that are used with a high degree of frequency when the software is running in full production e.g. creating customer records, Invoicing and other high volume activities where software failure would occur frequently have been considered.

· Mission critical processes like core activities like sales order processing are prime candidates for automated testing and have been considered for automation.

· Repetitive Testing.

· Applications with Long Life span – Longer the application in production greater the benefits from automation.

· Avoiding dynamic screens. Though possible to automate this increases the complexity of the script.

· Avoiding screens where objects are created dynamically.

· Avoiding business scenarios where complex hardware is involved.

· Selecting a row in a table results in an additional challenge from. Some automation tools provide the facility to read each row in a table and for focusing on a specific row. If the numbers of rows were very high the execution time of the script would be high. This leads to performance issues of the recorded script. Hence, it is better to prove the business scenario wherein tables with row selections figure by identifying a fixed row number. This scenario is faced very frequently in enterprise applications as in pricing tables and leads to the complexity of the script and subsequently the effort.

· Avoiding scenarios that require high degree of coding while automating so that script’s complexity is reduced and high maintainability of the script is ensured.

" Automation can not replace manual testing as automation is done by a chip and manual testing done by human brain- A chip can not replace human brain"

2 Responses to "An approach to build a QTP framework"

yezdi3736 Says:

Well laid out step by step approach.That was indeed very informative and helpful.If you could, please share why QTP better than other Automation tools.

Tarik Sheth Says:

As per my experience QTP is equivalently good as many other tools available. it is just that it is more popular for several reasons. (I will have post about various tools available in the market and automation testing using other tools.)