Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What do you understand about output value in the context of UFT? What are the different types of output values present in UFT?

Answer»

A step in which an OBJECT property value is RECORDED at a given time in your test and stored in the desired location is known as an output value step. The saved values can be UTILISED as input in a test script at various points.

The following are the different TYPES of output values present in UFT:

  • Standard output value.
  • Text /Text Area output value.
  • Database output value.
  • XML output value (from application/resources).
2.

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

Answer»

No, we are UNABLE to run two instances of UFT on the same computer. UFT, on the other hand, manages numerous instances of applications that will be evaluated. On the same PC, we can even operate on two distinct apps without interrupting UFT recording. To do so, you'll need to change a few UFT configuration parameters. From Automation -> Record and Run settings -> choose, select the option "Record and Run on any opened APPLICATION." UFT, for EXAMPLE, can WORK in several windows of the Internet Explorer browser.

3.

What are the possible types of errors that one can encounter in UFT?

Answer»

Following are the different types of errors that ONE can encounter in UFT:

  • Syntax Errors:
    • Syntax errors are typos or code that does not conform to the grammar of the VBscripting language. Syntax mistakes arise during code compilation and prevent the code from being executed unless the errors are corrected.
    • Use the keyboard shortcut Ctrl+F7 to check the syntax, and the result will be presented as shown below. If the WINDOW does not APPEAR, go to "View" and then "Errors."
  • Logical Errors:
    • A logical error occurs when the script is syntactically accurate but produces unanticipated outcomes. The operation is usually not interrupted by logical errors, but the outcomes are erroneous. Logical errors can be CAUSED by a variety of factors, including faulty assumptions or misinterpretations of the requirement, as well as poor program logic (using do-while instead of do-Until) or Infinite Loops.
    • Peer reviews and verification of the QTP output file/result file are two approaches to uncover logical errors and guarantee that the TOOL did what it was supposed to do.
  • Runtime Errors:
    • This type of error occurs during Run Time, as the name implies. Such failures occur when a script attempting to complete a task is unable to do so, and the script typically stops running because it is unable to continue.
    • Following are some well-known examples of Run-Time Errors:
      • The file was not found, although the script attempted to read it.
      • The script is attempting to act on the item that was not found.
      • Array Index out of limits while accessing array items while dividing a number by Zero.
4.

What do you understand about the synchronization point in the context of UFT? What are the different ways in which you can insert a synchronization point in UFT?

Answer»

The timing interface between the TOOL and the Application under TEST is known as the synchronization point. Synchronization point is a feature that allows you to set the time delay between TWO test script phases.

For example, clicking on a link may take 1 second to load the website, 5 seconds, or even 10 seconds to load completely. The response time of the application server, network bandwidth, and client system capabilities are all issues to consider. The script will fail if the time varies unless the tester manages the time discrepancies intelligently.

Following are the different ways of inserting a synchronization point in UFT:

  • WaitProperty: WaitProperty is a method that performs a sync using the property name, value and timeout value as input. Because it is a dynamic delay, this option is recommended.
  • Exist: Exist is a method that performs the sync using the Timeout value as an input. Because it is a dynamic delay, this option is recommended.
  • Wait: Wait is a hardcoded sync point that waits regardless of whether or not an event has occurred. As a result, using Wait is discouraged, but it can be useful for shorter wait times like 1 or 2 seconds. For example, wait(5) would denote that the system will wait for 5 seconds.
  • Sync Method: The Sync Method is only suitable for web applications with a constant lag between page loads.
  • Inserting inbuilt Synchronization Points in QTP:
    STEP 1: Enter into recording mode. If the USER is not in Recording Mode, this option will be disabled.
    Step 2: Select "Design"-> "Synchronization Point".
    Step 3: We must choose the object that will serve as the Sync Point. The object window appears after you choose the object.
5.

How do you close the second browser that has been opened using UFT?

Answer»

The "creation time" feature can be used to DETERMINE which BROWSER INSTANCE was opened after another. This is nothing more than a counter for each browser instance that is launched. It starts at 0 for the FIRST one and goes up from there. You can use the following code to close the second browser that has been opened:

Browser("creationtime:=1").Close
6.

What is the QTP Local Repository's extension? What does the .mtr extension stand for?

Answer»

The extension for a local repository in QTP is .BDB

The .mtr file is a BINARY file that provides information about checkpoints and other THINGS. To double-check that the .bdb file is a local object repository, rename it with the extension .tsr and open it in Object Repository Management (ORM). The same OBJECTS that appear in the Object Repository will appear here. If you try the same thing with a .mtr file, it will not work.

7.

What do you understand about GetRoProperty, SetToProperty and GetToProperty in the context of UFT?

Answer»

