3

Are there some guidelines/tips or specific frameworks/solutions for creating a test environment for a real-time system consisting of multiple asynchronous threads running simultaneously? Specifically, the system runs on a periodic clock, contains several threads communicating with each other via message-passing, contains real-time logging and tracing and has deterministic, but complex (and variable) execution states.

Thoughts?

bobsaccamano
  • 141
  • 6
  • 1
    Assuming that you're testing the code at a module level (file, class, small set of functions, whatever), the fact that it's an embedded system doesn't matter. Get a test framework that runs on either your target hardware (using e.g. a UART for terminal output) or on a target simulator that runs on a PC (presumably again with some idea of terminal output). Some frameworks are listed here: http://stackoverflow.com/questions/65820/unit-testing-c-code?rq=1 or http://stackoverflow.com/questions/1572601/testing-code-for-embedded-application?rq=1 – Ross Jun 04 '13 at 21:58
  • Let me clarify what I meant by module: I was referring to a collection of asynchronous threads running simultaneously. These loosely correspond to an OSI Layer[1]. So my test environment needs to consist, at the minimum, of a test process with its own stack, msg handler and timing mechanism. I shall edit the original question to reflect this (minimum) requirement. [1]: http://en.wikipedia.org/wiki/OSI_model – bobsaccamano Oct 10 '13 at 14:41

1 Answers1

1

I'm reading the book <Test-Driven Development for Embedded C> written by James W.Grenning.
I haven't finished reading it, so I can't be totally sure how much it will help. But I think it gives good guidelines and tips so far.
It gives examples showing how to make test automate for embedded software development, including automated or partially automated hardware tests. This is what attract me to read it.
By the way, in this book, it uses Unity and CppUTest as the Unit Test Harness.

hailang
  • 11
  • 3