Having Thread Validator launch your program is the most common way to start up
When you're ready to start running a target program:
Or click on the launch icon on the session toolbar.
Or use the shortcut:
Start application
There are two interface modes used while starting a program
•Wizard mode guides you through the tasks in a linear fashion
•Dialog mode has all options contained in a single dialog
All the options are the same - just in different places.
In this section we'll cover the Wizard mode first and the Dialog mode later.
On first use, the wizard appears with fields cleared, but here's an example with a few fields set:
Enter the details for your program, or if you want to run a previous program select it from the application list to repopulate the details.
After entering the details click Next >> for the next page of the wizard.
The following applies only if you did not start Thread Validator in administrator mode.
Anywhere you see the icon indicates that administrator privileges will be required to proceed.
If you started Thread Validator in administrator mode, you won't see any of these warnings, and everything will behave as normal.
•Application to start type or Browse to set the program name to launch
You can also choose a batch file and the first executable started in the batch file will be launched.
You can also choose a powershell script and the first executable started in the powershell script will be launched.
Manually typing a path will show red text until a valid path is entered, after which the text becomes black.
•Application to monitor choose the application that actually gets monitored
This will typically just be the program that you set to start - unless otherwise specified.
Alternatively you can monitor another application which will get launched by the start program.
If the start application has already been added to the Applications to Monitor settings with a default application then that default will be entered here automatically.
Otherwise, if nothing has been set up yet, you can do it from here:
•Edit... set the child applications that can be monitored for the start program
This uses the Applications to Monitor dialog - which is exactly equivalent to using the Applications to Monitor settings page.
A fallback option is to start monitoring <<Any application that is launched>>.
If in doubt, just use the same as the start application.
•Launch Count when monitoring a child application, set its nth invocation as the one to monitor
If the application to start is the same as the application to monitor then this is set to 1 and cannot be changed.
This will be reset to 1 every time the Application to Monitor field selection changes.
If in doubt, leave it set to 1.
•Command Line Arguments enter program arguments exactly as passed to the target program
•Startup Directory enter or click Dir... to set the directory for the program to start in
When setting your target program, this will default to the location of the executable
Manually typing a directory path will show red text until a valid path is entered, after which the text becomes black.
•Environment Variables click Edit... to set any additional environment variables before your program starts
These are managed in the Environment Variables Dialog.
•File to supply to stdin optionally enter or Browse to set a file to be read and piped to the standard input of the application
•File to supply to stdout optionally enter or Browse to set a file to be written with data piped from the standard output of the application
The list at the bottom of the wizard shows previously run programs.
Selecting an item in the list populates all the details above as used on the last run for that program.
You can still edit those details before starting.
•Full path shows the full path to the executable in the list
•Image Name shows the short program name without path
•Delete removes a selected program from the list
•Reset clears all details in the wizard - including the list of previously run applications below
The Admin column in the list of previous runs may show a symbol to indicate a requirement for administrator privileges in order to run the program. This is automatically detected from the program's manifest.
•Collect data from application if it's the startup threads you want to monitor, then obviously start collecting data from launch
•Redirect standard output Controls redirection of stdout and stderr
Use this option if you want to collect the output of stdout and stderr for later analysis.
Be aware that if the output of the program under test generates a lot of data via stdout or stderr that this data will need to be stored in memory and could exhaust Thread Validator's memory.
•Display command prompt Shows or hides the launched application.
If you are collecting stdout and stderr you may not be interested in viewing the application (or the command prompt if it is a console application). This provides you the option to hide the application when it is running.
Be aware that if you hide a command prompt you will not be able to type anything into the application.
The last page is just a summary of the options you have chosen.
Something missing? The choice of launch method is no longer necessary and has been removed.
If you're happy with the settings, go ahead:
•Start Application... start your program and attach Thread Validator to it
•Cmd Line... display the command line builder
If administrator privileges are required you'll be reminded of the need to restart here:
•Start Application... shows the Administrator Privileges Required confirmation dialog before restarting
In Dialog mode, all the settings are in one dialog which looks very much like the first page of the launch wizard above.
At the top are the options to collect line times and to start collecting data immediately.
•Launch start your program and attach Thread Validator to it
•Cmd Line... display the command line builder
Double clicking a program in the list will also start it immediately.
If administrator privileges are required, the Launch button will show the privileges icon reminding you of the need to restart.
•Launch shows the Administrator Privileges Required confirmation dialog before restarting.
If you started Thread Validator in administrator mode, you won't see any of these warnings, and everything will behave as normal.
The three fields Application to Start, Application to Monitor and Launch Count work together to control which application actually gets monitored by Thread Validator.
By example, let's say we have a program P.
In the simplest case, set options as follows:
•start P
•monitor P
•the Launch Count defaults to 1 and cannot be changed.
If P launches an application and you just want to monitor whatever that is:
•start P
•monitor <<Any application that is launched>>
•leave the Launch Count at 1
If P launches an application A and maybe others as well, and you specifically want to monitor only A as it's launched:
•use the Application to Monitor settings to add a definition for P and child applications A
•start P
•monitor A
•leave the Launch Count at 1
If P launches an application A many times and you specifically want to monitor the third invocation:
•use the Application to Monitor settings to add a definition for P and child applications A
•start P
•monitor A
•set the Launch Count to 3