Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How can I execute a SilkTest Plan file with a query via the command line?

How can I execute a SilkTest Plan file with a query via the command line?

This can be achieved by using the partner command. See below for an example:

F and/or program directory will be replaced by what drive you are using and where your project is located

partner -proj "F:\Program Files\Segue\SilkTest\Projects\Example\Example.vtp" -query RunQuery 
-r "F:\Program Files\Segue\SilkTest\Projects\Example\Example.pln"

The command switches used in the line above;

Optional argument specifying the project file or archived project to load when starting SilkTest or SilkTest Runtime. For example, partner -proj d:\temp\testapp.vtp -r agent.pln

Specifies a query. Must be followed by the name of a saved query. Tells SilkTest to perform an Include/Open All, then Testplan/Mark By Named Query, then Run/Marked Tests.

Must be the last option specified, followed only by the name of a SilkTest file to open. This includes files such as script (and, optionally, arguments that the script takes), a suite, testplan, or link file. If you specify a link file, tells SilkTest to resolve the link and attempt to open the link target. Otherwise, tells SilkTest to run the specified script, suite, or testplan, 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.

The results file of running the above will show:

Note: For more details on the partner command, see the SilkTest help "index" tab for partner command

Old KB# 21082


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:16
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.