Dear readers, these UFT/QTP interview questions have been specially designed for both beginners and professionals by covering all the essential concepts of UFT. Take a look at these sample questions to find out how much you’re well versed with this technology and also know how to answer them.
Without further delay, let’s get started with the questions one by one.
UFT Interview Questions and Answers – Updated 2021
Q1) What is UFT?
Ans. UFT stands for Unified Functional Testing. It’s an automated functional testing tool that helps testers find bugs or errors in applications under the test. Micro Focus acquired it. UFT was formerly known as QTP (QuickTest Professional). It supports automated tests for web, mobile, API, RPA, and enterprise application software.
Q2) What is the difference between QTP and UFT?
Ans. UFT is the updated version of QTP. UFT supports API testing, while QTP does not.
Q3) What are the different types of QTP assets and their extensions?
|Test Script File||.tsp|
|Test Batch runner||.mtb|
|Per Action Repository||.mtr|
|Shared Object Repository||.tsr|
Q4) In UFT, what type of object repositories are available?
Ans. UFT supports two types of Object Repository −
- Per-Action Object Repository – It is used by default and presented by the extension “.mtr.” It is also called a Local object repository
Shared Object Repository – Also known as Global Object repository and presented by the extension “.tsr.” While automating tests, changing object descriptions, etc., this is frequently used.
Q5) What’s the difference between UFT and Selenium?
Ans. The below table lists the main differences between UFT and Selenium:
|It’s a premium tool from Microfocus.||It’s an open-source tool and free to use.|
|Using this tool, you can test client-server, web, and desktop-based applications.||Using this tool, you can just automate the web applications.|
|It supports VBScript.||Supports many programming languages, including Java, Ruby, .Net, etc.|
|It’s a more user-friendly tool, and scripts are developed quickly.||It’s a low-level with less functionality compared to UFT.|
|Offers very good technical support.||Since it’s open-source, it has no official support.|
|Supports all types of dialog boxes.||Supports dialog boxes partially.|
Q6) What are the technologies supported by UFT?
Ans. Web, Java, Oracle, .Net, SAP, WPF, Siebel, PeopleSoft, PowerBuilder, Delphi, Web Services, Stingray 1, Terminal Emulator, Silverlight, Flex, Windows Mobile, VisualAge Smalltalk, and mainframe terminal emulator
Q7) What are the available environment variables types in UFT?
Ans. There are two types of UFT environment variables:
- Built-in Variables
- User-defined Variables
Built-in Variables – In UFT, pre-defined variables are built-in variables. It allows you to retrieve the data about the execution test and the operating system on which the test executes. A few of the built-in variables are Test directory, Action iteration, local hostnames, etc.
User-defined Variables – These are the variables that the user defines before executing the test.
- Internal Variables: These variables are available only to a particular test and defined by a user before test execution.
- External Variables: These variables are available globally for different tests and defined by the users.
Q8) How to call from one action to another action in UFT?
Ans. You can do it in 2 ways:
- Call to Existing Action – A call is made to the source script’s action without copying Object Repository, Script, and Datable.
- Call to copy of Action – In this, you can call one action from another action by coping with the Action Object Repository, Script, and Datable.
Q9) What are Virtual Objects?
Ans. Sometimes your application under test execution might contain standard window objects but are not recognized by QTP. Under such situations, those objects are defined as Virtual Objects and can be mapped to standard classes, such as checkboxes or buttons. So that UFT can simulate user actions on the virtual object during the run session.
Q10) Does UFT support cross-browser testing?
Ans. UFT/QTP test scripts run only on the Windows environment. You cannot run them across all browsers.
Q11) Give a brief about keyword View and Expert View in UFT/QTP.
- Expert view: As the name indicates, the expert view is for more technical users who want to tweak the source code according to the requirements. In the Expert View, each line represents a Test Step in VB Script.
- Keyword view: Keyword view in UFT enables the user to see the steps of created actions or components in a table-like form. You can generate and modify the steps by selecting the items and operations in the Keyword View.
Q12) Is it possible to record a running application on a remote machine using UFT?
Ans. Yes. It’s possible to record a remote machine’s application that you are accessing through the local browser, but not via the remoter like a Citrix. Still, even if you’re unable to record, try to install QTP and application on the same machine.
QTP Interview Questions
Q13) For suppose if there are four tests and you want to call these tests in the main script. Can you perform this using QTP?
Ans. Yes. You can call any number of Test Scripts from Main Script. You need to make the actions in whatever the scripts you want to call as the reusable actions and then give a call to these scripts.
Q14) What are actions in UFT?
Ans. Actions in UFT are the units that divide the test into logical sections. By dividing the tests into multiple actions, you can design more modular and efficient tests.
A test can contain different types of actions:
- Internal and External Actions – Internal action is stored in a local test, and external action is stored in a different test.
- Reusable Actions – When a call is inserted in a new action, by default, it becomes reusable, allowing you to call the action from any test).
- Copied Actions
Q15) How will you handle Java Tree in UFT?
Ans. Foremost you need to select Java Add-In and launch it in QTP. Next step is to record and operate on the Java Tree object.
If any issue arises while recording, you can choose Tools > Object Identification > Java, tree object, and make changes in mandatory and assistive properties to enable identification.
Q16) List the types of recording modes available in QTP?
Ans. The following are the types of recording modes available in UFT/QTP:
- Normal Recording
- Analog Recording
- Low-level recording
- Insight recording
- UI Automation recording
UFT Interview Questions and Answers Advanced
Q17) What is the logical name of the object?
Ans. While object creation, a logical name is given by UFT to uniquely identify it from other applications in the application. It can also be used to map the object name in the script with its corresponding description in the object repository.
Here Mindmajix is the logical name of the object.
Q18) Explain about the keyword CreateObject.
Ans. It creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
The name of the application providing the object.
- typename: Required.
The class or type of the object to create.
- location: Optional.
The name of the network server is where the object creation takes place.
Example : Set IE = CreateObject(“MozillaFirefox.Application”)
Q19) How to check the number of browsers opened?
Ans. To know that you have to find how many child objects of the type ‘browser’ are present on the desktop.
The following is the code that explains it:
Set ObjectBrowser = Description.Create
ObjectBrowser(“micclass”).Value = “Browser”
Set BObj = Desktop.ChildObjects(ObjectBrowser)
Q20) What is the use of breakpoints in UFT?
Ans. Breakpoints are used to stop the test execution at a certain point while running. Typically, used to check the application’s state or to know how a specific feature works at a particular phase at runtime.
Q21) How will you check the broken links on a page?
Ans. By incorporating a page checkpoint on every page, you can check the broken links on a page.
To do so, you can go to Tools->options->Web->Advanced and select the option to check for broken links automatically on every page QTP accesses.
Q22) What is the use of Text output value in QTP?
Ans. Output values allow you to view the values that the application talks about during runtime. The values change for each iteration, when parameterized. Thus by creating output values, you can capture the values that the application takes for each run and output them to the data table.
Q23) What is Test Fusion Report?
Ans. A report which displays all aspects of a test run and is organized in a tree format is called test fusion format. Shows the information of each step executed for all iterations. It also gives a Run-time data table and Screenshots of the test run if opted. By combining Test Fusion reports with QTP, you can share reports across an entire QA and development team.
Q24) How to handle exceptions in UFT?
Ans. In UFT, exceptional handling is done by using
- Recovery Scenarios.
- Using the “On Error” statement
In the Recovery scenario, you have to define.
- Recovery steps
- Triggered Events
- Post-Recovery Test-Run
Q25) What are the different types of Test Automation Frameworks?
Ans. Following are the types of Automation Frameworks are –
- Linear Scripting – Record & Playback
- The Data-Driven Testing Framework.
- The Test Library Architecture Framework.
- The Keyword-Driven or Table-Driven Testing Framework.