This topic explains the general procedure for running tests from the C++test GUI.
If you want to exclude designated project resources from the test or test only a designated subset of project resources, you must indicate that before starting the test. See Testing a User-Defined Set of Resources for details.
C++test does not directly test headers unless they are included by a source file under test.
See How do I analyze header files/what files are analyzed? for details.
C++test does perform static analysis and unit testing of instantiated function templates and instantiated members of class templates.
See Support for Template Functions for details.
C++test can perform a variety of tasks, from static analysis, to unit/regression test generation and execution, to exception finding. To start using C++test to achieve your goals, you run a test based on a default or custom test scenario, which defines the precise nature and scope of C++test's analysis. These test scenarios are called "Test Configurations," and they define settings such as test scope, static analysis, test case generation, and test case execution settings.
All preconfigured Test Configurations are described in Built-in Test Configurations. The procedure for creating a custom Test Configuration is the same across the various products in the Parasoft Test family, and is described in Configuring Test Configurations and Rules for Policies.
The general procedure for testing from the GUI is as follows:
If a Test Configuration is "grayed out," this indicated that it was created with an incompatible version of C++test, and cannot be applied with the current version.
C++test will then run the test scenario defined by the selected Test Configuration.
For unit testing, we recommend that you run multiple Test Configurations in the following order:
See Generating Test Cases for Regression Testing and Exception Finding and Executing Test Cases for details.
Test progress and results summaries will be reported in the Test Progress tab that C++test opens when it starts the test. Detailed results will be reported in the Quality Tasks view, which can be opened by choosing Parasoft> Show View> Quality Tasks. Drill down to see details about the test findings.
The general procedure for reviewing results (as well as generating reports) is the same across the various products in the Parasoft Test family, and is described in the Reviewing Results.
To change test settings — such as what rules are checked, how test cases are generated, whether coverage is tracked, etc.— edit an existing Test Configuration or create a new one, then run a test using the modified/new Test Configuration. Test Configurations and all related parameters can be viewed, edited, and modified in the Test Configurations dialog. To open this dialog, choose Parasoft> Test Configurations from the menu bar.
For the general procedure for configuring Test Configurations, see the Configuring Test Configurations and Rules for Policies.
For details on Test Configuration settings available for C++test, see Configuring Test Configurations.
To test a user-defined set of resources in C++test:
If you do not want all files to be analyzed/tested (for instance, to prevent the checking of automatically generated files), you can exclude project resources from testing. To indicate which project resources should not be tested:
Choose Properties from the shortcut menu, then select the Parasoft> C++test> Scope Settings category in the left pane.
Use the available controls to indicate which specific resources you want to skip and/or exclusion patterns that specify the set of resources you want to skip.
**\Generated*.c - Excludes all C files that 1) are in any project directory and 2) have a name starting with
**\*.designer.c - Excludes all C files that 1) are in any project directory and 2) have
designer.c as the final part of the name.
biz\Test*.c - Excludes all C files that 1) are in the biz directory and 2) have a name starting with
Test. It will not exclude such files if they are located in subdirectories of
biz\**\Test*.c - Excludes all C files that 1) are in the
biz directory and its subdirectories and 2) have a name starting with
4. Click OK or Apply.
If you share your project via source control, these preferences will be shared across the team (preferences are saved in the
.parasoft project definition file).