Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005220TestLinkAPI - XMLRPCpublic2012-09-11 14:372015-05-16 08:45
Reporterlblestel 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version1.9.14 (2015 Q3) 
Summary0005220: xml-rpc : Error with 0005063 patch, when rights on test project / test plan differ
DescriptionWith the 0005063 patch http://mantis.testlink.org/view.php?id=5063 [^] (relative to http://www.teamst.org/forum/viewtopic.php?f=10&t=6845 [^])


Create
 - an automation project "Auto"
 - a user, with a "guest" role as testproject generic role, and "admin" role on "Auto" testproject.


With our scripts, an error is returned, but the result of the request is done too...


the problem seems be here => TestlinkXMLRPCServer->userHasRight(mgt_view_tc) called at [C:\xampp\htdocs\testlink\lib\api\xmlrpc.class.php:1820]



Workaround : we have deleted the 0005063 patch, and set a general "based <admin>" (with the necessary rights) role to the user, and set "<no right>" role on all project except "Auto"


----------------

Voici les erreurs que j'ai eu en appelant la method : getTestCaseIDByName

Avec le patch :

Requête :
rwPE4n@n,XPoGP<?xml version='1.0'?>
<methodCall>
<methodName>tl.getTestCaseIDByName</methodName>
<params>
<param>
<value><struct>
<member>
<name>testcasepathname</name>
<value><string>WEB Services::API::Impaired::test_Impaired_HWR_apiKey_missing</string></value>
</member>
<member>
<name>devKey</name>
<value><string>de5a51b2263c4ed1b40f618c9fb91776</string></value>
</member>
<member>
<name>testcasename</name>
<value><string>test_Impaired_HWR_apiKey_missing</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>

Réponse :
 ============================================================================== 
 DB Access Error - debug_print_backtrace() OUTPUT START 
 ============================================================================== 
#0  database->exec_query(/* Class:testplan - Method: get_by_id */  SELECT testplans.*,NH.name,NH.parent_id  
FROM testplans testplans,  nodes_hierarchy NH  WHERE testplans.id = NH.id AND  testplans.id = , -1) called 
at [C:\xampp\htdocs\testlink\lib\functions\database.class.php:717]
#1  database->get_recordset(/* Class:testplan - Method: get_by_id */  SELECT testplans.*,NH.name,NH.parent_id  
FROM testplans testplans,  nodes_hierarchy NH  WHERE testplans.id = NH.id AND  testplans.id = ) called 
at [C:\xampp\htdocs\testlink\lib\functions\testplan.class.php:266]
0000002  testplan->get_by_id() called at [C:\xampp\htdocs\testlink\lib\api\xmlrpc.class.php:444]
0000003  TestlinkXMLRPCServer->userHasRight(mgt_view_tc) called at [C:\xampp\htdocs\testlink\lib\api\xmlrpc.class.php:1820]

0000004  TestlinkXMLRPCServer->getTestCaseIDByName(Array ([testcasepathname] => WEB Services::API::Impaired::test_Impaired_HWR_apiKey_missing,[devKey] 
=> de5a51b2263c4ed1b40f618c9fb91776,[testcasename] => test_Impaired_HWR_apiKey_missing)) called 
at [C:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php:336]
0000005  IXR_Server->call(tl.getTestCaseIDByName, Array ([0] => Array ([testcasepathname] => WEB 
Services::API::Impaired::test_Impaired_HWR_apiKey_missing,[devKey] => de5a51b2263c4ed1b40f618c9fb91776,[testcasename] 
=> test_Impaired_HWR_apiKey_missing))) called at [C:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php:294]

0000006  IXR_Server->serve() called at [C:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php:277]

