Page 1 of 1

getTestCaseCustomFieldDesignValue External ID Does Not Exist

PostPosted: Tue Feb 01, 2011 7:09 pm
by mds512
I am currently trying to write an API client in python to retrieve the status of a testcase as well as the corresponding custom field value.

I am using these as the function definitons:

Code: Select all
    def getTestCasesForTestSuite(self,tpid):
        data = {"devKey":self.devKey,"testplanid":tpid}

    def getTestCaseCustomFieldDesignValue(self,testCase,version,testProject,customField,details):
        data = {"devKey":self.devKey,"testcaseexternalid":testCase,"version":version,"testprojectid":testProject,"customfieldname":customField,"details":details}

After initializing the client, I get the testcases for a specific testplan
Code: Select all
testcases = client.getTestCasesForTestPlan(70420)

where 70420 is the testplan I'm using to test the function. This seems to work, as I get all the information for each testcase when I looked at the data I was getting back from the server.

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")

when I print the contents of cfield, all I get is
Code: Select all
[{'message': '(getTestCaseCustomFieldDesignValue) - Test Case External ID (10242) does not exist!', 'code': 5040}]

where the 10242 changes depending on the external ID I pass to the function

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.

Re: getTestCaseCustomFieldDesignValue External ID Does Not E

PostPosted: Wed Feb 02, 2011 4:07 pm
by fman
external Id ID that TL has assigned and that you see on TL GUI.