Parasoft C/C++ Test helps teams write better code, conduct more effective testing, and continuously monitor to achieve quality goals. C/C ++ Test can perform static analysis, comprehensive code review, runtime error detection, and integrate coverage analysis in both unit and component tests. This can be done automatically on the development desktop at the beginning of the development cycle.

C/C++ tests cannot start.

When CppTest is started, it often hangs and fails to start. The loading process stops while loading some SVN or Mylyn related plug-ins. You must uninstall and reinstall the software to use it again.

The first thing to know in this case is:

  • Is the host Windows or Linux

  • The exact version of C/C++ Test you are running (Help menu →About… →Press C/C++ Test Gear Icon →Press C/C++ Test Gear Icon

  • Standalone C/C++ tests or Eclipse plug-ins

The test failure to start problem mentioned above is most likely related to the “Deadlock on Startup” bug in the Eclipse IDE, which causes a workspace to be opened multiple times and then suspended after startup on some Linux systems. In general, the solution can be as follows:

  • Start the C/C++ test GUI (cppTest executable) with the “-clean” option. This should restore the workspace from the “hang” state. This process may need to be applied several times.
  • Upgrading the Eclipse Platform shipped with the C/C ++ test to version 4.6.2+ Suggests that Option 1 be the preferred option and option 2 be the permanent solution once the problem is identified.

OutOfMemoryError: Java heap space or GC overhead.

When running a product based on a Parasoft Test, you may see an error:

  • Java. Lang. OutOfMemoryError: Java heap space problem

  • An internal error occurred during: “Building Workspace”. GC overhead limit exceeded

This error occurs when Java is out of memory.

There are two solutions:

  • It is recommended to reduce the amount of memory used by software. Because it usually involves applying best practices.
  • Increase the amount of memory available to the software, as described below.

Allocate more memory for the JVM: In some cases, when dealing with large test suites or complex scenarios, you may need to increase the default amount of memory allocated to the JVM running SOAtest/LoadTest/Virtualize.

The 32-bit version uses 896MB by default. The 64-bit version uses 1792MB by default – 896MB if using SOAtest less than 9.4. To increase the maximum heap size, pass the -j-xmx argument to the executable. For example, “CPPtest -j-XMx1400M” starts C/C ++ testing and sets the maximum heap size to 1400MB. Tip:

  • Other JVM parameters can be configured in a similar manner. When passed to the executable, each JVM argument must be prefixed with “-j”.
  • Multiple JVM parameters can be passed with each parameter prefixed with “-j”. For example, “soatest-J-XMX1400m-J-xMS1024m” sets the maximum heap size to 1400MB and the start heap size to 1024MB.

ERROR: Process cannot be started or access denied.

When running C ++ Desktop, you need to ensure that C ++ Test can execute the compiler. If you do not set it correctly, you will see the following message:

Error during process execution: process cannot be started: “C: \ GCC” “-ic: \ Apps \ Parasoft \ C ++ test \ 10.3 \ engine \ Runtime \ include” -i. -dparasoft_cpptest -v -e -dm-ffreestanding -xc “C: \ Users \ ANDREY~1.MAD \ AppData \ Local \ Temp \ ParaSoft.25452.41.c “-o” c: \ Users \ ANDREY~1.MAD \ AppData \ Local \ Temp \ ParaSoft.25452.18467.c “Access denied.

The problem here is that C: \ GCC does not exist. But where would I change it? The answer is in the Parasoft project Settings:

  • Right-click on the project and go to Parasoft-> C ++ Test-> Build Settings

  • You will then see that you need to browse to the compiler, or if the compiler executable is on PATH, just specify the executable:

Using the Cygwin environment is just an extra note, in Cygwin, ‘GCC’ and ‘g ++’ can be Unix-style symbolic links to actual compilers. Exe files. However, C ++ tests must run the compiler using regular Windows process apis. Windows won’t understand the Unix-style SYm-Links Cygwin uses. Therefore, when using Cygwin, you should use the actual.exe name of the compiler in Build Settings.

To learn more about Parasoft C/C++ tests, click here