getTestCasesforTestSuite API function in Python

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
mouse_chan
TestLink user
Posts: 3
Joined: Thu Dec 30, 2010 6:51 am

getTestCasesforTestSuite API function in Python

Post by mouse_chan »

Hello,
In python, how can I use getTestCasesforTestSuite API function to return all testcases?
tom1
Advanced user
Posts: 23
Joined: Thu Nov 11, 2010 4:40 pm

Re: getTestCasesforTestSuite API function in Python

Post 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
fman
Member of TestLink Community
Posts: 3108
Joined: Tue Nov 15, 2005 7:19 am

Re: getTestCasesforTestSuite API function in Python

Post by fman »

example added to TL distribution
Post Reply