11 years, 2 months ago.

How to unit test mbed

I have been trying to compile unit tests for a mbed project and I'm not having any success. It's giving me a terrible head-ache and I have no idea where to go.

I have tried two ways. One way is compiling for the mbed and including googleTest and the other is compiling for my Linux system and including the mbed stuff.

I however haven't had any success so my progress is irrelevant.

I really want to use proper unit tests so any tips on getting this or any other unit tests working would be great.

1 Answer

11 years, 2 months ago.

Look here http://developer.mbed.org/users/PrzemekWirkus/notebook/mbed-sdk---cpputest-usage/

and some test here, on github https://github.com/mbedmicro/mbed/tree/master/libraries/tests/utest

That guide only explains how to setup a project which supposedly supports unit testing. It has been very usefull, but I'm still searching how to actually run Unit Tests now.

posted by Software Bob 20 Jan 2015

if in the online IDE, add CppUtest (its on mbed available), write your unit test, compile, and flash it with the binary. There's also a guide , I think written by Rohit , use search functionality here to find it. that should help you

posted by Martin Kojtal 20 Jan 2015