MantisBT - TestLink
View Issue Details
0004940TestLinkAPI - XMLRPCpublic2012-03-16 11:262019-06-10 19:21
normalfeature requestN/A
Windows 7Enterprise
1.9.3 (2011 Q3 - bug fixing) 
0004940: XML-RPC API function to create requirements
We're working on a project using the testLink XML-RPC API with Python. We've encountered some issues now because there are no functiond in the API to create, edit and remove requirements.
We would appreciate if you could implement those functions.
No tags attached.
related to 0004492new  API to add/modify Requirement Specifications and Requirements 
related to 0005059new  Added getRequirementByID to xmlrpc.class.php 
related to 0006292new  Add in XMLRPC methods for Requirements Specification and Requirements creation 
? xmlrpc.class.php (159,032) 2012-05-25 06:22
? test.rb (1,764) 2012-05-25 06:23
? xmlrpc.class.php (V2) (165,225) 2012-05-25 08:40
? xmlrpc.class.php (V3) (165,237) 2012-05-28 12:58
? xmlrpc.class.php (V4) (166,836) 2012-07-30 07:39
Issue History
2012-03-16 11:26mnabucoNew Issue
2012-03-16 11:31fmanPriorityurgent => normal
2012-05-24 10:13cvillarNote Added: 0016750
2012-05-24 15:04fmanNote Added: 0016755
2012-05-25 06:22cvillarFile Added: xmlrpc.class.php
2012-05-25 06:23cvillarFile Added: test.rb
2012-05-25 06:37cvillarNote Added: 0016756
2012-05-25 08:37cvillarNote Added: 0016758
2012-05-25 08:39cvillarNote Edited: 0016758bug_revision_view_page.php?bugnote_id=16758#r1811
2012-05-25 08:40cvillarFile Added: xmlrpc.class.php (V2)
2012-05-25 17:14fmanNote Added: 0016767
2012-05-28 12:58cvillarFile Added: xmlrpc.class.php (V3)
2012-05-28 13:02cvillarNote Added: 0016789
2012-06-14 20:00fmanRelationship addedrelated to 0005059
2012-07-30 07:39cvillarFile Added: xmlrpc.class.php (V4)
2012-07-30 07:42cvillarNote Added: 0017028
2012-07-30 10:05fmanNote Added: 0017029
2013-04-25 17:30fmanCategoryTL API => XMLRPC API
2013-04-25 17:30fmanCategoryXMLRPC API => API - XMLRPC
2015-04-29 20:53Mr.BricodageRelationship addedrelated to 0006292
2015-04-29 21:12Mr.BricodageRelationship addedrelated to 0004492
2019-06-10 17:26hejuNote Added: 0028917
2019-06-10 19:21fmanNote Added: 0028918

2012-05-24 10:13   

We're working on a project using the testLink XML-RPC API with Ruby, and we also need to create, edit and remove requirements.

We have implemented the method for creating requirements in {testlink_root}/lib/api/xmlrpc.class.php and it's working fine:

We only need to add the method to the list of methods:

$this->methods = array(....

'tl.createRequirement' => 'this:createRequirement',

And the method:

public function createRequirement($args)
            $msg_prefix="({$operation}) - ";
            $checkFunctions = array('authenticate','checkTestProjectID');
            $status_ok=$this->_runChecks($checkFunctions,$msg_prefix) && $this->userHasRight("mgt_modify_tc");
        $ret = $this->reqMgr->create($this->args['req_spec'],
         return $status_ok ? $ret : $this->errors;

Is that feature on the roadmap for the next version?
2012-05-24 15:04   
>> Is that feature on the roadmap for the next version?
if your code is working well we can add it
2012-05-25 06:37   
Ok, that would be great!

I have improved the method and attached to this ticket "xmlrpc.class.php" and an example of using from a ruby file.

When do you think the next version will be available?

For my project maybe I 'll have to develop more features, so I'll let you know.

Best regards,
2012-05-25 08:37   
(edited on: 2012-05-25 08:39)

I have also implemented the createReqSpec and updateReqSpec methods in (V2 file)

2012-05-25 17:14   
Ok, we are going to review and try to add to 1.9.4
2012-05-28 13:02   

I have also implemented the updateRequirement method in (V3 file), I think is the last I need for my project at the moment.
2012-07-30 07:42   

I improved methods changing parameters user_id and project_id to project_prefix and user. It's more useful.
2012-07-30 10:05   
it's ok if both options are supported (DB ID and Verbose)
2019-06-10 17:26   
Dear TestLink Team,

I would like to kindly ask for the roadmap for this feature request.

In my project, we are using TestLink for test management and test result tracking / storage, which is working quite well. More or less all test cases are automated, the wonderful [^] is used to let the automation framework talk to TestLink.

The proposed functionality of this feature request would facilitate the (automated) import of requirements a lot. Maybe in future the functionality to generate/update requirements can be added to the python client as well.

I think the requirements update/create/get functions would improve the usability of TestLink in scenarios where requirements are organized in an other tool, raising the need for some automated sync mechanism.

Best regards
2019-06-10 19:21   
can you company consider be the sponsor (make a donation) for this feature?