Change search
ReferencesLink to record
Permanent link

Direct link
Writing Testable Software: An empirical study of code quality in systems written with Test Driven Development
Mid Sweden University, Faculty of Science, Technology and Media, Department of Information Technology and Media.
2012 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

Software development can be thought of in two fairly distinct ways: on one hand, it is a scientific area in which scientific method is applied in terms of quantifiable measurements and empirical studies. On the other hand (as with many other principles) it is based on craftsmanship in which the best practices emerge with experience.TDD is one such practice, emerging from the community of software developers as a means of developing higher quality software.

This thesis aimed to study whether or not TDD actually leads to an increase in quality. This was conducted by developing a client application for a company in southern Sweden called TN Datakonsult AB. The application receives and visualizes signals from industrial processes. An API with the intent to capture this data over HTTP was developed in C#. This API was written by using TDD, while the client that consumed the API was written without tests as a control group. The code metrics that were calculated were cyclomatic complexity, lines of code, depth of inheritance, code coverage and class coupling.

The results shows that many of the benefits associated with TDD are derived from the ability to track that the application under development is behaving as expected at any given time. This is a quality aspect which is particularly difficult to measure, even though the code metrics pre-sented will assist the developer to keep track of the state of the application.

Place, publisher, year, edition, pages
2012. , 57 p.
Keyword [en]
TDD, Test Driven Development, Software Testing, Code metrics, Unit test
National Category
Software Engineering Information Systems
URN: urn:nbn:se:miun:diva-17481OAI: diva2:572938
Available from: 2012-12-03 Created: 2012-11-29 Last updated: 2012-12-03Bibliographically approved

Open Access in DiVA

fulltext(1409 kB)246 downloads
File information
File name FULLTEXT01.pdfFile size 1409 kBChecksum SHA-512
Type fulltextMimetype application/pdf

By organisation
Department of Information Technology and Media
Software EngineeringInformation Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 246 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: 212 hits
ReferencesLink to record
Permanent link

Direct link