PRIDE MONTH ALERT : FLAT 20% OFF On Our Best-Selling Courses Use -  PRIDE20

- QA Testing Blogs -

Top 100 UFT/QTP Interview Question and Answers in 2022



Introduction

If you are looking for a job in Automation Testing, you should be ready for some high-level uft interview questions. Here we have compiled a list of Top 100 QTP / UFT Interview Questions & Answers. You can use these QTP / UFT interview questions as references while preparing for your interview. Also, you can sharpen up your skill sets through an advanced QTP/UFT certification. Please keep in mind that all of these questions are basic and entry-level questions.

QTP Interview Questions Answer for Freshers

1. What is UFT/QTP?

QTP or ‘QuickTest Professional’ or ‘Universal Testing Platform’ is a testing tool for functional testing of software applications. It is used for testing the software at functional level. UFT stands for ‘Unified Functional Testing’, which is the combination of TestPartner and QuickTest Pro.

2. What are the benefits of using UFT as a test automation tool?

Following are the benefits of using UFT as a test automation tool:

  1. UFT has recording and playback functions.
  2. Record the script on the active screen to help the tester reference the properties of the screen object. 
  3. TheUFT has very good object detection technology.
  4. The active screen allows you to improve existing tests without the need for automated ultrasonic testing (AUT).
  5. Supports a variety of automated frameworks such as keyword-driven testing, modular testing, and data-driven testing. 
  6. It has an integrated development environment (IDE).
  7. Works with test management software such as Quality Center, Test Director, and Winrunner.
  8. Smoke, Regression, and Sanity are examples of easy-to-maintain suites. 
  9. The UFT supports Business Process Testing (BPT), a component-based testing framework that provides a powerful and efficient platform for manually and automatically testing entire business processes. The component reusability feature makes the testing process much faster, and you can combine manual and automated testing to reduce duplication of work.
  10. Works with XML.
  11. QTP enables test reports for analytical purposes.

3. What are the features of UFT?

UFT has many features, but it's also fairly easy to understand and train for employees to use. Below are some great features that can be very helpful in scripting.

  1. Test Combination Generator (TCG): This software helps you create test configurations by using test parameters and their possible values ​​to generate different combinations of data.
  2. Insight Recording: The control is visible only by appearance, not by native properties. This is useful for testing controls in environments where UFT is not supported or on remote computers running operating systems other than Windows. 
  3. UFT recognizes the controls in your application by matching them with the images saved with each Insight test object when you run the test or component. The
  4. UFT provides built-in reporting capabilities and the ability to create custom output files that accurately indicate where and when TestStep failed, along with a time stamp.
  5. Runtime objects for Windows are supported. You can use the Windows Runtime application to record and run tests. You can use the Windows Runtime application to create an object repository.

4. What does checkpoint mean in the context of UFT?

In UFT, a checkpoint is the point at which the current value of an object's specified property is compared to the desired value. If the current value and the predicted value are equal, the status is PASS. Otherwise, the status is FAIL.

Following are the types of checkpoints:

  1. Default checkpoint: During a run session, the expected value of the object's properties captured during recording is compared to the object's current value.
  2. Page Checkpoints: Page checkpoints are standard checkpoints set up for web pages. It is used to count the number of links and images on the page. Page checkpoints can be used to monitor load times or the time it takes to load a web page.
  3. Bitmap Checkpoint: A bitmap checkpoint is a checkpoint that allows a user to inspect a bitmap of an image or an entire web page. Compare the actual image with the expected image pixel by pixel.
  4. Image Checkpoint: Image checkpoints allow you to see properties such as the location of source files for online images. Unlike bitmap checkpoints, image checkpoints do not inspect pixels (bitmaps).
  5. Text Checkpoint: A text checkpoint is a tool for verifying that the expected text is present in a web page or application. This text can be obtained from a specific area of ​​the app or a small portion of the text on the screen.
  6. Accessibility Checkpoint: Ensure that web-based technologies and information systems follow the instructions and recommendations of the World Wide Web Consortium (W3C). These guidelines make it easier for people with disabilities to use the Internet.
  7. Database checkpoint: Database checkpoint queries in real-time and database values ​​are saved as intended.

Get more details through a well-curated QTP/UFT tutorial gude for beginners.

5. What are the different types of QTP assets and their extensions that are used in testing?

Test assets and extensions are listed below:

  Test Asset

    Extension

Test File

.mts

Shared Object Repository

.tsr

Function Library

.qfl

Results

.xml

Test Batch Runner

.mtb

Local Object Repository

.mtr

Recovery Scenario

.qrs

6 What do you understand by QTP and its phases?

QTP or Quick Test Pro is a testing tool that can either operate alone or in an integrated environment. A test that is conducted in QTP consist of the following phases:

  • Application Analysis: Before starting the tests, the application is analyzed to find out the needs for testing
  • Testing Infrastructure Preparation: As per the testing requirement the resources like a shared repository, function library is prepared to conduct the test
  • Test Cases Preparation: Test script or test case is prepared in which the actions are specified for any specific case while testing the application. An object repository is added with function library.
  • Test Enhancement: Checkpoints, logic addition, test scope enhancement and conditions are added for checking purposes
  • Defect Reporting: The bugs are locked into the bug report and sent to the development team.

7. Enlist all recording modes that are available in QTP.

