Forum Discussion

vitorpires's avatar
vitorpires
Occasional Contributor
7 years ago

Test routines takes too long to start!

Hi,

 

I'm using TestComplete 12 (12.50.4142.7 x64 more exactly) to test Java desktop applications over Delphi script language, and my project tests are taking about 2 or 3 minutes to definitely start. My computer is a Dell Latitude 3540 Core i7-4500U 1.80GHz, 8 GB RAM DDR4 with a SSD disk on Windows 10 Pro (quite as good for the system minimum requirements).

 

My project today has more than 900 script routines (48677 lines) in a single test Unit, but at the beginning when it was about 100 script routines, the loading time was much less. I've read about how TestComplete load those tests and I saw there was a compiling procedure before the test run.

 

I want to know if there's any way to improve my test performance by reducing this loading time. Beforehand, I can't split those tests into smaller test projects.

12 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    I had the same kind of issue which is TestComplete start the actual execution after 10 to 15 minuets of time. 

     

    I have created support ticket, they analyzed with the dump file i shared then they got me a patch. And now it executing perfectly with having only less then a minuet delay.

     

    Our project suite consists more number of routines and cases.

    • vitorpires's avatar
      vitorpires
      Occasional Contributor

      Thanks shankar_r, I have created support ticket yesterday for this issue, now I've sent my project suite and my machine information.. I'll be waiting for a diagnostic.

       

      When you say a patch, you mean an update for TestComplete?

      • shankar_r's avatar
        shankar_r
        Community Hero

        They will guide you how to apply the patch in your environment. They very much helpful.

    • vitorpires's avatar
      vitorpires
      Occasional Contributor

      Thanks Marsha_R. After I managed those helpful enhancements I could decrease the test start from 6 minutos to 4 (i've timed the difference before and after changes).. but my project test's still taking a long considerable time to run.. Is there any other tip to help

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        As you noted, there's kind of a "compile time" to start the tests.  This is the nature of interpreted code (as more Script languages). So, basically, what's happening is that when you start the tests, it needs to read them all in to start running them.  The best way to "fix" that is to work on making your code more efficient... do the same stuff with few lines.  For example, throughout your tests, are there any repeated blocks of code that look similar?  If there are, you can probably pull those out, make some modifications, and turn them into functions/procedures.  The overall effect is that if you take 20 lines of code from every test, turn it into a function, you are basically reducing everyone on of the tests calling that function by 19 lines of code.  This eventually reduces the overall size of your script file which means less code to read on start up.

         

        This is my best advice to you.  The additional advantage to this is easier maintenance.  If your AUT changes where you need to adjust the automation, by modularizing your code, it means you only need to change the code in one place rather than in 900 places.