-->
Page 1 of 1

Unit testing

PostPosted: Sun Jan 07, 2018 6:45 pm
by Zak Zag
Hi Guys,

is there any way to unit test my classes written in c++ for ESP8266 Arduino platform? I really cannot find anything related material on the internet. I thought a widely used c++ unit testing library will work, but arduino is different as it has no try-catch blocks (thus exceptions) and other disadvantages compared to standard c++ etc etc.

What i need is simple: some assertion library, structuring capabilities (suites,test cases,...) and some kind of mocking and checking whether a method was called or not.
Can anybody help?

Re: Unit testing

PostPosted: Tue Jan 09, 2018 8:12 am
by destroyedlolo
The old good way ; Serial.print() will be your friend.

Alternatively, for remote ESP without serial connectivity, I'm publishing debug message on MQTT.
Bye

Re: Unit testing

PostPosted: Sun Aug 26, 2018 1:28 pm
by Darren Humphrey
Zak Zag wrote:Hi Guys,

is there any way to unit test my classes written in c++ for ESP8266 Arduino platform? I really cannot find anything related material on the internet. I thought a widely used c++ unit testing library will work, but arduino is different as it has no try-catch blocks (thus exceptions) and other disadvantages compared to standard c++ etc etc.

What i need is simple: some assertion library, structuring capabilities (suites,test cases,...) and some kind of mocking and checking whether a method was called or not.
Can anybody help?


Did you ever find an answer to this question? My project is reaching the stage where I want to start generating some testing metrics, ideally with some coverage analysis.