Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • cpptestcli -data "c:\MyWorkspace" -resource "ProjectToTest" -config builtin://ShouldHaveRules -publish -settings acme_policy.settings

The reports will be sent to Parasoft DTP after each batch run.


cli Usage

The general procedure for testing from the command line is as follows:

...

Info
titleExcluding Specific Project Resources from Analysis/Testing

If you want to exclude some files from analysis/testing (for instance, to prevent static analysis of automatically-generated files), you can indicate which project resources should not be tested as described in Excluding Project Resources from Testing. Perform this configuration in the GUI, then the settings will be applied for all tests on this project—from the GUI or from the command line.

Using -data to Specify Your Eclipse WorkspaceYour Eclipse Workspace

Use If you are not in the same directory as the Eclipse workspace that you want to test, you need to use cpptestcli with the -data option to specify your workspace. For example, this Windows command tests the C/C++test Example project by applying the "My Configuration" Test Configuration, generates a report of results, and saves that report in the the c:\reports\Report1 directory:

cpptestcli -data "c:\Documents and Settings\cynthia\ApplicationData\Parasoft\C++test\workspace" -resource "C++test Example" -config user://"My Configuration" -report c:\reports\Report1If you are in the same directory as the workspace that you want to test, you can call cpptestcli without the-data option. For example, this Windows command tests the C++test Example project by applying the My Configuration Test Configuration, generates a report of results, and saves that report in the c:\reports\Report1 directory:
cpptestcli -resource "C++test Example" -config user://"My Configuration" -report c:\reports\Report1

...

Note

The dtp.autoconfig setting does not apply to the GUI and is ignored during the import.

For details on creating options files; see Settings (Options) Files.


  • Anchor
    -property
    -property
    -property <key>=<value>
    Allows you to configure a single setting directly in the command line. Use the following format: key=value.

    You can use this option multiple times to configure several settings on the same command line. Earlier entries with the same key will be overwritten. For example:

    • -property session.tag=sa_linux -property report.dtp.publish=true -property techsupport.auto_creation=true

...