Exploring Approaches for Unit Testing with the Yocto SDK

Yocto Project provides open source tools to help developers create custom Linux distributions, especially for embedded use. Hardware support is widely available from large chip vendors, and one could say that Yocto is currently the de-facto standard for creating embedded Linux ditributions. Yocto also provides a well-defined workflow for application development. However, despite its wide adoption and populatity, it seems to fall somewhat short in the are of unit testing.

Continue reading “Exploring Approaches for Unit Testing with the Yocto SDK”

C++ tips for easier unit testing

A while back I read the Working Effectively with Legacy Code by Michael C. Feathers. The book focuses on strategies and approaches to get existing untested legacy code covered by unit tests.

The book also includes more than twenty dependency-breaking techniques that can be used for new code as well to make it easily testable in the first place. Here I have picked three of the techniques that I have personally found most useful.

  • Interfaces to abstract implementation
  • Extract and override call
  • Expose static method

Continue reading “C++ tips for easier unit testing”

Automated Robot Framework tests for embedded Linux devices

When working with embedded systems, the software is only a part of the whole product or device. Usually there is also customized hardware involved, and some parts of the software are very low-level and hardware dependent. With embedded Linux most parts of the software can quite easily be covered by unit testing on a Linux host. Yet, there are always some parts which need to be tested with the actual physical hardware. Using the right tools this testing can also be automated.

Continue reading “Automated Robot Framework tests for embedded Linux devices”