Skip to main content

Quick reference about HP QuickTestPro ..

When I started using QTP in the mid of year 2005, the 1st question came in my mind was how do the recorded scripts replay the application scenarios without our intervention. The following things help you to understand about the fundamental features in QTP.

About HP QTP Automation Tool:

Scripting Language: VBScript, Vendor – HP, Purpose - Regression, Data migration, GUI, Integration Testing

Commonly used Automation Tools:
 HP QTP , IBM Rational Robot , Segue’s Silk Test , Test complete, actiWATE, eValid, ITP, liSA, PesterCat etc

Some of the Automation Frameworks used…
 Record and Playback (RP)- Recording the Script in a sequence and Replaying back
 Data driven (DD)– by Parameterizing all data in script
 Modularity driven (MD) – by creating independent scripts that represent modules, sections, and functions of AUT.
 Keyword driven (KD)- Functions mapped to Keywords
 Hybrid approach – Combination of DD, KD, MD & RP

Recording Modes:
Standard Recording: Done by normal recording to capture operations
Analog Recording: Records the exact mouse and keyboard operations
Low level Recording: Captures the mouse movements with respect to the co-ordinates

QTP Standard Views:
– Expert View: VBScript statements for actions displayed
– Keyword View: Hierarchical Representation of actions
– Active Screen View: Pictorial view of the currently active Screen

Types of data sheets in QTP:
 Globalsheet - Values stored in this are accessible in all the actions of a Test
 Localsheet - Every Action in a script has a corresponding Localsheet. One Action can not read other localsheet

Introduction to Object Repository:
QTP stores information of recorded/learned objects in location which can be modified.
Uses can view or modify the test object description of any test object in the repository or to add new objects to the repository. There are two types of object Repositories, 1. Shared object repository, 2. Per action repository.

Object identification by QTP:
Initially QTP learns the default property values of objects. If it is not enough to determine test object class, it adds assistive properties one by one until it has compiled the unique description. If no assistive properties are helpful then it adds a special Ordinal identifier like objects location on the page.

Objects:
These are GUI entities, qualified with some properties, data and the methods necessary to operate on that data

Checkpoints:
A checkpoint is a step in the test, which compares the actual value of a specified object property to an expected value of the same property
Example: Verify bitmaps, text in status bar etc
Various Checkpoints are Text, Bitmap, Database, Standard Checkpoints etc

Adding checkpoints to a test:
InsertCheckpointSelect the required checkpoint from the list
From the Active Screen, by Right Clicking on the object
Click on Insert Checkpoint button on toolbar


Actions and types:
Actions divide a Test into logical units, i.e. specific set of activities that are performed in the application. Types of actions are,
 Reusable Action - An action that can be called from any test
 External Action - A reusable action stored with another test. External actions are read-only in the calling test. This can be modified only in the test with which they are stored

 Non-Reusable Action - An action that can be called only in the test with which it is stored, and can be called only once

Transaction Response time:
It is used to measure the response time of any transaction

Synchronization:
Synchronization is a process in which the speed of tool and the application will be made in syncronization. Wait () command and Inserting Synchronization Point are used for this.

Virtual Objects:
Virtual Objects enable recording and running tests on objects that are not normally recognized by QuickTest. Virtual Object Wizard helps us to create a Virtual Objects.

Recovery Management
This is used for Controlling of any unexpected event or action performed by the application is to be automated. Recovery scenarios, created by QTP user, must consists a Trigger Event ( An event that interrupts a test run), Recovery Operation(s) i.e. the operation(s) which need to be performed in order to continue running the test, Post-Recovery Test Run Option (The instructions for QTP to proceed once the recovery operations done)

Regular Expressions:
Regular Expressions enable QTP to identify objects and text strings with varying values. To increase the flexibility and adaptability of the tests Regular Expressions are used
Common Regular Expressions are Period (.), Square brackets ([ ]), Asterisk (*), Vertical line (|), Backslash (\) etc

Variables:
There are 3 types of variables in QTP are Action parameters (accessible only within the action), Test parameters (accessible among all the actions of same test), and environment variables (accessed throughout the test run)

Comments

Popular posts from this blog

Thoughts on improving QTP execution performance by utilizing Descriptive programming (DP) .....

Some of the QTP projects/users might have experienced the following problem when their project getting huge or they need QTP execution very frequently for their product release. Problem: When repository is getting huge due to the large no of objects being added to object repository. Memory usage will be high when the Object repository size increased causing a decrease in the performance of QTP while recognizing objects. As you aware of QTP 8.2 and below Mercury recommends that OR size should not be greater than 1.5MB. Solution: Descriptive programming (DP) which does not depend on the QTP object repository features. But it stores the Application objects property values in the code itself. What is DP, how that can be achieved and when it is utilized more……… DP is nothing but avoiding QTP object repository by directly describing an object property values in the code. For example, to close a Browser, Set X = Browser (“Micclass: =Browser”) ‘code assigns Browser description to a variable.

Problem in syncing QTP with your web application.....

You have a very simple solution ...Instead of using wait property or inserting synchronization point. The following piece of script can be made reusable action and can be called anywhere while web page is loading.. If Browser (“micclass: =browser”).page (“micclass: =page”).exist then Environment. Value (“class”) = browser (“micclass: =browser”) Else if Environment. Value (“class”) = browser (“creationtime: =1”) End if Start timer = time Set B = Environment. Value (“class”) While B.busy = true OR B.readystate <> 4 Set B = Environment. Value (“class”) Wait (1) Wend End timer = time If time > = 0 then Msgbox (“browser is loaded”) End if Note: In While loop, 2 properties of Browser being used.