forked from g4l4drim/TestLink-API-Python-client
-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
Description
While updating test case if the test name already exists then API updateTestCase fails with the below error:
Traceback (most recent call last):
File "E:/Abhay/Work/Python/TestlinkConnect/TestlinkTest.py", line 238, in <module>
tc_import.addTCs()
File "E:/Abhay/Work/Python/TestlinkConnect/TestlinkTest.py", line 58, in addTCs
self.updateTC(TCData)
File "E:/Abhay/Work/Python/TestlinkConnect/TestlinkTest.py", line 176, in updateTC
self.myTestLink.updateTestCase(TCData['TLExtId'][1], testcasename=TCData['TCName'][1], summary=TCData['TCSummary'][1], steps=StepsList, preconditions=TCData['TCPreCondition'][1], executiontype=executionType)
File "C:\Python38\lib\site-packages\testlink\testlinkdecorators.py", line 112, in wrapperAddDevKey
return methodAPI(self, *argsPositional, **argsOptional)
File "C:\Python38\lib\site-packages\testlink\testlinkdecorators.py", line 99, in wrapperWithArgs
return self.callServerWithPosArgs(methodAPI.__name__,
File "C:\Python38\lib\site-packages\testlink\testlinkapigeneric.py", line 1584, in callServerWithPosArgs
self._checkResponse(response, methodNameAPI, argsOptional)
File "C:\Python38\lib\site-packages\testlink\testlinkapigeneric.py", line 2165, in _checkResponse
raise testlinkerrors.TLResponseError(
testlink.testlinkerrors.TLResponseError: (updateTestCase) - LOCALIZE: API_TESTCASE_SIBLING_WITH_SAME_NAME_EXISTS
updateTestCase({'testcasename': 'TC_443', 'summary': 'Verify the behavior of XYZ', 'steps': [{'step_number': 1, 'actions': 'Execute 1', 'expected_results': 'Expect 1', 'execution_type': 0}], 'preconditions': 'Preconsition 1', 'executiontype': 1, 'devKey': '01234567890', 'testcaseexternalid': 'TC-3877'})
Process finished with exit code 1
This check shouldn't be done before adding the test case itself?
This will avoid adding the test case with same name and error can be handled at that instance, rather than handling at a later point during test case updation.
Regards,
Abhay