Page 1 of 1

problem -- Report result with buildId

Posted: Fri Oct 16, 2009 5:12 pm
by ccc123
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;

the position for buildid

Posted: Fri Oct 16, 2009 6:23 pm
by ccc123
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.

Posted: Mon Oct 19, 2009 7:30 pm
by fman
call must be done as in example, as you have seen it works.