Settings in QTP

QTP Test Settings: Before Running or Recording any test on QTP, the QTP Test settings need to be set as per the requirements of the Test. Setting these Test Settings before starting a Test plays a crucial part in the behavior of the test.
These can be found at the path Test>Settings. A dialog box pops up, in which various tabs are present which allow one to set:

  • Properties of the test like Add-Ins used
  • Run time Preferences
  • Resources like files, data tables, and repository to be used
  • Parameters required in the Test
  • Environment variables used
  • Web navigation
  • Recovery Scenarios

Record and Run Settings: After Setting the Test Settings at Test>Settings, the next important settings for actually recording the application and running it for Testing are to be set at the Test>Record and Run Settings. This dialog box opens automatically, when recording a test for the first time. The details of which application to record are set in this dialog box.

Active Screen Capture Level: One of the most useful fetaures of QTP is the various views it provides, out of which Active view is the most unique. The selection of the appropriate Active Screen Capture level influences the storage space, properties stored and the view of the Active screen. The selection can be made by going to Tools>Options>Active Screen. The Active screen settings can also set at the Test>Record and Run Settings. The active screen capture level can be set to any of the 4 levels i.e. Complete, Partial, Minimum and None.

Object Repository: When a test is recorded, QTP adds each object on which an operation is performed, to the Tools>object repository. Objects can be added to the repository while editing the tests too. While recording, Objects are added to the repository in either of the two ways:

  • Object Repository per Action
  • Shared Object Repository

The settings can be changed by going to Test>Settings>Resources>Object Repository Type

In the Per-Action mode, objects are identified and separated on the basis of each action and the corresponding object repository for the test is created in the test folder. In the Shared mode, the user may choose a location to save the shared object repository files for all the tests.

All the Objects recorded during a test,and their properties can be seen and manipulated in the Tools>Object Repository. There are provisions in this Object Repository Dialog box to add new objects,spy objects, find and replace property values etc.
The First Section of Object Repository Dialog Box contains provisions to

  • Add Objects : A Button to add new objects to the repository
  • Highlight: To highlight the object selected in the repository, when the application is open
  • Object Spy: To Spy any Object, to see its Properties
  • Export: To Export any objects to an outside location

The second section of the dialog box contains provision to Find, Replace, Add, and Remove the properties of an object in the Repository also set any default values for the properties.

Expert View: While recording Tests in QTP, there are 3 important views that enable us to understand clearly, the various representations of the Script. They are

  • Expert View
  • Keyword View: Hierarchical Representation of Actions
  • Active Screen View: Pictorial view of the currently active Screen

In the Expert View, QTP displays each operation performed on the application in the form of a script. The script is comprised of VBScript statements and the view is a script editor with many script editing capabilities. For each object and method in an Expert View statement, a corresponding row exists in the Keyword View and a corresponding Active Screen in the Active Screen view, which enables easy traceability.

Step Generator: If the user is familiar with VBScript, the user can add and update statements and enhance the tests and components with programming. After the test or an Action is recorded, its power and flexibility can be increased by adding recordable and non-recordable VBScript statements as required for tasks like Check Points, Datatables etc. These additional steps can be added either manually or using Insert>Step >Step Generator. Whenever a step is added to a script, then any Syntax errors of the step can be Identified in its Keyword view.

The Step Generator enables you to add steps quickly and easily, by selecting from a range of context-sensitive options and entering the required values. The generated step gets added at the position of cursor in the expert view.

The Step Generator enables you to add steps quickly and easily, by selecting from a range of context-sensitive options and entering the required values. In the Step Generator dialog box you can define steps that use:

  • test object methods and properties
  • utility object methods and properties
  • calls to library functions, VBScript functions, and internal script functions

Setting related to the Application Used: The different kind of Applications that can be tested using QTP are windows applications,web based (java and .Net), SAP, Oracle etc. Apart from the windows applications using MFC and simple web applications(which can be run with default add-ins), rest all applications require a special Add-in to be purchased to do the testing.

Each add-in which is bought and installed, results in a new tab in all the setting dialog boxes , using which various setting options can be chosen.It purely depends on the type of application , how to choose a particular setting option.

Also See:

Rahnuma Tasnim

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top