Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006331TestLinkAPI - XMLRPCpublic2014-05-12 07:022014-07-28 20:31
Reportermykaul 
Assigned Tofman 
PrioritynormalSeverityfeature requestReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.9 (2013 Q4 - bug fixing) 
Fixed in Version1.9.11 (2014 Q2 - bug fixing) 
Summary0006331: Assign test case execution XMLRPC method
DescriptionBased 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 [^]
Steps To ReproduceN/A
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files

- Relationships
related to 0005082closedfman New API to assign test cases execution  
related to 0006440closedfman (gitoriuos code) assignTestCaseExecutionTask does not assign user 
child of 0006313closedfman Availables hot-fixes for 1.9.10 & How To get full fixed package from gitorious 

-  Notes
(0020984)
mykaul (reporter)
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 (administrator)
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 (administrator)
2014-05-25 17:16

reporter does not need to monitor his/her issues
(0021010)
fman (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
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 (administrator)
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 (reporter)
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 (reporter)
2014-07-15 18:23

After applying http://mantis.testlink.org/view.php?id=6440 [^] - it works!

- Issue History
Date Modified Username Field Change
2014-05-12 07:02 mykaul New Issue
2014-05-18 10:10 mykaul Note Added: 0020984
2014-05-18 11:56 fman Relationship added related to 0005082
2014-05-18 12:34 fman Note Added: 0020987
2014-05-18 12:53 fman Note Edited: 0020987 View Revisions
2014-05-25 17:16 fman Note Added: 0021009
2014-05-25 17:22 fman Note Added: 0021010
2014-05-25 17:23 fman QA Team - Task Workflow Status => READY FOR TESTING
2014-05-25 17:23 fman Status new => resolved
2014-05-25 17:23 fman Fixed in Version => 1.9.11 (2014 Q2 - bug fixing)
2014-05-25 17:23 fman Resolution open => fixed
2014-05-25 17:23 fman Assigned To => fman
2014-05-25 17:23 fman Summary Feature request: assign test case execution XMLRPC method => Assign test case execution XMLRPC method
2014-05-25 17:24 fman Relationship added child of 0006313
2014-06-05 10:04 tehilad Note Added: 0021034
2014-06-05 16:30 fman Note Added: 0021035
2014-06-19 11:31 mykaul Note Added: 0021142
2014-06-19 11:42 fman Note Added: 0021144
2014-06-26 08:24 mykaul Note Added: 0021169
2014-06-26 08:25 fman Note Added: 0021170
2014-06-27 07:08 mykaul Note Added: 0021174
2014-06-29 12:40 fman Note Added: 0021187
2014-06-30 13:12 mykaul Note Added: 0021195
2014-06-30 16:45 fman Note Added: 0021196
2014-07-13 11:30 mykaul Note Added: 0021264
2014-07-15 18:23 mykaul Note Added: 0021275
2014-07-15 19:50 fman Relationship added related to 0006440
2014-07-28 20:31 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker