Versions Compared

Key

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

...

  • To access the full functionality available with the Server Edition, you also need to install and configure Parasoft Team Server. 
  • We strongly recommend that you configure C++test preferences (for Team Server, task assignment, reporting, etc.) and team Test Configurations as described in the Configuration before you start testing.
  • For command line execution, you will need to ensure that the installation directory is on the path, or launch cpptest with the full path to the executable (for example, c:\parasoft\c++test\cpptestcli.exe).


    Conditional Content
    IDE: (VS)
    IDE: (VS)
    sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

    Before you can test code with C++test, it must be added to a Visual Studio project. See Creating a Project.

  • Before you perform the initial test, we strongly recommend that you review and modify project options. For details on how to do this, see Local Settings (Options) Files.
  • For cpptestcli to email each developer a report that contains only the errors/results related to his or her work, one of the following conditions must be true:

    • You have configured C++test to compute code authorship based on source control data AND your project is under a supported source control system AND each developer’s source control username + the mail domain (specified using an options file and the -localsettings option described in -localsettings %LOCALSETTINGS_FILE%) matches the developer’s email address.

    • You have configured C++test to compute code authorship based on local user AND each user name + the mail domain (specified using an options file and the -localsettings option described in -localsettings %LOCALSETTINGS_FILE%) matches the developer’s email address.

...

CLI mode is typically used to perform regular or continuous code analysis and test in conjunction with regular/continuous builds or as a part of an automatic regression test infrastructure. C++test CLI can be invoked


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

on a full Visual Studio solution, or one or more projects or source files that are part of a solution.

As part of the CLI execution, C++test can perform one or more of the following:

...

For example, a sample command line to be added might be:


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41
  • cpptestcli -solution "c:\MySolution" -resource "ProjectToTest" -config builtin://ShouldHaveRules -publishteamserver -localsettings acme_policy.settings

The reports will be sent after each batch run, and trend reports will be populated with data. The reports will also be available for viewing via Parasoft> Explore> Team Server Reports.

...


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41
  • -useenv - Causes the IDE to use PATH, INCLUDE, and LIB environment variables for Visual C++ compilation rather than the settings specified in the VC++ Directories section of the Projects options (in the Options dialog box).
  • -clearcmc - Cleans Visual Studio's Component Model Cache
Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

Options for Testing Projects Available in the Visual Studio IDE

OptionPurposeNotes
Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

-solution %SOLUTION_FILE%

Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

-solution %SOLUTION_FILE%Specifies the location of the solution file to use.

Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

Specifies the location of the solution file to use.

Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

Specifies the location of the solution file to use.

Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

N/A

Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

N/ASpecifies the location of the solution file to use.

-resource %RESOURCE%

Specifies the path to the workspace resource %RESOURCE% to test.

Use multiple times to specify multiple resources.

Use quotes when the resource path contains spaces or other non-alphanumeric characters.

If %RESOURCE% is a .properties file, the value corresponding to com.parasoft.xtest.checkers.resources will be interpreted as a colon(:)-separated list of resources. Only one properties file can be specified in this way. If %RESOURCE% is a .lst file, each line will be treated as a resource. If no resources are specified on the command line, the complete workspace will be tested.


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

For example, to test the ATM.cxx file in the C++test ATM example, you could use -resource "ATM/Source Files/ATM.cxx" (without the solution name)

or

-resource "Examples/Source Files/ATM.cxx" (with the solution name)

Other Examples:

-resource "MySolution/MyProject"

-resource "MySolution/MyProject/Source Files"

-resource "MySolution/MyProject/SourceFiles/MyClass.cpp"

-resource "c:\testedprojects.properties"

Note
titleNotes
  • To see a list of valid command line options, enter for cpptestcli -help.
  • cpptestcli automatically emails designated group managers and architects a report that lists all team/project errors and identifies which developer is responsible for each error. If no errors are reported, reports will be sent unless the options file contains the report.mail.on.error.only=true option.
  • If the appropriate prerequisites are met, cpptestcli automatically emails each developer a report that contains only the errors/results related to his or her work. If no errors are reported for a particular developer, a report will not be emailed to that developer.

...

  • Reporting Settings
  • Parasoft DTP Settings
  • Project Center Settings
  • Team Server Settings
  • Licensing Settings
  • Technical Support Settings
  • Authorship/Scope Settings
  • Source Control Settings


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41
  • File Encoding Settings
  • Miscellaneous Settings
