This lesson contains a set of exercises that cover application monitoring and runtime error detection. For details on performing application monitoring and runtime error detection in C++test, refer to the Runtime Error Detection.
In this section:
C++test can perform runtime error detection at the application level or during unit test execution. C++test’s runtime error detection performs a dynamic code analysis by applying a set of dynamic rules and reporting rule violations. It detects memory errors such as memory access errors, memory leaks, memory corruptions, and more. The instrumentation used to perform runtime error detection is lightweight and suitable for running on the target board for embedded testing.
C++test can prepare an instrumented version of the application executable and then run it. Depending on the configuration selected, C++test will report coverage statistics and/or memory errors found during the application execution.
To prepare for the following exercises, you need to have a project setup with a fresh copy of the Sensor example code available in [C++test install directory\examples\Sensor]
(use the procedure described in Tutorial - Creating a C++test Project). For details on setup for GNU/host based testing, see below.
C:\C++test\Tutorial\SensorEclipseGnu\Sensor
.Makefile
and sensor.c
to the new project directory. These files are found in [C++test install directory\examples\Sensor]
.cpptest
.C:\C++test\Tutorial\SensorEclipseGnu\workspace
).Sensor
in the Project name field.C:\C++test\Tutorial\SensorE-clipseGnu\Sensor
).When you see a dialog asking whether you want to open the associated perspective, respond according to your preferences. You can choose to work in the C/C++ perspective or the C++test perspective.