Which of the following is a scripting language?

A scripting language is a programming language that employs a high-level construct to interpret and execute one command at a time. In general, scripting languages are easier to learn and faster to code in than more structured and compiled languages such as C and C++.

Compiled languages are converted permanently into executable files before they are run. In contrast, scripting languages are typically converted into machine code on the fly during runtime by a program called an interpreter. Although this approach can cause performance problems because the instructions are not handled solely by the processor, it does make it easier for scripts to work with programs written in other languages.

Over time, as just-in-time compilation has improved performance and intepreted programming languages like Perl, Python and Ruby have evolved, the lines have begun to blur about what should, and what should not, be classified as a scripting language. Today, it is generally agreed that the classification should not be determined by the language itself, but rather by how the language is being used.

When a scripting language is used to connect disparate system components, it may also be referred to as a glue language.  In addition to being interpreted, such scripting languages are also typeless, allowing a variable to hold any type of data without having to explicitly declare its type. Usually, glue languages also provide native support for specific aggregate data types such as arrays and automate garbage collection to reclaim abandoned storage and prevent memory leaks.

Scripting languages like JavaScript are often used to facilitate enhanced features of websites. These features are processed on the server, but the script on a specific page runs on the user's browser. Many Web sites require that the user's browser be set to run scripts to take advantage of all the features of the site. In some cases, a Web site may be practically useless unless the user's computer is set to run programs locally in a scripting language.

Scripting languages defined elsewhere on WhatIs.com include:

AppleScript - AppleScript programs (applets) perform like bots: once they are written, they can autonomously process and manage multimedia data, including digital video, text and Web-based material.

bash - the free version of the Bourne shell distributed with Linux and GNU operating systems.

Bourne shell - the original UNIX shell. Also known by its program name, sh.

C shell - invented for programmers who prefer a syntax similar to that of the C programming language.

JavaScript - script language developed by Netscape. It is somewhat similar in capability to Microsoft's Visual Basic, Sun's Tcl, the UNIX-derived Perl, and IBM's REXX.

Korn shell - incorporatins all the features of C shell (csh) and Tab C-shell  (tcsh) with the script language features similar to that of the Bourne shell

LotusScript - can be coded within the Lotus Domino Designer development environment.

Perl - a script programming language that is similar in syntax to the C language; can optionally be compiled just before execution into either C code or cross-platform bytecode.

PHP - a script language and interpreter that is freely available and used primarily on Linux Web servers.

PowerShell - designed to automate system tasks, such as batch processing, and create systems management tools for commonly implemented processes; includes more than 130 standard command line tools for functions that formerly required users to create scripts in VB, VBScript or C#.

Python - often used to provide scripting capability to existing applications; is simple enough for user-level scripting with a minimum of training.

Ruby - according to proponents, Ruby's simple syntax (partially inspired by Ada and Eiffel), makes it readable by anyone who is familiar with any modern programming language.

This was last updated in May 2016

Continue Reading About scripting language

  • The Sun Developer Network discusses scripting for the Java platform.
  • Nikolai Bezroukov outlines the limitations of scripting languages.
  • Findy Services and B. Jacobs describe scripting language options.

Each TestComplete project uses one of the supported scripting languages:

  • JavaScript

  • Python

  • VBScript

  • JScript (legacy)

  • DelphiScript (legacy)

  • C#Script (legacy)

  • C++Script (legacy)

Which of the following is a scripting language?
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.

  • It defines the syntax of test object names in your tests. For instance, in JavaScript, JScript, Python and VBScript, the name of the Notepad process looks like 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: ["Process"]("Notepad").

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.

However, we highly recommend that you use JavaScript or Python to create script tests. These languages use the modern scripting engines - V8 engine v. 5.8 and Python 3.8.10 correspondingly. They are stable and reliable making it less likely for you to face issues you may face when using other more outdated scripting languages. In addition, you can easily find any needed references on these languages online.

Should the scripting language match the language of my tested application?

No, a project’s scripting language does not depend on your tested application’s programming language. For instance, you can use JavaScript to test Visual C++ applications, or VBScript to test Delphi programs.

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.

Note however that the syntax of C#Script and C++Script differs from that of C# and C++. So, selecting these scripting languages makes sense only if you plan to create a connected or self-testing C++ or C# application. If you want to select C#Script or C++Script only due to that the C# or C++ syntax is closer to your skills, we recommend that you rather use JavaScript as its syntax is more similar to C# and C++ than the C#Script and C++Script syntax is.

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:

  • JavaScript and Python do not support functions that obtain parameters by reference. The same applies to JScript, and C#Script and C++Script since these languages work via the JScript engine.

  • Any of the supported scripting languages let you call routines and variables defined in another unit. However, circular references between units are supported in JavaScript, Python, VBScript and DelphiScript only and are not supported in JScript, C#Script and C++Script.

  • Some users consider that exception handling in JavaScript, JScript, Python, DelphiScript, C#Script or C++Script may be more convenient than exception handling in VBScript.

  • The format of arrays in JavaScript, JScript, Python, C#Script and C++Script differs from the DelphiScript and VBScript (see Supported Scripting Languages - Specifics of Usage). This affects the usage of some routines (for example, the AddNamedChild method) 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?

Currently, Python and JavaScript are among the most commonly used languages, and that is why we recommend that you use them to create script tests. Their engines are updated regularly, and you can easily find any information on these languages online.

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.

See Also

Script Tests
Supported Scripting Languages - Specifics of Usage
Creating Projects and Project Suites
Create New Project Wizard - Enter Project Attributes Page
Create Project Dialog

What are the types of scripting language?

Types of Scripting Language.
ASP.NET..
Node. js..
Python..

Is HTML a scripting language?

What you're looking at right now is HTML code, read and interpreted by your browser. But this doesn't make HTML a programming language. HTML is a type of markup language. It encapsulates, or “marks up” data within HTML tags, which define the data and describe its purpose on the webpage.

Is C++ a scripting language?

Answer: Programs written in C++ are compiled and then the compiled code runs to generate the output. C++ is thus a programming language and not a scripting language, since scripting languages are directly interpreted at run time and no prior compilation of the code takes place.

Is Python a scripting language?

A scripting language is one that is interpreted. Python is an interpreted language. Python uses an interpreter to translate and run its code. Hence Python is a scripting language.