Below-listed are three types of recording modes available in QTP:

  • Normal or Default Recording: Irrespective of the object location QTP identifies it on the screen.
  • Analog Recording Mode: In case the exact mouse movement is critical to take any action, then this mode is used. Examples are painting applications or the signature required for the document.
  • Low-Level Recording: The objects that cannot be identified easily are recorded by this option. In case the object location changes inside the application then this mode is used.

8. What is the difference between bitmap checkpoints and image checkpoints?

The Bitmap Checkpoint performs a pixel-by-pixel comparison of an image or part of an image.

Image checkpoints perform pixel-to-pixel comparisons, but instead compare image properties such as alt text, linked URLs, and so on.

9. Explain the object repository in QTP.

Whenever QTP learns any new object, it stores it in its object repository along with its properties. It is basically used to identify an object and following two types of object repositories are maintained by QTP:

  • Shared Object Repository: This repository can be shared between multiple tests, but no changes can be made in this repository. It is usually saved with TSR extension and mostly is a keyword-driven methodology.
  • Local Object Repository: It is linked to only one test. In this repository, the user can easily make the changes, actions, like adding an object in the repository or making changes in an object property, can be done. The objects are saved with the ‘.mtr’ extension.

10. What is the difference between QTP features and actions?

Actions have their own object store and data table. Actions help modularize your tests and increase their reuse. Example: You can split a script into actions based on features such as login and logout.

Functions are VBscript programming concepts and do not have their own object repository or data table. Functions are useful for code reuse. Example: You can create a function in a script to concatenate two strings.

Some more qtp programming interview questions

11). Can QTP run in any environment?

No, QTP can only be used and run on the Windows operating system.

12 What kind of environment does HP QTP support?

Following are the different environments HP supports:

  1. Active X
  2. People Soft 
  3. Terminal Emulator
  4. Delphi
  5. Power Builder
  6. Visual Basic
  7. Java
  8. SAP
  9. Visual Age
  10. .Net
  11. Siebel
  12. Web 
  13. Oracle
  14. Stingray
  15. WebServices, and many more.

13 Do you want to explain the QTP test process?

Quick Test The testing process consists of six main phases.

  1.  Creating a test plan-This is the preparatory phase to identify the exact test steps, test dates, and expected results of an automated test. It also identifies the environment and system configuration required to create and run QTP tests.
  2.  Record a session in your application-In this phase, AUT performs one test step at a time, and QTP automatically records a VBscript statement for each step performed.
  3.  Test Improvements-This phase improves the logic of the test script by adding programming logic such as checkpoints, output values, parameterization, and if… else loops.
  4.  Playback and Debugging-After improvements, play the script to make sure it's working properly and debug it if necessary.
  5. Run Test-This phase runs the actual run of the test script.
  6.  Analyzing Test Results-Once the test has run, analyze the results in the generated TestFusion report.
  7.  Defect Reporting-All identified incidents must be reported. You can use the Quality Center to automatically report test errors that fail in QTP.

14). Enlist various test steps of QTP.

Below-listed five test steps are executed for any test:

  • Test Object Identification
  • Test Functions
  • Utility or Session controlling steps
  • Commenting
  • Programming Logic

15. What are the different types of test automation frameworks?

Following are the different types:

  1. Linear Scripting – Record & Playback
  2. The Test Library Architecture Framework.
  3. The Data-Driven Testing Framework.
  4. The Keyword-Driven or Table-Driven Testing Framework.

16. How do you use QTP to check your web application for broken links?

Page Checkpoints are available. This will display a number of valid / invalid links on the page.

17 What is a runtime data table? Where can I find and view this table?

Data such as parameterized outputs, testpoint values, and output values ​​are stored in run-time tables. This is an xls file stored in the test results folder. You can also access it from the Test Fusion Report.

18 What is the difference between a checkpoint and a baseline?

A checkpoint is a checkpoint that compares the current value of a particular property with the expected value of that property. Generates a PASS or FAIL status based on this comparison.

Output values ​​are values ​​that can be captured during a test run and stored in a specific location, such as a data table or variable. Unlike checkpoints, PASS / FAIL status is not generated.

19 What kind of environment variables does QTP have?

Following are the different environment variables:

  1. Built-in (Read only)
  2. User-defined Internal (Read only)
  3. User-defined External (Read/Write) 

20 How does QTP handle Java trees?

QTP handles the Java trees for the object defined by a variable or object, but the variable must be Java. So, if your object is not Java, you can use the UFT Object Repository to handle it.

First, select Java Add – In to start QTP. Recording the operation in the next step of the Java tree. If you encounter problems during recording, you can select Tools> Object Identification> Java> Tree Objects and change the required support properties to enable identification.

21 What does descriptive programming mean in the context of UFT?

Descriptive programming is used to perform operations on AUT objects whose definitions are not recorded in the object repository. You can use this approach to skip the object repository and specify the object's description directly in the statement. Object names are just a way to associate a scripted item with a description in the repository. The script runs even if the object is renamed in the script and object repository.

The following are different types of descriptive programming.

Static descriptive programming: 

Use the static method to specify object attributes in the following object identification pattern.

property: = values,

This format is called property-value pairs and is separated by double quotes. If the object has many identifying descriptions, use commas to separate them.

Dynamic Descriptive Programming:

