|
|
|
|
|
by jgable
2217 days ago
|
|
Hmm, sounds like you might be automating tests on the target, scripted from the PC. There's a place for this, but I'd call that automated integration/system testing, not unit testing. Unit testing was traditionally considered impractical for embedded systems, because the code is so closely tied to the hardware. However, with proper architecture and unit test frameworks that simplify your life, it's quite feasible, and indeed enjoyable. You write unit tests that exercise your embedded code, compiled for the PC, not the target. This ensures your code is portable. I use the Unity/CMock/Ceedling framework when I'm writing in C, and CppUTest when I'm writing in C++. I HIGHLY recommend the video courses taught by the guys at ThrowTheSwitch.org (the authors of Unity/CMock/Ceedling). See https://www.throwtheswitch.org/dr-surlys-school I read and enjoyed James Grenning's book, Test Driven Development for Embedded C, but it didn't really click for me until I took the video courses mentioned above. In the second course, you code an entire simple but realistic embedded project in TDD fashion. |
|