0000007  IXR_Server->IXR_Server(Array ([tl.reportTCResult] => this:reportTCResult,[tl.setTestCaseExecutionResult] 
=> this:reportTCResult,[tl.createBuild] => this:createBuild,[tl.createTestCase] => this:createTestCase,[tl.createTestPlan] 
=> this:createTestPlan,[tl.createTestProject] => this:createTestProject,[tl.createTestSuite] => 
this:createTestSuite,[tl.uploadExecutionAttachment] => this:uploadExecutionAttachment,[tl.uploadRequirementSpecificationAttachment] 
=> this:uploadRequirementSpecificationAttachment,[tl.uploadRequirementAttachment] => this:uploadRequirementAttachment,[tl.uploadTestProjectAttachment] 
=> this:uploadTestProjectAttachment,[tl.uploadTestSuiteAttachment] => this:uploadTestSuiteAttachment,[tl.uploadTestCaseAttachment] 
=> this:uploadTestCaseAttachment,[tl.uploadAttachment] => this:uploadAttachment,[tl.assignRequirements] 
=> this:assignRequirements,[tl.addTestCaseToTestPlan] => this:addTestCaseToTestPlan,
[tl.getProjects] => this:getProjects,[tl.getTestProjectByName] => this:getTestProjectByName,[tl.getTestPlanByName] 
=> this:getTestPlanByName,[tl.getProjectTestPlans] => this:getProjectTestPlans,[tl.getTestPlanPlatforms] 
=> this:getTestPlanPlatforms,[tl.getTotalsForTestPlan] => this:getTotalsForTestPlan,[tl.getBuildsForTestPlan] 
=> this:getBuildsForTestPlan,[tl.getLatestBuildForTestPlan] => this:getLatestBuildForTestPlan,[tl.getLastExecutionResult] 
=> this:getLastExecutionResult,[tl.getTestSuitesForTestPlan] => this:getTestSuitesForTestPlan,[tl.getTestSuitesForTestSuite] 
=> this:getTestSuitesForTestSuite,[tl.getTestCasesForTestSuite] => this:getTestCasesForTestSuite,[tl.getTestCasesForTestPlan] 
=> this:getTestCasesForTestPlan,[tl.getTestCaseIDByName] => this:getTestCaseIDByName,[tl.getTestCaseCustomFieldDesignValue] 
=> this:getTestCaseCustomFieldDesignValue,[tl.getFirstLevelTestSuitesForTestProject] => this:getFirstLevelTestSuitesForTest

Project,[tl.getTestCaseAttachments] => this:getTestCaseAttachments,[tl.getTestCase] => this:getTestCase,[tl.getFullPath] 
=> this:getFullPath,[tl.getTestSuiteByID] => this:getTestSuiteByID,[tl.deleteExecution] => this:deleteExecution,[tl.doesUserExist] 
=> this:doesUserExist,[tl.checkDevKey] => this:checkDevKey,[tl.about] => this:about,[tl.setTestMode] 
=> this:setTestMode,[tl.ping] => this:sayHello,[tl.sayHello] => this:sayHello,[tl.repeat] => 
this:repeat)) called at [C:\xampp\htdocs\testlink\lib\api\xmlrpc.class.php:281]
0000008  TestlinkXMLRPCServer->__construct() called at [C:\xampp\htdocs\testlink\lib\api\xmlrpc.php:25]

 ============================================================================== 
<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array><data>
  <value><struct>
  <member><name>id</name><value><string>100482</string></value></member>
  <member><name>name</name><value><string>test_Impaired_HWR_apiKey_missing</string></value></member>
  <member><name>parent_id</name><value><string>100480</string></value></member>
  <member><name>tsuite_name</name><value><string>Impaired</string></value></member>
  <member><name>tc_external_id</name><value><string>1</string></value></member>
</struct></value>
</data></array>
      </value>
    </param>
  </params>
</methodResponse>
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0023310)
Mr.Bricodage (updater)
2015-05-03 13:58

test content :
project "auto"
user "5220",
user rights : no_right(global), admin (auto),
dev-key : 8cdb0e6cc91edbd13c711489d7ae41ec

using "lib/api/xmlrpc/v1/sample_clients/php/clientGetTestCaseIDByName.php" (same function that is listed in bug):

POST /TestLink/lib/api/xmlrpc/v1/xmlrpc.php HTTP/1.0
Host: localhost
Content-Type: text/xml
User-Agent: Incutio XML-RPC
Content-length: 353

<?xml version="1.0"?>
<methodCall>
<methodName>tl.getTestCaseIDByName</methodName>
<params>
<param><value><struct>
  <member><name>devKey</name><value><string>8cdb0e6cc91edbd13c711489d7ae41ec</string></value></member>
  <member><name>testcasename</name><value><string>KOMODO</string></value></member>
</struct></value></param>
</params></methodCall>
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<array><data>
<value><struct>
<member><name>id</name><value><string>6</string></value></member>
<member><name>name</name><value><string>KOMODO</string></value></member>
<member><name>parent_id</name><value><string>3</string></value></member>
<member><name>tsuite_name</name><value><string>TS101</string></value></member>
<member><name>tc_external_id</name><value><string>2</string></value></member>
</struct></value>
</data></array>
</value>
</param>
</params>
</methodResponse>

==> no more
 ==============================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START
 ==============================================================================

issue can be closed

- Issue History
Date Modified Username Field Change
2012-09-11 14:37 lblestel New Issue
2013-04-25 17:30 fman Category TL API => XMLRPC API
2013-04-25 17:30 fman Category XMLRPC API => API - XMLRPC
2015-05-03 13:58 Mr.Bricodage Note Added: 0023310
2015-05-03 13:58 Mr.Bricodage Relationship added child of 0007083
2015-05-16 08:45 fman Status new => closed
2015-05-16 08:45 fman Assigned To => fman
2015-05-16 08:45 fman Resolution open => fixed
2015-05-16 08:45 fman Fixed in Version => 1.9.14 (2015 Q3)
2015-05-19 18:59 Mr.Bricodage Relationship deleted child of 0007083



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker