getTestCasesforTestSuite API function in Python

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

getTestCasesforTestSuite API function in Python

Postby mouse_chan » Thu Dec 30, 2010 7:07 am

Hello,
In python, how can I use getTestCasesforTestSuite API function to return all testcases?
mouse_chan
TestLink user
 
Posts: 3
Joined: Thu Dec 30, 2010 6:51 am

Re: getTestCasesforTestSuite API function in Python

Postby tom1 » Fri Jan 14, 2011 8:20 am

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
tom1
Advanced user
 
Posts: 23
Joined: Thu Nov 11, 2010 4:40 pm

Re: getTestCasesforTestSuite API function in Python

Postby fman » Sat Jan 15, 2011 8:38 am

example added to TL distribution
fman
Member of TestLink Community
 
Posts: 3063
Joined: Tue Nov 15, 2005 7:19 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 2 guests