Forum Discussion

TCYKPB's avatar
TCYKPB
Contributor
4 years ago

How to avoid certain "Stop on Error" scenarios?

Hello, I have my project configured to Stop on Errors when I run my test cases, but there are some errors which are not functional bugs (very frequently the TestedApps.App.Run() fails to open the desired application and it stops the test). Is there a way to bypass or make the "Stop on Error" property ignore these scenarios? Because if TestComplete fails to open one of my applications, I would like to retry opening it and continue the test, but so far I have tried putting that code inside a "try-catch" (javascript) block, and the test is still stopped, ignoring the "try" block.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

     Is there a way to bypass or make the "Stop on Error" property ignore these scenarios?

    I am not aware about such option.

    You may consider opposite approach - do not stop test on error but use Runner.Stop() / Runner.Halt() methods to stop test when really needed.

     

    • TCYKPB's avatar
      TCYKPB
      Contributor

      I have considered that, but I still want to stop on errors when, for example, a Click() in an object fails, or a Checkpoint fails. I just want to avoid the Stop when the TestedApp fails to Run() (or  find a workaround to make it open 100% of the times without errors).

      • brumazz's avatar
        brumazz
        SmartBear Alumni (Retired)

        This might be a bit basic, but what about just adding an If..Then statement to look for the needed process to be running.... and if not then launch it.

         
  • joaobc's avatar
    joaobc
    Occasional Contributor

    This week I search to edit delay value inside the scrip, and works as well.

    I go search again the documentation to help you. Take a look on this reference (https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/misc/options/index.html#Run), but I believe you can't edit this property anymore ..

    StopOnError

     This property is obsolete. It is supported for backward compatibility only.
    Error handling > On error project property. Boolean. Read-only. If the project property is set to Continue running, returns false. Otherwise, returns true.


    Check this too (https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/playback.html)

    reading I believe there is a way to edit with a plugin script, but I dont know if works in time of execution