This tutorial shows how to create, manage and debug unit tests for ESP32-based projects with Visual Studio and VisualGDB.

We will create a basic “Blinking LED” project based on the ESP-IDF framework and will show how to add unit tests to each of its components and how to manage them via the Visual Studio’s test explorer. Before you begin, install VisualGDB 5.5 Preview 3 or later.

If you would like to add unit tests to an existing project, we recommend following this tutorial first to make sure the test functionality works with your setup. Once you complete this tutorial, you can apply steps starting from step #7 to add unit tests to your existing project.