I'm looking in xmlrpc.class.php, and I'm not seeing a nice way to get platform IDs out of a project/testplan. Maybe I'm missing something obvious, but if anyone has a clever way of getting the platform IDs, I'd love to see it. I can inspect everything else I need to report test case results except the platform.
Thanks for any advice!
How are people getting platform IDs via the API?
Moderators: Amaradana, TurboPT, TL Developers
Re: How are people getting platform IDs via the API?
Well, I looked again after walking away for a bit and I think this does the job:
There is a function called getTestPlanPlatforms that takes a test plan ID ("testplanid") as part of the args list.
Example (Python):
import xmlrpclib
class TestlinkAPIClient:
SERVER_URL = "http://X.X.X.X/testlink/lib/api/xmlrpc.php"
def __init__(self, devKey):
self.server = xmlrpclib.Server(self.SERVER_URL)
self.devKey = devKey
def getTestPlanPlatforms(self, tp_id):
data = {"devKey":self.devKey, "testplanid":tp_id}
return self.server.tl.getTestPlanPlatforms(data)
I hope that helps someone (or at least those as challenged at searching as I apparently am.
There is a function called getTestPlanPlatforms that takes a test plan ID ("testplanid") as part of the args list.
Example (Python):
import xmlrpclib
class TestlinkAPIClient:
SERVER_URL = "http://X.X.X.X/testlink/lib/api/xmlrpc.php"
def __init__(self, devKey):
self.server = xmlrpclib.Server(self.SERVER_URL)
self.devKey = devKey
def getTestPlanPlatforms(self, tp_id):
data = {"devKey":self.devKey, "testplanid":tp_id}
return self.server.tl.getTestPlanPlatforms(data)
I hope that helps someone (or at least those as challenged at searching as I apparently am.
