MantisBT - TestLink
View Issue Details
0006331TestLinkAPI - XMLRPCpublic2014-05-12 07:022014-07-28 20:31
mykaul 
fman 
normalfeature requestalways
closedfixed 
1.9.9 (2013 Q4 - bug fixing) 
1.9.11 (2014 Q2 - bug fixing) 
mysql
READY FOR TESTING
0006331: Assign test case execution XMLRPC method
Based on the discussion @ http://mantis.testlink.org/view.php?id=6324 [^] , I'm opening this feature request - please provide the ability to assign a test case in a specific build to a specific user.

The complete use case is described @ http://mantis.testlink.org/view.php?id=6324#c20963 [^]
N/A
No tags attached.
related to 0005082closed fman New API to assign test cases execution  
related to 0006440closed fman (gitoriuos code) assignTestCaseExecutionTask does not assign user 
child of 0006313closed fman Availables hot-fixes for 1.9.10 & How To get full fixed package from gitorious 
Issue History
2014-05-12 07:02mykaulNew Issue
2014-05-18 10:10mykaulNote Added: 0020984
2014-05-18 11:56fmanRelationship addedrelated to 0005082
2014-05-18 12:34fmanNote Added: 0020987
2014-05-18 12:53fmanNote Edited: 0020987bug_revision_view_page.php?bugnote_id=20987#r3543
2014-05-25 17:16fmanNote Added: 0021009
2014-05-25 17:22fmanNote Added: 0021010
2014-05-25 17:23fmanQA Team - Task Workflow Status => READY FOR TESTING
2014-05-25 17:23fmanStatusnew => resolved
2014-05-25 17:23fmanFixed in Version => 1.9.11 (2014 Q2 - bug fixing)
2014-05-25 17:23fmanResolutionopen => fixed
2014-05-25 17:23fmanAssigned To => fman
2014-05-25 17:23fmanSummaryFeature request: assign test case execution XMLRPC method => Assign test case execution XMLRPC method
2014-05-25 17:24fmanRelationship addedchild of 0006313
2014-06-05 10:04tehiladNote Added: 0021034
2014-06-05 16:30fmanNote Added: 0021035
2014-06-19 11:31mykaulNote Added: 0021142
2014-06-19 11:42fmanNote Added: 0021144
2014-06-26 08:24mykaulNote Added: 0021169
2014-06-26 08:25fmanNote Added: 0021170
2014-06-27 07:08mykaulNote Added: 0021174
2014-06-29 12:40fmanNote Added: 0021187
2014-06-30 13:12mykaulNote Added: 0021195
2014-06-30 16:45fmanNote Added: 0021196
2014-07-13 11:30mykaulNote Added: 0021264
2014-07-15 18:23mykaulNote Added: 0021275
2014-07-15 19:50fmanRelationship addedrelated to 0006440
2014-07-28 20:31fmanStatusresolved => closed

Notes
(0020984)
mykaul   
2014-05-18 10:10   
I'm wondering if it's not the same request as http://mantis.testlink.org/view.php?id=5082 [^] .
(0020987)
fman   
2014-05-18 12:34   
(edited on: 2014-05-18 12:53)
oops (I'm wrong) is similar request written in a obscure way (IMHO)

(0021009)
fman   
2014-05-25 17:16   
reporter does not need to monitor his/her issues
(0021010)
fman   
2014-05-25 17:22   
method: assignTestCaseExecutionTask();

https://gitorious.org/testlink-ga/testlink-code/commit/4e1040fd888376a193983421a9c0bd4d9bb783a5 [^]

Think about providing support to TestLink development
(0021034)
tehilad   
2014-06-05 10:04   
I tried to use the new feature, by creating this method:
    
    def AssignTestToUser(self, devKey, testprojectid, testplanid, buildname,
                         platformname, testcaseexternalid, user):
        argsAPI = {
                   'devKey' : devKey,
                   'testprojectid' : str(testprojectid),
                   'testplanid': str(testplanid),
                   'buildname': str(buildname),
                   'platformname': str(platformname),
                   'testcaseexternalid' : str(testcaseexternalid),
                   'user': str(user)
                   }
        return self.server.tl.assignTestCaseExecutionTask(argsAPI)

I called it with parameters of our project, and got this output:
{'status': True, 'args': {'testcaseexternalid': 'x-1', 'buildid': '257', 'testcaseid': 5, 'platformid': 9, 'user': 'dabust', 'testprojectid': '1', 'buildname': '2.4.0-24', 'testplanid': '52057', 'platformname': '1 Brick'}}

but it doesn't seems to work(when I try to look in the test cases assigned to me, I don't see this test).
(0021035)
fman   
2014-06-05 16:30   
@tehilad
you have to test using the PHP client because is the only code I use.
Have you checked with other feature than test cases assigned to me ?
(0021142)
mykaul   
2014-06-19 11:31   
fman - we could not work with the PHP client, but here's the XML-RPC conversation as it appears on the wire - perhaps you can see if we are missing something?
POST /lib/api/xmlrpc/v1/xmlrpc.php HTTP/1.1
Host: 10.76.223.131
Accept-Encoding: gzip
User-Agent: xmlrpclib.py/1.0.1 (by www.pythonware.com)
Content-Type: text/xml
Content-Length: 774

