Predefined elements

Constants

Tricentis TDM Studio contains a number of read-only variables (constants) that can be used in templates.

Constant

Type

Content

APPENDLOG

boolean

Available for compatibility reasons, but not adjustable in the UI.

ASSEMBLIES

array

Additional assemblies from the Project Settings.

CONSISTENCY_STD_ODBC

string

Contains configuration information for an ODBC consistency database.

CONSISTENCY_STD_SQLITE

string

Contains configuration information for a SQLITE consistency database.

CURRENT_CULTURE

culture

Contains the regional settings of Tricentis TDM Studio, defined by the installed language. Possible Values are en-US or de-DE.

CURRENTFRAMELOOP

integer

Contains the current loop cycle of the frame.

The first cycle has the value 1: The last cycle is specified under Repetitions in the frame settings of a task.

CURRENTTIME

time

The current time. Whether the actual time or a calculated time is used, depends on the project and task settings.

This remains constant during the processing of a template and it is always updated before the processing.

DOLOG

boolean

Log Data Generation from the Project Settings.

EULER

float

The Euler number (e).

FRAMETITLE

string

Contains the name (title) of the frame that was just processed.

INVARIANT_CULTURE

culture

A neutral culture without association with a country or region. Formats are equal to the en-US culture without the currency symbol.

LOGFILEDIR

string

Log directory from the Project Settings.

If a relative path is specified in the project settings, then LOGFILEDIR contains an absolute path derived from the directory that the Tricentis TDM Studio project file (.ttsprj) is stored in. For AutoLoader projects, this path is derived from the directory that the AutoLoader project file (.ttsal) is stored in.

MAX_FLOAT

float

The highest value a variable of type float can accept.

MAX_INTEGER

integer

The highest value a variable of type integer can accept.

MAX_TIME

time

The highest value a variable of type time can accept.

MIN_FLOAT

float

The smallest value a variable of type float can accept.

MIN_INTEGER

integer

The smallest value a variable of type integer can accept.

MIN_TIME

time

The smallest value a variable of type time can accept.

MISCDIR

string

Reference to the misc directory in the Tricentis TDM Studio project folder. This can be used for storing files that are required in order to execute the project. The directory is generated by the AutoLoader project.

NEWLINE_MAC

string

Defines the line break to be used in text blocks as Mac OS format (not Mac OS X).

NEWLINE_UNIX

string

Defines the line break to be used in text blocks as UNIX and Mac OS X format.

NEWLINE_WIN

string

Defines the line break to be used in text blocks as DOS and Windows format.

NUMFRAMELOOPS

integer

Contains the loop cycles of the frame.

NUMRANDOMTEMPLATES

integer

Contains the number of random used elements of the frame.

PI

float

The number Pi.

PROJECTCREATOR

string

Creator from the Project Settings.

PROJECTDESCRIPTION

string

Description from the Project Settings.

PROJECTDIR

string

Project directory from the Project Settings.

If the project is run in Tricentis TDM Studio, then the project directory is identical with the directory that contains the Tricentis TDM Studio project file (.ttsprj). If the project is run via AutoLoader, then the project directory is identical with the directory that contains the AutoLoader project file (.ttsprj).

PROJECTFILENAME

string

The name of the project file with path and extension.

PROJECTNAME

string

Project name from the Project Settings.

PROJECTOUTPUTDIR

string

Output directory from the Project Settings. In templates, you should use the variable TASKOUTPUTDIR, so that the directory can be set for each task.

If a relative path is specified in the project settings, then PROJECTOUTPUTDIR contains an absolute path derived from the directory that the Tricentis TDM Studio project file (.ttsprj) is stored in. For AutoLoader projects, this path is derived from the directory that the AutoLoader project file (.ttsal) is stored in.

PROJECTTITLE

string

Title from the Project Settings.

RANDOMSEED

integer

Random start from the Task Settings.

RANDOMTEMPLATES

boolean

Random sequence from the Task Settings.

SAP_NWRFC

string

Uses the Netweaver protocol to open a SAP connection.

SAP_RFC

string

Uses the classical RFC protocol to open a SAP connection (librfc32.dll).

TASKCREATOR

string

Creator from the Task Settings.

TASKDESCRIPTION

string

Description from the Task Settings.

TASKFILENAME

string

The name of the task file with path and extension.

TASKNAME

string

Task name from the Task Settings.

TASKTITLE

string

Title from the the Task Settings.

TEMPLATEDIR

string

Directory that contains the templates of the project.

TEMPLATEFILENAME

string

Contains the full file name of the template that was just processed.

TEMPLATEPAUSE

integer

Pause between the templates from the Task Settings.

USERDLL

string

The file name of the assembly with the user-defined functions.

USERFUNCDIRS

array

Function Directories from the Project Settings.

Configurable Task variables

Task settings can be changed during processing of the Task variables. The write protection of the constants shown in the table below is disabled during that period.

Constant

Type

Value

<Task loop>_NUMLOOPS

integer

The number of loops as defined in the task's loops settings.

This variable is generated automatically if it is not already defined in the project variables.

<Task loop>_STARTTHREAD

boolean

Indication that a task loop has start thread enabled.

This variable is generated automatically if it is not already defined in the project variables.

<Frame loop variable>_CURRENT

integer

Contains the number of the cycle of the frame loop (beginning with 1) for which the variable <Frame loop variable> is defined (where <Frame loop variable> stands for the actual variable name).

In contrast to CURRENTFRAMELOOP, this variable allows you to establish the current cycle from outside the actual frame.

This variable is generated automatically if it is not already defined in the project variables.

FRAMEPAUSE

float

Pause between frames from the Task Settings.

STARTTIME

time

Start date for the first record from the Task Settings.

TASKOUTPUTDIR

string

Output directory from the Task Settings. If the output directory is not set in the task settings, then this constant equals PROJECTOUTPUTDIR.

If a relative path is specified in the project settings, then TASKOUTPUTDIR contains an absolute path derived from the directory that the Tricentis TDM Studio project file (.ttsprj) is stored in. For AutoLoader projects, this path is derived from the directory that the AutoLoader project file (.ttsal) is stored in.

USECURRENTTIME

boolean

Use System Time from the Task Settings.

USEPROJECTTIMESETTINGS

boolean

Use time settings of the project from the Task Settings.

An error occurs when the value of the variable is set to NULL.

Variables

Tricentis TDM Studio contains a predefined variable that, unlike a constant, is not write-protected and that can be accessed in a template or in the project or task variables.

Constant

Type

Content

NEWLINE

string

Defines the line break to be used in text blocks and in the WriteLinesFileStream function.

This variable can be assigned a different string at any time. The string that is the value for this variable is used for the output of line breaks in text blocks.

The predefined line breaks in Tricentis TDM Studio are described in the table below.

Constant

Type

Content

NEWLINE_MAC

string

\r

NEWLINE_UNIX

string

\n

NEWLINE_WIN

string

\r\n