This topic explains how to create and share custom Test Configurations (and any rule files or rule mapping files that they depend on) across the team.
Sections include:
Every test run of C++test —both in the GUI or from the command line interface—is based on a test configuration that defines a test scenario and sets all related test parameters. You can perform testing with built-in test configurations shipped with C/C++test that are based a variety of popular test scenarios. Alternatively, you can create a custom test configuration by duplicating one of the built-in test configurations and modifying the duplicate, or by creating a new test configuration from scratch; see Creating a Custom Test Configuration. Test configurations that are created and stored on your DTP server can only be customized directly on DTP; see DTP Test Configurations.
For your convenience, you can configure a Favorite test configuration that you plan to use most frequently. The Favorite test configuration defines the default test scenario and can easily be run from the Parasoft menu, with the Test Using tool bar button, or from the command line interface; see Setting the Favorite Test Configuration.
Setting a test configuration as Favorite makes it easily accessible in the Parasoft menu and the toolbar in your IDE to facilitate execution of your most frequent scenarios. In addition, the Favorite test configuration defines the default test scenario for command line execution.
You can specify more than one Favorite test configuration to configure easy access to test configurations you frequently use. C/C++test assumes that the test configuration with the highest position in the Favorite hierarchy is the default for command line use and for the Run Tests toolbar button.
To specify the Favorite test configuration:
You cannot directly modify built-in test configurations shipped with C/C++test. To create a custom test configuration, duplicate an existing test configuration and modify the duplicate in the User-defined category.
Test configurations that are created and stored on your DTP server can only be customized directly on DTP.
To create a custom test configuration:
If a test configuration is "grayed out," this indicates that it was created with an incompatible C/C++test version, and cannot be edited or run with the current version. |
If you are not using DTP or Team Server to share test settings across your team, you can share custom test configurations by exporting a test configuration so that it can be imported by other team members. See Importing/Exporting Test Configurations for details. |
You can deploy test configurations across the team via DTP, a primary platform for sharing and configuring team configurations, via Team Server, or by manually exporting and then importing a test configuration.
If C/C++test is connected to DTP, you can analyze your code according to test configurations that are stored on the DTP server you have specified (see Connecting to DTP).
Test configurations that are created and stored on your DTP server can only be customized directly on DTP.
To customize a DTP test configuration:
See the Test Configurations section in the Parasoft DTP User Guide for details about adding, configuring, and managing test configurations on DTP.
Team test configurations are the test configurations that apply the team-specific test settings (for example, a selected sub-set of static analysis or custom test generation settings). Executing the same test configurations across the team allows you to consistently analyze your code and ensure that the team’s quality and style guidelines are consistently applied across the code base.
Once a team test configuration is added to Team Server, it is accessible from all connected team C/C++test installations. If the test configuration uses custom rules and/or rulemapping, they can be added to Team Server, then automatically accessed by all connected team C/C++test installations.
To share a team test configuration team-wide, the architect or manager performs the following procedure on a C/C++test installation that is already connected to Team Server:
You can configure multiple team test configurations.
Team test configurations can be directly edited in your IDE.
The settings will be updated on Team Server and shared across the team.
Alternatively, you can first update the custom test configuration your test configuration was based on, and the re-upload that test configuration to Team Server.
Consider setting your team test configuration as the Favorite test configuration; see Setting the Favorite Test Configuration. |
Rule mapping is a key part of configuring C/C++test to enforce your team’s or organization’s coding policy (for example, by customizing the built-in rule names, severities, and categories to match the ones defined in your policy).
You can use Team Server to ensure that all team members can access the rulemap.xml
file you have created to customize Parasoft’s rule categories and severity levels. For details on how to create this file, see Modifying Rule Categories, IDs, Names, and Severity Levels).
To upload a rulemap.xml
file to the Team Server:
rulemap.xml
file that you want to share.rulemap.xml
file that you created, then click Open. The rulemap.xml
file that you just uploaded will now be listed in the Browsing dialog’s Rules tab. The rule configurations specified in this file will be available on all C/C++test installations connected to Team Server.You can verify if the new rule setting are applied by in the Static tab of any test configuration.
If you later modify the master |
You can use Team Server to ensure that all team members can access and check custom static analysis rules you have designed with the RuleWizard module. When Team Server manages a rule, all C/C++test installations connected to Team Server will automatically have access to the most recent version of the rule. If rule changes and the modified rule is uploaded to Team Server, the version on all team C-C++test installations will be updated automatically.
The architect (or other designated team member) performs the following procedure on one C/C++test that is already connected to Team Server:
.rule
extension. You can save the rule in any location..rule
files that you created, then click Open. The .rule
files that you just uploaded should now be listed in the Browsing dialog’s Rules tab. All rules represented in this tab will be available on all C++test installations connected to Team Server.Ensure that the modified Test Configuration available to the team as described in Deploying Test Configurations Across the Team. You must follow this procedure even if you are modifying a Test Configuration that is already shared.
|
To remove a rule from Team Server, the architect (or another designated team member) performs the following procedure from C/C++test:
If you want to share a custom test configuration with other team members or use it in an upgraded version of C/C++test, you can export this test configuration to a .properties file that can then be imported by another team member(s).
To export a test configuration:
To import a test configuration from a .properties file:
Test Configurations – Advanced TopicsOrganizing User and Team Test Configurations into SubdirectoriesYou can organize your user and team test configurations into user-defined subdirectories. To move a user or team test configuration to a user-defined subdirectory:
Specifying Test Configuration InheritanceIf you want multiple test configurations to share some parameter settings (for example, if you want multiple test configurations to have the same rules enabled), you can create new child test configurations referring to one parent test configuration. A child test configuration will inherit the parent’s settings; the value of each preference in the parent test configuration is used whenever the corresponding preference in the child test configuration is not configured. Inheritance is recursive. For example, if MyConfig2 test configuration inherits the settings from MyConfig1 and MyConfig3 inherits the settings from MyConfig 2, then MyConfig3 will inherits some MyConfig1 settings, because it inherits MyConfig2 settings. You can create a child test configuration from a test configuration displayed in the test configuration panel, or by specifying the URL of the test configuration (if the test configurations is available via HTTP). To create a child from a test configuration displayed in the test configuration panel:
To create a child from a test configuration available via HTTP:
To disconnect a child from its parent:
Comparing Test Configurations Using the Test Configurations PanelIf you want to see the differences between two test configurations, you can compare them to highlight the differences. You may want to compare test configurations if:
To compare any two test configurations displayed in the Test Configurations panel.
To compare a child Test Configuration with its parent:
To compare a child test configuration with the corresponding test configuration in the Quick Mode:
Changes will be highlighted in the comparison editor that opens. Comparint test configurations allows you to identify both the differences that are apparent within the panel (for example, when a setting is disabled in one test configuration and enabled in the other), as well as differences on a lower lever, such as different rule parametrization. |