MantisBT - TestLink
View Issue Details
0007326TestLinkAPI - XMLRPCpublic2015-11-05 18:122016-09-08 15:13
ghutchis 
fman 
normalfeature requestN/A
closedfixed 
1.9.13 (2015 #1) 
1.9.15 (2015 Q4) 
MySQL
READY FOR TESTING
0007326: API - getTestSuiteByName => getTestSuite()
I would like to be able to get a test suite ID using a name lookup, as at the point my script needs to do the call, the suite may not yet have been associated with a test plan. getTestSuiteByProject would also work acceptably.
No tags attached.
Issue History
2015-11-05 18:12ghutchisNew Issue
2015-11-05 18:26fmanQA Team - Task Workflow Status => TBD
2015-11-05 18:26fmanSummaryNeed call getTestSuiteByName => API - getTestSuiteByName
2015-11-05 18:29fmanNote Added: 0024203
2015-11-05 18:29fmanStatusnew => feedback
2015-11-05 18:55ghutchisNote Added: 0024204
2015-11-05 18:55ghutchisStatusfeedback => new
2015-11-06 06:56fmanNote Added: 0024206
2015-11-07 09:03fmanNote Added: 0024213
2015-11-07 09:03fmanFixed in Version => 1.9.15 (2015 Q4)
2015-11-07 09:03fmanSummaryAPI - getTestSuiteByName => API - getTestSuiteByName => getTestSuite()
2015-11-07 09:08fmanQA Team - Task Workflow StatusTBD => READY FOR TESTING
2015-11-07 09:08fmanNote Added: 0024214
2015-11-07 09:08fmanStatusnew => resolved
2015-11-07 09:08fmanResolutionopen => fixed
2015-11-07 09:08fmanAssigned To => fman
2016-09-08 15:13fmanNote Added: 0025311
2016-09-08 15:13fmanStatusresolved => closed

Notes
(0024203)
fman   
2015-11-05 18:29   
one ticket => one request
then getTestSuiteByName() or getTestSuiteByProject() not both on one ticket

In addition requirement for getTestSuitByProject() has not been provided then there is no way other than guess to provide an answer from dev point of view.

In addition because TestSuite name can be used on different suites on different levels of test spec tree => this will not allow to get an unique answer
(0024204)
ghutchis   
2015-11-05 18:55   
Request is really to get a test suite by something other than an ID (which is what I need) or a test plan (because it isn't in one yet). I have no idea of what the underlying structure of the DB and what is easy or difficult, which is why I listed alternatives. I do not need all alternatives implemented, although ByName would be consistent with other calls.

Returning multiple values is OK, I can easily sort through multiple results and find the correct one.
(0024206)
fman   
2015-11-06 06:56   
>> I have no idea of what the underlying structure of the DB and what is easy or >>difficult, which is why I listed alternatives
again disagree you have you do a clear request because output of getTestSuiteByName() or getTestSuitesByTestProject() is very different.

You will not be able IMHO to get the right ID if you get an array of ID belonging to all test suites on a test project that have same name, if no other info like position (depth) in test spec tree will not be provided.
(0024213)
fman   
2015-11-07 09:03   
new method getTestSuite()

/**
  * Returns all test suites inside target
  * test project with target name
  *
  * @param
  * @param struct $args
  * @param string $args["devKey"]
  * @param int $args["testsuitename"]
  * @param string $args["prefix"]
  * @return mixed $resultInfo
  *
  * @access public
  */
 

Please test and provide feedback
paypal donations are welcomed
(0024214)
fman   
2015-11-07 09:08   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/31bbc0cad74d4219e8ce78242a8b4e157cda3299 [^]

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/fab503c280e06be9613c321216db2d71dfabd91b [^]
(0025311)
fman   
2016-09-08 15:13   
1.9.15 Released - 2016-09-08