Note
titleNotes
  • Each setting should be entered on a single line.
  • If your options file contains any invalid settings, details will be reported in the command line output.
  • If your are running cli mode from a developer/tester desktop (as opposed to from a Server machine), use the tasks.clear=false option to ensure that your results from previous runs are preserved.

...

  • The repository(n).vss.ssdir property should contain a UNC value even if the repository database resides locally.
  • Be aware of VSS Naming Syntax, Conventions and Limitations. Any character can be used for names or labels, except the following:
    • Dollar sign ($)
    • At sign (@)
    • Angle brackets (< >), brackets ([ ]), braces ({ }), and parentheses (( ))
    • Colon (:) and semicolon (;)
    • Equal sign (=)
    • Caret sign (^)
    • Exclamation point (!)
    • Percent sign (%)
    • Question mark (?)
    • Comma (,)
    • Quotation mark (single or double) (' ")
  • VSS 6.0 (build 8163), which is deployed with Visual Studio 6, does not work properly with projects whose names start with a dot (.) symbol. If such a project name is used, subprojects cannot be added.
  • Do not use custom working directories for sub-projects (example: Project $/SomeProject has the working directory C:\TEMP\VSS\SomeProject and its subproject $/SomeProject/SomeSubProject has the working directory D:\SomeSubProject).


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

File Encoding Settings

Setting
Purpose
fileencoding.mode=default|user|auto

Defines how file encoding is calculated.

default specifies that you want to use system properties.

user indicates that you will explicitly specify the encoding name (using the setting below).

auto enables automatic detection of encoding for the Far-East language specified with fileencoding.autolanguage

fileencoding.user-encoding=<name_of_encoding>

If fileencoding.mode is set to user, this specifies the encoding name Valid names are ASCII-US, UTF-8, UTF-16, UTF-16LE, UTF-16BE or java.nio canonical name.

It should be specified in form parasoft-dotNET-[codepagenumber]

fileencoding.auto-language=<language’s numeric_code>

If fileencoding.mode is set to auto, this specifies the language’s numeric code. Valid codes are:

  • JAPANESE = 1
  • CHINESE = 2
  • SIMPLIFIED CHINESE = 3
  • TRADITIONAL CHINESE = 4
  • KOREAN = 5

Miscellaneous Settings

Setting
Purpose
report.rules=[url_path_to_rules_directory]

Specifies the directory for rules html files (generated by clicking the Printable Docs button in the Test Configuration’s Static Analysis tab).

For example:

report.rules=file:///C:/Temp/Burt/parasoft/xtest/gendoc/

report.rules=../gendoc/

The default setting is none.

tasks.clear=true|false

Clears existing tasks upon startup in cli mode. This prevents excessive time being spent "loading existing results."

The default is true.

console.verbosity.level=low|normal|high

Specifies the verbosity level for the Console view. Available settings are:

low: Configures the Console view to show errors and basic information about the current step’s name and
status (done, failed, up-to-date).

normal: Also shows command lines and issues reported during test and analysis.

high: Also shows warnings.

cpptest.custom.rules.dir=[directory]

Indicates where user-defined rules are saved.

cpptest.custom.configs.dir=[directory]

Indicates where user-defined Test Configurations are saved.

custom.compilers.dir=[directory]

Overrides the custom compiler directory settings (found in Parasoft> Configurations> Custom compilers) and uses the defined directory to search for custom compilers

parallel.mode=Manual|Auto|Disabled

Determines which of the following modes is active:

  • Auto: Allows Parasoft Test to control parallel processing settings.
  • Manual: Allows you to manually configure parallel processing settings to suit your specific needs.
  • Disabled: Configures Parasoft Test to use only one of the available CPUs.

For more details on this and other parallel processing options, see Configuring Parallel Processing.

parallel.max_threads=<number>

Specifies the maximum number of parallel threads that can be executed simultaneously. The actual number of parallel threads is determined by the number of CPUs, available memory, and license settings.

parallel.free_memory_limit=<percentage>

Specifies the amount of memory that should be kept free in low memory conditions (expressed as a percentage of the total memory available for the application). This is used to ensure that free memory is available for other processes.

parallel.no_memory_limit=true|false

Indicates that you do not want to place any restrictions (beyond existing system limitations) on the memory available to C++test

...

example: ${workspace_name}

Outputs 


Conditional Content
IDE: (VS)
IDE: (VS)
sv-attr:0A0102040159A975064F0FA35093CF150A0102040159A9821F79B94259645A41

the Solution name.


config_name

$ example: ${config_name}

...