2

I am working on an embedded systems project using ACE Framework and all the development is done using eclipse IDE. I am looking for a good testing framework. Basically the project involves parsing of incoming data and I am searching for a unit testing framework which suits my project. What are my options here?

User9102d82
  • 1,172
  • 9
  • 19
  • 1
    Welcome to SO! When you place a question try to add a minimum content: input sample, expected output sample, what did you try, research and where are you stuck. So leave a question, show us your code, what did you try and your research: https://stackoverflow.com/help/how-to-ask You can also add a bounty to draw more attention to this question once you have enough reputation: https://stackoverflow.com/help/privileges/set-bounties – borchvm Jan 20 '20 at 07:19

3 Answers3

2

I recommend you try out Catch or doctest, which are quite similar.

Krzysiek Karbowiak
  • 1,655
  • 1
  • 9
  • 17
  • 1
    My team has Cath2 working on a STM32 discovery (Cortex M-4), so this is a possible choice indeed. – Bktero Jan 20 '20 at 08:51
  • Testing doctest for STM32 (m4) – Yvan Pearson Oct 19 '21 at 17:21
  • @Bktero I checked the feature list for Catch, and it doesn't mention mock support or embedded support. How does it work with STM32 in your experience -- compiling for Linux and running there, or compiling to run on the STM32 device? – CivFan Mar 28 '23 at 04:04
  • @CivFan that was a long time ago, I'm sure if I remember all this! Indeed, Catch2 doesn't have support for mock objects. It doesn't need anything special for "embedded support". From what I recall, you can do something like this: ```#define CATCH_CONFIG_RUNNER Catch::Session session; session.configData().testsOrTags.emplace_back("[some tag]"); session.run(); ``` The test results will be printed to stdout. – Bktero Apr 17 '23 at 13:15
1

Try ceedling: It is UT framework from throw the switch, from http://www.throwtheswitch.org/ceedling

0

I recommend using this light-weight unit testing framework designed for embedded software use with C++ that I created: https://github.com/Novodes/SimpleTest-EmbeddedSafety/

It was tested with ARM Compiler version 6.6.4 and 6.6. There are just two files: simpletest.cpp and simpletest.h

This is based on the SimpleTest repository I forked and adapted for embedded software. It is super easy to use and integrate into your code.

Eyal Gerber
  • 1,026
  • 10
  • 27