Change search
ReferencesLink to record
Permanent link

Direct link
Embedded Unit Testing Framework
Norwegian University of Science and Technology, Faculty of Information Technology, Mathematics and Electrical Engineering, Department of Computer and Information Science.
2013 (English)MasteroppgaveStudent thesis
Abstract [en]

This thesis addresses the challenges with unit testing of embedded software. Embedded software uses peripheral devices that are not available during testing, which results in higher barriers to use unit testing, compared to normal software. But even with these barriers there are no problems with unit testing of embedded software. The study looks at challenges with unit testing of Energy Micros software library, and solutions to the problems with automated testing of embedded software. Use of automated testing will reduce the number of errors when code is refactored. Use of unit testing will also make it possible to take advantage of agile methods like test-driven development. The main goals for the study is to see if CMock is suitable for generation of mock modules and if testing with mock modules can reduce the number of errors in software. Unity is a test harness that supports the needed assertions for testing of embedded software. CMock is able to automatic generate mock modules, but has a few problems with inline functions and custom types, but it is possible to solve these problems. Even with these problems CMock is able to generate mock modules that is working, and supports the testing of embedded software. An experiment was performed to see if testing of embedded software with mock modules could reduce the number of errors. The result was significant and showed that the number of errors was reduced by using mock modules, compared development without testing. Observations were also done during the experiment, which found some problems with use of mock modules during testing. The experiment was done by undergraduate students in computer science. Use of unit test and mock modules as a substitute for hardware during automated testing on a native computer, it is possible to reduce the numbers of errors and refactor code without breaking the existing functionality.

Place, publisher, year, edition, pages
Institutt for datateknikk og informasjonsvitenskap , 2013. , 123 p.
URN: urn:nbn:no:ntnu:diva-22986Local ID: ntnudaim:9749OAI: diva2:655620
Available from: 2013-10-12 Created: 2013-10-12 Last updated: 2013-10-12Bibliographically approved

Open Access in DiVA

fulltext(1944 kB)2995 downloads
File information
File name FULLTEXT01.pdfFile size 1944 kBChecksum SHA-512
Type fulltextMimetype application/pdf
cover(184 kB)20 downloads
File information
File name COVER01.pdfFile size 184 kBChecksum SHA-512
Type coverMimetype application/pdf

By organisation
Department of Computer and Information Science

Search outside of DiVA

GoogleGoogle Scholar
Total: 2995 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 111 hits
ReferencesLink to record
Permanent link

Direct link