Sunday, November 2, 2014

Parametrization in QTP

Test can be enhanced by parameterizing the values that it uses. A parameter is a variable that is assigned a value from an external data source or generator.

Following values can be parametrized:
  •        Checkpoints
  •        Object properties for a selected step
  •        Operation arguments defined for a selected step.
  •        One or more properties of an object stored in the local object repository. 


Values can be parameterized using:
  •       Test/action parameters
  •       DataTable parameters
  •       Environment Variable parameters
  •       Using Random number parameters

Following are the parameter types used for parametrization


Test/action parameters: Test parameters enable to use values passed from the test. Action parameters enable to pass values from other actions in the test.

Data Table parameters: Enables to create a data-driven test (or action) that runs several times using the data supplied. In each repetition, or iteration, QTP uses a different value from the data table

Environment variable parameters: Enables to use variable values from other sources during the run session. These may be values supplied, or values that QTP generates based on conditions and options

Random number parameters. Enables to insert random numbers as values in the test

Saturday, November 1, 2014

Visual Relation Identifiers

A visual relation identifier (VRI) is a set of definitions that enable you to identify the object in the application according its neighbouring objects in the application. 

You can select neighbouring objects that will maintain the same
relative location to your object, even if the user interface design changes.

This helps UFT to identify similar objects much as a human tester would, and helps in creating more stable object repositories that can withstand predictable changes to the application’s user interface.

You define visual relations in the Visual Relation Identifier dialog box, which is accessible from the local or shared object repository, and from the Object Properties dialog box

Creating a visual relation identifier for an object


1. To create a visual relation identifier for an object, go to object repository window and select the object for which visual relation identifier needs to be created.
2. In the Visual Relation Identifier Settings row, click in the Value cell.
3. Click the Browse button in the text box.
4. Define relation of object relative to other objects.

Some Important points to remember about visual relation identifier are:


1. Visual relation identifier are taken into consideration if object is not uniquely identified using the object identification Properties.
2. Visual relation identifier have preference on smart identification for object recognition.
3. Ordinal Identifiers are ignored if visual relation identifier is defined for an object.
4. Visual Relation identifier are created for an object based on relative position of other stable object, i.e. objects existing left, right, top , bottom relative to object to be identified can be used for relative identifier.
5. Relative Objects should exist in object repository before a relation can be created.
6. Relative visual identifier cannot be used in Descriptive Programming as objects should exist in OR.
7. This is used to filter in case of multiple objects in the application matching object definition but are placed relative to other object in application.
8. If no objects in the application match the test object’s description properties, then the visual relation identifier you defined is ignored.
9. Visual relation identifiers are not supported for WebService test objects.