forked from g4l4drim/TestLink-API-Python-client
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
Description
I would like to get all automated/manual cases for the test project. Currently, I am doing this in a very inefficient way.
EXECUTION_TYPES = {'manual': '1', 'automated': '2'}
project='test-project'
def getTestCasesByExecutionType(execType=''):
testcases = []
projID = tlapi.getTestProjectByName(project)['id']
parent_ts = tlapi.getFirstLevelTestSuitesForTestProject(projID)[0]
tcInfo = tlapi.getTestCasesForTestSuite(testsuiteid=parent_ts['id'],deep=True,details='full') #Have to call with details "full" as execution_type is only included in "full" details of testcase
for each_tcInfo in tcInfo:
if each_tcInfo['execution_type'] == EXECUTION_TYPES[execType.lower()]:
testcases.append(each_tcInfo)
return testcases
The above is not efficient solution as it has to get "full" details of each test case just to get the execution_type which takes a lot of time when number of testcases are in thousands. I would be grateful if you could point out any efficient method or other solution to determine execution_type.