Embedded Unit Testing Framework

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 uni...

Full description

Bibliographic Details
Main Author: Bergersen, Erik
Format: Others
Language:English
Published: Norges teknisk-naturvitenskapelige universitet, Institutt for datateknikk og informasjonsvitenskap 2013
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:no:ntnu:diva-22986
id ndltd-UPSALLA1-oai-DiVA.org-ntnu-22986
record_format oai_dc
spelling ndltd-UPSALLA1-oai-DiVA.org-ntnu-229862013-10-13T04:36:55ZEmbedded Unit Testing FrameworkengBergersen, ErikNorges teknisk-naturvitenskapelige universitet, Institutt for datateknikk og informasjonsvitenskapInstitutt for datateknikk og informasjonsvitenskap2013This 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. Student thesisinfo:eu-repo/semantics/bachelorThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:no:ntnu:diva-22986Local ntnudaim:9749application/pdfinfo:eu-repo/semantics/openAccess
collection NDLTD
language English
format Others
sources NDLTD
description 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.
author Bergersen, Erik
spellingShingle Bergersen, Erik
Embedded Unit Testing Framework
author_facet Bergersen, Erik
author_sort Bergersen, Erik
title Embedded Unit Testing Framework
title_short Embedded Unit Testing Framework
title_full Embedded Unit Testing Framework
title_fullStr Embedded Unit Testing Framework
title_full_unstemmed Embedded Unit Testing Framework
title_sort embedded unit testing framework
publisher Norges teknisk-naturvitenskapelige universitet, Institutt for datateknikk og informasjonsvitenskap
publishDate 2013
url http://urn.kb.se/resolve?urn=urn:nbn:no:ntnu:diva-22986
work_keys_str_mv AT bergersenerik embeddedunittestingframework
_version_ 1716604531659243520