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
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.
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
‘Capturing a bitmap of the entire window
'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"