PlatformIO Community

Build a test subdirectory instead

I’ve got a complex project and with various components that I would like to start trying out without really ramping up for true Unit Testing. This is for ESP8266 Arduino. How can I just put something like an example subdirectory then use a basic main.cpp in there with just Setup() and Loop() and build that instead of the regular production main?

What’s the simplest way to just do quick builds of smaller, minimal code examples within the same project space?

You can start from here:
https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/unity.html

A good sample as reference:
https://docs.platformio.org/en/latest/tutorials/ststm32/stm32cube_debugging_unit_testing.html#tutorial-stm32cube-debugging-unit-testing

1 Like