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. |
You can deploy test configurations across the team via DTP, a primary platform for sharing and configuring team configurations, 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.
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. |