getting errors when i use getProjectTestPlansAPI in python

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

getting errors when i use getProjectTestPlansAPI in python

Postby overflow » Thu Apr 15, 2010 5:32 am

Hi all,

I am trying to get all the Project Test plans for a particular project ID. so i am using the getProjectTestPlans api for it. But i constantly getting the error as below :

[{'message': '(getProjectTestPlans) - LOCALIZE: API_NO_TESTPROJECTID', 'code': 160}]

I queried the mysql for testplans table and below is the equivalent of it :

| id | testproject_id | notes | active | is_open |
| 7 | 1 | | 1 | 1 |
| 8 | 1 | | 1 | 1 |
2 rows in set (0.00 sec)

Now i am bit confused as to what i have pass for testprojectid. ?? Can anyone please help.

Thanks in advance
TestLink user
Posts: 4
Joined: Thu Apr 15, 2010 5:25 am

Postby fman » Thu Apr 15, 2010 8:26 pm

I suggest you to do some tests using the PHP client sample code, to understand how it work , then move to python.
Sample clients on python are welcomed to provide to community
Member of TestLink Community
Posts: 3067
Joined: Tue Nov 15, 2005 7:19 am

Postby austvik » Fri Apr 16, 2010 6:07 am

Hi, Overflow.

I don't think that Python vs. PHP has anything to do with this one.

I think the API_NO_TESTPROJID is because you have not provided the test project id - either forgotten completely, or sent with the wrong parameter name.

In my lib/api/xmlrpc.php, the parameter has this name, is that the name you are using?
Code: Select all
public static $testProjectIDParamName = "testprojectid";

If changing/providing the name does not help, would you mind posting the code that does the call, and writing which version of TL you are using?

Advanced user
Posts: 24
Joined: Thu Mar 25, 2010 7:25 am

Postby overflow » Fri Apr 16, 2010 9:44 am

I found out the problem. It was the parameter name which I was passing wrongly. I was passing it as tpid rather than testplanid. I went through the xmlrpc.php file for the getprojectTestplans method and found out.

Thanks for the all the suggestions.

TestLink user
Posts: 4
Joined: Thu Apr 15, 2010 5:25 am

Return to XML-RPC API

Who is online

Users browsing this forum: Google [Bot] and 2 guests