API for testcase results of a specific build of test plan

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

API for testcase results of a specific build of test plan

Postby akang » Wed Nov 24, 2010 10:54 pm

Hello,

Do not figure out how to test cases being executed for a specific build of a test plan.

Anyone know which API I should use?
Or is version 1.8.5 support it?

Thanks,
akang
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm

Re: API for testcase results of a specific build of test pla

Postby akang » Thu Nov 25, 2010 12:57 am

More specific:

How to use API to retrieve data like the results from "Test result matrix"?
It seems to me the API in 1.8.5 can not support it.
Can any developer comment this?

Thanks,
akang
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm

Re: API for testcase results of a specific build of test pla

Postby fman » Thu Nov 25, 2010 7:53 pm

read method documentation inside XML RPC CLass
fman
Member of TestLink Community
 
Posts: 3062
Joined: Tue Nov 15, 2005 7:19 am

Re: API for testcase results of a specific build of test pla

Postby akang » Mon Nov 29, 2010 12:37 am

fman,
Read the class (i'm not an php guy).
The API only support getTestExecutionResult() -- the latest one which do no imply which build.
Also don't see any method I can get result of test-plan of build "x.y.z.0".
Let's say, I have 100 test cases (in many test suites) assign to test_plan: HELO.
Create builds: 1.0.0.0.1, 1.0.0.0.3, 1.0.0.0.5 for HELO.
Run 10 tests against build 1.0.0.0.1, 20 tests for 1.0.0.0.3,
and 2 for 1.0.0.0.5 which have BLOCKer.
All engineers are asked to test 1.0.0.0.3.
Run 50 tests against 1.0.0.0.3.
What is the API (or API's) I can use to retrieve test result for test_plan:HELO on build 1.0.0.0.3?

Thanks,
akang
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm

Re: API for testcase results of a specific build of test pla

Postby akang » Mon Nov 29, 2010 12:54 am

Here are the APIs I found from the xmlrpc class:
'tl.reportTCResult' => 'this:reportTCResult',
'tl.createBuild' => 'this:createBuild',
'tl.createTestCase' => 'this:createTestCase',
'tl.createTestProject' => 'this:createTestProject',
'tl.createTestSuite' => 'this:createTestSuite',
'tl.assignRequirements' => 'this:assignRequirements',
'tl.addTestCaseToTestPlan' => 'this:addTestCaseToTestPlan',
'tl.getProjects' => 'this:getProjects',
'tl ProjectByName' => 'this:getTestProjectByName',
'tl.getTestPlanByName' => 'this:getTestPlanByName',
'tl.getProjectTestPlans' => 'this:getProjectTestPlans',
'tl.getBuildsForTestPlan' => 'this:getBuildsForTestPlan',
'tl.getLatestBuildForTestPlan' => 'this:getLatestBuildForTestPlan',
'tl.getLastExecutionResult' => 'this:getLastExecutionResult',
'tl.getTestSuitesForTestPlan' => 'this:getTestSuitesForTestPlan',
'tl.getTestCasesForTestSuite' => 'this:getTestCasesForTestSuite',
'tl.getTestCasesForTestPlan' => 'this:getTestCasesForTestPlan',
'tl.getTestCaseIDByName' => 'this:getTestCaseIDByName',
'tl.getTestCaseCustomFieldDesignValue' => 'this:getTestCaseCustomFieldDesignValue',
'tl.getFirstLevelTestSuitesForTestProject' => 'this:getFirstLevelTestSuitesForTestProject',
'tl.getTestCaseAttachments' => 'this:getTestCaseAttachments',
'tl.about' => 'this:about',
'tl.setTestMode' => 'this:setTestMode',
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm

Re: API for testcase results of a specific build of test pla

Postby fman » Mon Nov 29, 2010 10:18 am

>> Read the class (i'm not an php guy).
Just do not read the code, read just the comments like this (where present):

Just an example of a method:
=======================================================================================================================

* Gets full path from the given node till the top using nodes_hierarchy_table
*
* @param struct $args
* @param string $args["devKey"]
* @param mixed $args["nodeID"] can be just a single node or an array of INTERNAL (DB) ID
* @return mixed $resultInfo
* @access public
*
* @internal revision
* BUGID 3993
* $args["nodeID"] can be just a single node or an array
* when path can not be found same date structure will be returned, that on situations
* where all is ok, but content for KEY(nodeID) will be NULL instead of rising ERROR

==============================================================================
OR
* Gets the result of LAST EXECUTION for a particular testcase
* on a test plan, but WITHOUT checking for a particular build
*
* @param struct $args
* @param string $args["devKey"]
* @param int $args["tplanid"]
* @param int $args["testcaseid"]: optional, if does not is present
* testcaseexternalid must be present
*
* @param int $args["testcaseexternalid"]: optional, if does not is present
* testcaseid must be present
*
* @return mixed $resultInfo
* if execution found, array with these keys:
* id (execution id),build_id,tester_id,execution_ts,
* status,testplan_id,tcversion_id,tcversion_number,
* execution_type,notes.
*
* if test case has not been execute,
* array('id' => -1)
*
* @access public
================================================================================================================
fman
Member of TestLink Community
 
Posts: 3062
Joined: Tue Nov 15, 2005 7:19 am

Re: API for testcase results of a specific build of test pla

Postby akang » Mon Nov 29, 2010 11:19 pm

fman,

I think the xmlrpc API, both at 1.8.5 and 1.9, does not support get test-case execution result on build 1.0.0.0.3 of test_plan:HELO.
The only API I can find regarding to Execution is getLastExecutionResult() which does not care about buildid at all.

From the GUI, TL allow you to test non-lastest-build (from my example, 1.0.0.0.5).
My interest is using API to get test-cases results executed against a specific build, say 1.0.0.0.3, of test-plan:HELO.

If you can point to me the right API I would really appreciate.

Thanks,
akang
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm

Re: API for testcase results of a specific build of test pla

Postby fman » Tue Nov 30, 2010 2:07 pm

Dear sir:
As you have seen there is no API method to do what you need => is impossible to point you to any API => make an feature request on mantis
fman
Member of TestLink Community
 
Posts: 3062
Joined: Tue Nov 15, 2005 7:19 am

Re: API for testcase results of a specific build of test pla

Postby akang » Tue Nov 30, 2010 5:52 pm

OK.
akang
Advanced user
 
Posts: 20
Joined: Wed Sep 22, 2010 8:36 pm


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 3 guests