Wednesday 23 March 2011

Recording & Running

 I Operational Overview Of Recording:
  During Recording QTP will do the following :
    1) It will generate corresponding Test script statements for each and every user action on the application.
    2) It will store the required related & related object's information in the 'Object Repository'.
II Operational Overview Of Running:
 During Running QTP will do the following:
    1)It will read the script statements and understand what action to be performed the which object.
    2)It realize, first i need to identify the object to do that action and for that i need some information.
    3)It will go to the object repository & search for the required information.
    4)Once the required information is formed using that info it will try to identify the object.
    5)If at all the object is formed then it will perform the action.
Recording & Run settings:




Navigation:
click on Automation menu ---> select the option 'Record & Run settings' ---> click on Apply button & OK button.

Recording Modes:
 There are 3 recording modes in QTP.Those are listed below:
1) Normal/Context Recording Mode
2) Analog Recording Mode
3) Low Level Recording Mode

1. Normal Recording Mode:
 This recording mode is used to record the operations performed on the 'standard GUI objects' in different contexts.
2. Analog Recording Mode:
 This is a special recording mode provided by the QTP which is used for Recording the Continuous operations.

Navigation:
keep your tool under recording mode-->activate the menu item 'Automation'-->select the Analog Recording---> select the one of the following options:
   Record relative to the screen
   Record relative to the following window.
--->if at all selcted the second option ,specify the window title using the hand icon 
----> click on 'start analog recording' button.
3. Low level Recording:
Low level

Thursday 17 March 2011

Object Repository

   'Object Repository' is a storage place where one can store the object information and it also acts an interface between the 'test script' & 'The AUT (Application Under Test)' in order to  identify the objects during execution.

QTP has 2 types of Object Repositories.They are:
1)Local Object Repositories.
2)Shared Object Repositories.

     Test objects can be stored in two types of object repositories—a 'shared object repository ' and a ' local object repository'.
          A 'shared object repository' stores test objects in a file that can be accessed by multiple components (via their application areas) in read-only mode and it is in the format of '.tsr'(test shared repository).
         A 'local object repository' stores objects in a file that is associated with one specific component, so that only that component can access the stored objects.
Object Repository


Exporting Local Objects Of An Application into The Current Test:
 Go to Resources-->Object Repository-->file-->Export Local Objects


Importing External Object Repository:
To import External Object Repository ('.tsr' file), go to  Resources menu-->Object Repository Manager-->File-->Open-->Browse the .tsr file-->click open button.







Tuesday 15 March 2011

QTP LifeCycle

'QTP Life Cycle' contains '6 phases'.
They are:

1)Test Planning
2)Genarating The Basic Script
3)Enhansing The Script
4)Debugging The Script.
5)Executing the Script/Test.
6)Analyzing The Result.


1)Test Planning:
  In this case the Automation Test Lead will do the following:
1)He will Understand the requirements.
2)He will identify the areas to be automated
3)He will analyze the +ve & -ve flows of the application.
4)He will analyze the dynamism of theapplication
5)He will do the pre-configuarational setting for the tool in such a way that the tool is compatable with the application.
6)He will do the resourse planning
7)He will do the scheduling
8)Finally he prepares the automation test plan document with the above analyzed information.


II)Genarating The Basic Script:
    In this phase, the automation test engineer will generate the basic script for the both +ve & -ve flows of the application.

 III)Enhancing The Script:
One can enhanse the script in the following ways.
    --> Inserting the Checkpoints.
   --> Inserting the synchronization point statements.
   --> Parametrize the test.
   --> Inserting the output value statements.
   --> Inserting the Transaction Point statements for measuring transactions.
   --> Inserting the comments.
   --> Inserting the script statements manually.

IV)Debugging The Script:
     'Debugging' is a process of executing the script in a user-defined passion with some temporary breaks inorder to identify the errors during the execution break.
 To do the same QTP has provided 'step commands' & 'break point' features.

V) Executing the Script/Test:
In this phase execute the test scripts what you have developed using QTP.

VI) Analyzing The Result:
   In this Phase compare the actual value what you have get after execution phase with the expected value.If actual value=expected value then the result is 'PASS' else the result is 'FAIL'.