What is the best way to handle errors in automation test?
for example if my test case contains multiple steps, each of them invokes different functions. How shall I handle error (object recognition, item couldn't be found, ..) errors?
Shall I check each step, and substep result ?
The right way will depend on how you have your test framework, test rig, and your tests written.
For me, since I prefer to use a page object / screen object framework setup, I bury the actions in Screen/Page objects, and expose a clean interface, then throw errors back up as exceptions, and let the test framework handle the error logging. This keeps the test looking very clean, yet allow the ability to better debug the test if needed.
On the question of checking each step. I would recommend it if you have tests that go through flows, check each step. It will make it easier to debug the test. Generally when a test fail, it's usually because a previous step didn't complete correctly. It's good to have multiple checkpoints when running through a multi-step user flow.
The most common error in Test Complete is object not found. Here is a quick reference concerning those errors: https://support.smartbear.com/viewarticle/72949/
Originally Posted by fattahsafa
Test Complete has its own online forum (http://community.smartbear.com/t5/Te...Complete_forum) moderated by Smart Bear support personnel. Your question might find more traction there.