we are running the Scripts from QC.After each script run is completed,we would like to add an attachment to the current test in TestSetProperties -> Attachments
How can I add an attachment (by using OTA)for the current test run.
Is there any way we get the current test run ID,if so I use the following code to attach
Set AttachmentFactory = TsTest.attachments
Set ObjAttch = AttachmentFactory.AddItem(null)
ObjAttch.FileName = "C:\Automation\Reports\Smoke\AAANotification20 01-All\Automation_Results.html"
ObjAttch.Type = 1
Whenever you run scripts from QC, the result path would be mapped to the Test plan folder path for teh same test.
You can use the QTP AOM to retrieve the current result path, and then add the attachement using that as reference
-- Here to Learn and share ---