|1 August 2013
scriptstarter-src.zipfile and it is free for use and reuse by the T-Plan Robot Enterprise customers.
javacall in the ALTERNATIVE 2 below must be replaced with a full path, for example
cd) to the Robot's install directory and run it from there.
scriptstarter.bat(MS Windows) or
scriptstarter.sh(Linux, Unix & Mac OS) file to allow you to call the tool from any location:
robot.jarin the starting command with a full path to the file.
scriptstarter.jarin the starting command with a full path to the file.
For example, if Robot is installed under
C:\Program Files\T-Plan\Roboton MS Windows and you unzipped the tool to
C:\ScriptStarterthe start command will look like:
java -Xmx512m -cp
C:\Program Files\T-Plan\Robot\robot.jar" StartScripts %1 %2 %3 %4 %5 %6 %7 %8 %9
The Java command from the
.shfile may be naturally executed directly from a command prompt (terminal) or from a 3rd party application, for example from a scheduler. The
-Xmx512mparameter defines how much memory the tool (and also Robot) may use at a maximum. In this case it is 512 MB. For larger deployments with a higher number of test scripts executed in parallel it is recommended to raise the limit to prevent the tool from running out of memory. Principles of the memory optimization are described in the Optimizing Performance chapter of the Robot's Release Notes document.
The test scripts to be started must be specified through a plain
text file. Empty lines and lines starting with # will be ignored.
Other lines must specify CLI parameters of a single T-Plan Robot
process. For a complete list of supported CLI options see the CLI
For example, the following text file will execute the
scripts in parallel on two different VNC environments:
# Start Script1.tpr on VNC server at rfb://192.168.100.7:5900
-c rfb://192.168.100.7:5900 -r C:\MyProject\tpr\Script1.tpr -n
# Start Script2.tpr on another VNC server at rfb://192.168.100.11:5900
-c rfb://192.168.100.11:5900 -r C:\MyProject\tpr\Script2.tpr -n
Each script line must contain at least the
-r/--runparameter to define the script to be executed. The line may optionally call the
-c/--connectoption to make the process connect to the specified SUT prior to starting the script. The script itself may alternatively establish the connection through a call of the Connect command (TPR test scripts) or the connect() method (Java test scripts). It is not recommended to use both the ways at a time for performance reasons because the connection will be established twice.
-v/--variableswitch. For example, the following two lines will start the same script on two different environments where each process will get a different set of values:
As parallel execution is not supported by the GUI, the scripts will be always executed in the CLI mode regardless of whether the lines specify the
-c rfb://192.168.100.7:5900 -r C:\MyProject\tpr\Script1.tpr -n -v "DATAFILE=C:\My Data\data1.xls" -v "MODE=
-c rfb://192.168.100.11:5900 -r C:\MyProject\tpr\Script1.tpr -n -v "
DATAFILE=C:\My Data\data2.xls" -v "MODE=
/--nodisplayoption or not. The example above lists the option for clarity.
scriptstarter.bat(MS Windows) or
scriptstarter.sh(Linux, Unix & Mac OS) file and pass it the text file as an argument. Unless you updated the file as is described in the ALTERNATIVE 2 above you will have to change to the install directory and run it from there.
Linux, Unix & Mac OS:
For example, to start the scripts in the example file above
C:\My Data\scripts.txt on MS Windows
one would execute:
Be aware that parallel script execution requires you to have a license key with multiple seats and/or multiple valid keys. If the number of executed processes exceeds the number of licensed seats Robot will put the outstanding processes on hold until the other process(es) finish.