GetRoProperty: GetRoProperty is a built-in method for retrieving the object property's runtime value. There are four steps to using the GetRoProperty method.

  • In the Object Repository, make a note of the object on which you wish to utilise the GetRoProperty method.
  • Identifies the run-time attribute that could be used for the RECORDED item. Object Spy is a tool that you can utilise.
  • Retrieve the identified Run-time property using the GetRoProperty method and save the value in a variable.
  • Use this figure to make more deductions.

SetToProperty and GetToProperty: SetToProperty and GetToProperty are two methods for changing a property's value.

  • Let us consider a Web BUTTON stored in the Object Repository.
  • UFT PRODUCES a replica of this object called Test Object and compares it to the Run-Time Object when the test is run.
  • You may get the value of a property of Test Object using GetToProperty.
  • You can alter the value of a Test Object's property with SetToProperty.
  • This test object, as well as any changes you make to the object properties using the SetToProperty method, is DELETED when the test is finished.
  • When the test is re-run, a new copy of the test object is produced in the object repository with the original property values.
8.

What do you understand by data tables in the context of UFT? Explain the different types of data tables. Describe some of the data table object methods.

Answer»

A DataTable, like MS Excel, aids TESTERS in the creation of data-driven TEST scenarios that may be used to repeat an Action. Datatables are divided into two categories:

  • Local Datatable: Each action has its own private data table, sometimes known as a local data table, which can be accessed ACROSS actions.
  • Global Datatable: Each test has a single global data sheet that is accessible across all actions.

The data sheet can be found under QTP's "Data" TAB, as seen below.

The following table lists some of the data table object methods:

MethodDescriptionSyntax
AddSheetAdds the supplied sheet to the data table at runtime.DataTable.AddSheet (SheetName)
DeleteSheetThe given sheet is removed from the run-time data table.DataTable.DeleteSheet( SheetID)
ExportThe Datatable is exported to a new file in the provided location.DataTable.Export(FileName)
ExportSheetRun-time export of a specific sheet of the Datatable.DataTable.ExportSheet(FileName, SheetName)
GetSheetThe given sheet from the run-time data table is returned.DataTable.GetSheet(SheetID)
GetCurrentRowReturns the active row of the global sheet's run-time data table.2DataTable.GetCurrentRow
GetParameterCountThe number of columns in the run-time data is returned.DataTable.GetParameterCount
GetRowCountThe number of rows in the Global Sheet's run-time data table is returned.DataTable.GetRowCount
GetSheetCountThe total number of sheets in the run-time data table is returned.DataTable.GetSheetCount
SetCurrentRowSets the current row's focus to the specified row number.DataTable.SetCurrentRow(RowNumber)
SetNextRowSets the focus of the run-time data table's next row.DataTable.SetNextRow
SetPreviousRowSets the previous row's focus in the run-time data. TableDataTable.SetPrevRow
9.

How can you run numerous QTP scripts at the same time?

Answer»

Using the TestBatchRunner TOOL, we may RUN NUMEROUS QTP scripts at once.

10.

What do you understand about actions in the context of UFT? How can you import an action into a test?

Answer»

In UFT, your test will be divided into "logical units" or "Business Processes" with the help of ACTIONS. Actions aid in the creation of a more modular and efficient script. When a script is first written, it just has one ACTION. However, depending on your needs, you can add more Actions to your Micro Focus UFT Script.

Actions are divided into two categories:

  • Reusable Actions: Actions that can be reused in other tests. They can be used numerous times in the same Test Script.
  • Non-Reusable Actions: Actions that aren't reusable can't be used in other tests. They can only be called once in the same script. When an action becomes large, it's a good idea to split it out. You have two options for splitting an EXISTING activity.
    • The selected action is split into two sibling actions because they are independent of each other.
    • Nested Action splits the chosen action into a parent action, the last step of which invokes the second, child action.

Importing Actions into a Test can be done in two ways:

  • Call to COPY of an Action: When you make a Copy of an Action, the action is duplicated in its entirety into the calling test, including checkpoints, parameterization, and the relevant action tab in the Data Table. You can make modifications to a copied action without affecting or being affected by any other test when you insert a copy of an existing action. Both reusable and non-reusable actions can be duplicated.
  • Call to an EXISTING Action: In the calling test, calls to actions are read-only. Only the test in which they were created can be changed. Allows you to reuse the same action across multiple tests and simplifies test maintenance. Only "Reusable" actions are AVAILABLE for calls.
11.

What do you understand about descriptive programming in the context of UFT? What are the different types of descriptive programming? Explain.

Answer»

Descriptive programming is used to perform operations on an AUT object whose definition isn't recorded in the Object Repository. You can use this approach to skip the Object Repository and provide the Object DESCRIPTION DIRECTLY in the statement. An object name is merely a way to LINK a scripted item to its description in a repository. The script should run even if the object name in your script and object repository is changed.

Following are the different types of descriptive programming:

Static Descriptive Programming:

In the Static Method, you specify an object's ATTRIBUTE in the following PATTERN for object identification.

property:=values,

