Hi ,
Using OTA API you can do this.
You should be connected to QC to use this.
Public Function AttachToQC(strQCPath,strFilesystemPath,testname)
Set TreeMgr=td.TestSetTreeManager
Set tsttr=TreeMgr.NodeByPath(strQCPath)
Set tstsetfact=tsttr.TestsetFactory
Set tstlist= tstsetfact.Newlist("")
For each test in tstlist
If test.Name=testname Then
Set Attach=test.Attachments
Set AddAttach=Attach.AddItem(Null)
AddAttach.FileName=strFilesystemPath
AddAttach.Type=1
AddAttach.Post
End If
Next
Set AddAttach=nothing
Set Attach=nothing
Set tstlist=nothing
Set tstsetfact=nothing
Set TreeMgr=Nothing
End Function
Regards,
Suman CH
On Tue, Aug 28, 2012 at 2:56 PM, deepti dev <[email protected]> wrote:
> Hi,
>
> Can someone tell me how i can attach a file in TestSet when i am running
> the test form QTP.
> Is there any other menthod than using QCUtil.CurrentTest
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en