I am using these as the function definitons:
Code: Select all
def getTestCasesForTestSuite(self,tpid):
data = {"devKey":self.devKey,"testplanid":tpid}
return self.server.tl.getTestCasesForTestSuite(data)
def getTestCaseCustomFieldDesignValue(self,testCase,version,testProject,customField,details):
data = {"devKey":self.devKey,"testcaseexternalid":testCase,"version":version,"testprojectid":testProject,"customfieldname":customField,"details":details}
return self.server.tl.getTestCaseCustomFieldDesignValue(data)
Code: Select all
testcases = client.getTestCasesForTestPlan(70420)
to get the testcases in the current testplan I am looking at, then run across all testcases using the keys of the testcases, and use the external ID to find the custom field value for "weight," where element is the key for each testcase
Code: Select all
cfield = client.getTestCaseCustomFieldDesignValue(testcases[element]["external_id"],testcases[element]["version"],1,"weight","simple")
Code: Select all
[{'message': '(getTestCaseCustomFieldDesignValue) - Test Case External ID (10242) does not exist!', 'code': 5040}]
I have not been able to figure out what exactly is going wrong, the external IDs are in the database when I query it and cannot find anything else that is going wrong.