TCL Launcher (tcl.jar)

The TCL launcher allows interfacing with TCL (.tcl) scripts.
It has been tested with TCL 8.5.


Configuration

The tcl.xml file allows pre-configuring the launcher with some default values:

Parameter Description
General > Test root path This must indicate where are located all the .tcl scripts.
This is a root path. Each test in XStudio has a canonical path that will be appended to this path.
This path MUST not include an ending slash.

Default value is: C:/my_tcl_scripts
General > Asynchronous timeout (in seconds) This must indicates the maximum time the system will wait for the test to complete.

Default value is: 600
Tcl > Tcl install path This must indicate where is installed Tcl on the host.

Default value is: C:/Tcl/bin


These values can be changed while creating the campaign session from XStudio.


Requirements

1) Each test in XStudio must have his dedicated .tcl script. The name of the script MUST be equal to the name of the test.

2) The .tcl script must be able to parse the argument testcaseIndex passed during interpretation. This allows the script to execute different routines depending on the testcase index.
The interpreter is executed by the launcher using this syntax:

tclsh85.exe <testRootPath>/<testPath>/<testName>.tcl /debug /testcaseIndex=<testcaseIndex>

3) When the .tcl has executed all its actions, it MUST create an empty test_completed.txt file. Indeed, the executions of the TCL scripts are asynchronous. This mechanism allows the launcher to know when the test is completed. A timeout of 10 minutes is predefined. If the .tcl script did not create the test_completed.txt within the first 10 minutes, then the launcher considers the test has crashed and skips it.

4) the .tcl script must generate a log.txt during its execution. This file MUST describe all the actions performed by the test as well as the result of each action. This file will be parsed by the launcher and all the information will be passed/stored automatically in the XStudio database. The log.txt MUST respect a specific format: Each line MUST include the strings “[Success]", "[Failure]" or "[Log]" or the line will not be treated. Based on this information, the testcase will be flagged as passed or failed.