Process Operations
The folder TBox Automation Tools->Process Operations in the Standard subset contains the following Modules:
TBox Start Program
This Module allows you to open an application or an executable file stored in a Microsoft Windows® file system. You can also use it to shut down an application via command line (see example 5).
It has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Path |
Path to the application that you want to open or an environment variable. To shut down an application, enter the name of the command line task. This entry is mandatory. |
Directory |
Specify a working directory for the program. By default, Tricentis Tosca uses the home directory of the registered user: C:\Documents and Settings\<user name>. |
Arguments |
If you want to start or stop the application via arguments, specify arguments. |
Arguments->Argument |
Define an argument and use ActionMode Input. To shut down an application, one of the arguments must be its name according to the Details tab in Windows Task Manager. You can specify multiple arguments, one per sub-ModuleAttribute. |
WaitforExit |
You can instruct Tricentis Tosca to wait until the application has been exited. To do so, set the value True and use ActionMode Select. Optionally, specify StandardOutputFile, TimeoutForExit, and ExitCode. |
WaitforExit->StandardOutputFile |
If you want Tricentis Tosca to create a log, specify the path and name of the log file. The log includes standard output (stdout) and standard error (stderr). |
WaitforExit->TimeoutForExit |
Specify the maximum time in seconds that Tricentis Tosca should wait before exiting the application. |
WaitforExit->ExitCode |
Verify your application's exit code. To do so, enter the code into the Value column and use ActionMode Verify. |
Run as |
Define which domain or local user credentials Tricentis Tosca should use to open the application. By default, Tosca Commander chooses ActionMode Select. |
Run as->Username |
User Principal Name (UPN) format of the user name that should open the application. For example: jdoe@company.com. |
Run as->Password |
If needed, specify the password of the user. |
![]() |
In this example, you start the application Notepad.exe, which is located at C:\Windows. To do so, Tricentis Tosca uses the user credentials of John Doe as specified in Username and Password.
|
![]() |
In this example, you open the file Test01.xml, which is located at D:\, with the program notepad.exe, which is located at C:\Windows. The defined working directory is C:\Temp.
|
![]() |
In this example, you start Google Chrome and open the website www.tricentis.com in private mode:
|
![]() |
In this example, you start TCShell.exe, which is located at %COMMANDER_HOME%. Additionally, Tricentis Tosca performs the following actions:
|
![]() |
In this example, you start TCShell.exe, which is located at %COMMANDER_HOME%. Additionally, Tricentis Tosca performs the following actions:
|
![]() |
In this example, you use the Windows command line task TaskKill (link opens in new tab) to shut down Chrome, forcibly and immediately.
|
TBox Close Program
The Module TBox Close Program lets you do the following things:
-
Close an application or process.
-
Wait until an application has closed.
-
Verify whether an application or process is currently running.
This is helpful whenever you need to end an application before you can proceed with the next TestStep.
The Module has the following ModuleAttributes:
ModuleAttribute |
Description |
---|---|
Id* |
Process identification number (PID) of the application. Example: 7588. |
Name* |
Process name of the application. Example: msedge. |
Main Window Title* |
Title of the main application window. Example: Slack. |
Command Line |
Optionally, fine-tune identification by entering the command line parameters you execute your application with. If you're only interested in specific parts of the parameter set, use wildcards. |
Operation |
Choose the operation you want to perform:
|
*You need to specify at least one of these values in your TestCase so that Tricentis Tosca can find the correct application or process. If you have multiple applications or processes with equal or similar identifiers, use more than one of these identifiers in your TestCase. |
![]() |
In this example, you verify whether an application exists whose window title contains Notepad. To do this, you use wildcards *.
Close an application that contains Notepad in its window title |
![]() |
In this example, you close the Notepad application that you previously opened with the command notepad a.txt.
Close an application that you opened with parameters using the command line |