getTestCaseCustomFieldDesignValue External ID Does Not Exist

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

getTestCaseCustomFieldDesignValue External ID Does Not Exist

Postby mds512 » Tue Feb 01, 2011 7:09 pm

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


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.
mds512
TestLink user
 
Posts: 1
Joined: Thu Jul 01, 2010 9:08 pm

Re: getTestCaseCustomFieldDesignValue External ID Does Not E

Postby fman » Wed Feb 02, 2011 4:07 pm

external Id ID that TL has assigned and that you see on TL GUI.
fman
Member of TestLink Community
 
Posts: 3061
Joined: Tue Nov 15, 2005 7:19 am


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 1 guest