The second way to achieve the same goal is dynamic descriptive programming. If your script uses descriptive programming object candidates multiple times, specifying all property-value pairs for each set can be very tedious. In such cases, you can use the QTP description class. The syntax of the description object is as follows:

SetMyDescription = Description.Create ();

MyDescription ("property"). Value = "property value";

22 If you use descriptive programming, which property do you use to identify the browser and the page?

You can use the name property

. Example: B .: Browser ("name: =" xxx ""). page ("name: =" xxxx "")… ..

or

You can also use the "micClass" property.

Example: Browser ("micClass: = browser"). page ("micClass: = page")….

23 What is the QTP batch test tool?

You can run multiple scripts using the batch test tool. When a script is added to the tool, the script is automatically opened and executed one at a time.

24 What are the drawbacks of QTP?

QTP version 10 to

1) Extensive testing with QTP consumes a lot of memory and increases CPU utilization.

2) QTP saves the results in an HTML file (not in TXT format), which can result in a large results folder.

25 What are the optional steps?

Steps declared as options do not necessarily have to be performed. If a corresponding GUI object exists, QTP will perform the operation on that object. If the GUI object does not exist, QTP bypasses the optional step and continues executing the next step.

26 How to call an application using QTP?

a) SystemUtil.Run

SystemUtil.Run (file name, parameter, path, operation)

Example: SystemUtil.Run ("iexplorer.exe", http: //www.google.com)

SystemUtil.Run ("test." txt "," "", C: \ "", 1 ")

b) InvokeApplication

Example: InvokeApplication" C: \ Programs \ Internet Explorer \ IEXPLORE.EXE http://www.google.com "

c ) Creating a shell object using VBscript

Example: Create a WScript.shell object.

dim test shell

settest shell = CreateObject ("Wscript.shell")

27 How do you declare variables in QTP?

Declared with the DIM keyword. Use the SET keyword to assign a value to the variable.

Example

Dim temp ‘Declare a temperature variable

Set temp = 20’ Assign the value 20 to the temperature.

28 What is GetRoProperty?

GetRoProperty is a standard method provided by QTP to get property values ​​for run-time objects.

29  What is a smart ID?

Normally, even one of the properties of the screen object does not match the property of the recorded object. The test will fail.

With Smart ID, QTP does not throw an error if the property values ​​do not match, but it uses the basic filter property and the optional filter property to uniquely identify the object. With smart IDs, if the property values ​​do not match, the script will not fail, but will continue to compare the next property. Smart identification can be enabled in the Object Identification dialog box.

30). Which recording mode needs more memory?

Low-level and Analog recording modes need more memory.

31 What are the different shooting modes? How does it work?

QTP has three recording modes.

Normal recording mode: The default recording method is always normal mode. This method uses a model of test and runtime objects to train and respond to AUT.

Analog Recording Mode: Records the exact mouse and keystrokes made by the user in relation to the screen or AUT window. Steps recorded this way cannot be edited.

Here's how this is usually represented in code:

Window/app.RunAnalog "Track1"

One of the scenarios where this type of recording can be used is when trying to capture a signature.

Low-level recording mode: This mode records the coordinates of the application on which the operation is performed, regardless of whether the QTP recognizes a particular object or operation.

32 Describes how to read the registry key with UFT.

‘Create a shell object

Set MyShell= CreateObject (“WScript.Shell”)

Read the value of key from the registry

RegValue =MyShell.RegRead (varpathofkey)

‘in above function we have to pass the path of key in registery’.

e.g. HKCU\software\ie\settings

msgbox RegValue

33 What is an Object Spy? How to use it.

Object Spy helps determine the execution and test times of object properties and methods of the application under test.

You can access the Object Spy directly from the

toolbar or the Object Repository dialog box.

Very useful for descriptive programming.

34 Would you like to mention the steps required by UFT to send an email from Outlook?

Set Outlook = CreateObject ("Outlook.Application")

Dim Message 'As Outlook.MailItem

Set Message = Outlook.CreateItem(olMailItem)

With Message

.Subject = Subject

.HTMLBody = TextBody

.Recipients.Add (aTo)

Const olOriginator = 0

.Send

End With

Read: Roles and Responsibilities of Automation Tester To Become Job-Ready

35 Describes how to retrieve data from the UFT database.

Set db= createobject (“ADODB.Connection”)

db.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\guru99\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.field (0) & rst.fields (1) & rst.fields (2) & rst.fields (3)

rst.Movenext

Next

36 What is the file extension of the QTP code file?

The code file extension is script.mts.

37 What is the code to write the data to the UFT text file?

Content = “JanBask”

Set Fo = createobject ("Scripting.FilesystemObject")

Set f = Fo.openTextFile ("c:\myFile.txt",8,true) ' open in write mode

f.Write (contents)

f.Close

Set f = nothing

38 Was it smart identification?

If QTP cannot identify a particular object in the recorded description, QTP uses a "smart identification" mechanism.

Use the following additional properties to identify the

object.

Basic Filter Properties (Primary): A set of properties that cannot be changed without changing the object type.

Optional Filter Properties (Secondary): Additional properties that help identify the object uniquely.

39 Let's take a brief look at the QTP automated object model.

