Page 1 of 1

getTestCasesforTestSuite API function in Python

PostPosted: Thu Dec 30, 2010 7:07 am
by mouse_chan
Hello,
In python, how can I use getTestCasesforTestSuite API function to return all testcases?

Re: getTestCasesforTestSuite API function in Python

PostPosted: Fri Jan 14, 2011 8:20 am
by tom1
Here is a small example in python.
Insert your servername, api key and a valid testsuite id.
(deep and details is optional)

Tom

Code: Select all
#!/usr/bin/python

import sys,xmlrpclib

URL = "http://YOURSERVER/testlink/lib/api/xmlrpc.php"
DEVKEY = "YOURKEY"
conn = xmlrpclib.Server(URL)

data = {}
data["devKey"] = DEVKEY
data["testsuiteid"] = "3"
data["deep"] = "true"
data["details"] = "full"
tcinfo = conn.tl.getTestCasesForTestSuite(data)

print tcinfo

Re: getTestCasesforTestSuite API function in Python

PostPosted: Sat Jan 15, 2011 8:38 am
by fman
example added to TL distribution