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?

1
  • 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: stackoverflow.com/help/how-to-ask You can also add a bounty to draw more attention to this question once you have enough reputation: stackoverflow.com/help/privileges/set-bounties Commented Jan 20, 2020 at 7:19

3 Answers 3

2

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

Sign up to request clarification or add additional context in comments.

4 Comments

My team has Cath2 working on a STM32 discovery (Cortex M-4), so this is a possible choice indeed.
Testing doctest for STM32 (m4)
@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 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.
1

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

3 Comments

More general thing.
According to its website, ceedling doesn't support C++
@volpato, yes, it supports C.
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.