The QTP automation object model deals with automation of QTP itself. Almost all the configurations and features provided by QTP are represented by QTP's automated object model. Almost every dialog box in QTP has a corresponding automation object that can be set or retrieved using the appropriate properties or methods of the automation object model. QTP automation objects can be used in conjunction with standard VB programming elements such as iterative loops and conditional statements to help design selected scripts.

40 How to write data to Excel file with UFT?

filepath = “C:\Bugs\Reports.xlsx”

Set objExcel = CreateObject(“Excel.Application”)

objExcel.Visible= True

Set Wb= objExcel.Workbooks.Open (filepath)

Wb.worksheets(1).Cells(1,1).Value = “JanBask” read value from Excel file

41 What kind of automation framework does UFT have?

Test automation was developed to simplify the process of test automation with UFT. There are three main types of automation frameworks in the UFT

keyword-driven framework. Used when you need to test multiple features.

Data Driven Framework: Used to test the same flow with different test data. Test data is more important than multiple features of your application.

Hybrid Framework: A combination of data-driven framework and keywords.

42 When do I need to use descriptive programming in UFT?

UFT identifies an object either through an object repository or descriptive programming. Descriptive programming is used in the following scenarios

a) Used to remove duplicate objects. The same object exists on different screens or windows of your application. If you use OR in this case, you must OR the same object under a different object hierarchy. Descriptive

programming is used to handle this situation

b) In certain scenarios, storing objects in an OR (object repository) is not appropriate. If you print 100 links on a page, do not save all the links in OR. Instead, you need to use descriptive programming to access these links.

43 What is settoproperty? When will it be used in UFT?

Settoproperty represents the setting of test object properties. You can use this property to change the value of the object at run time. You can edit the property values ​​at run time, but the changes you make are temporary.

44 What kind of errors can UFT generate?

The various types of errors that can occur with UFT are:

Syntax error: A syntax error is a typo or code that does not conform to the syntax of the VBScripting language. A syntax error occurs while compiling the code and the code will not run unless the error is corrected. When I check the syntax using the

Ctrl + F7 key combination, the result looks like this: If you don't see the window, go to View> Error.

Logical Error: If the script is syntactically correct but produces unexpected results, a logical error occurs. Normally, the operation is not interrupted by a logical error, but the result is incorrect. Logical errors can be caused by a variety of factors, including incorrect assumptions and misinterpretations of requests, improper program logic (using dowhile instead of doUntil), and infinite loops.

Peer review and QTP output / result file validation are two approaches to revealing logical errors and ensuring that the tool worked as expected.

Runtime Errors: This type of error, as the name implies, occurs during runtime. Such an error occurs when the script trying to complete the task fails, and the script cannot continue, so it usually stops running. The Following is a typical example of a run-time error.

  1. The script tried to read the file, but the file was not found. 
  2. The script is trying to handle the missing element.
  3. If you access an array element while dividing a number by zero, the array index goes out of range.

45 How do I close the second browser that I opened in UFT?

You can use the Create Time feature to determine which browser instances were opened one after another. This is just a counter for each browser instance launched. It starts at 0 and increases from there. You can use the following code to close the second open browser.

Browser("creationtime:=1").Close

46 What is the text output value in QTP?

You can use the text output value to capture the text that will be displayed to the application under test at run time.

If parameterized, the text output value is displayed at each iteration and captures the value stored in the run-time data table for further analysis.

47). Are mouse movements captured by low-level recordings?

No. mouse movements are not captured by low-level recordings.

48 What is a step generator?

The Step Generator allows you to add test steps to your script. You can use the step generator to add steps to your script without actually recording the script.

49 Is it possible to switch between PerAction and shared object repository? If yes, how?

Yes. You can switch. Go to Test-> Settings-> Resources. Here you have the option to select a repository.

50 What is a Test Fusion Report?

Test Fusion Report. It shows all aspects of test execution and is organized in a tree format.

Provides details for each step performed in every iteration.

If selected, there is also a runtime data table, screenshots, and a movie of the test run.

51 What are Virtual Objects?

Virtual objects are just like normal objects, but in a virtual form. In testing, virtual objects are usually set up to display results that you want to test against. For example, a virtual web page can be used to test whether the actual web page displays correctly.

For example, suppose you want to record a test on a web page that contains a bitmap that the user clicks on. The bitmap contains several different hyperlink areas, each of which opens a different target page. When you record the test, the website matches the coordinates of the bitmap click and opens the landing page.

To allow QTP to click on the required coordinates during an execution session, you can define a virtual object in the area of ​​the bitmap that contains those coordinates and associate it with the button class. When you run the test, QTP clicks on a bitmap of the area defined as a virtual object to ensure that your website opens the correct landing page.

52 What does sync point mean in the context of UFT? What are the different ways to insert sync points into the UFT?

The timing interface between the tool and the application under test is called a synchronization point. Syncpoint is a feature that allows you to set a time delay between two test script phases.

For example, clicking a link can take 1 second to load a website and 5 or 10 seconds to fully load it. Application server response times, network bandwidth, and client system capabilities are all considerations. Unless the tester intelligently manages the change in time, the script will fail when the time changes.

There are various ways to insert a sync point into a UFT:

WaitProperty: WaitProperty is a method that performs synchronization using the property name, value, and timeout value as inputs. This option is recommended as this is a dynamic delay.

Exist: Exist is a method that performs synchronization using a timeout value as input. This option is recommended as this is a dynamic delay.

