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
In this tutorial, you will learn –
- What is the Output Value?
- Types of Output Values in Micro Focus UFT
- Understand Test Results in QTP/UFT with Print/Export
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
If you select a step in the tree, the right panel gives it complete details
You can capture Movie / Screenshots of entire Test Run using Tools > Options > GUI Testing
You can print/export the results.
You can export the results/defects to Quality Center.
Click here if the video is not accessible