pythontestlink

How to get the user who is assigned a test case in TestLink with TestLink-API-Python-client


Is there any way to get the tester/user assigned to a test case with TestLink-API-Python-client?

With this command, I am able to assign a test case to a user, but I want to check if the test case is already assigned to some other tester or not.

>>> tls.assignTestCaseExecutionTask('abc', 178775, 'TC-86',buildname='mytestbuild')
{'status': True, 'args': {'testplanid': 178775, 'buildid': '164', 'testcaseid': 187201, 'action': 'assignOne', 'user': 'abc', 'buildname': 'mytestbuild', 'testcaseexternalid': 'TC-86'}}

If I execute this multiple times, it behaves same (ideally there should be a message that the test case is already assigned to the user). I am unable to figure out a way using which I can find the details of a user which is assigned a test case.


Solution

  • I have resolved the issue using getTestCaseAssignedTester method.

    tls.whatArgs('getTestCaseAssignedTester')
    'getTestCaseAssignedTester(<testplanid>, <testcaseexternalid>, [buildid=<buildid>], [buildname=<buildname>], [platformid=<platformid>], [platformname=<platformname>], [devKey=<devKey>])\n Gets the result of LAST EXECUTION for a particular testcase on a \n        test plan.\n        \n        testplanid           test plan id\n        testcaseexternalid   format PREFIX-NUMBER\n        \n        args variations:     buildid - buildname \n                             platformid - platformname\n        build information is general mandatory\n        platform information is required, when test plan has assigned platforms\n        '