Download run results files from ALM using OTA

This can be done using the ExtendedStorage property of the Run object.

Note: it works for both normal tests and BPT tests

RunID = 433
downloadPath = “C:\Temp”
qcurl = “http://10.10.14.15/qcbin
qcdomain = “DEFAULT”
qcproject = “DemoProject”
qcuser = “admin”
qcpass = “”

if IsOTAInstalled() then
set QCConnection = CreateObject(“TDApiOle80.TDConnection”)
QCConnection.InitConnectionEx qcurl
QCConnection.ConnectProjectEx qcdomain, qcproject, qcuser, qcpass
If not QCConnection.Connected then
Msgbox “Not connected. Exiting…”
Wscript.Quit
else
Set auxFilter = tdc.RunFactory.Filter
auxFilter.Filter(“RN_RUN_ID”) = RunID
For Each auxRun In auxFilter.newlist
Set extStorage = auxRun.ExtendedStorage
extStorage.ClientPath = downloadPath & “\” & RunID
extStorage.Load “”, true
Next
QCConnection.Disconnect
QCConnection.Logout
QCConnection.ReleaseConnection
End if
else
Msgbox “OTAClient.dll not registered. Exiting…”
End if
Function IsOTAInstalled()
IsOTAInstalled = true
On Error Resume Next
set QCConnection = CreateObject(“TDApiOle80.TDConnection”)
if err.number <> 0 then IsOTAInstalled = false
On error goto 0
End Function

Advertisements

2 thoughts on “Download run results files from ALM using OTA

  1. Shivananda

    Hi ,

    I have tried above code and I am getting below error.
    “Filter Error in Field : This Field can’t be filtered”
    Did you come across this type of error before?
    Could you please help me?.

    Thanks

    Reply
  2. Rajkumar

    Hi Bozz,

    I tried your code i can able to read the result name but unable to download the xml to the local path can you help me out.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s