dsn
|
-d
|
Yes
|
The name of the DSN to use to connect to the database. Although this parameter is required, if left blank,
SilkTest will be used.
|
username
|
-u
|
Yes
|
The name of the user used to connect. If left blank,
Admin will be used.
|
password
|
-p
|
No
|
The password of the user used to connect. Optional if the password is
Nothing (this is not recommended).
|
project
|
-r
|
No
|
The project that contains the scripts to play back. By default, all scripts in the project will execute. Use the
-script parameter to specify unique scripts. If you do not specify a script and a script requires input parameters, the default values will be used.
.NET scripts are executed first and visual tests are executed second.
If the project does not exist, an error message will display.
Important: If the project parameter is not specified, then the
Common project is used by default. For example, if you write
stw -d silktest -u admin -p admin -s Script1 -r OtherProject -s Script2,
Script1 will be run in the
Common project, while
Script2 will be run in the project called
OtherProject.
|
environment
|
-e
|
No
|
The name of the run environment for the scripts to use. The default playback environment will be used if this parameter is not included.
If the playback environment does not exist, then the script will not be executed.
Important: If used, this parameter must precede the parameters
project and
script.
|
script
|
-s
|
Yes
|
The name of the .NET script, visual test, or keyword-driven test to play back.
If the .NET script, visual test, or keyword-driven test does not exist, an error message will display.
|
variable
|
-m
|
No
|
This parameter allows you to specify the parameters for a script. If you use this parameter, it must follow the
script parameter.
The name and value pair should be enclosed in double quotes. Use the
= character to denote a value that is assigned to a variable. The Boolean parameter should be specified as
True or
False.
Parameters can be specified in any order but the names and numbers must match the parameters of the script exactly. Passing too many, not enough, or invalid names will cause an error message and the script will not run.
|
file
|
-f
|
No
|
This option allows you to specify command line parameters in a text file and feed that to the command line program. This could be used if you have lengthy arguments that you don't want to re-type.
See
Input File for full usage details.
|
outputfile
|
-o
|
No
|
Use this parameter to specify the name of a file that will contain information about the scripts that were executed. Only scripts that execute and either complete successfully or generate a playback error will appear in the output file.
The name of the output file must appear in quotes if the path or name contains spaces.
See
Output File for full usage details.
|
browser
|
-b
|
No
|
Use this parameter to specify on which browser scripts that have browser application configurations are executed. The parameter is case insensitive and the following values are allowed:
- InternetExplorer
- Firefox
- GoogleChrome
- Edge
- AndroidBrowser
- Safari
- None
When you want to use
AndroidBrowser or
Safari, specify the
mobiledevice parameter.
Important: If used, this parameter must precede the parameters
project and
script.
|
mobiledevice
|
-md
|
No
|
The name of the mobile device that the script is executed against. This name also displays in the
Select Browser dialog box.
To reset this value, pass in an empty string as two double quotes ("").
Important: If used, this parameter must precede the parameters
project and
script.
|
append
|
-a
|
No
|
Use this parameter to append the result. This is the same setting as displayed in the
Options dialog box.
|
increment
|
-i
|
No
|
Use this parameter to increment the result. This is the same setting as displayed in the
Options dialog box.
|
verbose
|
-v
|
No
|
This parameter displays output to the user during the execution of the script. It can appear anywhere in the command line.
DSN, username, and password are always displayed. If an output file is used, it will be displayed. Where a script name is shown, the project name will appear following the name in brackets . A line containing the name of the script, project, script status, total verifications, passed verifications, and failed verifications will be shown for each script executed.
|
help or
?
|
-h
|
No
|
Type
STW -? to display the available parameters for the command line program.
|
resultdir
|
-rd
|
No
|
Use this parameter to specify a directory into which all result files of the executed scripts are stored.
The following files are stored in this directory:
- The XML result files.
- The XSLT files that correspond to the result XML files.
- Error screens, if any errors occurred during the execution.
|
connectionstring
|
-c
|
No
|
Use this parameter to test a browser or a mobile device which is connected to a remote location. When executing a test with the
connectionstring parameter, the
connectionstring is written to the output file, between the mobile device and the parameters.
|