Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004940TestLinkAPI - XMLRPCpublic2012-03-16 11:262019-06-10 19:21
Reportermnabuco 
Assigned To 
PrioritynormalSeverityfeature requestReproducibilityN/A
StatusnewResolutionopen 
PlatformOSWindows 7OS VersionEnterprise
Product Version1.9.3 (2011 Q3 - bug fixing) 
Fixed in Version 
Summary0004940: XML-RPC API function to create requirements
DescriptionWe'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.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files? file icon xmlrpc.class.php [^] (159,032 bytes) 2012-05-25 06:22
? file icon test.rb [^] (1,764 bytes) 2012-05-25 06:23
? file icon xmlrpc.class.php (V2) [^] (165,225 bytes) 2012-05-25 08:40
? file icon xmlrpc.class.php (V3) [^] (165,237 bytes) 2012-05-28 12:58
? file icon xmlrpc.class.php (V4) [^] (166,836 bytes) 2012-07-30 07:39

- Relationships
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 

-  Notes
(0016750)
cvillar (reporter)
2012-05-24 10:13

Hi,

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)
    {
        $result=array();
        $this->_setArgs($args);
        $operation=__FUNCTION__;
            $msg_prefix="({$operation}) - ";
            $checkFunctions = array('authenticate','checkTestProjectID');
            $status_ok=$this->_runChecks($checkFunctions,$msg_prefix) && $this->userHasRight("mgt_modify_tc");
      
             if($status_ok)
             {
        $ret = $this->reqMgr->create($this->args['req_spec'],
                         $this->args['document_id'],
                         $this->args['title'],
                                     $this->args['scope'],
                         $this->args['user_id'],
                         $this->args['reqStatus'],
                                     $this->args['reqType'],
                         $this->args['expected_coverage'],
                         $this->args['order']);
             }
       
      
         return $status_ok ? $ret : $this->errors;
    }

Is that feature on the roadmap for the next version?
(0016755)
fman (administrator)
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
(0016756)
cvillar (reporter)
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,
(0016758)
cvillar (reporter)
2012-05-25 08:37
edited on: 2012-05-25 08:39

Hi.

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

(0016767)
fman (administrator)
2012-05-25 17:14

Ok, we are going to review and try to add to 1.9.4
(0016789)
cvillar (reporter)
2012-05-28 13:02

Thanks,

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

Hi,

I improved methods changing parameters user_id and project_id to project_prefix and user. It's more useful.
(0017029)
fman (administrator)
2012-07-30 10:05

it's ok if both options are supported (DB ID and Verbose)
(0028917)
heju (reporter)
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 https://pypi.org/project/TestLink-API-Python-client/ [^] 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
(0028918)
fman (administrator)
2019-06-10 19:21

@heju
can you company consider be the sponsor (make a donation) for this feature?

- Issue History
Date Modified Username Field Change
2012-03-16 11:26 mnabuco New Issue
2012-03-16 11:31 fman Priority urgent => normal
2012-05-24 10:13 cvillar Note Added: 0016750
2012-05-24 15:04 fman Note Added: 0016755
2012-05-25 06:22 cvillar File Added: xmlrpc.class.php
2012-05-25 06:23 cvillar File Added: test.rb
2012-05-25 06:37 cvillar Note Added: 0016756
2012-05-25 08:37 cvillar Note Added: 0016758
2012-05-25 08:39 cvillar Note Edited: 0016758 View Revisions
2012-05-25 08:40 cvillar File Added: xmlrpc.class.php (V2)
2012-05-25 17:14 fman Note Added: 0016767
2012-05-28 12:58 cvillar File Added: xmlrpc.class.php (V3)
2012-05-28 13:02 cvillar Note Added: 0016789
2012-06-14 20:00 fman Relationship added related to 0005059
2012-07-30 07:39 cvillar File Added: xmlrpc.class.php (V4)
2012-07-30 07:42 cvillar Note Added: 0017028
2012-07-30 10:05 fman Note Added: 0017029
2013-04-25 17:30 fman Category TL API => XMLRPC API
2013-04-25 17:30 fman Category XMLRPC API => API - XMLRPC
2015-04-29 20:53 Mr.Bricodage Relationship added related to 0006292
2015-04-29 21:12 Mr.Bricodage Relationship added related to 0004492
2019-06-10 17:26 heju Note Added: 0028917
2019-06-10 19:21 fman Note Added: 0028918



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker