I have a Test Script (6.0) that calls multiple Shared Modules. When I encounter an unrecoverable error; such as the license evaluation period has expired, I want to stop all execution of Test Partner. Is there a TP command that allows me to do this? I know I can "Exit Function", but that just takes me back to the function that called this one and TP just continues on. I know I can also set a global variable and check it upon return to the calling function and continue to "Exit Function" until I'm back to the main calling script, but was looking for an easier way.
Re: Stop execution of TestPartner (6.0) in VB code
This may take a bit of extra work... but you might want to put in a series of embedded IF statements.
For example, at the point in the first module that the unrecoverable error would occur, if the unrecoverable error does not occur, run the next module.
Embed the IF statements inside of each other and if at some point you receive the unrecoverable error the script will end.
The downside to this is that TP will most likely record a success on the script since it met all criteria so you will have to manually check to see to which module the error occurred. On the plus side, the error should most likely be viewable on the screen.