<?xml version='1.0'?>
<methodCall>
<methodName>tl.assignTestCaseExecutionTask</methodName>
<params>
<param>
<value><struct>
<member>
<name>testplanid</name>
<value><string>52057</string></value>
</member>
<member>
<name>platformname</name>
<value><string>1 Brick</string></value>
</member>
<member>
<name>testcaseexternalid</name>
<value><string>x-4402</string></value>
</member>
<member>
<name>user</name>
<value><string>dabust</string></value>
</member>
<member>
<name>buildname</name>
<value><string>2.4.0-24</string></value>
</member>
<member>
<name>testprojectid</name>
<value><string>1</string></value>
</member>
<member>
<name>devKey</name>
<value><string>dc30c06ec58a9ed2bae519d0ad206712</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
HTTP/1.1 200 OK
Date: Thu, 19 Jun 2014 11:24:02 GMT
Server: Apache/2.2.16 (Fedora)
X-Powered-By: PHP/5.3.6
Set-Cookie: PHPSESSID=bb6h36pdok0ki283tc5e0g9d93; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Length: 1013
Content-Type: text/xml

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
  <member><name>status</name><value><boolean>1</boolean></value></member>
  <member><name>args</name><value><struct>
  <member><name>testplanid</name><value><string>52057</string></value></member>
  <member><name>platformname</name><value><string>1 Brick</string></value></member>
  <member><name>testcaseexternalid</name><value><string>x-4402</string></value></member>
  <member><name>user</name><value><string>dabust</string></value></member>
  <member><name>buildname</name><value><string>2.4.0-24</string></value></member>
  <member><name>testprojectid</name><value><string>1</string></value></member>
  <member><name>testcaseid</name><value><int>52058</int></value></member>
  <member><name>buildid</name><value><string>257</string></value></member>
  <member><name>platformid</name><value><int>9</int></value></member>
</struct></value></member>
</struct>
      </value>
    </param>
  </params>
</methodResponse>



Anything suspicious?
Can you give us some guidance on how to use the PHP client?

Thanks in advance!
(0021144)
fman   
2014-06-19 11:42   
>> Can you give us some guidance on how to use the PHP client?
just open the code and provide the requested info, IMHO it can not be difficult
(0021169)
mykaul   
2014-06-26 08:24   
One difference I've noticed is that our XML-RPC also contains the testprojectid parameter:

<name>testprojectid</name><value><string>1</string></value></member>

Looking at the implementation, I don't see it. Is it missing or are we erroneously added it?
(0021170)
fman   
2014-06-26 08:25   
>> Looking at the implementation,
>> I don't see it. Is it missing or are we erroneously added it?
IMHO => are we erroneously added it?

have you tried without it?
(0021174)
mykaul   
2014-06-27 07:08   
Yes, we've tried without it, but it did not work either.
How would the API work without it? (I'm not familiar with the DB scheme) - is the test plan unique, across projects?
(0021187)
fman   
2014-06-29 12:40   
@mykaul:
can you please explain me what is unclear on this detail for
public function assignTestCaseExecutionTask($args)

@param string $args["devKey"]
@param int $args["testplanid"]
@param string $args["testcaseexternalid"] format PREFIX-NUMBER
@param int $args["buildid"] Mandatory => you can provide buildname as alternative
@param int $args["buildname"] Mandatory => you can provide buildid (DB ID) as alternative
@param int $args["platformid"] optional - BECOMES MANDATORY if Test plan has platforms. you can provide platformname as alternative
@param int $args["platformname"] optional - BECOMES MANDATORY if Test plan has platforms, you can provide platformid as alternative
@param string $args["user'] - login name => tester

where there is an indication of testproject id ?

Please try your best before start asking for help, or buy support if you need more personalized help.
(0021195)
mykaul   
2014-06-30 13:12   
OK - I see now the difference: buildname and platformname are of type int - we've used both as strings so far. We can try that and see if that works for us.
Is there some extra debugging we can turn on? (as we are getting HTTP code 200 OK on our calls - it just doesn't seem to actually do the assignment).
(0021196)
fman   
2014-06-30 16:45   
documentation is wrong BUILDNAME AND PLATFORNAME are STRINGS.
>> is there some extra debugging we can turn on?
no
(0021264)
mykaul   
2014-07-13 11:30   
Tried the patch for 6433 - which I now see we've had in our logs as well - but while it eliminated the error it still does not work for us.
(0021275)
mykaul   
2014-07-15 18:23   
After applying http://mantis.testlink.org/view.php?id=6440 [^] - it works!