Card image cap

Micro Focus Unified Functional Testing [UFT] is an application that is used for service, functional, and regression testing purposes. UFT was initially known as QuickTest Professional [QTP] and was released by Mercury Interactive in 2001. In 2006, Hewlett Packard developed this application and renamed it UFT. However, the use of UFT/QTP also includes identifying bugs in automated user actions in various browsers and operating systems of Windows. Therefore, the need for UTF experts is always on the rise which makes the interview process very professional as well. 

Here are some 50 basic and advanced UTF interview questions and answers which will help you prepare and perform well in your actual interview.

UFT/QTP Interview Questions and Answers

UFT Interview Questions and Answers For Beginners

1. Define Unicode.

Unicode is a character set used in Java to convert/encode the characters from various languages to binary numbers / the computer language. 

2. What is the major difference between UFT and QTP?

UFT and QTP vary with their API Testing as QTP encourages only GUI Testing while UFT allows both GUI and API for both Web-based Applications and Desktops.  

3. What are the types of object Repositories available in Micro Focus UFT?

Shared Object Repository uses ‘.tsr’ as its extension for dealing with dynamic objects that are used in various tests while Per-Action Object Repository uses ‘.mtr’ as its extension and is called to action by default. The former is also called Global while the latter is Local.

4. What are the different environments that support HP QTP?

  • Java
  • Oracle
  • SAP
  • Web Services
  • Active X
  • .Net
  • Siebel
  • People Soft
  • Delphi
  • Terminal Emulator
  • Power Builder
  • Stingray
  • Visual Basic
  • Web
  • Visual Age

5. How many types of Repositories does QTP have?

Any default action in QTP will carry a Local Repository while the tester carries Shared Object Repository to use it for various actions and make the object sharable to other users. Shared OR is also called a Common Repository.

6. What are the accessibility modifiers in UFT/QTP?

Private, protected and the public are the accessibility modifiers in UFT/QTP. The public is restrictive to its minimum while Private is highly restrictive and the Protected modifier uses keywords to allow visibility to certain classes in QTP/UFT.

7. What is Downcasting in UFT?

Downcasting refers to the process of casting the common type to an individual and a specific type. 

8. What are the bits required for ASCII, UTF-16, and UTF-8?

ASCII requires 7 bits while its character set is said to use 8 bits. UTF-16 requires bit patterns starting from 16-bit while UTF-8 uses bit patterns like 8, 16, and 18. On the whole, ASCII uses 7 bits and Unicode utilizes 16 bits.

9. What do you mean by Utility Objects?

Utility Objects in UFT/QTP refer to the objects that are reserved for Testing and Result Reporting purposes, like ‘SystemUtil.Run’.

10. Is there a built-in Add-in UFT? 

Yes, the built-in Add-in UFT is ‘Standard Windows’.

11. How many licenses are available for UFT?

There are 2 major licenses available for UFT. Seat License is also called the UFT trial license with which one can use UFT for free for 30 days as a demo. The concurrent License permits the local network users to use UFT from the pool server.

12. What is the purpose of Smart Identification in QTP?

When QTP fails to identify a particular object even after using its 3 properties, it then uses ‘Smart Identification’ which brings in a few more properties like ‘Base Filter Properties’ and ‘Optional Filter Properties’ to identify the required object.

13. What is the key difference between Object Spy and Object Repository?

Object Spy is a tool that helps one to monitor and view the functions and features of an object when placed in AUT while Object Repository [OR] is the storage space where all the objects used in a test are stored.  Object Spy can also be used to know the object hierarchy and also to add objects to OR while OR stores certain properties to identify the objects.

14. Can scripting be used to bring different tests in the main script in QTP?

When you establish the Actions in different scripts re-usable then these scripts can be called from the main script in QTP for testing. This process supports a minimum of 4 scripts, therefore, the answer is a big YES.

15. What is the function of the ‘action split’ in QTP?

