Closed abhay2703 closed 3 years ago
Hello Abhay,
please don't forget, you are working with an API, not with full service all user interface. Improvements are welcome and feel free to add new service methods to TestlinkAPIClient.
If you add a pre check, you would have also to raise an exception like what you see currently. So what would be the benefit? You would run into the risk, that you define on the client different rules as the server uses. The API Client has no knowledge about internal server rules.
Better approach would be, that you surround your api calls with a try - except handling, .
Regards Luiko
Dear Luiko,
Thanks for the prompt response.
That was a suggestion for consistency in API and server rules. But still your point is 100% valid that it has no real benefit.
And currently I am using try-except (as you suggested) to handle the error while updating test cases.
Thanks and Regards, Abhay
While updating test case if the test name already exists then API updateTestCase fails with the below error:
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