Mocking embedded hardware for software validation

Date

2016-08

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

This report makes the case for unit testing embedded systems software, a procedure traditionally found in application software development. While the challenges of developing and executing unit tests on embedded software are acknowledged, multiple solutions are presented. The GNU toolchain and a Texas Instruments microcontroller are used as an example embedded target. Two applications, one introductory and one more realistic, were developed for this embedded target using the C programming language. This report details the procedure required to apply open-source frameworks, Unity and CMock, to the two embedded applications. These frameworks, combined with the techniques outlined in this report, accomplished several goals of unit testing. The goals included automated validation of the embedded applications, increased code coverage, and protection against regression defects. In addition, it is shown how unit tests led to more modular software architecture. Potential ideas to extend this research to other tools, environments, and frameworks are also discussed.

Description

Citation