This topic explains how to prepare C++test to execute your existing manually-written CppUnit test cases. Running CppUnit  test cases in C++test allows you to centralize unit testing and reporting. C++test’s reporting and authorship calculation capabilities help the team track which test cases failed, since when, and who is responsible for fixing each failure.

The team can run these tests in command-line mode each night. For instant feedback on whether their code changes broke the existing functionality, each developer can import the regression failures caused by their modifications. Since the regression failures are directed to the developers responsible for them, the overall process of fixing them is much more streamlined than it would be if all developers were looking at the same list of regression failures.

Additionally, C++test  provides test coverage information for CppUnit test cases and can also perform runtime error detection as they execute.

Sections include:

Accessing the Tests

To configure C++test to access your manually-written CppUnit test cases:

  1. Ensure that the CppUnit test case files are available within the project tree.

      2. Choose Parasoft> Test Configurations to open the Test Configurations dialog.

     3. Select the Test Configurations category that represents the user-defined Test Configuration you want to execute the CppUnit tests.

     4. Open the Execution tab.

     5. In the General subtab, modify the Test suite file search patterns setting as needed so that C++test will locate and test the CppUnit tests.

     6. Click either Apply or Close to commit the modified settings.

The  tests will be executed when you run a test using this Test Configuration.


The imported test cases must satisfy the following conditions:

Excluding Test Cases from the Build

If a given CppUnit file is not excluded from build, then:

Thus, we recommend excluding CppUnit files from the build. However, it is not required.

The procedure for excluding CppUnit files from the build depends on your project’s options source (set in the C++test Build Settings):