In English

Improving Unit Testing Practices With the Use of Gamification

Davíð Arnarsson ; Ívar Húni Jóhannesson
Göteborg : Chalmers tekniska högskola, 2015. 94 s.
[Examensarbete på avancerad nivå]

Background Testing in software development is important. Unit testing is one technique developers use to catch potential bugs and combat regressions. However, unit testing is often considered to be an arduous task, and as such, developers might avoid unit testing their code. Gamification is a concept that has been defined as the use of game elements in a non-game context. The concept has been demonstrated to have a positive effect on unit testing in an experimental context but hasn’t been observed in industry until recently. Aim This study employs gamification as a means for motivating developers to write more and better unit tests. By analyzing both static and dynamic qualities of unit tests and feeding the results into our gamification tool, G-Unit, we aim to score developers based on their unit testing efforts. Method This study applies design science research, based on work by Wieringa. The study consisted of 3 iterations and each iteration consists of 5 phases of the regulative cycle. The data was collected by using surveys, interviews and by mining the artifact’s SQL database. Results No ethical issues arose during the study, the developers felt that the G-Unit tool motivated them to write more and better tests and were able to learn about important software testing metrics and concepts. The largest design problem was the continuous balancing of the gamification system while the largest technical challenge was the implementation of test smell detection. Contributions The study was a successful in its task of motivating the developers at the participating company to write more and better unit tests. Gamification had a positive effect on the developers work.

Nyckelord: Gamification, Unit-testing, motivation, testing, ethics, design science research.

Publikationen registrerades 2015-08-12. Den ändrades senast 2015-08-12

CPL ID: 220555

Detta är en tjänst från Chalmers bibliotek