Basic Data Types | TestComplete Documentation (2024)

TestComplete uses data types that are supported by script engines and that are compatible with the VARIANT data type. This data type is used in certain programming languages like Visual Basic and C++. VARIANT is a universal type that can be used to store almost any kind of data: number, string, date/time, true/false, references to objects, arrays and so on. All variables and parameters that you create and use in your test projects are VARIANT-compatible.

When describing methods and properties of test objects, TestComplete helps use the following data types (which are VARIANT-compatible):

Integer

An integer number, from -2147483648 to 2147483647.

Double or Real

A floating-point value, for instance, 3.14. Real is used in DelphiScript. In other scripting languages, this data type is called Double. Range of available values:
-1.79769313486232×10308…-4.94065645841247×10-324 for negative values;
4.94065645841247×10-324…1.79769313486232×10308 for positive values.

String

Any textual data (a single character or an arbitrary string). In JavaScript, JScript, VBScript, C#Script and C++Script string data is enclosed in quotes, for instance, "my text". In DelphiScript, string data is enclosed in apostrophes, for instance, 'my text'. In Python, both are acceptable.

Boolean

A value that is either True, or False. In Python, use the title case spelling: True, or False. If you use JavaScript, JScript, C#Script or C++Script, use the lower-case spelling: true, false. VBScript and DelphiScript are not case-sensitive.

Date/Time

A value that stores a date, time or both date and time. This special type is used to perform various operations over date and time values easily. See Working With Dates and Working With Time.

Object

A value that is a reference to some object, for instance, to an object that provides a scripting interface to a window or control, or to an object that provides access to a window image. An example of the Object type usage is the Picture parameter of the Log.Picture method.

In some cases, TestComplete panels and dialogs report a property or parameter has the IDispatch type. IDispatch is an interface that is introduced by the Component Object Model (COM). Your test scripts can work with the COM objects implementing the IDispatch interface.

Variant

Any VARIANT-compatible value. This type is universal and it means the value can hold any data: strings, numbers, references to objects and so on. For instance, the Variant type is used for parameters of the Runner.CallMethod method, since in general they can be values of any supported type.

The Variant type is also used if a value can have various types, for instance, either boolean or integer like the State parameter of the Check action.

See Also

Script Tests

Basic Data Types | TestComplete Documentation (2024)

FAQs

Basic Data Types | TestComplete Documentation? ›

Simple data types. Three unique values are the integer data type (a whole number with a sign from –231 to 230), the octet string (from 0 to 65535), and the object ID derived from the set of all object identifiers allocated according to the rules specified in ASN. 1.

What are the basic data types? ›

10 data types
  • Integer. Integer data types often represent whole numbers in programming. ...
  • Character. In coding, alphabet letters denote characters. ...
  • Date. This data type stores a calendar date with other programming information. ...
  • Floating point (real) ...
  • Long. ...
  • Short. ...
  • String. ...
  • Boolean.
Jun 24, 2022

What are the 3 categories of simple data types? ›

Simple data types. Three unique values are the integer data type (a whole number with a sign from –231 to 230), the octet string (from 0 to 65535), and the object ID derived from the set of all object identifiers allocated according to the rules specified in ASN. 1.

What are the basic data types in Python? ›

Python has several built-in data types, including numeric types (int, float, complex), string (str), boolean (bool), and collection types (list, tuple, dict, set). Each data type has its own set of properties, methods, and behaviors that allow programmers to manipulate and process data effectively in their programs.

How many basic data types are supported in Java? ›

The eight primitive data types supported by the Java programming language are: byte: The byte data type is an 8-bit signed two's complement integer. It has a minimum value of -128 and a maximum value of 127 (inclusive).

What are the 4 main types of data? ›

4 Types Of Data – Nominal, Ordinal, Discrete and Continuous.

What is the most basic data type? ›

The most common basic data types are int , double , char , and bool .

What are the 3 most common data types? ›

Common data types
Data TypeDefinition
Boolean (bool)True or false values
Enumerated type (enum)Small set of predefined unique values (elements or enumerators) that can be text-based or numerical
ArrayList with a number of elements in a specific order—typically of the same type
8 more rows

What is data type with example? ›

For example, many programming languages use the data type string to classify text, integer to identify whole numbers and floating point to designate numbers with decimal points. The data type defines which operations can safely be performed to create, transform and use the variable in another computation.

What are the two basic types of data? ›

There are two general types of data – quantitative and qualitative and both are equally important. You use both types to demonstrate effectiveness, importance or value.

What are the advantages of using data structure? ›

Data Structures are necessary for designing efficient algorithms. It provides reusability and abstraction. Using appropriate data structures can help programmers save a good amount of time while performing operations such as storage, retrieval, or processing of data. Manipulation of large amounts of data is easier.

What is the difference between float and Boolean? ›

Floats are real numbers with a decimal point. 2. Boolean: These are True/False values.

What do you mean by data type? ›

A data type is a classification of data which tells the compiler or interpreter how the programmer intends to use the data. Most programming languages support various types of data, including integer, real, character or string, and Boolean.

What are the eight basic data types? ›

The eight primitive data types in Java are int, boolean, short, long, char, double, float, and byte. Unlike non-primitive data types, these aren't considered real objects and represent raw values.

How many main data types are there? ›

4 Types of Data: Nominal, Ordinal, Discrete, Continuous | upGrad blog.

What are the two main data types in Java? ›

Data types are divided into two groups:
  • Primitive data types - includes byte , short , int , long , float , double , boolean and char.
  • Non-primitive data types - such as String , Arrays and Classes (you will learn more about these in a later chapter)

What are the 5 data types? ›

Data types
  • String (or str or text). Used for a combination of any characters that appear on a keyboard, such as letters, numbers and symbols.
  • Character (or char). Used for single letters.
  • Integer (or int). Used for whole numbers.
  • Float (or Real). ...
  • Boolean (or bool).

What are the 5 main data types in databases? ›

Database data types refer to the format of data storage that can hold a distinct type or range of values. When computer programs store data in variables, each variable must be designated a distinct data type. Some common data types are as follows: integers, characters, strings, floating-point numbers and arrays.

Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 5829

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.