Business component doesn\'t stop on step failure?
When I run a business component from Quality Center on my local machine, I watch as QuickTest stalls trying to find a test object that doesn't exist. Instead of halting, QuickTest just skips to the next step! I was expecting QuickTest to stop at that point. For example, if the failure is a part of an if-then condition, QuickTest will just proceed to run the instructions in the if-then block! I looked for a setting that might control this behavior, but I haven't seen one. I am using QuickTest Pro version 10. When I run the business component locally, and not from Quality Center, QuickTest will bring up an error window and I can stop the test, but I want to be able to do this when running from Quality Center too. Does anyone have any ideas?
Re: Business component doesn\'t stop on step failure?
This is a bug in QTP. Or a feature of BPT as per them. The only way for you to avoid this is to use scripted components and move all code into function then use on error resume next before calling the function.
Another workaround is to override all common methods using RegisterUserFunc and then inside the new method check for object existence. If the object doesn't exist then you should use ExitComponent