Forum Discussion
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.
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.
- tristaanogre7 years agoEsteemed Contributor
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.
Related Content
- 2 years agoianlop