Action Spilt, as the name suggests, splits the ongoing action (in reference to its functionality) into 2 to get the code for re-use. Actions in QTP do have different functionalities which makes this split process quite easy. 

16. How many modes of Recording can be practiced in UFT/QTP and what are they?

QTP/UFT practices 3 major Recording modes.

  • The default mode is called the ‘Normal Recording Mode ‘ which is used in automation activities. It can be able to recognize objects irrespective of their position on the screen by utilizing QTP's Test Object Model.
  • The Analog Recording mode is used to record every keyboard and mouse movement made by the user and is saved in the track format.
  • The last mode is the Low-Level Recording mode which records every action (performed by the user such as recording signature, drawing a picture, drag and drop operations) based on the coordinate location of the objects and not on their properties. 

17. Which Recording mode, available in QTP, requires more storage space/memory?

The Low-Level Recording Mode and the Analog mode require more memory as they store every action made in QTP, by the users. 

18. Can the recording modes be changed while the Test creation is performed?

You can shift to Analog mode only while you are recording but you can switch to the Low-level mode whenever you want to. During this process, you can shift to different recording modes and also come back to the default one, whenever you want.

19. What is Insight Recording Mode?

The insight Recording mode is a mode that records object screenshots to carry out actions on it instead of recording the properties of the objects. This mode can be used whenever UFT/QTP is unable to use the properties of the object to recognize them for its corresponding actions. 

20. What is the procedure followed by QTP to identify an object?

QTP follows 3 properties that determine each object with its unique features. The Mandatory properties store the description of each object, while the Assistive properties add non-mandatory features to the object description when the default one is not sufficient. However, the Ordinal Identifiers states the location of the objects (Source code/ the page), for its identification.

21. If an action OR is shared and local and if both have the same object then which OR type will be taken into account during the test?

The local OR type will be considered during the test as it is the default OR type, unlike shared OR.

22. What is the difference between Output value and Checkpoint?

Output value, as the name suggests, refers to the output of the application of different objects while Check Point acts as a verification point for the output values. Output values can be of Database values / Text values / Property values while Check Point is used to make a comparison between the expected and the received values.  

23. How can GetRoProperty and SetToProperty be differentiated?

GetRoProperty is used in QTP as the common method to get the run-time object’s property values while SetToProperty can be used to make a temporary change in the property of any object from OR. 

24. Which Add is used to support the Mainframe Applications?

Terminal Emulators [TE] is the Add which can be used to support the Mainframe Applications. 

25. When will the UFT Tool Test execution be reduced?

If the user loads unwanted and inessential Add-ins in UFT, then the function of UFT Tool Test execution will be reduced. 

26. Which Add is used for supporting Oracle RDBMS?

UFT can use an MS Access Database Engine which is integrated, instead of any Add-ins, to carry out Database operations. 

27. Can UFT Tools be used to test D2K applications?

No, as there are no Add-ins that support D2K applications in UFT.

28. Are the Database Operations supported by UFT?

Yes. UFT can use SQL commands present in UFT Editor, with the help of an integrated MS Access Database Engine. The Database operations are carried out by UFT with VBScript Database objects. 

29. Which file type should be used to export UFT Tests?

UFT Tests can be exported only through the ‘.zip’ file format.

UFT Advanced Interview Questions For Experienced

30. When an inner class is a member of the outer class, which modifier should be used?

Different modifiers can be used with a non-local inner class that is part of the outer class. Public, protected, private, abstract, final, and or static can be used in such cases. 

31. Where should the Package statement appear in a source code file?

The Package statement is the most important detail and therefore should be present on the first line of the source code. During this process, the comments and other blank lines should be ignored. 

32. When is the Native method implemented?

The Native method can be implemented in any language, except Java. 

33. What are the objects that are used in a Web-based environment?

Objects like Dropdown box, Text box, Page, Radio button, Button, Check box, Browser, Edit box, Link, Combo box, Image, List box, and Image are a few that can be used in a Web-based environment. 

34. What is the latest version of UFT?

Version 14.0 UFT is the latest version.

35. In order to work with excel, which object should be used?

The Utility object should be used to work with excel.

36. What are the different types of UFT File extensions?

  • .txt , .vbs , .qfl for Library Files.
  • .mtb for Batch test File.
  • .qrs for Recovery Scenario Files.
  • .mts for QTP Script File.
  • .xls for Datatable Data (Input/Output).
  • .xml , .txt , .ini for Environmental Variable File.
  • .mst for Action File.
  • .tsr for Shared Object Repository.
  • .mtr for Local/Per Action OR.
  • .vot for Virtual Object Collection.

37. In case the results of the tests stay unpredictable, how can they be managed?

You should use ‘Recovery Scenario’ when the test results are unpredictable in UFT/QTP.

38. When any new action is implemented, which gets created by default?

The Local Data Sheet, Local OR, and the Folder get created by default when a new action is implemented. 

39. In order to make the text file readable, which object should be used?

Use ‘TextStream’ to make a text file readable in QTP/UFT.

40. A function and a subroutine are different but how?

The only main difference between a function and a subroutine is the ability of the former to return a value while the latter cannot return any values. 

41. What is the procedure to export files from the database to QTP?

Use the following code to read files and data from the QTP database:

Set db = createobject(“ADODB.Connection”)
db.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G::\masterflair\vb6\admission_project.mdb;Persist Security Info=False”

Set rst = createobject(“ADODB.Recordset”)
rst.Open “select * from Course “, db,3
id = rst.RecordCount
For i=0 to id-1
print rst.fields(0) & rst.fields(1) & rst.fields(2) & rst.fields(3)

42. What is the code to extract all the characters from a string?

Dim a

a = “QAInsights”

1 = Len(a)

For i=1 to 1

b = mid(a,I,1)

MsgBox b


43. What is the procedure to use Java trees in QTP?

Choose ‘Java Add-In’ and then open QTP. Now every operation conducted on the Java Tree should be recorded. In case you need to enable identification, you should make changes in the properties of the objects by clicking Tools > Object Identification > Java, tree Object. 

44. What are the ways to shift from one activity to another action in UFT/QTP?

You can either call the ‘Call to copy of Action’ to have your Action Object Repository Script and Datable copied to the required Test Script. Else you can ‘Call to Existing Action’ to only make a reference/call to the Action of Object Repository, Script, and Datable to the source script. 

45. Is it possible to perform both Cross-platform and Cross-browser tests in QTP?

Yes. Cross-platform tests can be carried out in QTP by using the OS functionality. You need to enter ‘Platform = Environment(“OS”) to invoke that function. According to each platform, call the actions which were recorded there. In the case of Cross Browser Testing, enter “Browser(“Core Values”) and GetRoProperty(“version”) to get the right browser and its exact version by which you can call the actions. 

46. How can one view the Run-Time Data Table and when is it used?

The Run-Time Data stores data like checkpoint values, output, and output values. It is stored in the Test Results Folder in the ‘.xls’ file format. Therefore, you can access it only in the Test Fusion Report. 

47. If you have to enter a variable in QTP, how will you do it?

All you have to do is to enter a variable with the help of a DIM keyword and then you should assign the variable’s value through the SET keyword. 

48. Enter the syntax to insert/remove xls in QTP.

DataTable.ImportSheet “..\..\TestData\Input.xls”, 1 ,dtGlobalSheet

DataTable.ExportSheet “..\..\Results\Output.xls”,”Global”

49. What is the purpose of ‘action 0’ in QTP?

‘Action 0’ is used to know the sequence in which the actions are called. However, ‘action 0’ is a default number and the number keeps increasing for each test like action 1, action 2, etc. 

50. What should you do to stop your system from getting locked in QTP?

The simple method to avoid getting locked in QTP is to play some video or song in a loop, in the device’s media player. Make that run in the background while you work in QTP.

Related Interview Questions

About Author


Liam Plunkett

Solution Architect

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

Table of Contents