Page 1 of 1

Cannot add testcase to testplan

PostPosted: Mon Apr 05, 2010 5:30 pm
by jrf2
I am trying to use the testlink API to assign a testcase to a testplan so that I can report the result of the testcase. But regardless of the inputs that I give to the "addTestCaseToTestPlan" function, It always gives me the same error message:
"message(addTestCaseToTestPlan) - Test Case External ID (24) does not exist!code5040"

Eventhough, tl.getTestCaseIDByName reports the external id as 24


If anyone has encountered this problem before or knows what might be the cause of it, your help would be greatly appreciated. Thanks.

PostPosted: Wed Apr 07, 2010 12:53 pm
by austvik
(I don't have any answers, but here are some troubleshooting tips.)

Maybe you could try with id 230 to see that if it reads internal id instead of external id?

Maybe you could check the correct ids in the database?

It might be easier to help you if you post the version you are using, and the code you are using to call tl.addTestCaseToTestPlan().

Re: Cannot add testcase to testplan

PostPosted: Mon May 03, 2010 9:58 pm
by brianj
I'm seeing this same problem.

Code: Select all
   def addTestCaseToTestPlan(self, testcaseid, testplanid, projectid):
      version = 1
      data = {"devKey":self.devKey, "testplanid":testplanid, "testcaseexternalid":testcaseid, "version":version, "testprojectid":projectid, "executionorder":1, "urgency":"high" }
print "getting testcaseid from name"
result = client.getTestCaseIDByName("brians_new_test")
print result

# add a test to the test plan
print "adding to test plan..."
result = client.addTestCaseToTestPlan(result[0]['tc_external_id'],31557,29266)
print result

I've double and triple checked the three parameters being sent to "addTestcase", yet I always get back:

[{'message': '(addTestCaseToTestPlan) - Test Case External ID (9071) does not exist!', 'code': 5040}], even though I can see that the 9071 testcase does exist.

I have tried using the testcase id rather than the external id, but it simply reports the same problem.

Re: Cannot add testcase to testplan

PostPosted: Sat May 08, 2010 7:47 am
by austvik
Hi, Brian.

Sounds like a bug.

Would you mind filing a bug report with what you have tried (and maybe with some illustrating selects from the database?)?