Forum Discussion

SSharma3's avatar
Occasional Contributor
2 years ago

Test complete not stopping the script



Whenever any script is running which is of longer duration and I click on stop button, test complete does not stop that.

I have to kill the test complete process.

All the effort is wasted and I could not see the logs.



5 Replies

  • Kitt's avatar
    Regular Contributor

    What do you consider to be a long duration? You could have a broken loop somewhere in your code that TC cannot find it's way out of, so you may want to try and see at what step TC is running longer than expected. You can add some breakpoints in your code to pause the runner before moving to the next step or function - just step through the code to see if you have any issues. I would also check your Task Manager to see what is running besides TC when this occurs. 


    Could you provide some information on what type of process you are running or what you code is attempting to do when you are unable to stop TC?  

  • The problem you have is probably TC trying to find an object and due to the big amount of objects available in your app, the low amount of resources in your machine, or even your application doing something in the background, it hangs and it will stay like that until the internal "search" process of test complete finishes.

    If your app is web based, I would suggest you not use the FindObject method and instead use the QuerySelector. 

    Another approach is to get the parent object of the object your are trying to find, and then use the FindObject from the parent object, thus reducing the amount of objects TC has to search.


    Forget about configuring timeouts or that kind of stuff, TestComplete just ignores them all until it finishes doing what it is doing, which is kinda bad but that's how I found out it works.


  • Marsha_R's avatar
    Champion Level 3

    It can take a relatively long time to stop if your test log is large because the last thing TC does is write the log.

    • TCYKPB's avatar

      Why does TC not write the log on every action?

  • Marsha_R's avatar
    Champion Level 3

    I have no idea what it's doing in the background.  I've just seen that behavior since version 8.