Choosing a scripting language for the project is the first important choice to make before creating a project. Choosing a language should be a careful and circumspect process, since it shall not be possible to change the choice in the future. If you would like to change the selected project's scripting language, you would have to redo the project from scratch!
In order to select a scripting language for a new project we need to perform the following steps:
TestComplete provides a possibility of choice from the following three programming languages: JScript, VBScript, and DelphiScript. Apart from these three languages, the following two are also available: C++Script and C#Script. The latter two languages are in fact the same as JScript, with somewhat modified syntax. That's why everything that goes for JScript is just as applicable for these two scripting languages also.
The next important thing: if you are planning to create tests only in TestComplete and then launch them with the help of TestComplete (or with the help of TestExecute – a command-prompt utility), you can select absolutely any language, regardless of the application that you are about to test.
For example, you may use VBScript language to test applications coded in C#, or select DelphiScript to test web-applications. In any case, you will enjoy complete access to all the TestComplete possibilities. For example, to access standard .NET classes in TestComplete, there is a special dotNET
object up for grabs. This object can be used in any programming language.
If you are already familiar with one of the languages suggested by TestComplete, selecting just that will be better for you. If none of the languages are familiar to you, the following tips may come in mighty handy:
Now, we shall consider why we need such languages as DelphiScript, C++Script, and C#Script.
TestComplete allows scripting in more advanced languages (C#, C++, Delphi, and Visual Basic). Meanwhile, you are using all the functionalities of a given language, writing up tests in any appropriate IDE, using the functionalities extended by TestComplete to gain access to the tested application. If you plan to record scripts with the help of TestComplete first and then convert them to tests in more advanced languages, you will need to apply these three languages. You can select a scripting language to comply with what it will be converted to (for example, C++Script to convert to C++code, DelphiScript for converting to Delphi). Having resolved that, the process of converting becomes hands-down easy. You will only need to make several similar changes in the code. In other cases, usage of the languages DelphiScript, C++Script, and C#Script is usually not considered expedient.