Test batch Runner in UFT

Meaning of Test Batch Runner (TBR):-
It is an inbuilt tool, bundled with UFT package. This tool is helpful in running of collective tests in a one go. These tests run one after the other in a flow.
In a sprint each time new build is given and based on the build functionality implemented or fixes, our regression tasks various. To overcome this we use TBR, thus some builds require 10 test scripts to run while other require only 5 out of these 10 in a sequence manner. So to overcome this, UFT came with TBR.
How to create Test Batch? 
Step1:- Open TBR from “Start > All Programs > HP Software > HP Unified Functional Testing > Tools > Test Batch Runner
Refer the link on Tools
Step2:- Create new TB file (File->New)
Step3:- Open the test scripts folder to add to TBR.(Tests->Add)
Step4:-Check the test that needs to be run.
Step5:-Run the test batch file (Test->Run or F5) and check the results.

Important Points:-
1. TBR file extension is  .MTB (Module Test Batch)
2. We can work with TBR with UFT closed.
3. It will launch UFT and open ->Run the test in a sequence.
4. We cannot see the Test Results in a one go, we need to open individual results file and check the status.

5. Overall status of each test run can be made from TBR

6. TBR test results can be Unknown, Passed, Failed, Running and Error.

Utility Objects in UFT

Meaning of Utility Objects:-
Utility objects are basically reserved keywords in UFT . This means their functionality is already defined in UFT compiler .For example in C language we used “Printf”  function, whose meaning was defined in  standard library of functions that were accessible by C program.

On the same tracks UFT provides lot of inbuilt utility objects whose functionality we can use at Runtime. These are not stored in object repository as objects.
Helps in retrieving or controlling UFT settings which can be used to modify the behavior of UFT at Runtime.
Some of the available Utility Objects:-
Datatable, Description, Dotnetfactory, Repository, RandomNumber, Environment
We need to generate Random number at runtime which can used to test the functionality of our application with random set of dat.
Scenario:- We want to test the addition functionality,  based on the random number
Solution: –We are going to use “RandomNumber” utility object.
‘Calling addition function 
Dim iFirstField,iSecondField
‘Assigning the random value between 1 and 100
iFirstField = RandomNumber(1,100)
‘Assigning the random value between 100 and 10000
iSecondField = RandomNumber(100,10000)
‘Function call
fnAdd iFirstField,iSecondField

public Function fnAdd(iFirstField,iSecondField)
    Dim iResult
    iResult = iFirstField + iSecondField
    msgbox (iResult)
End function

Tools available in UFT

Today I am planning to discuss about the Tools which comes in Bundle with UFT. As automation experts we should be aware about their usage and importance. 

In this discussion I’ll list them and in future, will be elaborating more on their functionality, so that we can utilize them to the maximum.

Tools list:-
  1. Activity Wizard
  2. Additional Installation Requirements
  3. HP Micro Player
  4. License Validation Utility
  5. Password Encoder
  6. Register new browser control
  7. Remote Agent
  8. Run Results Deletion Tool
  9. Silent Test Runner
  10. SoapUI to API Test Converter
  11. Test Batch Runner

 Test batch runner, Password Encoder , Silent Test Runner are some of the most frequently used tools.
Where to find:-
Path:-“”C:Program FilesHPHP SoftwareHP Unified Functional TestingTools”
Start > All Programs > HP Software > HP Unified Functional Testing > Tools”

Select the Tool to work with from HP folder in Program files.

Test Batch Runner UI(Used in Batch execution of Test Scripts):-

Test Batch Runner

Activity Wizard(Used in API testing):-

Activity Wizard UI

Answers to UFT interview Questions (Part-3)


1. Following are the main disadvantages of Shared OR:-

 As this is shared across projects, incase user deletesupdates any of the object by mistake, it results in failure of all the Test scripts with which Shared OR is attached.

Concurrent issue, Only one user can edit the Shared OR at a time, so in multiple user team working on same Shared OR, person has to wait to add objects to OR until other person closes, otherwise it’ll come in read only mode.

Incase we are running UFT  in update mode, it is not possible for  Shared OR, as it comes in read only mode in object repository window

I am not very sure whether it has any performance implications as it is a single file shared across multiple projects.

2) Test Resources (TS) tab is used to store various resources available for automation. Basically it acts as a shared store house, like we deposit our money in bank. So various resources that can be saved in TS, can be Test Scripts, Environment Variables, Shared OR,Data Table, Data files(like Excel), Recovery scenario’s, Test cases, Function library .

Please add incase we are missing something.

  RepositoriesCollection.Add(“Path of OR”)
  Using Automation Object Model

