Need help with getTestCaseIDByName

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Need help with getTestCaseIDByName

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

Hello everyone,
When I tried to use getTestCaseIDByName with a Chinese name to return the testcaseID, I got the results:

[{'message': '(getTestCaseIDByName) - Cannot find matching test case. No testcas
e exists with the name provided!', 'code': 5030}]

I found it could get testcaseID by English name, but not by Chinese name. Please help me.

Code like this:
Code: Select all
#!/usr/bin/env python
# -*- coding:utf-8 -*-

import xmlrpclib
 
class TestlinkAPIClient:       
    # substitute your server URL Here
    SERVER_URL = "http://172.31.89.40/testlink/lib/api/xmlrpc.php"
   
    def __init__(self, devKey):
        self.server = xmlrpclib.Server(uri=self.SERVER_URL, encoding='utf8')
        self.devKey = devKey
   
    def getInfo(self):
        return self.server.tl.about()
   
    def get_test_id_by_name(self,name):
        data = {"devKey":self.devKey,"testcasename":name}
        return self.server.tl.getTestCaseIDByName(data)
       
 
# substitute your Dev Key Here
client = TestlinkAPIClient("01d32fcd314cced08e549b5e4e48cac1")

# get info about the server
print client.getInfo()

# get_testcase id by his name
print client.get_test_id_by_name("全部移动")
mouse_chan
TestLink user
 
Posts: 3
Joined: Thu Dec 30, 2010 6:51 am

Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 2 guests