cancel
Showing results for 
Search instead for 
Did you mean: 

Test routines takes too long to start!

Occasional Contributor

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 12
Community Hero

Re: Test routines takes too long to start!

The section on disabling features you do not use might be of some help:

https://support.smartbear.com/testcomplete/docs/working-with/best-practices/performance-tips.html

Occasional Contributor

Re: Test routines takes too long to start!

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

Community Hero

Re: Test routines takes too long to start!

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: Test routines takes too long to start!


@vitorpires wrote:

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


Well I did one third of the problem so now we need two more people to help   Smiley Happy

 

In case there aren't any more comments here, you can always contact Support at this link:

https://support.smartbear.com/testcomplete/

Occasional Contributor

Re: Test routines takes too long to start!

Thanks @tristaanogre. In our project of automated tests, the tested application is a Checkout, that is, a very big software with a lot of features.. To comport all those features, we work with a kind of layer-design, modularizing all the content in Lib (common unit files used by others automated test projects), Mapeamento (is a Mapping of TestComplete recorded actions of all applications features and functions, subcategorized by frames) and the Testes (this one is where all the test procedures are in, centralized).. 

 

We already make every effort to ensure the modularization and reuse of code in order to facilitate the maintenance of our tests, but to ensure the coverage of our application tests, necessarily our test project has grown a lot.

Community Hero

Re: Test routines takes too long to start!

Yeah, at some point, you get to be at the mercy of the code.  

 

I'm not sure this is an option... but there might be a different code language other than DelphiScript which may trigger faster.  Probably a major project to convert to JavaScript or Python.

 

Another thing is to start looking and seeing if there's more efficient ways of writing the code.  If there are a lot of If-Then blocks, could they be combined into a Case statement?  Few lines, generally, IIRC.  In any case, at this point, it's all code tweaks as far as I know.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: Test routines takes too long to start!

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.

ce.PNG


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

Occasional Contributor

Re: Test routines takes too long to start!

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?

Community Hero

Re: Test routines takes too long to start!

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


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”


Extension Available

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors