This topic explains how to configure C/C++test Professional.

Sections include:

Workflow Overview

If your organization is using Parasoft DTP, we strongly recommend that you adopt the following workflow to simplify configuration and updating of preference settings across your team:

  1. Configure team-wide preferences.
    1. Configure team-wide preferences settings in the C/C++test GUI.
    2. Export the settings you configured in the GUI to a settings file.
    3. Add the exported settings to your team’s DTP.
  2. Configure C/C++test preferences on each desktop and server installation.
    1. Configure C/C++test to automatically detect the settings stored on DTP.
    2. Extend or override those settings as needed.
  3. Update team-wide preferences on DTP as needed. Changes will automatically be propagated to the connected C/C++test installations.

Configuring Team-wide Preferences

To configure team-wide settings:

  1. Choose Parasoft>Options in the IDE menu bar to open the Parasoft Preferences panel.

  2. Configure the following settings:
  3. Click the Share link in the top-level Parasoft Preferences page, specify which settings you want to export, and specify where you want to store the file that contains the exported settings.
  4. Add the exported settings to Parasoft DTP (see the 'DTP Projects' section in the DTP User Guide). 

Configuring Preferences on Each Installation

Configuring a C/C++test to Use DTP Preferences

To configure each desktop and server installation to use the preferences stored on DTP:

  1. Choose Parasoft>Options in the IDE menu bar to open the Parasoft Preferences panel.

  2. Open the DTP page.
  3. Configure connection with your DTP server (see Connecting to DTP).
  4. Click Apply.

The settings stored on DTP are automatically refreshed for your C/C++test istallation every time C/C++test is launched. To refresth the settins without restarting C/C++test:

  1. Choose Parasoft> Preferences>  DTP.
  2. Click the Configure button in the Project field.
  3. Select your DTP project in the Configure Project dialog that opens.
  4. Click Finish.
  5. Ensure the Use DTP settings option is enabled if available for a given preferences category (see Preferences Categories).

If you’re working with multiple DTP projects, you can easily switch from one project’s settings to another by choosing a different project in the Configure Project dialog.

Configuring Machine-specific Preferences

You can override team-wide preferences stored on DTP by configuring machine-specific preferences.

  1. Open the Preferences category you want to configure (see Configuring Preferences in the GUI).
  2. Ensure the Use DTP settings option is disabled (if available for the category you want to configure). If enabled, your machine-specific settings will be overridden by team-wide settings configured on DTP (see Updating Team-wide Preferences).
  3. Configure machine-specific preferences as needed.
  4. Click Apply.

Updating Team-wide Preferences

If you are using this recommended process, you can updated team-wide settings in Parasoft DTP, then those modifications will automatically be propagated to all the connected machines. 

To prevent this automated updating (e.g., because you have updated settings locally and do not want them overridden), disable Use DTP settings on the Preferences page(s) you do not want to be updated from DTP.

Configuring Preferences in the GUI

Preference Configuration Overview

To customize preferences:

  1. Choose Parasoft>Options in the IDE menu bar to open the Parasoft Preferences panel.

  2. In the left pane, select the category that represents the settings you want to configure (see Preferences Categories).
  3. Configure C/C++test preferences as needed.
  4. Click Apply to save the settings.

Preferences Categories

Parasoft (Root-Level)

Specifies general preference and allows you to export preferences to a settings file. Ignore solution and solution folder names in paths: Enables "reduced paths" mode. In this mode—where only reduced (project relative) paths are used. Names of solution and solution folders will be skipped in these paths. New paths will be unique because project names are unique inside a solution.

Authors

Maps a team member’s automatically-detected username to a different username and/or email address. See Configuring Task Assignment and Code Authorship Settings.

Configurations

Specifies the number of Test Configurations available in the Parasoft> Test History menu, the location where custom static analysis rules (user rules) are saved and searched for, and the location where user-defined Test Configurations and rules are saved and searched for.

  • Size of recently run test configurations: Determines the number of Test Configurations available in the Parasoft> Test History menu.
  • Custom directories: Indicates where user-defined Test Configurations and  custom directories (e.g., for user rules, embedded cross-compilers, etc.) are saved.

Console

Specifies settings for the Console view.

  • 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: Adds command lines and issues reported during test and analysis.
  • High: Uses full-format violation listings and also reports warnings.
  • Show console on any change: Determines whether the console is brought to the front any time its content changes.

DTP

Specifies setting for the DTP server. See Connecting to DTP.

E-mail

Specifies email settings used for report notifications and for sending files to Parasoft Technical Support. See Configuring Email Settings.
 

File Encoding

Determines the encoding for files without a BOM signature. You can choose to use the system defaults, indicate specific encoding, or automatically detect a specific Far-East language.
 


Issue Tracking Tags

Specifies custom tags that the team uses to associate a test case with an issue from an issue/feature/defect tracking system (such as Jira).  See Using Custom Defect/Issue Tracking Tags.

JDBC Drivers

Specifies JDBC drivers (for example, drivers required to connect to a database used for parameterizing tests). See Configuring JDBC Drivers.

License

Specifies license settings. See  Licensing.

Parallel Processing

Specifies parallel processing settings. See Configuring Parallel Processing.

Quality Tasks

Specifies general options related to how tasks are displayed in the Quality Tasks view. See Configuring Task Reporting Preferences.

Reports

Specifies what reports include and how they are formatted. See Configuring Report Settings.

Scope and Authorship

Specifies how C/C++test computes code authorship and assigns tasks to different team members.  See Configuring Task Assignment and Code Authorship Settings.

 Source Control

 Specifies how C/C++test connects to your source control repositories. See Connecting Source Control.

Technical Support

Specifies options for preparing support archives and sending them to Parasoft Support. See Preparing a Support Archive.

Using Variables in Preference Settings

See General Variables for information about variables that can be used in report, e-mail, Parasoft DTP, and license settings.

Exporting GUI Preferences to a Settings File

You can export C/C++test preferences from the GUI to a settings text file. This is useful if you want to:

  • Copy settings into DTP for team-wide sharing (see Workflow Overview).
  • Quickly create a settings file that you can modify for command-line testing preferences.
  • Share the preferences via source control (rather than via DTP).
  • Edit preferences in a text file rather than in the GUI.

To export preferences to a settings file:

  1. Choose Parasoft>Options in the IDE menu bar to open the Parasoft Preferences panel.

  2. Choose Parasoft (the root element in the left tree) in the Preferences dialog.
  3. Click the Share link.
  4. Specify the path to the settings file where you want to save the preferences in the File to export field or navigate to that file using the Browse button. If you select an existing file, the source control settings will be appended to that file. Otherwise, a new file will be created.
  5. Specify the preferences you want to export to export. Exported passwords will be encrypted.
  6. Click OK.

To import preferences form a settings file:

  1. Choose Parasoft>Options in the IDE menu bar to open the Parasoft Preferences panel.

  2. Select Parasoft (the root element in the left tree) in the Preferences dialog.
  3. Click the Import link.
  4. Specify the path to the settings file and the preferences you want to import.
  5. Click OK.


Specifying Solution-Level Preferences

By default, general Parasoft Preferences are common for all tested solutions/projects. To define preferences specific for a given solution:

  1. In the solution directory, create a "parasoft.properties" file.
  2. Add preference entries to that "parasoft.properties" file. Use the format described in Configuring Test Configurations.

Each time the solution is opened, the global preferences will be overridden by the ones read from the "parasoft.properties" file. After the solution is closed (or another solution is opened), global preferences will be restored.

Solution-specific preferences are read-only. If you modify any preferences in the GUI, the changes will not be reflected in the "parasoft.preferences" file automatically.


Overriding the System User Name Outside of the GUI

You can override the system user name, or example, if you are integrating the product into an automated process and do not want the resulting tasks assigned to the default system name.

  1. Go to <Install Directory>\plugins\com.parasoft.ptest.runtime.vstudio.core\parasoft.properties
  2. Add the following line to this file:
    user.name=<username>
  3. Save the file. (You may need to move the file in order to save it, due to Windows UAC).
  4. Restart Visual Studio.
  5. Reload the project solution.

Note that this configuration is the equivalent to modifying the User name setting at the top level of the Preferences UI. 

Using Preference Settings for Command-Line Execution

Using an Existing Locally-Stored Settings File

If you already have a locally-stored settings file that represents the settings you want to use for command-line execution, pass the location of the file using the -settings command line option, for example:

cpptestcli -settings my_settings_file

See Configuring Localsettings and Testing from the Command Line Interface for details.

Using the Settings Stored on DTP

To configure your C/C++test instance to use settings stored on DTP, you can do one of the following:

  • Pass the name and port of DTP, as well as the project name, using the -dtp.autoconfig command line option, for example:

    cpptestcli -dtp.autoconfig [email protected]:443
  • Enable the dtp.autoconfig option in a settings file, for example:

    dtp.enabled=true
    dtp.url=http://mydtp.mycompany.com:8080
    dtp.project=project1
    dtp.autoconfig=true

    See Configuring Localsettings for details.

Specifying Multiple Groups of Settings

To facilitate the testing process, you can specify different subsets of setting and pass them on the command line in a certain hierarchy. This allows you to simultaneously apply, for example:

  • key project settings stored on DTP
  • settings configured for all tests performed on your your particular machine
  • settings tailored to perform specific subset set of tests on your machine

Be sure to list the most general settings first and the most specific settings last. Settings are processed in the order in which they are listed and any settings that are duplicated across groups will be overridden each time a duplicate is found. Your command line may resemble the following:

cpptestcli -dtp.autoconfig project1@https://concerto.company.com:443 -settings machine_properties -settings project_properties
  • No labels