How to Print Output Values in QTP/UFT & Exporting Test Results

What is the Output Value?

An output value step is a step in which an object property value is captured at a specific point in your test and stored at the desired location. The stored values can be used as input at different points in a test script

Types of Output Values in Micro Focus UFT

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

Creating an Output Value is very similar to creating a Checkpoint. A Standard output value can be used on any object to an output value of any of its properties. You can select one or many properties from the same object as output. Following the video, gives steps to create a standard output value to print.

Click here if the video is not accessible

During run time, HP QTP stores output value in datasheet which is cleared as soon as a test is over.

Code Example:

SystemUtil.Run "C:\Program Files\HP\samples\flight\app\flight.exe"
Dialog("Login").WinEdit("Agent Name:").SetDataTable("AgentName",dtGlobalsheet)
Dialog("Login").WinEdit("Password:").SetDataTable("Password",dtGlobalsheet)
Dialog("Login").WinButton("OK").Click
Dialog("Login").Dialog("FlightReservations").Static("Please enter agent name").OutputCheckPoint("ErrorMessage")
Dialog("Login").Dialog("FlightReservations").WinEdit("OK").Click
Dialog("Login").WinEdit("Cancel").Click

Understand Test Results in QTP/UFT with Print/Export Example

Let’s understand the Test Results generated by Micro Focus UFT

In HP QTP, Right Hand Side shows Test Results Summary.

Left Hand Side is Test Results Tree – an icon-based view of the test steps that were performed while the test was running. Similar to the test tree in Keyword View

Test Results In QTP/UFT With Print/Export Example

If you select a step in the tree, the right panel gives it complete details

Test Results In QTP/UFT With Print/Export Example

You can capture Movie / Screenshots of entire Test Run using Tools > Options > GUI Testing

Test Results In QTP/UFT With Print/Export Example

You can print/export the results.

Test Results In QTP/UFT With Print/Export Example

You can export the results/defects to Quality Center.

Test Results In QTP/UFT With Print/Export Example

Click here if the video is not accessible