On the use of Test-Driven Development for Embedded Systems

Pietro Cassieri, Michelangelo Esposito, Simone Romano, Giuseppe Scanniello · Information and Software Technology · 2025

Context: Test-Driven Development ( TDD ) is an agile development approach where the writing of unit tests precedes the writing of production code. Some software engineers have been advocating the use of TDD to develop Embedded Systems ( ESs ) despite the lack of empirical evidence on TDD applied to ES development. Objectives: Our overarching objective is to start building knowledge on TDD applied to ES development. Specifically, we investigated: (i) the claimed benefits of TDD ( i.e., increased external quality of ESs and developers’ productivity) and (ii) how developers apply TDD when developing ESs. Method: We conducted two empirical investigations. The former investigation, comprising two experiments, aimed to study the claimed benefits of TDD. To that end, we asked Computer Science (CS) Master’s students to fulfill ES development tasks by using TDD or a non-TDD approach. The latter investigation consisted of an ethnographically-informed study to gain insights into how developers apply TDD when developing ESs. In this study, we involved CS Master’s students, who were observed while fulfilling an ES development task. The participants in the two empirical investigations were different. Results: We found that the external quality of the developed ESs increased when using TDD as compared to a non-TDD approach, while there was not a substantial difference in developers’ productivity. However, TDD is perceived as more difficult to apply, and the development task is deemed more challenging with TDD. Several patterns emerged about how developers approach TDD when developing an ES ( e.g., the participants did not always develop in conformity with TDD). Conclusion: TDD seems to be a promising approach to the development of ESs, even though further research is needed. In this regard, we believe that our results can pave the way for future research with the involvement of software companies and professionals.

Read the paper · More papers on PaperTik