Wait: A wait is a hard-coded sync point that waits for an event to occur. Therefore, we do not recommend using waits, but they are useful for short wait times, such as 1 or 2 seconds. For example, wait (5) indicates that the system will wait for 5 seconds.

Sync Method: The sync method is only suitable for web applications that have a certain delay between page loads.

Inserts a built-in sync point into QTP.

53 What do GetRoProperty, SetToProperty, and GetToProperty mean?

GetRoProperty: GetRoProperty is a built-in method for getting the run-time value of an object's property. Using the GetRoProperty method consists of four steps.

In the object repository, note the object that uses the GetRoProperty method.

Identifies the run-time attributes that can be used for journal entries. Object Spy is a tool you can use.

Use the GetRoProperty method to get the identified run-time property and store the value in a variable.

Use this number to further deduct.

SetToProperty and GetToProperty: SetToProperty and GetToProperty are two methods for changing the value of a property.

Consider a web button stored in an object repository. The

UFT creates a replica of this object named "Test Object" and compares it to the RunTime object when running the test. You can use

GetToProperty to get the value of a property in a test object.

You can use SetToProperty to change the value of a property in a test object.

This test object and any changes you make to the object's properties using the SetToProperty method will be removed after the test is complete.

When the test runs again, a new copy of the test object is created in the object repository with the original property values.

54 Can I use QTP to record an application running on a remote computer?

Yes. If you access your application through a local browser instead of a remote browser like Citrix, you can record the remote application.

If you still can't record, we recommend installing QTP and the application on the same computer.

55). What is the object spy?

QTP provides an extremely helpful tool that is known as object spy through which user can view the object properties and operations linked to them in AUT. All object properties and their values can be retrieved through it. Set of properties that are stored by the object to uniquely identify the objects uniquely. Moreover, object naming is also performed by them, which is a prominent feature of QTP.

56) Is it possible to run two UFT instances on the same workstation? If not, please explain why.

No, you can't run two instances of UFT on the same computer. UFT, on the other hand, manages a large number of application instances that are evaluated. You can also operate two different apps on the same PC without interrupting UFT recording. To do this, you need to change some UFT configuration parameters. In Automation> Recording and Execution Settings> Selection, select Record and Run to run in the open application. For example, UFT works in multiple windows in the Internet Explorer browser.

57) What is the QTP Local Repository Extension?

QTP Local Repository Extension is a way for you to create a QTP profile on your local machine by using the repository. This creates the opportunity to profile an application without the need for programming. 

58) What does the .mtr extension stand for?

The .mtr file is a binary file that provides information about checkpoints and more. To verify that the .bdb file is a local object repository, rename the file to a .tsr extension and open it in Object Repository Management (ORM). Here you will see the same objects as the object repository. If I try the same with the .mtr file, it doesn't work.

59 What does the output value in the context of UFT mean? What is the type of UFT output value?

A step in which an object property value is recorded at a particular point in the test and stored in the desired location is called an output value step. The saved values ​​can be used as input to the test script in various places.

UFT has the following types of output values:

  1. default output values.
  2. Text / text area for output values.
  3. Database output value.
  4. XML output value (from application / resource).

60). What are the advantages of test automation?

advantages of test automation

Testing automation is advantageous and one of the most preferred ways to perform the test on various objects. Below-listed advantages are offered by testing automation:

  • No Manual Intervention
  • Cost-effective
  • Less error probability
  • Quick Result Production

61 Explains how QTP identifies objects.

QTP identifies each GUI object based on its corresponding property. During recording, QTP identifies a special property (defined in the object identification settings) and stores it in the object repository of the GUI object. At run time, QTP uniquely identifies GUI objects by comparing saved property values ​​to screen properties.

QTP interview questions for 2 years experienced

62 What are the different ways to launch an application in UFT?

  •  SystemUtil. Run:

Following is the syntax for using SystemUtil.Run

SystemUtil.Run ( FileName, Parameters, Path, Operation )

Example: 

SystemUtil.Run("chrome.exe",http://www.google.com)

SystemUtil.Run("test.txt", "","C:\","1")

  • InvokeApplication:

We can also use the InvokeApplication command for launching an application.

InvokeApplication "C:\Program Files\Google Chrome\CHROME.EXE http://www.google.com"

  • Using VBScript to create a shell object:

Example: We create a “WScript.shell” object.

Dim testshell

Set testshell= CreateObject ("Wscript.shell")

testshell.run "%windir%\paint"

63 What is logical name of the object?

The logical name is the name given by QTP when you create an object in the repository to uniquely identify the object from other objects in your application. This name is used by QTP to map the object name in the script to the corresponding description in the object repository. Example: Browser ("Browser"). Page ("JanBask Training") where JanBask Training is the logical name of the object.

64 What is the difference between an executable and a load function library?

You cannot debug the statement in the executable file. You can use the load function library to debug statements and load multiple library files.

65 Please explain how to find the length of the array with QTP.

The code to get the length of the array with QTP is

print (ubound (arr) +1)

Ubound returns the last index of the array, so the length of the array is +1. This is the total number of elements in the array

66 Mention the different types of recording modes in QTP. Which is used when?

QTP supports three recording modes

  • a) Normal mode: This is the default recording mode and is used for most automated activities. Recognizes objects regardless of their position on the screen.
  • b) Low level recording mode: This is useful for recording objects that are not identified in QTP's normal mode. Record the exact x, y coordinates of the mouse operation.
  • c) Analog mode: This mode is useful for operations such as signature capture, image drawing, and drag and drop operations.

