This topic explains the general procedure for running tests from the C/C++test Professional 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/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/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/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/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/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. You can create a custom test configruation; see 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/C++test, and cannot be applied with the current version.
C/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/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.
See Reviewing Results for details about the procedure for 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.
See the Configuring Test Configurations and Rules for Policies for details about configuring test configurations.
To test a user-defined set of resources in C/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).