Use the STWImport.exe command line utility to import assets from the command line. Import parameters can be specified entirely from a command line, or unless otherwise noted, specified in a configuration file.
The utility is located in \Silk\Silk Test\ng\gui\
Syntax | Values | Required | Description |
---|---|---|---|
Username (-u) | User-defined | Yes |
The name of the user used to connect. It can only be specified using the command line. Any configuration file specification for this parameter is ignored. When using Windows authentication, omit the user name. |
Password (-p) | User-defined | Yes |
The password of the user used to connect. This parameter is required if the password is not Nothing. It can only be specified using the command line. Any configuration file specification for this parameter is ignored. When using Windows authentication, omit the password. |
DSN (-d) | User-defined | Yes |
The name of the DSN to use to connect to the database. This parameter is required for any DSN names other than "SilkTest". It can only be specified using the command line. Any configuration file specification for this parameter is ignored. |
ImportFile (-if) | User-defined |
The file name or location of the ZIP file to be imported. |
|
Execute (-ex) | Yes | No (see Note below) | Yes | Commits the import operation. The default value is "No". |
Filename (-f) | User-defined | No |
An INI configuration file that stores command line parameters. It can only be specified using the command line.
Note: The INI file parameters override the command line parameters with one exception. The Projects (-prj) and System (-s) parameter
values specified in the INI file do not override the same parameters specified on the command line. Instead the values for
each are both used.
|
AllVersions (-av) | Yes | No (see Note below) | No | Imports all versions of the asset(s). The default value is "No". |
ReportResult (-rr) | User-defined | No |
Contains the file name and location of the summary report file to be created. The default location is the current directory. |
SilentMode (-sm) | Yes | No (see Note below) | No |
Prevents the display of the console output. |
Projectmapping (-pm) | User-defined | No |
Specifies the target project to use instead of the original source project from the import file. Multiple mappings can be separated by using the pipe character (|). |
Projects (-prj) | Asset nodes | No | Specifies a single project asset or group of project assets for import. All assets in the database will be imported without
this parameter. Groups of nodes are separated by the pipe character(|). The format is:
{ProjectName}.{AssetType}.{AssetName}.{Ver#}. For example:
-prj ProjectA.Script.SampleScript.1 Strings separated by the pipe character must be included within double quotes. For example:
-prj "Common | ProjectB.Result" Note: When specifying the asset type, use the singular form of the asset. For example, use "result" not "results". For asset names
comprised of two words (visual test), remove the space (visualtest). There is one exception: test script. Use only the word
"script" to specify a test script.
|
System (-s) | Asset nodes | No | Specifies a single system asset or group of system assets for import. All system assets in the database will be imported
without this parameter. Groups of nodes are separated by the pipe character(|). The format is:
{SystemName}.{SystemType}.{SystemAssetName}. For example:
-s Options.Record.RecA Strings separated by the pipe character must be included within double quotes. |
ProjectAssetResolve- Conflict (-parc) | s | a | p | No | Specifies the conflict resolution method for project assets that already exist in the database.
|
SystemAssetResolve- Conflict (-sarc) | s | p | No | Specifies the conflict resolution method for system assets that already exist in the database.
|
When specifying parameter values in the import configuration file, the default value is used whenever a parameter or parameter value is omitted. For non-default values, the value must be explicitly stated. For example, to import all versions of an asset, include the AllVersions (-av) parameter together with the value "Yes".
C:/>STWImport.exe -u Admin -p admin -d MyDBName -mt sf -mn "c:\MySTAssetFiles" -prj ProjectA -pm "ProjectA=ProjectB" -rr "c:\STImport.txt" -ex
In the example above, the latest version of ProjectA asset files contained in the MySTAssetFiles directory are imported into ProjectB in the MYDBName database and a file containing a summary report is created.
C:/>STWImport.exe -u Admin -p admin -d MyDBName -f "C:\STimport.ini"
In the example above, only the import parameters that are required to be specified on the command line are included. All other parameters are stored in the configuration file.