Test-Driven Development of Embedded Software

Jeroen Boydens, Piet Cordemans, Eric Steegmans · Lirias · 2010

Software in embedded systems plays an essential role. Principles of Test-Driven Development can be applied to increase quality of source code. TDD promotes the creation of code driven by automated tests. TDD exists for many years in general software development. This paper focuses on the migration of TDD to embedded system development. However, embedded systems do not lend themselves towards test automation. There are a number of obstacles when applying TDD on embedded systems. Amongst others is the strong hardware dependency of software, or even hardware that is missing at software development launch time. The paper shows that programming to an interface, instead of to a concrete class itself, isolates the software from the hardware. Then virtual drivers, which mock the behavior of real hardware drivers, can be implemented to test business logic behavior. Another option is to include a test wrapper on the embedded system. Based on existing measurements of advantages of TDD in general software development, the paper experiences comparable when applying the TDD methodology to embedded system design. Not only decreases the number of software bugs, furthermore the project's life cycle shortens.

Read the paper · More papers on PaperTik