This topic helps you troubleshoot problems you might experience with C/C++test.
You cancustomize the amount of allocated memory with the CPPTEST_ENGINE_EXTRA_ARGS option by specifying the value of the -Xmx
setting. This may be particularly useful for when you perform static analysis or report results to DTP. See Configuring Advanced Options for details.
C++test analyzes C/C++ source files directly and header files indirectly. Based on the current selection, C++test will analyze all C/C++ source files and report violations for all source and header files from the selection (only for header files included by the source files).
For example:
When generating a report, specify a report configuration file that contains the following entry:
results.report.active_rules=true
Choose Parasoft> Preferences, select Console, then select the desired verbosity level (High, Normal, Low).
High Verbosity | Normal Verbosity | Low Verbosity | |
---|---|---|---|
Basic info about the current step’s name and status (done, failed, up-to-date) | Yes | Yes | Yes |
Errors | Yes | Yes | Yes |
Warnings | Yes | No | No |
Command Lines | Yes | Yes | No |
Violations printed out during static analysis and unit testing execution | Yes, full-format | Yes, short-format | No |
See Migrating test assets from C++test 6.x.
C++test cannot generate test cases when project caching is enabled in Visual Studio 2017. To ensure that test cases can be generated, disable project caching:
To ensure that all Parasoft options are working in the Solution Explorer context menu, the following Visual Studio Workloads must be installed with your Visual Studio 2017 or later:
In Visual Studio 2017 and 2019, performance management monitors and manages extensions that can affect startup time. As a result, a pop-up alert may appear when Parasoft Plugin is installed to indicate that Visual Studio startup time has increased. You can click the 'Manage performance' link in the pop-up window to review the startup times and disable displaying the alert.
Visual Studio may mark correct code elements in test suites with a red underline to indicate potential errors when IntelliSense, Visual Studio's native code completion, is unable to recognize C/C++test-specific syntax. To prevent this, you can do one of the following:
Wrap the code in your test suite (s) with the following directives:
#ifndef __INTELLISENSE__ //this code block will not be analyzed by IntelliSense #endif |
Installing or updating extensions or other Visual Studio components may corrupt Visual Studio's Component Model Cache, which can prevent C++test from launching. To clear the Component Model Cache, try to run cpptestcli
with the -clearcmc
option.
To ensure the analysis completes, you can do one of the following:
cpptest.analyzer.source.timeout=<TIMEOUT_IN_SECONDS>
.
Suppressions associated with rules whose messages changed between releases may not be available on DTP and the rules must be re-suppressed.
You can restore legacy messages for BD category rules in version 10.4.1 and later by configuring the following advanced option (see Configuring Advanced Options):
CPPTEST_ENGINE_EXTRA_ARGS="-property flowanalysis.legacy.messages.for.<rule_ID>=true"
For example:
CPPTEST_ENGINE_EXTRA_ARGS="-property flowanalysis.legacy.messages.for.BD.PB.ARRAY=true -property flowanalysis.legacy.messages.for.BD.PB.ZERO=true" |
To successfully restore the legacy messages, ensure that you remove the .cpptest folder that contains the local C/C++test cache data from following location: <workspace_location>/.cpptest/.dtpengine/.cpptes
t.
Reports generated by Parasoft products require a sans-serif font to be available in your environment. If your report fails to correctly display some characters, such as national characters, ensure that a sans-serif font is installed on your system.
See Preparing a Support Archive.