Page 1 of 1

Unity Unit Testing of Hardware (with CMock)

Posted: Wed May 15, 2019 2:51 pm
by plajjd
I am using the Unity unit test framework in the IDF, and would like to provide fake data from hardware ports. (UART, SPI, GPIO, ADC, etc)

Does any one have suggestions on how to write unit tests for functions that access ESP32 hardware?

Has anyone used CMock, and have advice or opinions about it?

Thanks!

Phil.

Re: Unity Unit Testing of Hardware (with CMock)

Posted: Sun Oct 20, 2019 6:27 pm
by alejo9118
Hi.
Here is a simple example that can be useful for what you want.
https://gitlab.com/deltalejo/esp32-unity-fff-demo