Forum Discussion

Ptaun's avatar
Ptaun
Occasional Contributor
9 years ago

Large Number of Files in TestComplete Causing Memory Issue

For various internal reasons, we are moving from an external keyword driven framework to writing our test scripts in JScript within TestComplete itself.  To test the scalability and the eventual performance of the framework under this architecture, we copied one of our larger files a number of times (~250).  Within one of those files, we created a new function and called it with the appropriate reference:

 

//USEUNIT Utils250

// The function from which we kick off TestComplete
function EntryPoint()
{
    NewFunction(); // Empty and exists only within Utils250
}

This will take about a 1 minute to 1:30 to run, utilizing about ~90% memory usage.  Is there an organizational best practice or technical strategy that would help reduce overhead?  Currently, this exists within the same Project Suite.

13 Replies

    • Ptaun's avatar
      Ptaun
      Occasional Contributor

      We have tried both versions 11 and 12.  In version 12 however we did see a decreased overhead of about 35 to 40 seconds with similar memory usage after converting the project to JavaScript.  Still seems like a long time to execute an empty function though.

      • Marsha_R's avatar
        Marsha_R
        Icon for Champion Level 3 rankChampion Level 3

        Are you running the empty function once or from each of the 250?  

    • Marsha_R's avatar
      Marsha_R
      Icon for Champion Level 3 rankChampion Level 3

      How long does it take if you take the USEUNIT out? 

      • joseph_michaud's avatar
        joseph_michaud
        Icon for Staff rankStaff

        I think this is going to depend on the size of your 250 files.  When TestComplete runs a test, it processes all the script files.  I can imagine that if you have lots of very large script files, it will take a while to process.  How large are your files?  Can you provide a sample?

         

        Try sprinkling some Log.Message() calls at the top level in your script files just to see how long it takes to process the files.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Test Complete runs scripts, not compiled code, so it kind of needs to go through the process of loading all the scripts at runtime, hence the start up delay.

    Question: when you say your Excel files are your scripts, what do you mean? Are they just tables of data or do they contain some sort of code?

    The reason I ask is that a solution could be to code a framework of sorts that will read an Excel file, parse it for commands, execute, and then report out the results, repeat in a loop for each file. Rather than adding 800+ files to TestComplete, invest some time in writing some code to allow you to keep the Excel files as is and let them operate as your drivers for the actual tests. ULtimately, your code base will be less than the 800+ files and so your memory footprint will be considerably smaller.