QTP Forum
Shopmotion


How to Upload a file to Quality Center (QC/ ALM) Empty
Search
 
 

Display results as :
 


Rechercher Advanced Search

Poll
Keywords

Latest topics
September 2019
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Calendar Calendar

Affiliates
free forum


How to Upload a file to Quality Center (QC/ ALM)

Go down

Vote if this topic was useful to you

How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap100%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 100% 
[ 1 ]
How to Upload a file to Quality Center (QC/ ALM) Vote_lcap0%How to Upload a file to Quality Center (QC/ ALM) Vote_rcap 0% 
[ 0 ]
 
Total Votes : 1

How to Upload a file to Quality Center (QC/ ALM) Empty How to Upload a file to Quality Center (QC/ ALM)

Post by Gajre on Wed Oct 10, 2012 12:34 am

'Assigning the Values to the variables or directly give them during calling the function as respective arguments.
QCFileName = "GajreResults" 'This is the Name of
the Resource in the Test Resource folder of QC--This should the available in QC.
LocalUploadFolder = "D:\Gajre\Test Execution Results" 'Local System Folder
LocalUploadFile = "ResultsLogfile.xls" 'File to be uploaded
QCResourceType = "Data table"

call UpLoadFileToQC(QCFileName,LocalUploadFolder,LocalUploadFile,QCResourceType)

Function UpLoadFileToQC(QCFileName,LocalUploadFolder,LocalUploadFile,QCResourceType)
On Error Resume Next
oSubFlag = false
Set oResourceFactory = QCUtil.QCConnection.QCResourceFactory
Set oRoot = oResourceFactory.NewList("")
Set oSub = Nothing
iTotalItems = oRoot.Count
For ItemCtr = 1 To iTotalItems
CurItem = oRoot.Item(ItemCtr).Name
If UCase(CurItem) = UCase(QCFileName) Then
Set oSub = oRoot.Item(ItemCtr)
oSubFlag = true
Exit for
End If
Next
Set oRoot = Nothing
Set oResourceFactory = Nothing
If oSubFlag Then
oSub.Refresh
oSub.FileName = LocalUploadFile 'This is the file Which is der in the UploadFolder Path
oSub.ResourceType = QCResourceType 'Example: oSub.ResourceType = "Data table"
oSub.Post
oSub.UploadResource LocalUploadFolder, true
Set oSub = nothing
End If
End Function


Last edited by Gajre on Wed Oct 10, 2012 12:58 am; edited 1 time in total
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 36
Location : Hyderabad

View user profile https://qtpelearning.forumotion.com

Back to top Go down

How to Upload a file to Quality Center (QC/ ALM) Empty Re: How to Upload a file to Quality Center (QC/ ALM)

Post by Gajre on Wed Oct 10, 2012 12:40 am

You can upload any type of files based on the QC Resource Type.
for example to upload a library you will have to pass/ assign the "Function library" (please check in QC resource type and correct it the spelling is wrong) value to QCResourceType variable/ argument

Similarly to upload ObjectRepository or a .tsr file, pass/ assign the "Shared Object Repository" (please check in QC resource type and correct it the spelling is wrong) value to QCResourceType variable/ argument

so on for other resource types...Wink
Gajre
Gajre
Admin

Posts : 37
Join date : 2012-06-17
Age : 36
Location : Hyderabad

View user profile https://qtpelearning.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum