Thursday, May 26, 2011

QTP Life Cycle

       

QTP life cycle contains six phases

Ø  Test planning
Ø  Generating the basic test
Ø  Enhancing the test
Ø  Debugging the test
Ø  Executing the test
Ø  Analysis the Results

Test Planning:
In this phase the automation test lead will do the following
Ø  Understanding the requirements
Ø  Identifying all the areas to be automated
Ø  Analyzing both the negative and positive flow of the application
Ø  Preparing the automation test plan document based on the analysis
Ø  Preparing the tool ready with all the pre configurationally settings for the further operations.

Generating the basic test:
In this phase the automation test engineer will generate the basic test engineer will generate the basic test for both the +ve and –ve flow of the application

Enhancing the Test:

One can enhance the script in the following ways

Ø  Adding comments
Ø  Inserting the script statement manually
Ø  Inserting the programmatic statements

Ø  Inserting the check points

Ø  Parameterizing the test
Ø  Inserting the output value statements
Ø  Synchronizing the test
Ø  Inserting the transactional points for measuring transactions

Record and Run Settings In QTP:

Record and Run Settings:

 For every new test one has to compulsorily do these settings before recording or running. These settings will make to understand on which applications it need to concentrate while recording or running.
Navigation:        
Ø  Activate the menu item Automation
Ø  Select the option record and run settings
Ø  Select one of the following options
Ø  Record and run test on any opened windows based application
Ø  Record and run on this application (opened on session start)
Ø  If at all second option is selected then click on add button
Ø  Browse the desired application part
Ø  Click on OK
Ø  Click on apply & OK.
(Record and Run Settings Window in QTP)


Operational overview of Recording:
 During recording QTP will do the following.
Ø  It will generate corresponding script statements for every user action on the application.
Ø  It will store the required related information in the object repository.
Operational overview of Running:
During running QTP will doing the following.
Ø  It will read the script statement and understands what action to be performed on which object.
Ø  Then it realizes it need to identify the object first to perform the action
Ø  To identify the object it requires some information for that information it will go the object repository and search.
Ø  Once the information is found using this information it will try to identify the original object.
Ø  Once the object is identified it will perform the action on it.


Recording in QTP

      
            Recording is a feature provided by QTP, by which we can capture the user actions, but remember recording is only to get familiar with QTP.

Recording Modes:

There are three types of recording modes in QTP
Ø  Context sensitive or Normal recording mode
Ø  Analog Recording Mode
Ø  Low-level Recording mode.

Context sensitive Recording mode:
It is used for recording the operations performed on the standard GUI object in different situations.

Navigation:
a)    Click on the record button displayed on the QTP test pane or Press F3 after launching the QTPro


  OR
a)   Click on Automation displayed in the menu bar.
b)    Click on the record button available there.



Analog Recording Mode:

It is a special recording mode provided by QTP, which is used for recording the continuous operations.

Navigation:
·        Keep the tool under normal recording mode
·        Activate the menu item test
·        Select the option analog recording
·        Select one of the following option
·        Record relative to the screen
·        Record relative to the following window
·        If at all second option is selected specify the window title with the help of the Hand Icon
Click on start analog record

Low-Level Recording:

It is a special recording mode provided by QTP, which is used for recording at least some minimum operations on the non-supported environments also.

Navigation:
·        Keep the tool under normal recording mode
·        Activate the menu item test
·        Select the option Low Level recording
·        Start Recording