Using reportTCResult() when Platform is MISSING

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
mooasun
TestLink user
Posts: 7
Joined: Thu Oct 11, 2012 8:38 pm

Using reportTCResult() when Platform is MISSING

Post by mooasun »

I am using XML-RPC to import test results to test link. But I get an error from reportTCResult() when a test case in a test plan does not have the test platform assigned. I like to programatically assign a test platform to a test case in a test plan but I did not find any API that can accomplish that. Can someone give me a pointer?

The error message I got from reportTCResult() call was:

Test Case (name=new test case/id=15) is not associated with Test Plan (name=plan1/id=5) for Platform (name=Windows8-32/id=1).

The few questions I have are:

1. Is there an API or a way to test if a platform is assigned to a (test plan, test case) combination? Assuming that I know the test plan id, test case id and platform id.

2. If a platform is in a test project but not assigned to a test plan, how can I do it using xml-rpc?

3. How can I assign a platform to a (test plan, test case) combination? When I found out platform is not assigned in #1.

Much thanks!
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Using reportTCResult() when Platform is MISSING

Post by fman »

UPTODATE details of each API method are present on [TL INSTALL DIR]/lib/api/xmlrpc.class.php

We also have create a section on forum:

FAQ & HINTS
FAQ & HINTS maintained by Development Team, using also info provided by users

than can be searched with useful info => search there before post
mooasun
TestLink user
Posts: 7
Joined: Thu Oct 11, 2012 8:38 pm

Re: Using reportTCResult() when Platform is MISSING

Post by mooasun »

Yes, I have got though all those you mentioned. I had also looked thru source code xmlrpc.class.php a few times. I was not able find anything that can address my problem. I do not understand why other people had not encounter this problem before. This seems to be something anyone who do automation will encounter. I think either I do not understand the TestLink data model correctly or something is missing from the API. For those who know TestLink implementation well, I would appreciate if you can point me to the right direction.

Thanks!
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Using reportTCResult() when Platform is MISSING

Post by fman »

IMHO API is not intended to cover ALL operations that can be done via GUI.
But new API methods can be developed with PHP knowledge using our classes as building blocks.
mooasun
TestLink user
Posts: 7
Joined: Thu Oct 11, 2012 8:38 pm

Re: Using reportTCResult() when Platform is MISSING

Post by mooasun »

Ok. It sounds like the functionality is not there. I will extend the XML-RPC API (TestlinkXMLRPCServer) to add those functionalities.

BTW, is there documentation on TestLink data model? I do not find it in dev guide. I like to understand how test case version, platform, build and execution tables are linked. Are the data base init scripts and code the only sources?
Post Reply