67). Why is Action Split used by QTP?

Action split is used in QTP to split the actions of two parts. The two types of splits in action are:

Splitting into two sibling actions: The two split actions are independent Splitting into parent-child nested action: The second split action is only conducted when the first action of parent gets executed.

68 What is a runtime data table? Where can I find and view this table?

QTP has a data table used at run time.

In QTP, select View> Data Table.

This is basically an Excel file saved in the created test folder, named Default.xls by default.

69 How is parameterization and data drive related in QTP?

To be data driven, it needs to be parameterized. That is, you need to set a constant value as a parameter to get the value provided by the run-time data table for each dialogue (cycle).

Only by parameterization, you can control transactions (actions) using different datasets. As you know, it is not recommended to run the script multiple times on the same dataset. Nor is it convenient.

70 Describes the concept of how QTP identifies objects.

QTP examines the object during recording and saves it as a test object.

For each test object, QTP learns a set of standard properties called required properties and examines the remaining objects to see if those properties are sufficient to uniquely identify the object. While running the test, QTP searches for a run-time object that matches the test object learned during recording.

qtp interview questions for 2 years experienced

71 Distinguish between two QTP object repository types?

The object repository is used to store all objects in the application under test.

Object repository type: 

  1. Per action and shared repository. 
  2. In the shared repository, there is only one central repository for every test, but for each action, a separate repository for each action is created for each test.

72 In what ways you can call from one action to another action?

There are two ways you can call from one action to another action 4444 4444 a) Call to copy of action: In this, the script and datatable, action object repository will be copied to the destination Test Script 4444 4444 b) Call to existing Action: In this, script datable and object repository are not copied instead a call reference would be made to the action in the source script 4444 4444 85) What is Optional step in QTP? How you can add optional step in QTP? 4444 4444 When running a test, it test fails in opening a dialog box, QTP does not necessarily abort the test run. It bye passes any step designated “optional” and continues running the test. 

73 In what ways you can call from one action to another action?

There are two ways you can call from one action to another action

a) Call to copy of action: In this, the script and datatable, action object repository will be copied to the destination Test Script.

b) Call to existing Action: In this, script datatable and object repository are not copied instead a call reference would be made to the action in the source script.

74 What is Optional step in QTP? How you can add optional step in QTP?

When running a test, it test fails in opening a dialog box, QTP does not necessarily abort the test run. It bye passes any step designated “optional” and continues running the test. By default, QTP automatically marks the step that opens a particular dialog box as an option. To set an optional step for a keyword, right-click and select Optional Step. Optional step icons will be added in the next step. To add an optional step in Expert View, add the optional step to the beginning of the VBScript statement.

What if the "Option Explicit" keyword is used in QTP?

The keyword "OptionExplicit" is used to specify that all variables must be declared before they can be used in QTP.

75 How to get out of the for loop with QTP?

You must use the "ExitFor" statement to exit the "For Loop" in QTP. The "Exit For" statement takes control of the "for loop"

Read: Top 120+ QA Testing Interview Questions and Answers for year 2022

The duplicate object repository is created in QTP when the split operation is performed. The object split actions can be added to other repositories as well.

76 What are the different types of recording modes available in UFT? Is it possible to change between Recording modes while creating a Test?

The different types of recording modes available in UFT are:

  1. Context recognition recording mode: Context recognition mode is another name for normal recording mode. This is the default recording mode and takes full advantage of QuickTest Professional's test object model. Recognize what's in the app wherever you are on the screen. It keeps track of the objects in your program and the actions you take on them.

  2. Analog Capture Mode: Quick Test Professional records and tracks all mouse movements as you drag the mouse over the screen or window in analog capture mode. Analog recordings made by UFT are saved as tracks in the test directory. This is useful for capturing operations that cannot be captured at the object level. For example, signatures are created by dragging with the mouse. You can record in analog mode by the following method. 

    1. About screens If your analog operations include many screens, use the screen options. B. Drag and drop objects from one window to another.

    2. Related to windows If analog operations are restricted to a single window, use in relation to windows.

  3. Low-level mode: This mode allows you to record any object in your application, regardless of whether QTP recognizes the object or operation. In this mode, all run-time objects are recorded as Window or WinObject test objects and are recorded at the object level. This is used when you need to know the exact coordinates of an object for testing. Hashmaps are a good example of how clicking different parts of an image leads to different URLs. This recording mode is used when running recording tests in an environment not recognized by QTP.

77 Defines the error area of ​​the UFT.

You may get some errors when working with scripts such as running, saving and opening scripts. Such errors are listed in an area called the "error area".

The types of errors displayed in the Errors pane are:

  1. Code syntax error
  2. Missing resource
  3. Missing reference and property value

78). Why is QTP Add-Ins loaded in QTP?

Add-Ins are small files or programs that can be added to the computer due to which the computer capabilities can be enhanced. They are added due to following listed reasons:

  • To increase system capabilities
  • To improve communication interface and graphics quality
  • For particular function loading into memory
  • To access just those functions that are required for script execution

