problem -- Report result with buildId

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

problem -- Report result with buildId

Postby ccc123 » Fri Oct 16, 2009 5:12 pm

does anybody tried to upload the test result with buildid? no matter if I give build id, the report is always inserted to the latest build.

if set guess= false, it gave errors, say missing build id.

i used this method:

mixed reportTCResult( struct $args, string $args["devKey"], int $args["testcaseid"], int $args["testplanid"], string $args["status"], int $args["buildid"], string $args["notes"], bool $args["guess"] )

http://testlink.org/api/phpdoc_generate ... rtTCResult


and I actaully use Meyn's API and added the method with buildid using the above statement.

error:

uessing is disabled so a buildid must be specified!

and the called method:

[XmlRpcMethod("tl.reportTCResult", StructParams = true)]
object reportTCResult(string devKey, int testcaseid, int testplanid, string status, int build, string notes, bool guess);

int build is supplied.




could someone confirm that the result can be reported with build id?


p.s. the build id is validated from MySQL and is correct. it's got by:

testplanBuildList1 = cnx.GetBuildsForTestPlan(tp1.id);

(tp1 is the plan id)

testplanBuild1 = testplanBuildList1[0];

so build id is testplanBuild1.id;
ccc123
TestLink user
 
Posts: 10
Joined: Wed Oct 14, 2009 11:18 pm

the position for buildid

Postby ccc123 » Fri Oct 16, 2009 6:23 pm

the api doc says:

reportTCResult [line 1779]

mixed reportTCResult( struct $args, string $args["devKey"], int $args["testcaseid"], int $args["testplanid"], string $args["status"], int $args["buildid"], int $args["buildname"], string $args["notes"], bool $args["guess"], string $args["bugid"] )

Parameters:
struct $args:
string $args["devKey"]:
int $args["testcaseid"]:
int $args["testplanid"]:
string $args["status"]: - status is $validStatusList
int $args["buildid"]: - optional. if not present and $args["buildname"] exists then $args["buildname"] will be checked and used if valid else build with HIGHEST ID will be used
int $args["buildname"]: - optional. if not present Build with higher internal ID will be used
string $args["notes"]: - optional
bool $args["guess"]: - optional defining whether to guess optinal params or require them explicitly default is true (guess by default)
string $args["bugid"]: - optional


and i tried the sampe code, clientReportTCResult.php

the sample code is able to report the result to the specified build.

in the sample code: the way to call reportTC:

clientReportTCResult.php:

$response = reportResult($server_url,$testCaseID,$testCaseExternalID,$testPlanID,
$buildID,null,$status,$exec_notes,$bug_id,$debug);


where $buildID is right after $testPlanID, then $status.

not sure if $buildID should be right after $testPlanID or right after $status in the API server.
ccc123
TestLink user
 
Posts: 10
Joined: Wed Oct 14, 2009 11:18 pm

Postby fman » Mon Oct 19, 2009 7:30 pm

call must be done as in example, as you have seen it works.
fman
Member of TestLink Community
 
Posts: 3049
Joined: Tue Nov 15, 2005 7:19 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 1 guest