4)Refer the link Test Batch Runner

More FAQ’s 

UFT/QTP Interview Questions (Part-3)

Interview Questions (Part-3)

1. What are disadvantages of Shared Object Repository?

2. Please explain what all can be saved in Resource’s tab of ALM/QC?

3. How we can load OR at Run time?

4. Explain the process to work with Batch files in QTP?

5. What are the types of Descriptive programming (DP)? Where we can use them?
Please add your answers or more questions for UFT/QTP community .



Smart Identification in UFT/QTP

How to enable and disable Smart identification?

Scenario:- We need to capture an object(Say WebEdit) and we want UFT/QTP to uniquely identify the object but it is not able to find any unique properties to identify that, so how
can we go about it.

Solution:-We need to take help of Smart identification here as Mandatory + Assistive(MA) properties are not able to find any unique properties (We are also ignoring Ordinal identifier )

Enabling Smart identification for an object:-

Step 1:- Tools – Object identification 

Step2:- Select the Environment (In our case it is web as we need to configure
 for WebEdit) 

Step3:-Select the Test Object Class – Check the “Enable Smart Identification”
— Click “Configure”

Step4:- Set the Base Filter and Optional Filter properties – Click 

Step5:- Select the properties from Add/Remove Properties and Ok (We can define our new Property Also)

Step6:-Click Ok on all screens opened, and we are done and now WebEdit will be identified smartly by UFT

Verify Check:- To verify that enabled object it working as pet the settings, add object to Object Repository(OR) and check under “Object Properties” ->“Additional Details”->”Enable smart identification” is coming as “True”, in case it is not enabled “Enable smart identification”(ESI) will come as disabled.

Important Points:-

1.Incase ESI, is enabled, we can disable this option for any particular object in OR, 
by making setting its value to “False”.

2.For making this feature disabled for whole script, File->Settings->Run->”Disable Smart Identification during the Run session”

3.In point above, now UFT won’t rely on Smart identification during Run even we have 
set this feature enabled for any Object.

 4.In case we added any object, with ESI as Off, UFT won’t use ESI for identification
 in future, even though we have enabled it afterwords.

5.Taking the example of Web edit, in case we added it to OR with ESI disabled, 
enabling it for webedit after that won’t made the already added webedit to have ESI
 enabled and it’ll come as disabled in OR. But for newly added Webedit it will be enabled

Object Identification

How to define Visual Relation identifier in UFT

Step by Step guide to setting VRI in UFT:-

Select the object for enabling VRI then set the values

Click on cross symbol to add the VRI relative objects

Select from the existing objects or Select from application 

After selection of relative object, we can specify the relation details with the object on which VRI is applied.

We can also select X/Y-axis option apart from Left,Right,Above,Below,Contains, Horizontal/Vertical.

We can modify and check the VRI properties

Visual Relation Identifier?

Visual Relation Identifier in UFT


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.

Scenario1:- You need to go to Cash counter (Object) in bank; your friend told you that it is the third counter from entry.

Solution :- You( UFT )enters the bank, looks for Cash counter name, but sadly there are two Cash Counters one for deposit and other for withdrawal , you are confused which is the counter you have to go,  than you thought of going to the third counter from entry  (Ordinal Identifier concept of object identification in UFT) but bad luck again, due to some renovation in Bank, cash counter has been moved to different location, so you as  UFT failed to identify the object.

To overcome the limitation of Scenario1, UFT comes with the feature VRI (Introduced in QTP -11.0).

Scenario 2:– In addition to scenario1, UFT is told that cash counter (Object) has Bank Manager Cabin on left and in the same horizontal line.

Solution: – UFT enters the bank, looks for the Cash counter name, but as there are two counters with the same name, now comes VRI, i.e. to look for that counter which is left of Managers cabin and finally right(Unique) counter is found.

Now here even renovation happens than also UFT will uniquely identify counter (with the assumption that in case of renovation also Managers, Cash counter will remain adjacent to each other irrespective of their position(Ordinal Identifier) in Bank.)

In testing also lot of time object position changes (Renovation happens) so VRI is more reliable than Ordinal identifier, provided that relative objects are same.

Place to ser VRI:-

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

VRI usage in UFT:-

Step 1:- During a run session, UFT first attempts to identify the test object (Cash Counter)using the object’s description properties(Mandatory + Assistive Properties).If it fails to uniquely identify than VRI comes into picture.(Provided VRI is enabled)

Step2:- If UFT finds one or more objects matching the test object’s description, it attempts to identify the object using the VRI.

Image courtesy of Ohmega1982 / FreeDigitalPhotos.net