This format is known as a property value pair, and it is delimited by inverted commas. If your object has many descriptions for identification, use commas to separate them.

Dynamic Descriptive Programming:

The second way to accomplish the same goal is to use Dynamic Descriptive Programming. It will be highly tedious to specify all the property value pairs for each sentence if your script uses the descriptive programming object candidate several times. In such instances, you might take advantage of QTP's Description Class. A description object's syntax is as follows:

Set MyDescription = Description.Create();MyDescription("property").Value = "property-value";
12.

What do you understand about checkpoints in the context of UFT? Explain the different types of checkpoints available in UFT.

Answer»

In UFT, a checkpoint is a point where the CURRENT value of an OBJECT's specified properties is compared to the intended value. If the present and predicted values are equal, the status is PASS; otherwise, the status is FAIL.

Following are the different types of checkpoints available in UFT:

  • Standard Checkpoint: During a run session, it compares the expected values of object properties captured during recording to the object's current values.
  • Page Checkpoint: A Page Checkpoint is a Standard Checkpoint established for a web page. It's used to count how many links and images are on a page. Page Checkpoints can be used to monitor Load Time, or the time it takes for a web page to load.
  • Bitmap Checkpoint: A Bitmap Checkpoint is a checkpoint that allows a user to examine the bitmap of an image or a complete web page. It compares real and expected images on a pixel-by-pixel basis.
  • Image Checkpoint: An image checkpoint allows you to inspect properties such as an online image's source file location. Unlike Bitmap Checkpoint, image checkpoint does not allow you to examine pixels (bitmaps).
  • Text Checkpoint: A text checkpoint is a tool for ensuring that expected text in a web page or application is present. This text could be from a SPECIFIC area of the app or a small portion of the text on the screen.
  • Accessibility Checkpoint: It ensures that Web-based technologies and information systems follow the World Wide Web Consortium's (W3C) instructions and recommendations. These guidelines make it simple for impaired people to USE the internet.
  • Database Checkpoint: A Database Checkpoint runs a query in real-time, and the database values are saved as intended. During runtime, the identical query is repeated and the actual and expected values are compared.
  • Table Checkpoint: A Table Checkpoint allows you to examine the contents of cells in a table (grid) that appears in your environment on the FLY. You can also inspect table parameters such as row height, cell width, and so on. Table Checkpoint is similar to Database Checkpoint in that it allows you to save your work.
  • XML Checkpoint: You may verify XML Data, XML Schema, and XML Data using XML Checkpoints.
13.

What are the features of UFT?

Answer»

UFT has a lot of functionality, but it's also quite straightforward to understand and train employees on. The following are a few excellent features that offer a lot of value to scripting:

  • Test Combinations Generator (TCG): This software assists in the creation of test configurations by utilising test parameters and their possible values to generate different DATA combinations.
  • INSIGHT Recording:  It recognises controls solely based on their look, rather than their native PROPERTIES. This can be handy for testing controls in ENVIRONMENTS where UFT isn't supported, or even on a distant machine running a non-Windows operating system. UFT recognises the controls in the application by matching them to the images saved with each of the Insight test objects when it runs the test or component.
  • UFT offers built-in reporting capabilities as well as the ability to create customised output FILES that show exactly where a test step failed and when it did so, as well as the timestamp.
  • Runtime objects for Windows are supported. We can use the Windows Runtime application to record and perform tests. With the Windows Runtime application, we may create object repositories.
14.

What are the advantages of using UFT as an automation tool for testing?

Answer»

Following are the advantages of using UFT as an automation tool for testing:

  • UFT has record and playback capabilities.
  • It records SCRIPTS on an active screen and assists testers in referring to screen object characteristics.
  • UFT has a very good object recognition technique.
  • Integration and Support: 
    • The tool's integration with various platforms, such as .net and mainframe, is fantastic. It works with both new and old WEB technologies, as well as terminal emulators and Windows thick-client apps.
    • It facilitates continuous integration by connecting with Jenkins, Git, and other similar tools.
    • UFT enables cross-browser testing and works with all MAJOR browsers, including Internet Explorer, Firefox, Chrome, and Apple Safari. d)Its connection with ALM allows us to store automation execution results in ALM and even schedule automation execution at a specific date and time.
  • Through an active screen, you can improve existing tests even if you don't have Automated Ultrasonic Testing (AUT).
  • It supports a variety of automation frameworks, including keyword-driven testing, modular testing, data-driven testing, and so on.
  • It has an integrated development environment (IDE).
  • It works with test management software such as Quality Center, Test Director, and Winrunner.
  • Smoke, Regression, and Sanity are examples of suites that can be SIMPLY maintained.
  • UFT supports Business Process Testing (BPT), a component-based testing framework that provides a strong and efficient platform for manually and automatically testing complete business processes. Its component reusability feature makes the testing process very fast, and it combines manual and automation tests with less duplication.
  • It works with XML.
  • QTP allows for test reporting for analysis purposes.