Monday, February 11, 2013

QTP Framework

************************************************************************************************
Framework:
************************************************************************************************
A set of guidelines like coding standards , test-data handling , object repository treatment etc... which when followed during automation scripting produce beneficial outcomes like increase code re-usage , higher portability , reduced script maintenance cost etc. Mind you these are just guidelines and not rules; they are not mandatory and you can still script without following the guidelines


Basically QTP supports three kind of framework i
1)     Linear Framework
2)     Modular driven framework
3)     Keyword Driven Framework.
************************************************************************************************
Linear Framework
************************************************************************************************
                It deals with individual script which is recorded under one Action and running individual. I think we all done this thing in very first when we get the QTP but I’m very sure, not all one know that we created and executed the test under Linear Framework. Anyway this is not big deal. I was also not aware when I get the QTP first time. So this is very simple and easy way to create the test by navigating through the application. But by using this method there are some limitations which we can not cross. Sometime when we test some business processes in one application, we may feel that some operations we repeat in all Linear Framework Script. To handle this situation we go with Modular Framework which solves this kind of problem by dividing the single test in multiple part or module.
************************************************************************************************
In modular framework
************************************************************************************************
                  Tester basically divides the test in different parts which give the facility to use the different part of scripts in any tests. That solves the many problem of repeataion of test and gives the facility to make the script reusable? So in one sentence, Division of Linear Framework script in different parts called Modular Framework.
************************************************************************************************
keyword driven framework
************************************************************************************************
           Tester should know the basic of programming because it deals with function. In programming, Function is an important part of programming as they allow you to create chunks of code that performs a specific task. Basically we create the functions in the one test and calling these functions as keyword in other tests therefore we are calling keyword driven framework. This is very important and useful framework to deal and handle many critical tasks in testing through QTP.

Sunday, December 9, 2012

Synchronization in QTP



Synchronization : 

                 Synchronization is a process to make the Automation tool(QTP) wait for the application process to complete prior to moving to subsequent steps.
How can we  achieve this,  it can be done in the following ways.
             1. Using Waitproperty method
    2. Browser Navigation timeout.
    3. Object Synchronization timeout
    4. Inserting the  Wait/Exist statement
 *********************************************************************************************
Using Waitproperty method :
*********************************************************************************************
Syntax :
Browser(“Google”).Page(“Google”).WebEdit(“q”).waitproperty(PropName,PropValue,TimeInMilliSeconds)


*********************************************************************************************
 Browser Navigation timeout:
*********************************************************************************************
       Default Browser Navigation timeout is 60 seconds, means if QTP unable identify the Unique browser
object it wait for 60 seconds
*********************************************************************************************
 Increasing the Object Synchronization timeout:
*********************************************************************************************
              Default  object Synchronization timeout is 60 seconds, means if QTP unable identify the Unique object it wait for 60 seconds
*********************************************************************************************
Inserting the  Wait/Exist statement :
*********************************************************************************************
Syntax for wait:
      Wait time in seconds
Syntax for Exist
    Browser(“Google”).Page(“Google”).WebEdit(“q”).exist(5)
****************************************************************************************
Diff : Wait is static and Exist is dynamic
****************************************************************************************