In this section:
General Command Line Execution
The general procedure for testing from the command line is as follows:
- Use
the soatestcli
utility, with appropriate options, to launch analysis in the command-line mode. A complete list of options is provided in CLI Options. Key options are:- -data: Specifies the Eclipse workspace location. If the -data option is not used, then the default workspace found under
<SOATEST_WORKSPACE>\parasoft\workspace
(where "SOATEST_WORKSPACE" could beC:\Users\<USERNAME>
) will be used. - -config: Specifies the Test Configuration you want to run.
- -resource: Specifies the test suite(s) to run. To run a single test suite, specify the path to test-suite-name.tst relative to the workspace. To run multiple test suites, use multiple -resource parameters in the order in which you want the tests run. To run all test suites within a directory, specify the directory path relative to the workspace.
- -publish: Publishes test results to DTP.
- -report: Specifies the location of the test execution report.
- -settings: Specifies a .properties file that contains advanced configuration settings. Options are described in Settings Files - Options.
- -data: Specifies the Eclipse workspace location. If the -data option is not used, then the default workspace found under
If the SOAtest installation is not on your path, launch soatestcli
with the full path to the executable.
CLI Invocation
The general form of invocation for soatestcli
is:
- Windows:
soatestcli.exe [OPTIONS]
- UNIX:
soatestcli [OPTIONS]
Typically, invocations follow this pattern:
- Windows:
soatestcli.exe -data %WORKSPACE_DIR% -resource resource_to_test -settings %LOCAL_SETTINGS_FILE% -config %CONFIG_URL% -report%REPORT_FILE%
- UNIX:
soatestcli -data %WORKSPACE_DIR% -resource resource_to_test -settings %LOCAL_SETTINGS_FILE% -config %CONFIG_URL% -report %REPORT_FILE%
Examples
soatestcli.exe -config "user://Example Configuration"
- Runs all tests in the default workspace (for standalone installations, usually
C:\Users\<USERNAME>\parasoft\workspace
) with the user-defined Test Configuration named "Example Configuration."
Note
A user-defined configuration is local to the specified workspace and the configuration. "Example Configuration" is automatically created and set to be the default configuration by SOAtest when the workspace is first created.
soatestcli.exe -import c:\myProject
- Imports a project from
C:\myProject
into the default workspace.
soatestcli.exe -config "user://Example Configuration" -data "c:\myWorkspace"
- Runs all tests in the workspace at
C:\myWorkspace
. Tests in projects that have not been imported will not be run. The "Example Configuration" Test Configuration is used.
soatestcli.exe -config "user://Example Configuration" -resource "tests/myTest.tst"
- Runs the test suite file myTest.tst located in the 'tests' project of the default workspace. The "Example Configuration" Test Configuration is used. The project 'tests' must have already been imported into the workspace.
soatestcli.exe -config "user://Example Configuration" -resource "tests" -report c:\reports\Report1
- Runs all tests in the 'tests' project folder of the default workspace, and saves the report at
C:\reports\Report1
. The project 'tests' must have already been imported into the workspace.