ALM API via Python
Question ID: 106907
0
0

I have a user that would like to use Python to script some changes using the ALM API. Does anyone have any information as to how to access the API via Python?

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on June 14, 2016 2:15 pm
746 views
Answers (1)
2
Private answer

Lungri,

You would first need to have your ALM client registered on the client machine. You can do this from the Tools page in ALM.

The next step would be to ensure that you have the Python for Windows extensions installed in your Python enviornment:

pip install pypiwin32
Finally, you can access the API by importing the Win32 com module and using the client.Dispatch method to access the connection:

import win32com.client

qcServer = ''http://sample:8080/qcbin''
qcDomain = ''DEFAULT''
qcProject = ''ALM_DEMO''
qcUser = ''alex_alm''
qcPassword = ''''

tdc = win32com.client.Dispatch(''TDApiOle80.TDConnection'')
tdc.InitConnection(qcServer)
tdc.Login (qcUser, qcPassword)
tdc.Connect (qcDomain, qcProject)

print (tdc.Connected)

tdc.Disconnect
tdc.Logout
tdc.ReleaseConnection

del tdc

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on June 14, 2016 2:17 pm
0
Hi, could you please transform the same with restfull api in python. As ALM12 not supprts tdconnection yet
( at January 25, 2017 6:56 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top