1.9.5 - API calls for getting results

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
mhtestlink
TestLink user
Posts: 1
Joined: Sat Aug 09, 2014 6:11 am

1.9.5 - API calls for getting results

Post by mhtestlink »

I am currently working on a project to build an overview of the Testlink results (Testlink v1.9.5).

After reading the documentation and looking at the PHP file I used the method "getLastExecutionResult" and tried to include the buildID to get the results for a specific build. But no matter which buildID the call uses only the last result is returned.

Is there a way to get the results per build with the API?


Example Calls with different buildIDs which return both only the last result:

Code: Select all

<methodCall><methodName>tl.getLastExecutionResult</methodName><params><param><value><struct><member><name>devKey</name><value><string>blabla</string></value></member><member><name>testcaseexternalid</name><value><string>PLAY-445</string></value></member><member><name>testplanid</name><value><string>74954</string></value></member><member><name>buildid</name><value><string>  567  </string></value></member></struct></value></param></params></methodCall>
and

Code: Select all

<methodCall><methodName>tl.getLastExecutionResult</methodName><params><param><value><struct><member><name>devKey</name><value><string>blabla</string></value></member><member><name>testcaseexternalid</name><value><string>PLAY-445</string></value></member><member><name>testplanid</name><value><string>74954</string></value></member><member><name>buildid</name><value><string>  3312  </string></value></member></struct></value></param></params></methodCall>
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: API calls for results (1.9.5)

Post by fman »

Since 1.9.11 (latest stable version) interface is this (documentation is inside of xmlrpc.class.php on testlink distribution)
/**
* Gets the result of LAST EXECUTION for a particular testcase on a test plan.
* If there are no filter criteria regarding platform and build,
* result will be get WITHOUT checking for a particular platform and build.
*
* @param struct $args
* @param string $args["devKey"]
* @param int $args["tplanid"]
* @param int $args["testcaseid"]: Pseudo optional.
* if does not is present then testcaseexternalid MUST BE present
*
* @param int $args["testcaseexternalid"]: Pseudo optional.
* if does not is present then testcaseid MUST BE present
*
* @param string $args["platformid"]: optional.
* ONLY if not present, then $args["platformname"]
* will be analized (if exists)
*
* @param string $args["platformname"]: optional (see $args["platformid"])
*
* @param int $args["buildid"]: optional
* ONLY if not present, then $args["buildname"] will be analized (if exists)
*
* @param int $args["buildname"] - optional (see $args["buildid"])
*
* @param int $args["options"] - optional
* options['getBugs'] = true / false
*
*
* @return mixed $resultInfo
* if execution found
* array that contains a map with these keys:
* id (execution id),build_id,tester_id,execution_ts,
* status,testplan_id,tcversion_id,tcversion_number,
* execution_type,notes.
*
* If user has requested getbugs, then a key bugs (that is an array)
* will also exists.
*
*
*
* if test case has not been execute,
* array('id' => -1)
*
* @access public
*/

1.9.5 IS TOO OLD and there is no more support
Post Reply