QTP: Quick Test Professional It is s an automated functional Graphical User Interface (GUI) testing tool created by the HP subsidiary Mercury Interactive that allows the automation of user actions on a web or client based computer application. Quick Test is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications. After installing QTP , This image is displayed on the screen and we need to select all and Tick Mark in all 3square boxes show below:
THIS IS THE MAIN PAGE OF QTP:
Menu Bar File Toolbar
Title Bar
Debug To
Test Toolbar Action Toolbar
Test Pane
Active Scre Scr
Data Table
Debug Vie Status Bar
QTP Environment: 1.Keyword View - Graphical view of objects and steps added 2. Expert view - Scripting area of the objects. 2.Datatable - For parameterization of values in and out from the object properties 4.ActiveScreen - For adding objects and checkpoints during static time 5.Menu bar - For changing the Environmental settings in QTP
It contains the following key elements: Title bar: displaying the name of the currently open test Menu bar: displaying menus of QuickTest commands File toolbar: containing buttons to assist you in managing tests Test toolbar: containing buttons used while creating and maintaining tests Debug toolbar: containing buttons used while debugging tests. Action toolbar: containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow. Test pane: containing two tabs to view your test-the Tree View and the Expert View Test Details pane: containing the Active Screen Data Table: containing two tabs, Global and Action, to assist you in parameterizing your test Debug Viewer pane:containing three tabs to assist you in debugging your test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint.) Status bar: displaying the status of the test.
In QTP we can write scripting in three ways : 1) On clicking on Insert -> Start transaction , then we need to click on record button for starting the
transaction , then scripting automatically display on the expert view and later we need to stop recording. 2) Directly clicking on record and then we can start doing any transaction then the scripting automatically display on expert view. 3) Directly writing scripting in expert view.
DIFFERENCE BETWEEN EXPERT VIEW AND KEYBOARD VIEW The Expert view is maintained by the user whose is having knowledge on scripting language, any changes made in the Expert View are automatically synchronized with the Keyword View. The Keyboard view is also maintained by the user but in this view the user need not required any scripting language and the user can directly start working in keyboard view.
QTP contains 3 types of recording : 1) Context Level. 2) Analog Recording .
3) Low Level Recording. Context Level : It identifies only click. BY Default QTP work on context level. Analog Recording : It identifies the drag. Low Level Recording: This doesn’t have any plugins Ex: Java, Webpage’s .
Checkpoints: A checkpoint is a verification point that compares a current value for a specified property with the expected value for that property. We can Insert checkpoint 1.From Menu Insert à Checkpoint à Standard Checkpoint 2.From Keyword view 3.From the Active Screen Checkpoint Types: 1. Standard Checkpoint 2. Image Checkpoint 3. Table Checkpoint 4. Page Checkpoint 5. Text Checkpoint 6. Text Area Checkpoint 7. Bitmap Checkpoint 8. Database Checkpoint
DESCRIPTON OF CHECKPOINTS:
Standard CheckPoint: It checks the property value of an object in your application or Web page. It checks a variety of objects such as buttons, radio buttons, combo boxes, lists, etc Bitmap CheckPoint : It checks an area of the application as a bitmap.To create a bitmap checkpoint of multiple objects, select the highest level object that includes all the objects to include in the bitmap checkpoint. Text CheckPoint: It checks whether the text string is displayed in the appropriate place in your application or on a Web page. Text Area CheckPoint : It checks whether the text string is displayed within the defined area in the application. If the area defined is associated with more than one object, the Object Selection-Text Area Checkpoint Properties dialog box opens. Table CheckPoint: It checks the information within a table or the table itself. The row or column values can also be checked. Accessibility CheckPoint : It identifies areas of the Web site that do not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines Page CheckPoint: It checks whether the page is displayed correctly and gives information like number of links, number of images and load time of the page. Database CheckPoint: It checks the contents of a database accessed by the application.
OBJECT MANAGEMENT: Quick Test identifies objects of two types • Test Objects: Objects in the test that represent objects in the application or website that are created and maintained by QTP. • Run Time Objects: Objects in the application that are created and maintained by the Browser.
Three object management tools are available to maintain both the test and runtime objects in the test. Object Identification: It is used to set the properties used to identify an object. Each object has mandatory and assistive properties which are used to identify them. Object Repository: All objects recorded for the test are stored in the repository. The Object Repository displays all objects in the current action or the entire test. The Object Repository can be used to view or modify the properties of any object in the reposirory or to add new objects to the repository. An object in the application can be highlighted using the Highlight option.
Object Spy: Using the Object Spy, we can view the properties of any Object in the open application. We can also view Object Methods.
D
PARAMETERIZATION A parameter is a variable that is assigned a value from an external data source at run time. We use parameterization when we want to change the value of properties at run time. Parameterization can be done in three ways using Quick Test. • Datatable • Environment variables • Random numbers, DataTable Parameters The test runs once for each line of data in the Data Table. Each iteration takes a different value from the data table. To run selected rows in the data table choose the Run tab from Test->Settings and specify an option in the Data table iterations frame.
Environment variable Parameters
ronment variables can have Quick Test generated values or values supplied from external files. We can add ent variables from Test->Settings->Environment tab. Choose User-defined from the variable type. Click New your own internal variables or Click Export to retrieve values from external sources
Random number Parameters It enables us to use random numbers as values in the test. We can specify the range from which the random number is generated. By default, the random number range is between 0 and 100.
Recovery Scenarios: To instruct Quick test to recover from unexpected events and errors that occur in the testing environment during the run session. A Recovery scenario consists of a) Trigger Event b) Recovery Operation c) Post Recovery Run Option We can create the recovery scenario using recovery scenario wizard. Recovery scenario wizard consists of a) Define the trigger event that interrupts the run session b) Specifying the recovery operations required to continue c) Choosing a post recovery test run operation d) Specifying a name and description for the recovery scenario e) Specifying whether to associate the recovery scenario to the current test and / or to all new tests.