79 What does an object repository mean in the context of UFT? Describes how object identification works in UFT.

UFT recognizes the object repository as a collection of test objects and information for manipulating them. By default, when a user logs a test, the object and its properties are logged. UFT cannot play scripts until you understand the object and its properties.

The identification of objects in the UFT can be explained in the following ways 

80). How is parameterization done in QTP?

At the place of recorded values, different values are used for the processes. The variables are used at the time of script execution to access different values. Several types of parameterization can be performed in QTP to pass data, they are listed below:

  • By using loop statements
  • By dynamically testing data submission
  • By using a data table
  • By fetching data from the external files
  • By taking front-end test data

81 What does "Action 0" in QTP mean?

When you create a new test in QTP with Action 1, Action 0 is created by default. Use action 0 to set the order in which other actions 1, 2, 3, etc. are called.

82 Please explain how to replace the string with QTP.

To replace part of the QTP string, use the code shown below:

Str = (JanBask99)

Suppose if you want to replace “99” with “88” then the code will

print replace(str,“99”, “88”) output will be “JanBask88”

83 How do I import an action into a test?

You can import actions into your tests in two ways:

Call Copy Action: When you copy an action, the action is completely copied to the calling test, including the associated action tabs for checkpoints, parameterization, and data tables. .. By pasting a copy of an existing action, you can make changes to the copied action without affecting or affecting other tests. You can duplicate both reusable and non-reusable actions.

Calling an existing action: In the call test, the action call is read-only. You can only modify the tests in which they were created. Allows the same action to be reused across multiple tests, simplifying test maintenance. Only "reusable" actions can be used in the call.

84 What are the factors that affect bitmap checkpoints?

Bitmap checkpoints are affected by screen resolution and image size.

85 What is an accessibility checkpoint?

The World Wide Web Consortium (W3C) has issued several directives and guidelines on web-based technologies and information systems to make people with disabilities more accessible to the Internet. For example, the standard stipulates that images require "alternative text." Therefore, visually impaired people who visit a website use a text-to-speech converter to understand what an image is, at least if it doesn't appear. All of these standards are checked by accessibility checkpoints.

86 ). Can an action be called from another action in QTP, if yes then what is the method to call it?

In QTP we can call one action from another. There are two ways to do this that are listed below:

  • Call to Copy of Action: The copy of action is generated in the object repository that enables us to perform the change to a copy of action.
  • Call to Existing Action: The action that is made up earlier, an action reference is generated. The actions can be accessed in read-only mode. No copy of the data table and existing script can be made.

87 Explain Data Tables and different types of data tables

DataTables like MS Excel help testers create data-driven test scenarios that they can use to repeat actions. Data tables fall into two categories:

Local data table: Each action has its own private data table (also known as a local data table) that can be accessed between actions.

Global Data Table: Each test has a single global datasheet that can be accessed by all actions. 

88 Why use breakpoints in QTP?

This is to stop running the test at a specific point during the running of the test. It is typically used to monitor the status of an application and to understand how a particular feature works at a particular stage at run time. (Checking is, of course, a manual procedure.)

89 What is a slow object?

There is no special throw object in the VBscript. This question won't come up unless you investigate the specific add-in that supports this feature (at least to my knowledge).

You can visit the link: QTP UFT Tutorial

Where you can get all the information about QTP and its significance of QTP while testing any bug. 

90 How to do cross-platform and cross-browser testing with QTP? Could you explain with an example?

You need to create individual actions to handle different operating systems and browsers.

Example: Platform = Environment (“OS”). Next, based on the platform, you need to move to the actions you recorded for that particular platform.

Cross-browser test:

Use this code. Browser ("Core Values"). GetROProperty ("version") Allows you to extract the browser and its corresponding version. Example: Internet Explorer 6 or Netscape 5. Invokes actions related to this browser based on this value.

91 What are the features and benefits of Quick Test Pro (QTP)?

  1. Keyword-driven testing
  2. Suitable for both client-server and web-based applications.
  3. VBscript as a scripting language. Better error handling mechanism than.
  4. Excellent data-driven test capabilities.

92). What are the different action types?

The test scripts include only one action, that contains the number of steps that are to be performed to test the applications. Below listed three types of actions are performed in QTP:

  • Non-Reusable Action: These actions can be called only once by the tests from where they are stored
  • Reusable Action: These actions can be called multiple times from where they are stored
  • External Action: They are reusable actions but stored in external tests. The external actions are available only in read-only mode and any change to external action cannot be made.

93). Explain the difference between Runtime and Test object?

The difference between runtime and test object is given below:

Read: Software Tester Career Path: Role & Job Responsibilities

  • The actual objects of the application are known as runtime objects, whereas test objects are just referenced objects of the actual ones.
  • Test objects can have different names in different environments, while runtime objects have the same name.
  • Test objects can be used to identify the real objects of application that are also runtime objects
  • Test objects reside in the object repository, while runtime objects reside in the application

94 What are the different types of object repositories available in UFT?

