Forum Discussion

komalak11's avatar
komalak11
Contributor
9 years ago

Test complete gives out of memory error. Anyone facing same problem?

When running the scripts for more than 24 hours, there is out of memory exception thrown by the tool.

 

This results in loss of logs as well. Is there anyone facing the same problem. I read few articles there are GDI objects which are created and not disposed. But the objects created for me is around 2000. Also test complete takes up almost 8GB of my RAM space (using a 16GB RAM system).

 

Can anyone please help me out?

13 Replies

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 1 rankChampion Level 1

    Hi,

     

    If TestComplete's crash dump window is displayed with the suggestion to send a report to Support, I would recommend you to specify your contact info and send the report.

    In any case, create a ticket via the https://support.smartbear.com/message/?prod=TestComplete form and Support will provide you with recommendations specific to your case and their needs.

    • Manfred_F's avatar
      Manfred_F
      Regular Contributor

      I'm using oop for Scripting, and it took me a lot of effort to stop my vbScript modules eating Memory..

      Do You also use OOP?

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Some other things to consider:

         

        1) Possibly breaking your project up into multiple projects. Once a project finishes running, it does flush out the memory.  So, rather than running a single project over 24 hours +, have several projects running one after another, executing the same number of tests.

        2) Have TestComplete flush the logs to disk regularly to prevent loss of logs in the case of such an error.  Under Tools | Options | Current Project Properties | Playback there is an option to save the log every so many minutes.  Set that to a non-zero number.

        3) A bit more involved, but do some analysis of how much you're actually writing out to your log via Log.Message.  I've found it to be a good rule of thumb/best practice to only write out to the log when I actually need to know something.  Basically, if things are working well, tests steps are executing without error, validations are happening without error... I don't write out anything at all.  I only log errors and warnings which reduces my log size and has the bonus of making determining a failure that much easier.

        4) As Manfred_F mentioned, you might want to take a look at how you're constructing your tests and make sure that you're properly disposing of objects in your automation code by setting objects to null so they are disposed of when they go out of scope.