How To Install cpputest on Debian 10

Learn how to install cpputest on Debian 10 with this tutorial. cpputest is C/C++ based unit test framework ?? main package

Introduction

In this tutorial we learn how to install cpputest on Debian 10.

What is cpputest

cpputest is:

CppUTest is a C/C++ based unit xUnit test framework for unit testing and for test-driving your code. It is written in C++ but is used in C and C++ projects and frequently used in embedded systems.

CppUTest has a couple design principles:

  • Simple to use and small
  • Portable to old and new platforms

CppUTest also has support for building mocks and can be used by practitioners of Test Driven Development.

This is the main package. It contains some examples, support scripts and depends on libcpputest-dev which provides the test framework itself.

There are three methods to install cpputest on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install cpputest Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install cpputest using apt-get by running the following command:

sudo apt-get -y install cpputest

Install cpputest Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install cpputest using apt by running the following command:

sudo apt -y install cpputest

Install cpputest Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install cpputest using aptitude by running the following command:

sudo aptitude -y install cpputest

How To Uninstall cpputest on Debian 10

To uninstall only the cpputest package we can use the following command:

sudo apt-get remove cpputest

Uninstall cpputest And Its Dependencies

To uninstall cpputest and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove cpputest

Remove cpputest Configurations and Data

To remove cpputest configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge cpputest

Remove cpputest configuration, data, and all of its dependencies

We can use the following command to remove cpputest configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge cpputest

Dependencies

cpputest have the following dependencies:

References

Summary

In this tutorial we learn how to install cpputest package on Debian 10 using different package management tools: apt, apt-get and aptitude.