Absent Member.. Absent Member..
Absent Member..
476 views

QTP/UFT support tip: How add images into the test result.

QTP 11 and above offers the option to insert additional images into the test results.

 

The Command for this is Reporter.ReportEvent

 

How to use it:

Reporter.ReportEvent StepStatus, Name of the Step, Detail, path where the image file is located

 

Example:

Reporter.ReportEvent micDone,"Step Title", "Details of the Sample", "C:\Image.jpg"

 

At the end of the test execution when you open the test result there will be an step with the image added.

 

You can combine this with Capture Bitmap to make it more flexible.

 

Example:

Dialog("Login").WinEdit("Agent Name:").Set "mercury"

‘Capturing a bitmap of the entire window

Dialog("Login").CaptureBitmap("C:\Temp\Bitmap.bmp")

'Store the image in the Report

Reporter.ReportEvent micDone,"User Name", "Image to show the user name typed in the dialog", "C:\Temp\Bitmap.bmp"

Labels (1)
0 Likes
0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.