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 be C:\Users\yourname) 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.
    • -publishteamserver: Publishes test results to Team Server (for backward compatibility).
    • -report: Specifies the location of a the test execution report.
    • -localsettings: Specifies a .properties file that contains advanced configuration settings. Options are described in Local Settings Files - Options.

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 -localsettings %LOCAL_SETTINGS_FILE% -config %CONFIG_URL% -report%REPORT_FILE%
  • UNIX: soatestcli -data %WORKSPACE_DIR% -resource resource_to_test -localsettings %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:\documents and settings\<username>\soatest\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.

CLI Video Tutorial

  • No labels