testlink

How to get testplanid in testlink project


How to get testplanid in testlink project? I have given name 'myTestProjectTestBuild' to my test plan, but while giving this name as testplanid, it says The Test Plan ID (0) provided does not exist!

>>> tls.getBuildsForTestPlan('myTestProjectTestBuild')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/testlink/testlinkdecorators.py", line 140, in wrapperReplaceTLResponseError
    response = methodAPI(self, *argsPositional, **argsOptional)
  File "/usr/lib/python2.7/site-packages/testlink/testlinkdecorators.py", line 112, in wrapperAddDevKey
    return methodAPI(self, *argsPositional, **argsOptional)
  File "/usr/lib/python2.7/site-packages/testlink/testlinkdecorators.py", line 100, in wrapperWithArgs
    *argsPositional, **argsOptional)
  File "/usr/lib/python2.7/site-packages/testlink/testlinkapigeneric.py", line 1515, in callServerWithPosArgs
    self._checkResponse(response, methodNameAPI, argsOptional)
  File "/usr/lib/python2.7/site-packages/testlink/testlinkapigeneric.py", line 1879, in _checkResponse
    response[0]['message'], response[0]['code'])
testlink.testlinkerrors.TLResponseError: 3000: (getBuildsForTestPlan) - The Test Plan ID (0) provided does not exist!
getBuildsForTestPlan({'testplanid': 'myTestProjectTestBuild', 'devKey': 'xyz'})

Can someone let me know from where I can get testplanid in testlink?


Solution

  • I got the value of testplanid with tls.getProjectTestPlans('<project_id').