Change search
ReferencesLink to record
Permanent link

Direct link
Dependency Injection and Mock on Software and Testing
Uppsala University, Disciplinary Domain of Humanities and Social Sciences, Faculty of Social Sciences, Department of Informatics and Media, Information Systems.
2014 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Abstract [en]

Software testing has been integrated within software development life cycle due to its importance in assuring software quality, software safety, and customers' satisfaction. However, problems in software testing are prominent among software developers as system grows in size and complexity. Dependency injection becomes an appealing solution for developers with its practicality to improve software design, improve testability, and enable mock testing technique. The study aims to discover the extent to which the dependency injection facilitates software design and software testing. In addition, the effect of mock practice on testing is also assessed.

Metrics for investigation are defined and measured on various aspects of two systems. The two systems are selected and developed based on the same user requirements, development technologies, and methodologies. By comparing the two systems against the investigated metrics, we aim to reveal whether the dependency injection improve the code design. Then four test suites from both systems are evaluated in relation to testability.

The results demonstrate that the dependency injection does not seem to improve the code design if comparing on the selected metrics. Even though it does not score better, its effect is evident in other software aspects. The testability of the two systems is similar and suffers from the same problem. Meanwhile, mock helps assist software testing and improve testability. The effect of mock technique can be witnessed, especially when it is applied with other test techniques. Explanations and discussions on these findings are addressed in the paper.

Place, publisher, year, edition, pages
2014. , 96 p.
Keyword [en]
dependency injection, mock, software testing, testability, software metrics
National Category
Information Systems, Social aspects
URN: urn:nbn:se:uu:diva-226214OAI: diva2:726176
Subject / course
Information Systems
Educational program
Master programme in Information Systems
2014-06-04, H325, Ekonomikum, 15:15 (English)
Available from: 2014-07-30 Created: 2014-06-13 Last updated: 2014-07-30Bibliographically approved

Open Access in DiVA

Mengkeang_Veng-Depdendency_Injection_and_Mock_on_Software_and_Testing(2362 kB)252 downloads
File information
File name FULLTEXT01.pdfFile size 2362 kBChecksum SHA-512
Type fulltextMimetype application/pdf

By organisation
Information Systems
Information Systems, Social aspects

Search outside of DiVA

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

Direct link