Absent Member.
Absent Member.
2735 views

downlaod attachments from test lab module of qc

hi all,can anyone help me . i need a vbscript code snippet to download attachments of a specific test case in test lab , i came to know it can be done using extendedstorage object but i am not getting how to use it, i have gone through ota api reference but could nt understand
0 Likes
3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: downlaod attachments from test lab module of qc

Hi Dipak,


Here is the sample..

Dim TDC
Set TDC = CreateObject("TDApiOle80.TDConnection")
TDC.InitConnectionEx "http://localhost:8080/qcbin"
TDC.ConnectProjectEx "username", "password", "domain", "project"

Dim TargetFolder
TargetFolder = "C:\temp"

Dim es
Set es = TDC.ExtendedStorage
es.ServerPath = TDC.DirectoryPath ("3")
es.ClientPath = TargetFolder
es.Load "*.xls", True

Msgbox "Downloading"

TDC.DisconnectProject
TDC.ReleaseConnection
set TDC = nothing

msgbox "Disconnected"



If you look at the attach folder in extended storage Folder of your project repository the you see All the attachments in stored in certain format like..

Attachment's linked to defects have a name like BUG_bugid_AttachmentName
For Test Lab Test case attachment
TestCycl_TestCyclID_AttachmentName.

If you want to retrieve the attachment of the test script that linked to test set then you need have TestCycl Id..


Hope this helps.

Thanks,
Sud



0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: downlaod attachments from test lab module of qc

we are using QC 10, and need to know:

How to Download attachment/resources from QC Test Resources folder?

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: downlaod attachments from test lab module of qc

Hi,

 

 

I need to download a .cfg file from test set. In the test set i have 100 test cases. But all 100 test case uses the same file common across all test case. How to download this file in a specified location in desktop? I am using VAPI-XP.

 

Thanks,

mano

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.