Starting Silk Test Classic from the Command Line

You can start the Silk Test Classic executable program from the command line by:

The syntax is:
partner [-complog filename] [-m mach] [-opt optionset.opt] [-p mess] [-proj filename [-base filename]] 
[[-q] [-query query name] [-quiet] [-r filename] [-resexport] [-resextract] [-r] scr.t/suite.s/plan.pln/link.lnk

The filename specified for various options expects the file to be located in the working directory. The default location is the Silk Test Classic installation directory, C:\Program Files (x86)\Silk\SilkTest. If you want to use a file that is located in another directory, you must specify the full path in addition to the filename.


The partner command can be called with the following options:


Optional arguments to a script file. You can access the arguments using the GetArgs function and use them with your scripts.

If you pass arguments in the command line, the arguments provided in the command line are used and any arguments specified in the currently loaded options set are not used. To use the arguments in the currently loaded options set, do not specify arguments in the command line.

For additional information, see Passing arguments to a script.

Tells Silk Test Classic to log compilation errors to a file you specify. Enter the argument as -complog filename. For example:
partner [-complog c:\testing\logtest1.txt]

If you include this argument, Silk Test Classic checks that the specified file exists each time that you compile. If the file does not exist, Silk Test Classic creates and opens the file. If the file exists, Silk Test Classic opens it and adds the information. The number of errors is written in the format n error(s), for example 0 errors, 1 error, or 50 errors. Compilation errors are written to the error log file as they are displayed in the Errors window. The error log file is automatically saved and closed when Silk Test Classic finishes writing errors to it.


Specifies the target machine. The default is the current machine. Call the 4Test built-in function Connect to connect to a different machine at runtime.

In order to use the -m switch, you need to have the Network setting of the Runtime Options dialog box set to TCP/IP or NetBIOS. If this is set to '(disabled)', the target machine is ignored. To set the Network setting, either set it interactively in the Runtime Options dialog box before running from the command line, or save the setting in an option set and add the '-opt <option set>' argument to the command line.

Specifies an options set. Must be followed by the path of the .opt file that you want to use.

Provided for use with a Windows shell program that is running Silk Test Classic as a batch task. This option enables another Windows program to receive a message containing the number of errors that resulted from the run. Silk Test Classic broadcasts this message using the Windows PostMessage function, with the following arguments:

  • uiMsg = RegisterWindowMessage (mess)
  • wParam = 0
  • lParam = number of errors

To take advantage of the -p option, the shell program that runs Silk Test Classic should first register the message (mess), and should look for the message while Silk Test Classic is running.

Optional argument specifying the project file or archived project to load when starting Silk Test Classic or Silk Test Classic Runtime. For example:
partner –proj d:\temp\testapp.vtp –r agent.pln

-base is an optional argument to –proj. You use the base argument to specify the location where you want to unpack the package contents. For example, partner –proj d:\temp\testapp.stp –base c:\rel30\testapp unpacks the contents of the package to the c:\rel30\testapp directory.

Quits Silk Test Classic after the script, suite, or test plan completes.
Specifies a query. Must be followed by the name of a saved query. Tells Silk Test Classic to perform an Include > Open All, then Testplan > Mark By Named Query, then Run > Marked Tests.

Starts Silk Test Classic in quiet mode, which prevents any pop-up dialog boxes from displaying when Silk Test Classic starts up.

The quiet option is particularly useful if you are doing unattended testing where a user is not available to respond to any pop-up dialog boxes that may display.

Must be the last option specified, followed only by the name of a Silk Test Classic file to open. This includes files such as script (and, optionally, arguments that the script takes), a suite, test plan, or link file. If you specify a link file, tells Silk Test Classic to resolve the link and attempt to open the link target. Otherwise, tells Silk Test Classic to run the specified script, suite, or test plan, optionally passing args as arguments to a script file. For example, partner –proj d:\temp\testapp.stp –base c:\rel30\testapp –r Agent.pln unpacks the archive from the temp subdirectory into the c:\rel30\testapp subdirectory and then loads and executes the Agent.pln file.
Tells Silk Test Classic to export a one line summary of the most recent results sets to .rex files automatically. Specifying -resexport has the same effect as if each script run invokes the ResExportOnClose function during its execution.
Tells Silk Test Classic to extract all information from the most recent results sets to a .txt file. Both the Silk Test Classic Extract menu command and the -resextract option create UTF-8 files.
script.t/ suite.s/ plan.pln/ link.lnk
The name of the Silk Test Classic script, suite, test plan, or link file to load, run, or open.


  • To load Silk Test Classic, type the following:
  • To run the test.s suite, type the following:
    partner -r test.s
  • To run the test.t script on the system with the hostname "sys1", type the following:
    partner -m sys1 -r test.t
  • To run the test.t script with arguments, type the following:
    partner -r test.t arg1 arg2
  • To run the tests marked by the query named query3 in tests.pln, type the following:
    partner -query query3 -r tests.pln
  • To run tests.pln and to export the most recent results set from tests.res to tests.rex, type the following:
    partner -q -resexport -r tests.pln
  • To edit the include file, type the following: