Monday, May 6, 2013

Remove an attachment from QC Through QTP

Function RemoveAttachFromQC(File_Name)
    var_cnt= QCUtil.CurrentTest.Attachments.NewList(“”).count
    For i= 1 to var_cnt
        If   QCUtil.CurrentTest.Attachments.NewList(“”).Item(2).Name =File_Name Then
            Attachment = QCUtil.CurrentTest.Attachments.NewList(“”).Item(1).ID
           QCUtil.CurrentTest.Attachments.RemoveItem(Attachment)
        Else
           Reporter.ReportEvent micFail,"Delete failed","Please provide the valid filename with extention"
        End If
    Next
End Function

File_Name=”Test.txt” 

Call RemoveAttachFromQC(File_Name)

Best practices for test automation in agile software development

  Agile software development is a highly iterative and collaborative approach to software development that emphasizes flexibility and a...