Sunday, October 16, 2011

QTP Tutorial 1


Anatomy of QTP: –
Ad-inn Manager: – It is a feature provided by qtp used for making the qtp compatible with a specified environment by default the QTP provides 3 add-ins
  1. Visual Basic
  2.  Activex
  3.  Web
Apart from these 3 add-ins qtp is always compatible with standard windows environment QTP serene is divided in to 5 parts
  1. Test pane area
  2. Active Screen
  3. Data table
  4. Debug weaver pane
  5. Tool option

1.    Test pane: – It is an area provided by QTP used for viewing the text script. It also allows the user to do any kind of modifications on the text script.
Test pane represents the script in 2 ways.
·      Expert View
·      Keyword View

  1. Expert View: – Expert view represents the script in vb script format.
  2. Keyword View: – It is represents the script using a graphical user interface which is divided in to 4 Parts.
  • Item
  • Operation
  • Value
  • Documentation
2.    Active screen: –It is a feature provided by QTP which holds the snap shots of application state of each and every script statement.
Features:–
It is used for understand the script easily.
It is used for enhancing the script easily.

3.     Data Table: – It is also called as formula one sheet developed by the 3rd party and integrated with the QTP.
Features:–
- It is used for holding the test data.
- It provides a facility to import the test data from different data sources like database, excel sheet or flat file.
- It allows the user to enter the data and modify the data directly in it.
- It isolates the text script from the data source.

QTP maintain 2 copies of data tables
·         Design time datatable
·         Run time datatable

4.    Debug Viewer pane: – It is used for viewing, modifying, or setting the current values of the variables and command tabs.

5.    Too potion: – The options that are available in menu bars and tools are known as tool options.

Recording and running
Record and run settings:– It is a feature provided by QTP used for making the QTP aware on which applications a test engineer is about to perform record and run operations.

A test engineer has to compulsorily use this option for every new test. For doing the same this feature has provided 2 Options.
·         Record and run on any open windows application
·         Record and run on these applications
Navigations
  • Activate the menu item test
  • Select the option record and run settings
  • Select one of the following action
  • Record and run on any open windows application
  • Record and run on these applications
  • If at all the second option is selected click on add button
  • Browse the desire file to be added
  • Click on ok
  • Click on apply and ok.
Operational Overview of recording: During recording the QTP will be doing the following things.
·         Every user action is converted in to script statement
·         The corresponding object information is stored in the object repository.

Operational Overview of running:
  • QTP tries to understand the script statement
  • After understanding what action to be performed or which object is realized that it needs to identify that object.
  • In order to identify the object it needs the corresponding information.
  • For that it will go to the object repository and search for the information.
  • If at all the information is found using that information it will try to identify the object.
  • If at all the object is identified then it will perform the action
Types of Recording Modes
  1. Context sensitive recording mode: – It is used for recording the operations perform on the standard GUI objects.
  2.  Analog Recording: – It is a special recording mode provided by QTP to record the continuous actions performed on the application.
  3.  Low level recording: – It is used for recording at least minimum operations on the applications which are developed with known supported environment.
Navigation
  1. Keep the tool under normal recording mode
  2. Activate the menu item text
  3. Select the option analog recording
  4. Select one of the following actions.
  5. Record relative to the screen.
  6. Record relative to the following window.
  7. If at all the second option is selected specify the window title using the hand icon C
  8. Click on start analog record button.
OBJECT REPOSITORY
It is storage place where one can store the objects information and it also acts as a interface between the text script and the AUT in order to identify the object during execution.

Types Of Object Repository
There are 2 types of object repositories.

1. Per-Action Object Repository:–
For each and every action in a test the QTP will create and manage the individual repository.
Dis-Advantage: Difficult to maintenance

2. Shared Repository:–
It is a Common place where one can store the objects information and it can be associated to multiple tests.
Advantage: Easy to maintenance and can be used by multiple test case
Note: The shared repository has to be created manually and associated manually to the test.


If you have any quarries/feed back catch me on - knowthetesting@gmail.com 
Thank you 
Ram

No comments:

Post a Comment