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