Forum Discussion

pschutz's avatar
pschutz
Occasional Contributor
14 years ago

Pause on error in TestExecute

Is there a way to have my script pause on an error using testexecute.  In TestComplete, I have a listener for OnLogError that uses the Runner.Pause() method, but this isn't supported by TestExecute.  Also, I would like to be able to pause it on an error without debug mode being enabled.  Thanks!

4 Replies


  • Hi Patrick,





    Pausing test execution is actually stopping at a breakpoint. Since it is impossible to debug tests in TestExecute, it cannot be paused.





    Could you please explain what you need this for?
  • pschutz's avatar
    pschutz
    Occasional Contributor
    If an error occurs during the test, such as an error message popping up or something like that, I would like a way for my testers to be able to go investigate what occurred and then resume the test.



    I was thinking that I could put a loop in a listener for an error post that would run until a key combination was pressed, but I couldn't find a method to do this.



    Thanks!

  • Hi Patrick,





    You can create a user form with a single button that closes this form. Show this form as a modal form when you want to pause the test execution. Please find more information in the User Forms help topic.
  • pschutz's avatar
    pschutz
    Occasional Contributor
    That's really cool! I didn't even know User Forms existed.  Thanks!