The various types of object repositories that UFT can use are:

  1. Local object repository: The default object repository is the local object repository. This is action specific and can only be used for one action at a time. If the application is not time sensitive, the local object repository takes precedence. Local object repositories cannot be reused. There are several things you can do with a local object repository.
  2. For example, in the application under test, highlight the objects stored in the repository.
  3. Checks if a particular object is stored in the AUT of the object repository.
  4. Objects can be cut, copied, pasted, modified, and deleted. If you accidentally change the value of the property, you can use the application's update feature to edit its description.
  5. Shared Object Repository: If your application is dynamic and the object description changes frequently, a global or shared object repository is recommended. Shared object repositories are used more in automated projects than local object repositories. However, it is more costly to maintain and manage than on-premises object storage.

95). What are the various checkpoints in QTP?

Checkpoints are those points where two object values that are current and expected values are compared. When checkpoints are inserted in the test, then a keyword view checkpoint is added in front of the row and a checkpoint statement id is added. QTP offers following types of checkpoints:

  • Page Checkpoint
  • Image Checkpoint
  • Bitmap Checkpoint
  • Text Checkpoint
  • Database Checkpoint
  • Standard Checkpoint
  • Accessibility Checkpoint
  • XML Checkpoint

uft interview questions for experienced

96 Differentiate between UFT and Selenium.

UFT: Features, regression, and service testing are the most common uses of the tool. UFT allows testers to automate user behavior in web or client-based computer applications to test and detect errors that may occur as a result of such actions. This applies to the same operations performed by different people, datasets, Windows operating systems, and browsers. Automation with QTP / UFT can save a lot of time and money if properly planned and implemented.

Selenium: Selenium is a comprehensive open source project that provides a collection of automation technologies and libraries for web browsers. Selenium provides a rendering tool (Selenium IDE) for creating functional tests without having to learn the test scripting language. It also includes a test domain-specific language (Selenese) for creating tests in JavaScript (Node.js), C #, Groovy, Java, Perl, PHP, Python, Ruby, and Scala. You can then run the test using a modern web browser. Selenium is available for Windows, Linux, and MacOSX. This is free software distributed under Apache License 2.0.

97). What is a keyword view and expert view?

  • Keyword View: It contains the steps that are executed in the keyword-driven tabular form on the application in the English language. The four fields that are contained in the Keyword view are Item, Operation, Value, and Document. By selecting operation and items the tests can be modified and created.
  • Expert View: The steps that are to be performed on the application are contained in this view. We can edit the view in the VBScript language. The scripts can be edited in an expert view. The existing row and methods mentioned in the expert view.

98). How can the operating system information be fetched by a QTP script?

The environment variable can be used to know about this. The QTP variables OS and OS Version are used to perform the action in the script.

What does a virtual object mean in the context of UFT?

Standard widgets can exist in the application under test, but UFT may not recognize them. In some cases, buttons, links, or other types of objects can be declared as virtual objects (VOs) so that user actions can be mimicked by virtual objects during execution.

99). Which object repository is better local or shared?

The decision to use any repository is totally open and you can use any of this. The shared repository can be used when multiple scripts are there and to be used to refer to the same object.

100 What do Expert View and Keyword View mean in the context of UFT?

Expert View: Each line in Expert View represents a TestStep in a VBscript. Consider the following code.

Dialog ("Login"). WinEdit ("Site Name:"). Set "JanBask Training"

After the object type, the name of the object is displayed in square brackets. The login is the object name and the dialog is the object type. "Dot" separates objects in the object hierarchy. In this case, the Dialog and WinEdit object hierarchies are the same. To explain the situation, object hierarchy is an object-oriented concept that refers to a collection of elements linked in a parent-child relationship. In this situation, the parent object is a "dialog box" and the child object is a "WinEdit". The operation performed on the object is always printed at the end of the statement, followed by the value associated with the operation. The Set method inserts the term "Interview Bit" into the site name edit box.

The GUI object on which the operation is performed is the syntax of the expert view statement, along with its entire hierarchy, followed by the operation on the object and the value associated with that operation. This is expressed as:

ParentObject (Name) .ChildObject1 (Name) ..ChildObjectN (Name) .Operation

Keyword View: The keyword view is a table-like view, where each step is represented by one row in the table and each column is represented by a different section of the step.

The items for which you want to perform a step are listed in the Items column. The hierarchy of GUI elements on which the operation is performed is displayed in this column using an icon.

The operations to be performed on the object are listed in the Operation column.

The Value column contains the argument values ​​for the selected operation, and the Document column describes each step for clarity.

These four columns are the default values, but the assign and comment columns are also available in the keyword view.

Conclusion

I hope, this blog will be beneficial for all those who are preparing for their interview on automation testing of QTP.

It’s my advice to go through all the tools before facing the interview. You can go through all the previous and latest versions of tools. So that you can get an idea about the difference between the previous and latest versions.

FaceBook Twitter Google+ LinkedIn Pinterest Email

    Janbask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


Comments

Trending Courses

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

1 day 02 Jul 2022

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

-0 day 01 Jul 2022

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

7 days 08 Jul 2022

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

7 days 08 Jul 2022

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

-0 day 01 Jul 2022

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

7 days 08 Jul 2022

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

7 days 08 Jul 2022

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

-0 day 01 Jul 2022

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation

Upcoming Class

1 day 02 Jul 2022

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks

Upcoming Class

15 days 16 Jul 2022

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning

Upcoming Class

28 days 29 Jul 2022

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop

Upcoming Class

-0 day 01 Jul 2022

Search Posts

Reset

Trending Posts

Receive Latest Materials and Offers on QA Testing Course

Interviews