Wednesday, 23 January 2019

Attach Result to QC test run

Public Function addAttachToTDRun (strFileName)
Dim CurrentRun, attachment

On error resume next
If QCUtil.IsConnected Then
Set CurrentRun =QCUtil.CurrentRun
Set attachment = CurrentRun.Attachments
If Err.Number = 424 Then
Reporter.ReportEvent micWarning, "Not running through QC so can't save results", ""
Else
Reporter.ReportEvent micDone, "Attachment Saved to QC run data", strFileName
Set attlist = attachment.NewList("")
Set att = attachment.AddItem(Null) 
att.FileName = strFileName 
att.Type = 1
att.Post 
att.Save False 
End If
Else 

Reporter.ReportEvent micWarning, "Not connected", "Not connected to Quality Center" 

End If


On error goto 0

End Function 

No comments:

Post a Comment

Spring Boot : Exception Handler 14