Each TestComplete project uses one of the supported scripting languages:
The scripting language for the project is specified at the project creation time and cannot be changed later.
The scripting language is important even if you are not going to create test scripts:
It defines the syntax of script code snippets that you can use in keyword tests.
Process("Notepad"). In DelphiScript, you should replace quotes with apostrophes:
Process('Notepad'); and in C#Script and C++Script, the word Process should be enclosed in brackets:
Which language to choose?
The supported languages are quite different, so you may ask “Which one should I choose for my project?” The answer is simple: choose the language you know better and that is closer to your development experience. This will decrease the test creation time, since you will not have to learn a new language.
Should the scripting language match the language of my tested application?
There is only one recommendation: if you plan to create a connected or a self-testing Application, select the scripting language that matches the development tool where you will create that application. That is, if you use Visual C++ or C++Builder, you should select C++Script; if you use Visual Basic, select VBScript; if you use C#, use C#Script, and if you use Delphi, select DelphiScript. This will make it easier to import recorded scripts to connected and self-testing applications.
Will my project be limited in functionality if I select this or that language?
No, it will not. The vast majority of TestComplete features is equally oriented on each of the supported languages. So, you can choose the language that is closer to your developer skills.
Scripting languages have a different set of predefined functions. Why do you say the project will not be limited in functionality?
Yes, each scripting language provides a number of built-in functions that help you perform some routine actions, such as converting numerical values to strings and vice versa (C#Script and C++Script have the same functions as JScript, since these languages are based on JScript). Normally, the sets of predefined functions of different scripting languages are similar to each other, with few exceptions (for instance, DelphiScript does not have an analogue of VBScript’s
split function). However, the difference in predefined functions is negligible, since most of predefined functions are simple and you can easily create their analogues in another language. Also, TestComplete provides an extensive set of scripting objects whose functionality covers the functionality of predefined functions. They can be used in any project, regardless of its scripting language.
What are the specifics of the supported scripting languages that may affect my tests?
As we have said above, you will not be limited in functionality if you prefer one language to another - you will be able to use all TestComplete features regardless of which language you choose. However, because languages have different syntax and work via different engines, there are few exceptions:
AddNamedChildmethod) in JScript, C#Script and C++Script code. For more information, see documentation for the specific method.
For more information on usage specifics of supported scripting languages, see Supported Scripting Languages - Specifics of Usage.
Why are some languages marked as legacy? Can I use them?
The other languages that TestComplete supports, JScript, DelphiScript, C++Script, and C#Script, are now outdated and rarely used. We do not recommend that you use them to create new projects. That is why these languages are not available in the Create New Project wizard.
If you already have projects that use these languages, they will remain intact. You can run your existing tests without any limitations.
If you still want to use one of these languages to create new tests, you can do any of the following:
Use the Create Project dialog to add projects to an existing project suite. In this dialog, you can select any scripting languages that TestComplete supports including the legacy languages.
– or –
(For JScript and DelphiScript only) Configure TestComplete to use one of the legacy languages as a default language for new projects. You can do this in the Tools > Options > Project dialog.